handsontable 15.0.0-next-fdd4480-20241205 → 15.0.0-next-c7f1716-20241209

Sign up to get free protection for your applications and to get access to all the features.
@@ -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: 15.0.0-next-fdd4480-20241205
29
- * Release date: 11/12/2024 (built at 05/12/2024 10:05:38)
28
+ * Version: 15.0.0-next-c7f1716-20241209
29
+ * Release date: 11/12/2024 (built at 09/12/2024 14:36:56)
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={88088:()=>{},53879:(e,t,r)=>{"use strict";r.d(t,{iz:()=>lt,Ay:()=>ah});var n,s,i={};r.r(i),r.d(i,{AbsPlugin:()=>Xi,AddressPlugin:()=>$i,ArrayPlugin:()=>Ki,BitShiftPlugin:()=>qi,BitwiseLogicOperationsPlugin:()=>eo,BooleanPlugin:()=>to,CharPlugin:()=>ro,CodePlugin:()=>no,ComplexPlugin:()=>jl,ConditionalAggregationPlugin:()=>ua,CountBlankPlugin:()=>so,CountUniquePlugin:()=>io,DateTimePlugin:()=>oo,DegreesPlugin:()=>co,DeltaPlugin:()=>po,ExpPlugin:()=>go,FinancialPlugin:()=>fo,FormulaTextPlugin:()=>vo,HyperlinkPlugin:()=>Ro,InformationPlugin:()=>So,IsEvenPlugin:()=>To,IsOddPlugin:()=>No,LogarithmPlugin:()=>Mo,LookupPlugin:()=>fa,MathConstantsPlugin:()=>bo,MathPlugin:()=>Bl,MatrixPlugin:()=>Io,MedianPlugin:()=>xo,ModuloPlugin:()=>Po,NumericAggregationPlugin:()=>ko,PowerPlugin:()=>Uo,RadiansPlugin:()=>Vo,RadixConversionPlugin:()=>Wo,RandomPlugin:()=>Xo,RomanPlugin:()=>ma,RoundingPlugin:()=>Zo,SimpleArithmerticPlugin:()=>wa,SqrtPlugin:()=>Jo,StatisticalAggregationPlugin:()=>nh,StatisticalPlugin:()=>Vl,SumprodPlugin:()=>ca,TextPlugin:()=>da,TrigonometryPlugin:()=>pa}),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),_r(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(br(t))return;const r=P(t.col);return`${this.type===n.ABSOLUTE?"$":""}${r}`}exceedsSheetSizeLimits(e){return this.col>=e}}
32
32
  /**
@@ -1113,9 +1113,9 @@ const F=y(),U=p(),V=(e=>({loadLanguagesInNode:t=>E(t,e)}))($),B=d();let W=(e=>({
1113
1113
  Consider limiting the number of rendered columns by specifying the table width and/or\x20
1114
1114
  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.getWidth(e);this.rootNode.childNodes[r+t].style.width=`${n}px`}const r=this.rootNode.firstChild;r&&(0,a.addClass)(r,"rowHeader")}}t.default=h},75396:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=r(62577),i=n(r(41608)),o=r(71120);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},36936:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(59376));t.RowHeadersRenderer=s.default;var i=n(r(75396));t.ColumnHeadersRenderer=i.default;var o=n(r(16951));t.ColGroupRenderer=o.default;var a=n(r(98575));t.RowsRenderer=a.default;var l=n(r(62861));t.CellsRenderer=l.default;var h=n(r(85604));t.TableRenderer=h.default;t.Renderer=class{constructor(){let{TABLE:e,THEAD:t,COLGROUP:r,TBODY:n,rowUtils:u,columnUtils:c,cellRenderer:d,stylesHandler:p}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderer=new h.default(e,{cellRenderer:d,stylesHandler:p}),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(u,c)}setActiveOverlayName(e){return this.renderer.setActiveOverlayName(e),this}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()}}},59376:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707)),i=r(97646),o=n(r(41608)),a=r(62577),l=r(71120);class h 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 h=this.obtainOrderView(o),u=s.obtainOrderView(o);h.appendView(u).setSize(r).setOffset(this.table.renderedColumnToSource(0)).start();for(let n=0;n<r;n++){h.render();const r=h.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)}h.end()}}}t.default=h},98575:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707)),i=n(r(41608)),o=r(14859),a=r(21595),l=r(97646),h=r(62577),u=r(71120);const c="ht__row_even",d="ht__row_odd";let p=!1;class g 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;!p&&e>1e3&&(p=!0,(0,o.warn)(a.toSingleLine`Performance tip: Handsontable rendered more than 1000 visible rows.\x20
1115
1115
  Consider limiting the number of rendered rows by specifying the table height and/or\x20
1116
- turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&(0,h.setAttribute)(this.rootNode,[(0,u.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,h.setAttribute)(e,[(0,u.A11Y_ROW)(),(0,u.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)]);(0,h.removeClass)(e,[c,d]),(s+1)%2==0?(0,h.addClass)(e,c):(0,h.addClass)(e,d)}this.orderView.end()}}t.default=g},85604:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707));t.default=class{constructor(e){let{cellRenderer:t,stylesHandler:r}=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),(0,s.default)(this,"activeOverlayName",void 0),(0,s.default)(this,"stylesHandler",void 0),this.rootNode=e,this.rootDocument=this.rootNode.ownerDocument,this.cellRenderer=t,this.stylesHandler=r}setActiveOverlayName(e){this.activeOverlayName=e}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),n=this.rowUtils;if(e.firstChild){const t=this.renderedRowToSource(r),s=n.getHeightByOverlayName(t,this.activeOverlayName),i=this.stylesHandler.areCellsBorderBox()?0:1;e.firstChild.style.height=s?s-i+"px":""}}}}},15401:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834);var s=n(r(85707)),i=r(62577),o=r(25499);function a(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 l(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var h=new WeakSet;function u(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 h=Math.abs((0,i.getScrollLeft)(a,a));if(l>h){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-h>=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 h=n.getColumnHeaderHeight();for(let n=1;n<=s;n++)if(h+=t.sumCellSizes(n-1,n),a.top+h-l>=r){e=n-2;break}}}return e}t.default=class{constructor(e){a(this,h),(0,s.default)(this,"dataAccessObject",void 0),this.dataAccessObject=e}scrollViewport(e,t,r){if(e.col<0||e.row<0)return!1;const n=this.scrollViewportHorizontally(e.col,t),s=this.scrollViewportVertically(e.row,r);return n||s}scrollViewportHorizontally(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto";const{drawn:r,totalColumns:n}=this.dataAccessObject;if(!r)return!1;const s=(0,o.createObjectPropListener)(t);if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollHorizontally",e,s),!Number.isInteger(e)||e<0||e>n)return!1;t=s.value;const{fixedColumnsStart:i,inlineStartOverlay:a}=this.dataAccessObject,l="auto"===t;if(l&&e<i)return!1;const h=this.getFirstVisibleColumn(),u=this.getLastVisibleColumn();let c=!1;return(l&&(e<h||e>u)||!l)&&(c=a.scrollTo(e,l?e>=this.getLastPartiallyVisibleColumn():"end"===t)),c}scrollViewportVertically(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto";const{drawn:r,totalRows:n}=this.dataAccessObject;if(!r)return!1;const s=(0,o.createObjectPropListener)(t);if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollVertically",e,s),!Number.isInteger(e)||e<0||e>n)return!1;t=s.value;const{fixedRowsBottom:i,fixedRowsTop:a,topOverlay:l}=this.dataAccessObject,h="auto"===t;if(h&&(e<a||e>n-i-1))return!1;const u=this.getFirstVisibleRow(),c=this.getLastVisibleRow();let d=!1;return(h&&(e<u||e>c)||!h)&&(d=l.scrollTo(e,h?e>=this.getLastPartiallyVisibleRow():"bottom"===t)),d}getFirstVisibleRow(){return this.dataAccessObject.wtTable.getFirstVisibleRow()}getLastVisibleRow(){return l(h,this,c).call(this,this.dataAccessObject.wtTable.getLastVisibleRow())}getFirstPartiallyVisibleRow(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleRow()}getLastPartiallyVisibleRow(){return l(h,this,c).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleRow())}getFirstVisibleColumn(){return this.dataAccessObject.wtTable.getFirstVisibleColumn()}getLastVisibleColumn(){return l(h,this,u).call(this,this.dataAccessObject.wtTable.getLastVisibleColumn())}getFirstPartiallyVisibleColumn(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleColumn()}getLastPartiallyVisibleColumn(){return l(h,this,u).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleColumn())}}},32506:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(62577),s=r(77661),i=r(25499),o=r(25046),a=r(38087);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=(0,a.getCornerStyle)(this.instance),this.cornerCenterPointOffset=-Math.ceil(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}px`,this.cornerStyle.height=`${this.cornerDefaultStyle.height}px`,this.cornerStyle.border=[`${this.cornerDefaultStyle.borderWidth}px`,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),(0,o.isMobileBrowser)()&&this.instance.getSetting("isDataViewInstance")&&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:h,bottomHitArea:u}=this.selectionHandles.styles,c=parseInt(a.borderWidth,10),d=parseInt(a.width,10),p=parseInt(l.width,10),g=this.wot.wtTable.getWidth(),f=this.wot.wtTable.getHeight();a.top=`${parseInt(r-d-1,10)}px`,a[o]=`${parseInt(n-d-1,10)}px`,l.top=`${parseInt(r-p/4*3,10)}px`,l[o]=`${parseInt(n-p/4*3,10)}px`;const m=Math.min(parseInt(n+s,10),g-d-2*c),y=Math.min(parseInt(n+s-p/4,10),g-p-2*c);h[o]=`${m}px`,u[o]=`${y}px`;const E=Math.min(parseInt(r+i,10),f-d-2*c),w=Math.min(parseInt(r+i-p/4,10),f-p-2*c);h.top=`${E}px`,u.top=`${w}px`,this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(a.display="block",l.display="block",this.isPartRange(e,t)?(h.display="none",u.display="none"):(h.display="block",u.display="block")):(a.display="none",h.display="none",l.display="none",u.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;let[t,r,s,i]=e;if(t<0&&s<0||r<0&&i<0)return void this.disappear();const{wtTable:a,rootDocument:l,rootWindow:h}=this.wot,u=t!==s||r!==i,c=a.getFirstRenderedRow(),d=a.getLastRenderedRow(),p=a.getFirstRenderedColumn(),g=a.getLastRenderedColumn();let f;if(u){if(r=Math.max(r,p),i=Math.min(i,g),t=Math.max(t,c),s=Math.min(s,d),i<r||s<t)return void this.disappear();f=a.getCell(this.wot.createCellCoords(t,r))}else if(f=a.getCell(this.wot.createCellCoords(t,r)),!(f instanceof HTMLElement))return void this.disappear();const m=u?a.getCell(this.wot.createCellCoords(s,i)):f,y=(0,n.offset)(f),E=u?(0,n.offset)(m):y,w=(0,n.offset)(a.TABLE),C=y.top,v=y.left,R=this.wot.wtSettings.getSetting("rtlMode");let S=0,T=0;if(R){const e=(0,n.outerWidth)(a.TABLE),t=(0,n.outerWidth)(f),r=h.innerWidth-w.left-e;T=v+t-E.left,S=h.innerWidth-v-t-r-1}else T=E.left+(0,n.outerWidth)(m)-v,S=v-w.left-1;if(this.isEntireColumnSelected(t,s)){const e=t,n=this.getDimensionsFromHeader("columns",r,i,e,w);let s=null;n&&([s,S,T]=n),s&&(f=s)}let N=C-w.top-1,M=E.top+(0,n.outerHeight)(m)-C;if(this.isEntireRowSelected(r,i)){const e=r,n=this.getDimensionsFromHeader("rows",t,s,e,w);let i=null;n&&([i,N,M]=n),i&&(f=i)}const _=h.getComputedStyle(f);parseInt(_.borderTopWidth,10)>0&&(N+=1,M=M>0?M-1:0),parseInt(_[R?"borderRightWidth":"borderLeftWidth"],10)>0&&(S+=1,T=T>0?T-1:0);const b=R?"right":"left";this.topStyle.top=`${N}px`,this.topStyle[b]=`${S}px`,this.topStyle.width=`${T}px`,this.topStyle.display="block",this.startStyle.top=`${N}px`,this.startStyle[b]=`${S}px`,this.startStyle.height=`${M}px`,this.startStyle.display="block";const A=Math.floor(this.settings.border.width/2);this.bottomStyle.top=N+M-A+"px",this.bottomStyle[b]=`${S}px`,this.bottomStyle.width=`${T}px`,this.bottomStyle.display="block",this.endStyle.top=`${N}px`,this.endStyle[b]=S+T-A+"px",this.endStyle.height=`${M+1}px`,this.endStyle.display="block";let O=this.settings.border.cornerVisible;O="function"==typeof O?O(this.settings.layerLevel):O;const I=this.wot.getSetting("onModifyGetCellCoords",s,i,!1,"render");let[x,P]=[s,i];if(I&&Array.isArray(I)&&([,,x,P]=I),(0,o.isMobileBrowser)()||!O||this.isPartRange(x,P))this.cornerStyle.display="none";else{this.cornerStyle.top=N+M+this.cornerCenterPointOffset-this.cornerDefaultStyle.borderWidth+"px",this.cornerStyle[b]=S+T+this.cornerCenterPointOffset-this.cornerDefaultStyle.borderWidth+"px",this.cornerStyle.borderRightWidth=`${this.cornerDefaultStyle.borderWidth}px`,this.cornerStyle.borderLeftWidth=`${this.cornerDefaultStyle.borderWidth}px`,this.cornerStyle.borderBottomWidth=`${this.cornerDefaultStyle.borderWidth}px`,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";let e=(0,n.getTrimmingContainer)(a.TABLE);const t=e===h;t&&(e=l.documentElement);const r=parseInt(this.cornerDefaultStyle.borderWidth,10)-1,o=Math.ceil(parseInt(this.cornerDefaultStyle.width,10)/2),u=Math.ceil(parseInt(this.cornerDefaultStyle.height,10)/2);if(i===this.wot.getSetting("totalColumns")-1){const s=t?m.getBoundingClientRect().left:m.offsetLeft;let i=!1,a=0;R?(a=s-parseInt(this.cornerDefaultStyle.width,10)/2,i=a<0):(a=s+(0,n.outerWidth)(m)+parseInt(this.cornerDefaultStyle.width,10)/2,i=a>=(0,n.innerWidth)(e)),i&&(this.cornerStyle[b]=`${Math.floor(S+T+this.cornerCenterPointOffset-o-r)}px`,this.cornerStyle[R?"borderLeftWidth":"borderRightWidth"]=0)}if(s===this.wot.getSetting("totalRows")-1){(t?m.getBoundingClientRect().top:m.offsetTop)+(0,n.outerHeight)(m)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,n.innerHeight)(e)&&(this.cornerStyle.top=`${Math.floor(N+M+this.cornerCenterPointOffset-u-r)}px`,this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}(0,o.isMobileBrowser)()&&this.instance.getSetting("isDataViewInstance")&&this.updateMultipleSelectionHandlesPosition(s,i,N,S,T,M)}isEntireColumnSelected(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}isEntireRowSelected(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}getDimensionsFromHeader(e,t,r,s,i){const{wtTable:o}=this.wot,a=o.wtRootElement.parentNode;let l=null,h=null,u=null,c=null,d=null,p=null,g=null,f=null;switch(e){case"rows":l=function(){return o.getRowHeader(...arguments)},h=function(){return(0,n.outerHeight)(...arguments)},u="ht__selection--rows",p="top";break;case"columns":l=function(){return o.getColumnHeader(...arguments)},h=function(){return(0,n.outerWidth)(...arguments)},u="ht__selection--columns",p="left"}if(a.classList.contains(u)){const e=this.wot.getSetting("columnHeaders").length;if(g=l(t,e-s),f=l(r,e-s),!g||!f)return!1;const o=(0,n.offset)(g),a=(0,n.offset)(f);return g&&f&&(c=o[p]-i[p]-1,d=a[p]+h(f)-o[p]),[g,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.instance.getSetting("isDataViewInstance")&&(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)}}},38087:(e,t)=>{"use strict";t.__esModule=!0;t.getCornerStyle=e=>{const t=e.stylesHandler;if(t.isClassicTheme())return Object.freeze({width:6,height:6,borderWidth:1,borderStyle:"solid",borderColor:"#FFF"});const r=t.getCSSVariableValue("cell-autofill-size"),n=t.getCSSVariableValue("cell-autofill-border-width"),s=t.getCSSVariableValue("cell-autofill-border-color");return Object.freeze({width:r,height:r,borderWidth:n,borderStyle:"solid",borderColor:s})}},20746:(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"},70471:(e,t,r)=>{"use strict";r(14846),r(69655);var n=r(96784);t.__esModule=!0;var s={SelectionManager:!0,Selection:!0},i=n(r(42157));t.Selection=i.default;var o=r(20746);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(38087);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(67600);t.SelectionManager=l.SelectionManager},67600:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834),r(15724),r(25352),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620),r(14846),r(69655),r(94364);var s=r(62577),i=r(10917),o=n(r(32506));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 h(e,t){return e.get(c(e,t))}function u(e,t,r){return e.set(c(e,t),r),r}function c(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var d=new WeakMap,p=new WeakMap,g=new WeakMap,f=new WeakMap,m=new WeakMap,y=new WeakMap,E=new WeakSet;function w(){const e=h(f,this).get(h(d,this)),t=h(d,this).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=h(d,this).wtTable.TABLE.querySelectorAll(`.${e}`);let i=[];Array.isArray(null===(t=h(p,this).options)||void 0===t?void 0:t.cellAttributes)&&(i=h(p,this).options.cellAttributes.map((e=>e[0]))),Array.isArray(null===(r=h(p,this).options)||void 0===r?void 0:r.headerAttributes)&&(i=[...i,...h(p,this).options.headerAttributes.map((e=>e[0]))]);for(let t=0,r=n.length;t<r;t++)(0,s.removeClass)(n[t],e),(0,s.removeAttribute)(n[t],i)})),e.clear()}t.SelectionManager=class{constructor(e){var t,r;l(t=this,r=E),r.add(t),a(this,d,void 0),a(this,p,void 0),a(this,g,new i.SelectionScanner),a(this,f,new WeakMap),a(this,m,new WeakSet),a(this,y,new Map),u(p,this,e)}setActiveOverlay(e){return u(d,this,e),h(g,this).setActiveOverlay(h(d,this)),h(f,this).has(h(d,this))||h(f,this).set(h(d,this),new Set),this}getFocusSelection(){return null!==h(p,this)?h(p,this).getFocus():null}getAreaSelection(){return null!==h(p,this)?h(p,this).createLayeredArea():null}getBorderInstance(e){if(!e.settings.border)return null;if(h(y,this).has(e)){const t=h(y,this).get(e);if(t.has(h(d,this)))return t.get(h(d,this));const r=new o.default(h(d,this),e.settings);return t.set(h(d,this),r),r}const t=new o.default(h(d,this),e.settings);return h(y,this).set(e,new Map([[h(d,this),t]])),t}getBorderInstances(e){var t,r;return Array.from(null!==(t=null===(r=h(y,this).get(e))||void 0===r?void 0:r.values())&&void 0!==t?t:[])}destroyBorders(e){h(y,this).get(e).forEach((e=>e.destroy())),h(y,this).delete(e)}render(e){if(null===h(p,this))return;e&&c(E,this,w).call(this);const t=Array.from(h(p,this)),r=new Map,n=new Map;for(let e=0;e<t.length;e++){const s=t[e],{className:i,headerAttributes:o,createLayers:a,selectionType:l}=s.settings;h(m,this).has(s)||(h(m,this).add(s),s.addLocalHook("destroy",(()=>this.destroyBorders(s))));const u=this.getBorderInstance(s);if(s.isEmpty()){null==u||u.disappear();continue}if(i){h(g,this).setActiveSelection(s).scan().forEach((e=>{if(r.has(e)){const t=r.get(e);t.has(i)&&!0===a?t.set(i,t.get(i)+1):t.set(i,1)}else r.set(e,new Map([[i,1]]));o&&(n.has(e)||n.set(e,[]),"TH"===e.nodeName&&n.get(e).push(...o))}))}const c=s.getCorners();h(d,this).getSetting("onBeforeDrawBorders",c,l),null==u||u.appear(c)}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=>h(f,this).get(h(d,this)).add(e))),(0,s.addClass)(t,n),"TD"===t.nodeName&&Array.isArray(null===(r=h(p,this).options)||void 0===r?void 0:r.cellAttributes)&&(0,s.setAttribute)(t,h(p,this).options.cellAttributes)})),Array.from(n.keys()).forEach((e=>{(0,s.setAttribute)(e,[...n.get(e)])}))}}},10917:(e,t,r)=>{"use strict";t.__esModule=!0,r(67834),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620);var n=r(62577);function s(e,t,r){i(e,t),t.set(e,r)}function i(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function o(e,t){return e.get(l(e,t))}function a(e,t,r){return e.set(l(e,t),r),r}function l(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var h=new WeakMap,u=new WeakMap,c=new WeakSet;function d(e){let[t,r,n,s]=o(h,this).getCorners();if(t<0&&n<0||r<0&&s<0)return;const{wtTable:i}=o(u,this),a=t!==n||r!==s;if(r=Math.max(r,0),s=Math.max(s,0),t=Math.max(t,0),n=Math.max(n,0),a){if(r=Math.max(r,i.getFirstRenderedColumn()),s=Math.min(s,i.getLastRenderedColumn()),t=Math.max(t,i.getFirstRenderedRow()),n=Math.min(n,i.getLastRenderedRow()),s<r||n<t)return}else{if(!(i.getCell(o(u,this).createCellCoords(t,r))instanceof HTMLElement))return}for(let i=t;i<=n;i+=1)for(let t=r;t<=s;t+=1)e(i,t)}function p(e){const{wtTable:t}=o(u,this),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;i(e=this,t=c),t.add(e),s(this,h,void 0),s(this,u,void 0)}setActiveOverlay(e){return a(u,this,e),this}setActiveSelection(e){return a(h,this,e),this}scan(){const e=o(h,this).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,s]=o(h,this).getCorners(),{wtTable:i}=o(u,this),a=i.getRenderedColumnsCount(),l=i.getColumnHeadersCount();let c=0;for(let d=-i.getRowHeadersCount();d<a;d++){const a=i.columnFilter.renderedToSource(d);if(!(a<r||a>s)){for(let d=-l;d<0;d++){if(d<t||d>n)continue;const p=d+l;let g=i.getColumnHeader(a,p);const f=o(u,this).getSetting("onBeforeHighlightingColumnHeader",a,p,{selectionType:o(h,this).settings.selectionType,columnCursor:c,selectionWidth:s-r+1});null!==f&&(f!==a&&(g=i.getColumnHeader(f,p)),e(g))}c+=1}}}scanRowsInHeadersRange(e){const[t,r,n,s]=o(h,this).getCorners(),{wtTable:i}=o(u,this),a=i.getRenderedRowsCount(),l=i.getRowHeadersCount();let c=0;for(let d=-i.getColumnHeadersCount();d<a;d++){const a=i.rowFilter.renderedToSource(d);if(!(a<t||a>n)){for(let d=-l;d<0;d++){if(d<r||d>s)continue;const p=d+l;let g=i.getRowHeader(a,p);const f=o(u,this).getSetting("onBeforeHighlightingRowHeader",a,p,{selectionType:o(h,this).settings.selectionType,rowCursor:c,selectionHeight:n-t+1});null!==f&&(f!==a&&(g=i.getRowHeader(f,p)),e(g))}c+=1}}}scanCellsRange(e){const{wtTable:t}=o(u,this);l(c,this,d).call(this,((r,s)=>{const i=t.getCell(o(u,this).createCellCoords(r,s)),a=o(u,this).getSetting("onAfterDrawSelection",r,s,o(h,this).settings.layerLevel);"string"==typeof a&&(0,n.addClass)(i,a),e(i)}))}scanRowsInCellsRange(e){const[t,,r]=o(h,this).getCorners(),{wtTable:n}=o(u,this);l(c,this,p).call(this,((s,i)=>{if(s>=t&&s<=r){const t=n.getCell(o(u,this).createCellCoords(s,i));e(t)}}))}scanColumnsInCellsRange(e){const[,t,,r]=o(h,this).getCorners(),{wtTable:n}=o(u,this);l(c,this,p).call(this,((s,i)=>{if(i>=t&&i<=r){const t=n.getCell(o(u,this).createCellCoords(s,i));e(t)}}))}}},42157:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=r(25499),i=n(r(16050));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},34117:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834);var s=n(r(85707)),i=r(62577),o=r(25499);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,currentRowClassName:null,currentColumnClassName:null,preventOverflow:()=>!1,preventWheel:!1,data:void 0,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(){},rowHeightByOverlayName(){},defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,viewportRowRenderingThreshold:null,viewportColumnRenderingThreshold: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,onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onModifyGetCoordsElement:null,onModifyGetCoords: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]}}},7346:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834),r(15724),r(14846),r(69655);var s=n(r(85707)),i=r(62577),o=r(89804),a=n(r(62383)),l=n(r(82217)),h=r(36936),u=n(r(92020)),c=n(r(67920)),d=r(69397),p=r(71120);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 u.default(this.dataAccessObject,this.wtSettings),this.tableRenderer=new h.Renderer({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wtSettings.getSettingPure("cellRenderer"),stylesHandler:this.dataAccessObject.stylesHandler})}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,p.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,p.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,p.A11Y_PRESENTATION)()])),r.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,i.setAttribute)(r,[(0,p.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"),h=t.getSetting("rowHeaders"),u=h.length,c=t.getSetting("columnHeaders"),p=c.length;let g=e;if(this.isMaster&&(r.beforeDraw(),this.holderOffset=(0,i.offset)(this.holder),g=n.createCalculators(g),u&&!t.getSetting("fixedColumnsStart"))){const e=r.inlineStartOverlay.getScrollPosition(),t=this.correctHeaderWidth;this.correctHeaderWidth=0!==e,t!==this.correctHeaderWidth&&(g=!1)}if(g)this.isMaster&&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,p),this.columnFilter=new a.default(t,o,u);let g=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const e={};this.wtSettings.getSetting("beforeDraw",!0,e),g=!0!==e.skipRender}g&&(this.tableRenderer.setHeaderContentRenderers(h,c),(this.is(d.CLONE_BOTTOM)||this.is(d.CLONE_BOTTOM_INLINE_START_CORNER))&&this.tableRenderer.setHeaderContentRenderers(h,[]),this.resetOversizedRows(),this.tableRenderer.setActiveOverlayName(this.name).setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&this.markOversizedColumnHeaders(),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(d.CLONE_BOTTOM))&&this.markOversizedRows(),this.isMaster?(this.wtSettings.getSetting("externalRowCalculator")||n.createVisibleCalculators(),r.refresh(!1),r.applyToDOM(),this.wtSettings.getSetting("onDraw",!0)):this.is(d.CLONE_BOTTOM)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize())}let f=!1;return this.isMaster&&(f=r.topOverlay.resetFixedPosition(),r.bottomOverlay.clone&&(f=r.bottomOverlay.resetFixedPosition()||f),f=r.inlineStartOverlay.resetFixedPosition()||f,r.topInlineStartCornerOverlay&&r.topInlineStartCornerOverlay.resetFixedPosition(),r.bottomInlineStartCornerOverlay&&r.bottomInlineStartCornerOverlay.clone&&r.bottomInlineStartCornerOverlay.resetFixedPosition()),f?(r.refreshAll(),r.adjustElementsSize()):this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(g),this.isMaster&&r.afterDraw(),this.dataAccessObject.drawn=!0,this}markIfOversizedColumnHeader(e){const t=this.columnFilter.renderedToSource(e);let r=this.wtSettings.getSetting("columnHeaders").length;const n=this.dataAccessObject.stylesHandler.getDefaultRowHeight();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,!this.isMaster,"render");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);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);const a=this.wtSettings.getSetting("onModifyGetCoordsElement",s,o);return a&&Array.isArray(a)&&([s,o]=a),this.wot.createCellCoords(s,o)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let e=this.TBODY.childNodes.length;const t=e*this.dataAccessObject.stylesHandler.getDefaultRowHeight(),r=(0,i.innerHeight)(this.TBODY)-1,n=this.wot.stylesHandler.areCellsBorderBox(),s=n?i.outerHeight:i.innerHeight,o=n?0:1,a=n?1:0;let l,h,u,c,d;if(t!==r||this.wtSettings.getSetting("fixedRowsBottom"))for(;e;){e-=1,u=this.rowFilter.renderedToSource(e),l=this.getRowHeight(u),c=this.getTrForRow(u),d=c.querySelector("th");const t=0===u?a:0;h=d?s(d):s(c)-o,(!l&&this.dataAccessObject.stylesHandler.getDefaultRowHeight()<h-t||l<h)&&(n||(h+=1),this.dataAccessObject.wtViewport.oversizedRows[u]=h)}}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)}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}}},55538:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(7346)),i=n(r(96514)),o=n(r(29220)),a=r(25499),l=r(69397);class h extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_BOTTOM)}}(0,a.mixin)(h,i.default),(0,a.mixin)(h,o.default);t.default=h},41618:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(7346)),i=n(r(96514)),o=n(r(11381)),a=r(25499),l=r(69397);class h extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_BOTTOM_INLINE_START_CORNER)}}(0,a.mixin)(h,i.default),(0,a.mixin)(h,o.default);t.default=h},80222:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(7346)),i=n(r(9898)),o=n(r(11381)),a=r(25499),l=r(69397);class h extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_INLINE_START)}}(0,a.mixin)(h,i.default),(0,a.mixin)(h,o.default);t.default=h},78951:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=r(62577),i=n(r(7346)),o=n(r(9898)),a=n(r(29220)),l=r(25499);class h 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 h=e.offsetWidth,u=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 s=parseInt(t.getComputedStyle(n).height,10);r.removeChild(n),0===s&&(u=0)}u=Math.min(u,l),o.height="auto"===n?"auto":`${u}px`,h=Math.min(h,a),o.width=`${h}px`,o.overflow="",this.hasTableHeight="auto"===o.height||u>0,this.hasTableWidth=h>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)(h,o.default),(0,l.mixin)(h,a.default);t.default=h},29220:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(25499);const s={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,n.defineGetter)(s,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});t.default=s},9898:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(25499);const s={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,n.defineGetter)(s,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});t.default=s},11381:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(25499);const s={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,n.defineGetter)(s,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});t.default=s},96514:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(25499);const s={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,n.defineGetter)(s,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});t.default=s},26814:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(25499);const s={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,n.defineGetter)(s,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});t.default=s},94318:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(7346)),i=n(r(26814)),o=n(r(29220)),a=r(25499),l=r(69397);class h extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_TOP)}}(0,a.mixin)(h,i.default),(0,a.mixin)(h,o.default);t.default=h},16318:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(7346)),i=n(r(26814)),o=n(r(11381)),a=r(25499),l=r(69397);class h extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_TOP_INLINE_START_CORNER)}}(0,a.mixin)(h,i.default),(0,a.mixin)(h,o.default);t.default=h},92020:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707));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),this.dataAccessObject=e,this.wtSettings=t}getWidth(e){return this.wtSettings.getSetting("columnWidth",e)||this.wtSettings.getSetting("defaultColumnWidth")}getHeaderHeight(e){let t=this.dataAccessObject.stylesHandler.getDefaultRowHeight();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))}calculateWidths(){const{wtSettings:e}=this;let t=e.getSetting("rowHeaderWidth");if(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)}}}}},76095:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707));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)}}},30303:(e,t)=>{"use strict";t.__esModule=!0;t.WORKING_SPACE_ALL=0,t.WORKING_SPACE_TOP=1,t.WORKING_SPACE_BOTTOM=2},97646:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(44653));t.OrderView=s.default;var i=n(r(7620));t.SharedOrderView=i.default},7620:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(44653));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},44653:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(15724);var s=n(r(85707)),i=r(30303),o=n(r(70074));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(){}}},67744:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707));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}}},70074:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707)),i=n(r(67744)),o=r(30303);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()}}},67920:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707));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}getHeightByOverlayName(e,t){let r=this.wtSettings.getSetting("rowHeightByOverlayName",e,t);const n=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==n&&(r=void 0===r?n:Math.max(r,n)),r}}},52714:(e,t,r)=>{"use strict";t.__esModule=!0,r(67834),r(14846),r(69655);var n=r(62577),s=r(14859);function i(e,t,r){o(e,t),t.set(e,r)}function o(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function a(e,t){return e.get(h(e,t))}function l(e,t,r){return e.set(h(e,t),r),r}function h(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var u=new WeakMap,c=new WeakMap,d=new WeakMap,p=new WeakMap,g=new WeakMap,f=new WeakMap,m=new WeakMap,y=new WeakSet;function E(){const e=this.getCSSVariableValue("line-height"),t=this.getCSSVariableValue("cell-vertical-padding"),r=Math.ceil(parseFloat(this.getStyleForTD("border-bottom-width")));return null===e||null===t||isNaN(r)?null:e+2*t+r}function w(){(0,n.removeClass)(a(c,this),/ht-theme-.*/g),(0,n.addClass)(a(c,this),a(u,this))}function C(){this.isClassicTheme()||l(d,this,getComputedStyle(a(c,this)));const e=h(y,this,v).call(this,["box-sizing","border-bottom-width"]);a(m,this).td={...a(m,this).td,"box-sizing":e["box-sizing"],"border-bottom-width":e["border-bottom-width"]}}function v(e){const t=a(p,this),r=a(c,this),n=t.createElement("table"),s=t.createElement("tbody"),i=t.createElement("tr"),o=t.createElement("tr"),l=t.createElement("td");o.appendChild(l),s.appendChild(i),s.appendChild(o),n.appendChild(s),r.appendChild(n);const h=getComputedStyle(l),u={};return e.forEach((e=>{u[e]=h.getPropertyValue(e)})),r.removeChild(n),u}function R(e){const t=Math.ceil(parseFloat(h(y,this,S).call(this,e)));return Number.isNaN(t)?null:t}function S(e){const t=a(d,this).getPropertyValue(e);return""===t?null:t}function T(){l(m,this,{}),l(f,this,{}),l(g,this,!0)}t.StylesHandler=class{constructor(e){var t,r;o(t=this,r=y),r.add(t),i(this,u,void 0),i(this,c,void 0),i(this,d,void 0),i(this,p,void 0),i(this,g,!0),i(this,f,{}),i(this,m,{}),l(c,this,e.rootTable.parentElement.parentElement),l(p,this,e.rootDocument)}isClassicTheme(){return a(g,this)}getCSSVariableValue(e){var t;if(a(g,this))return null;if(a(f,this)[`--ht-${e}`])return a(f,this)[`--ht-${e}`];const r=null!==(t=h(y,this,R).call(this,`--ht-${e}`))&&void 0!==t?t:h(y,this,S).call(this,`--ht-${e}`);return null!==r?(a(f,this)[`--ht-${e}`]=r,r):void 0}getStyleForTD(e){var t;return null===(t=a(m,this))||void 0===t?void 0:t.td[e]}getDefaultRowHeight(){if(a(g,this))return 23;const e=h(y,this,E).call(this);return!e&&(0,n.hasClass)(a(c,this),"ht-wrapper")?((0,s.warn)(`The "${a(u,this)}" theme is enabled, but its stylesheets are missing or not imported correctly. Import the correct CSS files in order to use that theme.`),l(g,this,!0),this.useTheme(),23):e}areCellsBorderBox(){return"border-box"===this.getStyleForTD("box-sizing")}useTheme(e){if(!e)return h(y,this,C).call(this),l(g,this,!0),void l(u,this,e||void 0);e&&e!==a(u,this)&&(a(u,this)&&h(y,this,T).call(this),l(u,this,e),l(g,this,!1),h(y,this,w).call(this),h(y,this,C).call(this))}getThemeName(){return a(u,this)}removeClassNames(){(0,n.hasClass)(a(c,this),a(u,this))&&(0,n.removeClass)(a(c,this),a(u,this))}}},16598:(e,t,r)=>{"use strict";t.__esModule=!0,r(94364);var n=r(62577),s=r(25499),i=r(63059);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.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.rowsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllRows")?new i.RenderedAllRowsCalculationType:new i.RenderedRowsCalculationType],["fullyVisible",()=>new i.FullyVisibleRowsCalculationType],["partiallyVisible",()=>new i.PartiallyVisibleRowsCalculationType]]),this.columnsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllColumns")?new i.RenderedAllColumnsCalculationType:new i.RenderedColumnsCalculationType],["fullyVisible",()=>new i.FullyVisibleColumnsCalculationType],["partiallyVisible",()=>new i.PartiallyVisibleColumnsCalculationType]]),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}getViewportHeight(){let e=this.getWorkspaceHeight();if(e===1/0)return e;const t=this.getColumnHeaderHeight();return t>0&&(e-=t),e}getWorkspaceWidth(){const{rootDocument:e,rootWindow:t}=this.domBindings,r=this.dataAccessObject.inlineStartOverlayTrimmingContainer;let n;if(r===t){const t=this.wtSettings.getSetting("totalColumns");n=this.wtTable.holder.offsetWidth,this.getRowHeaderWidth()+this.sumColumnWidths(0,t)>n&&(n=e.documentElement.clientWidth)}else n=r.clientWidth;return n}getViewportWidth(){const e=this.getWorkspaceWidth();if(e===1/0)return e;const t=this.getRowHeaderWidth();return t>0?e-t:e}hasVerticalScroll(){return this.wtTable.hider.offsetHeight>this.getWorkspaceHeight()}hasHorizontalScroll(){return this.wtTable.hider.offsetWidth>this.getWorkspaceWidth()}isVerticallyScrollableByWindow(){return this.dataAccessObject.topOverlayTrimmingContainer===this.domBindings.rootWindow}isHorizontallyScrollableByWindow(){return this.dataAccessObject.inlineStartOverlayTrimmingContainer===this.domBindings.rootWindow}sumColumnWidths(e,t){let r=0,n=e;for(;n<t;)r+=this.wtTable.getColumnWidth(n),n+=1;return 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}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}createRowsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rendered","fullyVisible","partiallyVisible"];const{wtSettings:t,wtTable:r}=this;let s,o,a=this.getViewportHeight();this.rowHeaderWidth=NaN;let l=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const h=t.getSetting("fixedRowsTop"),u=t.getSetting("fixedRowsBottom"),c=t.getSetting("totalRows");return h&&l>=0&&(o=this.dataAccessObject.topOverlay.sumCellSizes(0,h),l+=o,a-=o),u&&this.dataAccessObject.bottomOverlay.clone&&(o=this.dataAccessObject.bottomOverlay.sumCellSizes(c-u,c),a-=o),s=r.holder.clientHeight===r.holder.offsetHeight?0:(0,n.getScrollbarWidth)(this.domBindings.rootDocument),new i.ViewportRowsCalculator({calculationTypes:e.map((e=>[e,this.rowsCalculatorTypes.get(e)()])),viewportHeight:a,scrollOffset:l,totalRows:t.getSetting("totalRows"),defaultRowHeight:this.instance.stylesHandler.getDefaultRowHeight(),rowHeightFn:e=>r.getRowHeight(e),overrideFn:t.getSettingPure("viewportRowCalculatorOverride"),horizontalScrollbarHeight:s})}createColumnsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rendered","fullyVisible","partiallyVisible"];const{wtSettings:t,wtTable:r}=this;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({calculationTypes:e.map((e=>[e,this.columnsCalculatorTypes.get(e)()])),viewportWidth:s,scrollOffset:o,totalColumns:t.getSetting("totalColumns"),columnWidthFn:e=>r.getColumnWidth(e),overrideFn:t.getSettingPure("viewportColumnCalculatorOverride"),inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}createCalculators(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,r=this.createRowsCalculator(),n=this.createColumnsCalculator();if(e&&!t.getSetting("renderAllRows")){const t=r.getResultsFor("fullyVisible");e=this.areAllProposedVisibleRowsAlreadyRendered(t)}if(e&&!t.getSetting("renderAllColumns")){const t=n.getResultsFor("fullyVisible");e=this.areAllProposedVisibleColumnsAlreadyRendered(t)}return e||(this.rowsRenderCalculator=r.getResultsFor("rendered"),this.columnsRenderCalculator=n.getResultsFor("rendered")),this.rowsVisibleCalculator=r.getResultsFor("fullyVisible"),this.columnsVisibleCalculator=n.getResultsFor("fullyVisible"),this.rowsPartiallyVisibleCalculator=r.getResultsFor("partiallyVisible"),this.columnsPartiallyVisibleCalculator=n.getResultsFor("partiallyVisible"),e}createVisibleCalculators(){const e=this.createRowsCalculator(["fullyVisible","partiallyVisible"]),t=this.createColumnsCalculator(["fullyVisible","partiallyVisible"]);this.rowsVisibleCalculator=e.getResultsFor("fullyVisible"),this.columnsVisibleCalculator=t.getResultsFor("fullyVisible"),this.rowsPartiallyVisibleCalculator=e.getResultsFor("partiallyVisible"),this.columnsPartiallyVisibleCalculator=t.getResultsFor("partiallyVisible")}areAllProposedVisibleRowsAlreadyRendered(e){if(!this.rowsVisibleCalculator)return!1;let{startRow:t,endRow:r}=e;if(null===t&&null===r){if(!e.isVisibleInTrimmingContainer)return!0;t=this.rowsPartiallyVisibleCalculator.startRow,r=this.rowsPartiallyVisibleCalculator.endRow}const{startRow:n,endRow:s,rowStartOffset:i,rowEndOffset:o}=this.rowsRenderCalculator,a=this.wtSettings.getSetting("totalRows")-1,l=this.wtSettings.getSetting("viewportRowRenderingThreshold");return Number.isInteger(l)&&l>0?(t=Math.max(0,t-Math.min(i,l)),r=Math.min(a,r+Math.min(o,l))):"auto"===l&&(t=Math.max(0,t-Math.ceil(i/2)),r=Math.min(a,r+Math.ceil(o/2))),!(t<n||t===n&&t>0)&&!(r>s||r===s&&r<a)}areAllProposedVisibleColumnsAlreadyRendered(e){if(!this.columnsVisibleCalculator)return!1;let{startColumn:t,endColumn:r}=e;if(null===t&&null===r){if(!e.isVisibleInTrimmingContainer)return!0;t=this.columnsPartiallyVisibleCalculator.startColumn,r=this.columnsPartiallyVisibleCalculator.endColumn}const{startColumn:n,endColumn:s,columnStartOffset:i,columnEndOffset:o}=this.columnsRenderCalculator,a=this.wtSettings.getSetting("totalColumns")-1,l=this.wtSettings.getSetting("viewportColumnRenderingThreshold");return Number.isInteger(l)&&l>0?(t=Math.max(0,t-Math.min(i,l)),r=Math.min(a,r+Math.min(o,l))):"auto"===l&&(t=Math.max(0,t-Math.ceil(i/2)),r=Math.min(a,r+Math.ceil(o/2))),!(t<n||t===n&&t>0)&&!(r>s||r===s&&r<a)}resetHasOversizedColumnHeadersMarked(){(0,s.objectEach)(this.hasOversizedColumnHeadersMarked,((e,t,r)=>{r[t]=void 0}))}}},87935:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(88088);var s=n(r(83497)),i=r(45435),o=r(6521),a=r(28197),l=r(58570),h=r(1791),u=r(10912),c=r(74854),d=r(50206);function p(e,t){const r=new s.default(e,t||{},i.rootInstanceSymbol);return r.init(),r}t.CellCoords=d.CellCoords,t.CellRange=d.CellRange,(0,h.registerCellType)(u.TextCellType),p.editors={BaseEditor:c.BaseEditor},p.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new s.default(e,t,i.rootInstanceSymbol)},p.DefaultSettings=(0,o.metaSchemaFactory)(),p.hooks=a.Hooks.getSingleton(),p.CellCoords=d.CellCoords,p.CellRange=d.CellRange,p.packageName="handsontable",p.buildDate="05/12/2024 10:05:38",p.version="15.0.0-next-fdd4480-20241205",p.languages={dictionaryKeys:l.dictionaryKeys,getLanguageDictionary:l.getLanguageDictionary,getLanguagesDictionaries:l.getLanguagesDictionaries,registerLanguageDictionary:l.registerLanguageDictionary,getTranslatedPhrase:l.getTranslatedPhrase};t.default=p},76527:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(10463),s=r(36759),i=r(25799);const o=t.CELL_TYPE="autocomplete";t.AutocompleteCellType={CELL_TYPE:o,editor:n.AutocompleteEditor,renderer:s.autocompleteRenderer,validator:i.autocompleteValidator}},33023:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(76527);t.AutocompleteCellType=n.AutocompleteCellType,t.CELL_TYPE=n.CELL_TYPE},65829:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(12302),s=r(86510);const i=t.CELL_TYPE="checkbox";t.CheckboxCellType={CELL_TYPE:i,editor:n.CheckboxEditor,renderer:s.checkboxRenderer}},40834:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(65829);t.CELL_TYPE=n.CELL_TYPE,t.CheckboxCellType=n.CheckboxCellType},34135:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(16339),s=r(72375),i=r(5535);const o=t.CELL_TYPE="date";t.DateCellType={CELL_TYPE:o,editor:n.DateEditor,renderer:s.dateRenderer,validator:i.dateValidator}},41031:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(34135);t.CELL_TYPE=n.CELL_TYPE,t.DateCellType=n.DateCellType},62277:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(51034),s=r(24682),i=r(96);const o=t.CELL_TYPE="dropdown";t.DropdownCellType={CELL_TYPE:o,editor:n.DropdownEditor,renderer:s.dropdownRenderer,validator:i.dropdownValidator}},96306:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(62277);t.CELL_TYPE=n.CELL_TYPE,t.DropdownCellType=n.DropdownCellType},74845:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(82518),s=r(32278);const i=t.CELL_TYPE="handsontable";t.HandsontableCellType={CELL_TYPE:i,editor:n.HandsontableEditor,renderer:s.handsontableRenderer}},96618:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(74845);t.CELL_TYPE=n.CELL_TYPE,t.HandsontableCellType=n.HandsontableCellType},14758:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllCellTypes=function(){(0,p.registerCellType)(n.AutocompleteCellType),(0,p.registerCellType)(s.CheckboxCellType),(0,p.registerCellType)(i.DateCellType),(0,p.registerCellType)(o.DropdownCellType),(0,p.registerCellType)(a.HandsontableCellType),(0,p.registerCellType)(l.NumericCellType),(0,p.registerCellType)(h.PasswordCellType),(0,p.registerCellType)(u.SelectCellType),(0,p.registerCellType)(c.TextCellType),(0,p.registerCellType)(d.TimeCellType)};var n=r(33023);t.AutocompleteCellType=n.AutocompleteCellType,t.AUTOCOMPLETE_TYPE=n.CELL_TYPE;var s=r(40834);t.CheckboxCellType=s.CheckboxCellType,t.CHECKBOX_TYPE=s.CELL_TYPE;var i=r(41031);t.DateCellType=i.DateCellType,t.DATE_TYPE=i.CELL_TYPE;var o=r(96306);t.DropdownCellType=o.DropdownCellType,t.DROPDOWN_TYPE=o.CELL_TYPE;var a=r(96618);t.HandsontableCellType=a.HandsontableCellType,t.HANDSONTABLE_TYPE=a.CELL_TYPE;var l=r(15718);t.NumericCellType=l.NumericCellType,t.NUMERIC_TYPE=l.CELL_TYPE;var h=r(20210);t.PasswordCellType=h.PasswordCellType,t.PASSWORD_TYPE=h.CELL_TYPE;var u=r(22315);t.SelectCellType=u.SelectCellType,t.SELECT_TYPE=u.CELL_TYPE;var c=r(10912);t.TextCellType=c.TextCellType,t.TEXT_TYPE=c.CELL_TYPE;var d=r(92858);t.TimeCellType=d.TimeCellType,t.TIME_TYPE=d.CELL_TYPE;var p=r(1791);t.registerCellType=p.registerCellType,t.getCellType=p.getCellType,t.getRegisteredCellTypeNames=p.getRegisteredCellTypeNames,t.getRegisteredCellTypes=p.getRegisteredCellTypes,t.hasCellType=p.hasCellType},15718:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(3421);t.CELL_TYPE=n.CELL_TYPE,t.NumericCellType=n.NumericCellType},3421:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(82304),s=r(17756),i=r(48636);const o=t.CELL_TYPE="numeric";t.NumericCellType={CELL_TYPE:o,editor:n.NumericEditor,renderer:s.numericRenderer,validator:i.numericValidator,dataType:"number"}},20210:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(24157);t.CELL_TYPE=n.CELL_TYPE,t.PasswordCellType=n.PasswordCellType},24157:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(14150),s=r(64910);const i=t.CELL_TYPE="password";t.PasswordCellType={CELL_TYPE:i,editor:n.PasswordEditor,renderer:s.passwordRenderer,copyable:!1}},1791:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t.getCellType=function(e){if(!u(e))throw Error(`You declared cell type "${e}" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by\n "Handsontable.cellTypes.registerCellType" method`);return h(e)},t.registerCellType=function(e,t){"string"!=typeof e&&(e=(t=e).CELL_TYPE);const{editor: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(67834);var s=n(r(28651)),i=r(8266),o=r(54852),a=r(17027);const{register:l,getItem:h,hasItem:u,getNames:c,getValues:d}=(0,s.default)("cellTypes");t.getRegisteredCellTypes=d,t.getRegisteredCellTypeNames=c,t.hasCellType=u},22315:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(19908);t.CELL_TYPE=n.CELL_TYPE,t.SelectCellType=n.SelectCellType},19908:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(63303),s=r(15651);const i=t.CELL_TYPE="select";t.SelectCellType={CELL_TYPE:i,editor:n.SelectEditor,renderer:s.selectRenderer}},10912:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(57489);t.CELL_TYPE=n.CELL_TYPE,t.TextCellType=n.TextCellType},57489:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(66420),s=r(85096);const i=t.CELL_TYPE="text";t.TextCellType={CELL_TYPE:i,editor:n.TextEditor,renderer:s.textRenderer}},92858:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(99421);t.CELL_TYPE=n.CELL_TYPE,t.TimeCellType=n.TimeCellType},99421:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(35442),s=r(70350),i=r(68864);const o=t.CELL_TYPE="time";t.TimeCellType={CELL_TYPE:o,editor:n.TimeEditor,renderer:s.timeRenderer,validator:i.timeValidator}},83497:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t.default=function(e,t){var r,n=this;let F=arguments.length>2&&void 0!==arguments[2]&&arguments[2],U=this;const V=new h.default(U);let B,W,Y,G,j,z,$=!0;(0,T.hasValidParameter)(F)&&(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 K=null!==(r=null==t?void 0:t.layoutDirection)&&void 0!==r?r:"inherit",X=["rtl","ltr"].includes(K)?K:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",X),this.isRtl=function(){return"rtl"===X},this.isLtr=function(){return!U.isRtl()},this.getDirectionFactor=function(){return U.isLtr()?1:-1},t.language=(0,_.getValidLanguageCode)(t.language);const q=new O.MetaManager(U,t,[O.DynamicCellMetaMod,O.ExtendMetaPropertiesMod]),Q=q.getTableMeta(),Z=q.getGlobalMeta(),J=(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),(0,s.addClass)(e,"ht-wrapper"));this.guid=`ht_${(0,E.randomString)()}`,H.set(this.guid,this),this.columnIndexMapper=new S.IndexMapper,this.rowIndexMapper=new S.IndexMapper,this.columnIndexMapper.addLocalHook("indexesSequenceChange",(e=>{U.runHooks("afterColumnSequenceChange",e)})),this.rowIndexMapper.addLocalHook("indexesSequenceChange",(e=>{U.runHooks("afterRowSequenceChange",e)})),W=new v.default(U),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let ee=new A.Selection(Q,{rowIndexMapper:U.rowIndexMapper,columnIndexMapper:U.columnIndexMapper,countCols:()=>U.countCols(),countRows:()=>U.countRows(),propToCol:e=>B.propToCol(e),isEditorOpened:()=>!!U.getActiveEditor()&&U.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),countRenderableRowsInRange:function(){return n.view.countRenderableRowsInRange(...arguments)},countRenderableColumnsInRange:function(){return n.view.countRenderableColumnsInRange(...arguments)},getShortcutManager:()=>U.getShortcutManager(),createCellCoords:(e,t)=>U._createCellCoords(e,t),createCellRange:(e,t,r)=>U._createCellRange(e,t,r),visualToRenderableCoords:e=>{const{row:t,col:r}=e;return U._createCellCoords(t>=0?U.rowIndexMapper.getRenderableFromVisualIndex(t):t,r>=0?U.columnIndexMapper.getRenderableFromVisualIndex(r):r)},renderableToVisualCoords:e=>{const{row:t,col:r}=e;return U._createCellCoords(t>=0?U.rowIndexMapper.getVisualFromRenderableIndex(t):t,r>=0?U.columnIndexMapper.getVisualFromRenderableIndex(r):r)},findFirstNonHiddenRenderableRow:(e,t)=>{const r=t>e?1:-1,n=Math.min(e,t),s=Math.max(e,t),i=U.rowIndexMapper.getNearestNotHiddenIndex(e,r);return null===i||1===r&&i>s||-1===r&&i<n?null:i>=0?U.rowIndexMapper.getRenderableFromVisualIndex(i):i},findFirstNonHiddenRenderableColumn:(e,t)=>{const r=t>e?1:-1,n=Math.min(e,t),s=Math.max(e,t),i=U.columnIndexMapper.getNearestNotHiddenIndex(e,r);return null===i||1===r&&i>s||-1===r&&i<n?null:i>=0?U.columnIndexMapper.getRenderableFromVisualIndex(i):i},isDisabledCellSelection:(e,t)=>e<0||t<0?U.getSettings().disableVisualSelection:U.getCellMeta(e,t).disableVisualSelection});this.selection=ee;const te=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.commit()};function re(e){const t=(0,b.normalizeLanguageCode)(e);(0,_.hasLanguageDictionary)(t)?(U.runHooks("beforeLanguageChange",t),Z.language=t,U.runHooks("afterLanguageChange",t)):(0,b.warnUserAboutLanguageRegistration)(e)}function ne(e,t){const r="className"===e?U.rootElement:U.table;if($)(0,s.addClass)(r,t);else{let n=[],i=[];Z[e]&&(n=Array.isArray(Z[e])?Z[e]:(0,d.stringToArray)(Z[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)}Z[e]=t}function se(){let e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function ie(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function oe(e,t,r){if(!e.length)return void r();const n=U.getActiveEditor(),s=new se;let i=!0;s.onQueueEmpty=()=>{n&&i&&n.cancelChanges(),r()};for(let r=e.length-1;r>=0;r--){const[n,o,,a]=e[r],l=B.propToCol(o);let h;h=Number.isInteger(l)?U.getCellMeta(n,l):{...Object.getPrototypeOf(Q),...Q},"numeric"===h.type&&"string"==typeof a&&(0,w.isNumericLike)(a)&&(e[r][3]=ie(a)),U.getCellValidator(h)&&(s.addValidatorToQueue(),U.validateCell(e[r][3],h,function(t,r){return function(n){if("boolean"!=typeof n)throw new Error("Validation error: result is not boolean");!1===n&&!1===r.allowInvalid&&(i=!1,e.splice(t,1),r.valid=!0),s.removeValidatorFormQueue()}}(r,h),t))}s.checkIfQueueIsEmpty()}function ae(e,t){for(let r=e.length-1;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]>U.countRows()-1;){const{delta:e}=B.createRow(void 0,void 0,{source:t});if(0===e){n=!0;break}}if("array"===U.dataType&&(!Q.columns||0===Q.columns.length)&&Q.allowInsertColumn)for(;B.propToCol(e[r][1])>U.countCols()-1;){const{delta:e}=B.createCol(void 0,void 0,{source:t});if(0===e){n=!0;break}}n||B.set(e[r][0],e[r][1],e[r][3])}}else e.splice(r,1)}const r=e.length>0;if(U.forceFullRender=!0,r){Y.adjustRowsAndCols(),U.runHooks("beforeChangeRender",e,t),G.closeEditor(),U.view.render(),G.prepareEditor(),U.view.adjustElementsSize(),U.runHooks("afterChange",e,t||"edit");const r=U.getActiveEditor();r&&(0,o.isDefined)(r.refreshValue)&&r.refreshValue()}else U.view.render()}function le(e,t,r){return Array.isArray(e)?e:[[e,t,r]]}function he(e,t){const r=U.getActiveEditor(),n=U.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",te),this.rowIndexMapper.addLocalHook("cacheUpdated",te),this.selection.addLocalHook("afterSetRangeEnd",((e,t)=>{const r=(0,u.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,U.colToProp(i.col),o.row,U.colToProp(o.col),r,a),t&&(!r.isTouched()||r.isTouched()&&!r.value)&&z.scrollTo(e);const l=ee.isSelectedByRowHeader(),h=ee.isSelectedByColumnHeader();l&&h?(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")):h?((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"]),"shift"!==ee.getSelectionSource()&&G.closeEditor(null),U.view.render(),G.prepareEditor()})),this.selection.addLocalHook("beforeSetFocus",(e=>{this.runHooks("beforeSelectionFocusSet",e.row,e.col)})),this.selection.addLocalHook("afterSetFocus",(e=>{const t=(0,u.createObjectPropListener)(!1);this.runHooks("afterSelectionFocusSet",e.row,e.col,t),(!t.isTouched()||t.isTouched()&&!t.value)&&z.scrollTo(e),G.closeEditor(),U.view.render(),G.prepareEditor()})),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,U.colToProp(r.col),n.row,U.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",(()=>{G.closeEditor(),U.view.render(),(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("beforeModifyTransformFocus",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("modifyTransformFocus",...t)})).addLocalHook("afterModifyTransformFocus",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("afterModifyTransformFocus",...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"))),Y={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=U.countSourceRows();if(Q.maxRows===a)return;const h="insert_row_below"===e?"below":"above";t=null!==(r=t)&&void 0!==r?r:"below"===h?a:0;const{delta:u,startPhysicalIndex:c}=B.createRow(t,s,{source:i,mode:h});ee.shiftRows(U.toVisualRow(c),u);break;case"insert_col_start":case"insert_col_end":const p="insert_col_end"===e?"end":"start";t=null!==(n=t)&&void 0!==n?n:"end"===p?U.countSourceCols():0;const{delta:g,startPhysicalIndex:f}=B.createCol(t,s,{source:i,mode:p});if(g){if(Array.isArray(Q.colHeaders)){const e=[U.toVisualColumn(f),0];e.length+=g,Array.prototype.splice.apply(Q.colHeaders,e)}ee.shiftColumns(U.toVisualColumn(f),g)}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)?U.countRows()-1:Math.max(r-t,0);Number.isInteger(r)&&(r=Math.max(r-t,0));if(!B.removeRow(r,n,i))return;if(ee.isSelected()){const{row:e}=U.getSelectedRangeLast().highlight;e>=r&&e<=r+n-1&&G.closeEditor(!0)}const a=U.countRows();0===a?ee.deselect():"ContextMenu.removeRow"===i?ee.refresh():ee.shiftRows(r,-n);const l=Q.fixedRowsTop;l>=s+1&&(Q.fixedRowsTop-=Math.min(n,l-s));const h=Q.fixedRowsBottom;h&&s>=a-h&&(Q.fixedRowsBottom-=Math.min(n,h)),t+=n}))};Array.isArray(t)?m(l(t)):m([[t,s]]);break;case"remove_col":const y=e=>{let t=0;(0,d.arrayEach)(e,(e=>{let[r,n]=e;const s=(0,o.isEmpty)(r)?U.countCols()-1:Math.max(r-t,0);let a=U.toPhysicalColumn(s);Number.isInteger(r)&&(r=Math.max(r-t,0));if(!B.removeCol(r,n,i))return;if(ee.isSelected()){const{col:e}=U.getSelectedRangeLast().highlight;e>=r&&e<=r+n-1&&G.closeEditor(!0)}0===U.countCols()?ee.deselect():"ContextMenu.removeColumn"===i?ee.refresh():ee.shiftColumns(r,-n);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)?y(l(t)):y([[t,s]]);break;default:throw new Error(`There is no such action "${e}"`)}U.view.render(),a||Y.adjustRowsAndCols()},adjustRowsAndCols(){const e=Q.minRows,t=Q.minSpareRows,r=Q.minCols,n=Q.minSpareCols;if(e){const t=U.countRows();t<e&&B.createRow(t,e-t,{source:"auto"})}if(t){const e=U.countEmptyRows(!0);if(e<t){const r=t-e,n=Math.min(r,Q.maxRows-U.countSourceRows());B.createRow(U.countRows(),n,{source:"auto"})}}{let e;(r||n)&&(e=U.countEmptyCols(!0));let t=U.countCols();if(r&&!Q.columns&&t<r){const n=r-t;e+=n,B.createCol(t,n,{source:"auto"})}if(n&&!Q.columns&&"array"===U.dataType&&e<n){t=U.countCols();const r=n-e,s=Math.min(r,Q.maxCols-t);B.createCol(t,s,{source:"auto"})}}U.view&&U.view.adjustElementsSize()},populateFromArray(e,t,r,n,s){let i,o,a,l;const h=[],c={},p=[],g=e.row,f=e.col;if(o=t.length,0===o)return!1;let m=0,y=0;switch((0,u.isObject)(r)&&(m=r.col-f+1,y=r.row-g+1),s){case"shift_down":const s=(0,d.pivot)(t),E=s.length,w=Math.max(E,m),C=U.getData().slice(g),v=(0,d.pivot)(C).slice(f,f+w);for(a=0;a<w;a+=1)if(a<E){for(i=0,o=s[a].length;i<y-o;i+=1)s[a].push(s[a][i%o]);a<v.length?p.push(s[a].concat(v[a])):p.push(s[a].concat(new Array(C.length).fill(null)))}else p.push(s[a%E].concat(v[a]));U.populateFromArray(g,f,(0,d.pivot)(p));break;case"shift_right":const R=t.length,S=Math.max(R,y),T=U.getData().slice(g).map((e=>e.slice(f)));for(i=0;i<S;i+=1)if(i<R){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,S).concat(T[i]));U.populateFromArray(g,f,t);break;default:c.row=e.row,c.col=e.col;let N,M=0,_=0,b=!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>U.countRows()-1||c.row>=Q.maxRows);i++){const t=i-M,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=U.getCellMeta(c.row,c.col),"CopyPaste.paste"!==n&&"Autofill.fill"!==n||!N.skipRowOnPaste){for(_=0,a=0;a<l&&!(r&&c.col>r.col&&d>s||!Q.allowInsertColumn&&c.col>U.countCols()-1||c.col>=Q.maxCols);a++){if(N=U.getCellMeta(c.row,c.col),("CopyPaste.paste"===n||"Autofill.fill"===n)&&N.skipColumnOnPaste){_+=1,c.col+=1,l+=1;continue}if(N.readOnly&&"UndoRedo.undo"!==n){c.col+=1;continue}let e=A(t,a-_),r=U.getDataAtCell(c.row,c.col);if(null!==e&&"object"==typeof e)if(Array.isArray(e)&&null===r&&(r=[]),null===r||"object"!=typeof r)b=!1;else{const t=(0,u.duckSchema)(Array.isArray(r)?r:r[0]||r),n=(0,u.duckSchema)(Array.isArray(e)?e:e[0]||e);(0,u.isObjectEqual)(t,n)||Array.isArray(t)&&Array.isArray(n)?e=(0,u.deepClone)(e):b=!1}else null!==r&&"object"==typeof r&&(b=!1);b&&h.push([c.row,c.col,e]),b=!0,c.col+=1}c.row+=1}else M+=1,c.row+=1,o+=1}U.setDataAtCell(h,null,null,n||"populateFromArray")}}},this.init=function(){W.setData(Q.data),U.runHooks("beforeInit"),((0,a.isMobileBrowser)()||(0,a.isIpadOS)())&&(0,s.addClass)(U.rootElement,"mobile"),this.updateSettings(Q,!0),this.view=new C.default(this);const e=Q.themeName||(0,D.getThemeClassName)(U.rootElement);U.useTheme(e),U.view.addClassNameToLicenseElement(U.getCurrentThemeName()),G=l.default.getInstance(U,Q,ee),z=(0,I.createViewportScroller)(U),j=new c.FocusManager(U),(0,T.isRootInstance)(this)&&(0,I.installFocusCatcher)(U),U.runHooks("init"),this.forceFullRender=!0,this.view.render(),$&&null===U.rootElement.offsetParent&&(0,s.observeVisibilityChangeOnce)(U.rootElement,(()=>{U.view._wt.wtOverlays.updateLastSpreaderSize(),U.render(),U.view.adjustElementsSize()})),"object"==typeof $&&(U.runHooks("afterChange",$[0],$[1]),$=!1),U.runHooks("afterInit")},this._createCellCoords=function(e,t){return U.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,r){return U.view._wt.createCellRange(e,t,r)},this.validateCell=function(e,t,r,n){let s=U.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=U.getCell(s,n,!0);if(i&&"TH"!==i.nodeName){const e=U.rowIndexMapper.getRenderableFromVisualIndex(s),t=U.columnIndexMapper.getRenderableFromVisualIndex(n);U.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=U.runHooks("beforeValidate",e,t.visualRow,t.prop,n),U._registerImmediate((()=>{s.call(t,e,(r=>{U&&(r=U.runHooks("afterValidate",r,e,t.visualRow,t.prop,n),t.valid=r,a(r),U.runHooks("postAfterValidate",r,e,t.visualRow,t.prop,n))}))}))):U._registerImmediate((()=>{t.valid=!0,a(t.valid,!1)}))},this.setDataAtCell=function(e,t,r,n){const s=le(e,t,r),i=[];let o,a,l,h=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]:B.colToProp(s[o][1]),i.push([s[o][0],l,W.getAtCell(this.toPhysicalRow(s[o][0]),s[o][1]),s[o][2]])}h||"object"!=typeof e||(h=t);const u=he(i,h);U.runHooks("afterSetDataAtCell",u,h),oe(u,h,(()=>{ae(u,h)}))},this.setDataAtRowProp=function(e,t,r,n){const s=le(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],W.getAtCell(this.toPhysicalRow(s[o][0]),s[o][1]),s[o][2]]);l||"object"!=typeof e||(l=t);const h=he(i,n);U.runHooks("afterSetDataAtRowProp",h,l),oe(h,l,(()=>{ae(h,l)}))},this.listen=function(){U&&!U.isListening()&&(H.forEach((e=>{U!==e&&e.unlisten()})),k=U.guid,U.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(k=null,U.runHooks("afterUnlisten"))},this.isListening=function(){return k===U.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];G.closeEditor(e),U.view.render(),t&&ee.isSelected()&&G.prepareEditor()},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?U._createCellCoords(n,s):null;return Y.populateFromArray(U._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 B.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 B.spliceRow(e,t,r,...s)},this.getSelected=function(){if(ee.isSelected())return(0,d.arrayMap)(ee.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(ee.isSelected())return Array.from(ee.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(!ee.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];(0,d.arrayEach)(ee.getSelectedRange(),(e=>{if(e.isSingleHeader())return;const r=e.getTopStartCorner(),n=e.getBottomEndCorner();(0,w.rangeEach)(r.row,n.row,(e=>{(0,w.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():U.view.render())},this.render=function(){this.view&&(this.renderCall=!0,this.forceFullRender=!0,this.isRenderSuspended()||U.view.render())},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(!U.view)return;const{width:e,height:t}=U.view.getLastSize(),{width:r,height:n}=U.rootElement.getBoundingClientRect(),s=r!==e||n!==t;!1===U.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:r,height:n},s)||((s||U.view._wt.wtOverlays.scrollableElement===U.rootWindow)&&(U.view.setLastSize(r,n),U.render()),U.runHooks("afterRefreshDimensions",{width:e,height:t},{width:r,height:n},s))},this.updateData=function(e,t){(0,O.replaceData)(e,(e=>{B=e}),(e=>{B=e,U.columnIndexMapper.fitToLength(this.getInitialColumnCount()),U.rowIndexMapper.fitToLength(this.countSourceRows()),Y.adjustRowsAndCols(),ee.refresh()}),{hotInstance:U,dataMap:B,dataSource:W,internalSource:"updateData",source:t,metaManager:q,firstRun:$})},this.loadData=function(e,t){(0,O.replaceData)(e,(e=>{B=e}),(()=>{q.clearCellsCache(),U.initIndexMappers(),Y.adjustRowsAndCols(),ee.refresh(),$&&($=[null,"loadData"])}),{hotInstance:U,dataMap:B,dataSource:W,internalSource:"loadData",source:t,metaManager:q,firstRun:$})},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"===U.dataType){const r=this.countSourceCols();for(let n=0;n<r;n+=1)e(n)&&(t+=1)}else"object"!==U.dataType&&"function"!==U.dataType||(t=B.colToPropCache.length);else if((0,o.isDefined)(Q.dataSchema)){const e=B.getSchema();t=Array.isArray(e)?e.length:(0,u.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)?B.getAll():B.getRange(U._createCellCoords(e,t),U._createCellCoords(r,n),B.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,r,n){return B.getCopyableText(U._createCellCoords(e,t),U._createCellCoords(r,n))},this.getCopyableData=function(e,t){return B.getCopyable(e,B.colToProp(t))},this.getSchema=function(){return B.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=($?U.loadData:U.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?re(e.language):"className"===n?ne("className",e.className):"tableClassName"===n&&U.table?(ne("tableClassName",e.tableClassName),U.view._wt.wtOverlays.syncOverlayTableClassNames()):M.Hooks.getSingleton().isRegistered(n)||M.Hooks.getSingleton().isDeprecated(n)?(0,i.isFunction)(e[n])?M.Hooks.getSingleton().addAsFixed(n,e[n],U):Array.isArray(e[n])&&M.Hooks.getSingleton().add(n,e[n],U):!t&&(0,u.hasOwnProperty)(e,n)&&(Z[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&&(B.createMap(),U.initIndexMappers());const l=U.countCols(),h=Q.columns;if(h&&(0,i.isFunction)(h)&&(a=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||q.clearCache(),l>0)for(n=0,s=0;n<l;n++){if(h){const e=a?h(n):h[s];e&&q.updateColumnMeta(s,e)}s+=1}(0,o.isDefined)(e.cell)&&(0,u.objectEach)(e.cell,(e=>{U.setCellMetaObject(e.row,e.col,e)})),U.runHooks("afterCellMetaReset");let c=U.rootElement.style.height;""!==c&&(c=parseInt(U.rootElement.style.height,10));let d=e.height;if((0,i.isFunction)(d)&&(d=d()),t){U.rootElement.getAttribute("style")&&U.rootElement.setAttribute("data-initialstyle",U.rootElement.getAttribute("style"))}if(null===d){const e=U.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?U.rootElement.setAttribute("style",e):(U.rootElement.style.height="",U.rootElement.style.overflow="")}else void 0!==d&&(U.rootElement.style.height=isNaN(d)?`${d}`:`${d}px`,U.rootElement.style.overflow="hidden");if(void 0!==e.width){let t=e.width;(0,i.isFunction)(t)&&(t=t()),U.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}if(!t){if(U.view){U.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),U.view._wt.exportSettingsAsClassNames();const t=U.getCurrentThemeName(),r=(0,u.hasOwnProperty)(e,"themeName");t&&r&&(U.view.getStylesHandler().removeClassNames(),U.view.removeClassNameFromLicenseElement(t));const n=r&&e.themeName||(0,D.getThemeClassName)(U.rootElement);U.useTheme(n),U.view.addClassNameToLicenseElement(U.getCurrentThemeName())}U.runHooks("afterUpdateSettings",e)}Y.adjustRowsAndCols(),U.view&&!$&&(U.forceFullRender=!0,U.view.render(),U.view._wt.wtOverlays.adjustElementsSize()),t||!U.view||""!==c&&""!==d&&void 0!==d||c===d||U.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=U.getSelectedLast();if(Q.getValue){if((0,i.isFunction)(Q.getValue))return Q.getValue.call(U);if(e)return U.getData()[e[0][0]][Q.getValue]}else if(e)return U.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){Y.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||void 0===s||void 0===n?null:U.view.getCellAtCoords(U._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)),U._createCellCoords(s,i)},this.colToProp=function(e){return B.colToProp(e)},this.propToCol=function(e){return B.propToCol(e)},this.toVisualRow=e=>this.rowIndexMapper.getVisualFromPhysicalIndex(e),this.toVisualColumn=e=>this.columnIndexMapper.getVisualFromPhysicalIndex(e),this.toPhysicalRow=e=>this.rowIndexMapper.getPhysicalFromVisualIndex(e),this.toPhysicalColumn=e=>this.columnIndexMapper.getPhysicalFromVisualIndex(e),this.getDataAtCell=function(e,t){return B.get(e,B.colToProp(t))},this.getDataAtRowProp=function(e,t){return B.get(e,t)},this.getDataAtCol=function(e){const t=[],r=B.getRange(U._createCellCoords(0,e),U._createCellCoords(Q.data.length-1,e),B.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=B.getRange(U._createCellCoords(0,B.propToCol(e)),U._createCellCoords(Q.data.length-1,B.propToCol(e)),B.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?W.getData():W.getByRange(U._createCellCoords(e,t),U._createCellCoords(r,n)),s},this.getSourceDataArray=function(e,t,r,n){let s;return s=void 0===e?W.getData(!0):W.getByRange(U._createCellCoords(e,t),U._createCellCoords(r,n),!0),s},this.getSourceDataAtCol=function(e){return W.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,r,n){const s=le(e,t,r),i=this.hasHook("afterSetSourceDataAtCell"),a=[];i&&(0,d.arrayEach)(s,(e=>{let[t,r,n]=e;a.push([t,r,W.getAtCell(t,r),n])})),(0,d.arrayEach)(s,(e=>{let[t,r,n]=e;W.setAtCell(t,r,n)})),i&&this.runHooks("afterSetSourceDataAtCell",a,n),this.render();const l=U.getActiveEditor();l&&(0,o.isDefined)(l.refreshValue)&&l.refreshValue()},this.getSourceDataAtRow=function(e){return W.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return W.getAtCell(e,t)},this.getDataAtRow=function(e){return B.getRange(U._createCellCoords(e,0),U._createCellCoords(e,this.countCols()-1),B.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,h=null,u=null;void 0===a&&(a=i),void 0===l&&(l=o);let c="mixed";return(0,w.rangeEach)(Math.max(Math.min(i,a),0),Math.max(i,a),(e=>{let t=!0;return(0,w.rangeEach)(Math.max(Math.min(o,l),0),Math.max(o,l),(r=>{const n=this.getCellMeta(e,r);return u=n.type,h?t=h===u:h=u,t})),c=t?u:"mixed",t})),c},this.removeCellMeta=function(e,t,r){const[n,s]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let i=q.getCellMetaKeyValue(n,s,r);!1!==U.runHooks("beforeRemoveCellMeta",e,t,r,i)&&(q.removeCellMeta(n,s,r),U.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&&q.removeRow(this.toPhysicalRow(e),t),n.length>0&&(0,d.arrayEach)(n.reverse(),(t=>{q.createRow(this.toPhysicalRow(e)),(0,d.arrayEach)(t,((t,r)=>this.setCellMetaObject(e,r,t)))})),U.render()},this.setCellMetaObject=function(e,t,r){"object"==typeof r&&(0,u.objectEach)(r,((r,n)=>{this.setCellMeta(e,t,n,r)}))},this.setCellMeta=function(e,t,r,n){if(!1===U.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)),q.setCellMeta(s,i,r,n),U.runHooks("afterSetCellMeta",e,t,r,n)},this.getCellsMeta=function(){return q.getCellsMeta()},this.getCellMeta=function(e,t){let r=this.toPhysicalRow(e),n=this.toPhysicalColumn(t);return null===r&&(r=e),null===n&&(n=t),q.getCellMeta(r,n,{visualRow:e,visualColumn:t})},this.getColumnMeta=function(e){return q.getColumnMeta(this.toPhysicalColumn(e))},this.getCellMetaAtRow=function(e){return q.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===U.dataType||Q.columns)},this.getCellRenderer=function(e,t){const r="number"==typeof e?U.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof r?(0,f.getRenderer)(r):(0,o.isUndefined)(r)?(0,f.getRenderer)("text"):r},this.getCellEditor=function(e,t){const r="number"==typeof e?U.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?U.getCellMeta(e,t).validator:e.validator;return"string"==typeof r?(0,y.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 se;e&&(n.onQueueEmpty=e);let s=U.countRows()-1;for(;s>=0;){if(void 0!==t&&-1===t.indexOf(s)){s-=1;continue}let e=U.countCols()-1;for(;e>=0;)void 0===r||-1!==r.indexOf(e)?(n.addValidatorToQueue(),U.validateCell(U.getDataAtCell(s,e),U.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=U.runHooks("modifyRowHeader",r)),void 0===r?(t=[],(0,w.rangeEach)(U.countRows()-1,(e=>{t.push(U.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=U.countCols();e<t;e++)if(U.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const r=U.runHooks("modifyColHeader",e);if(void 0===r){const e=[],t=U.countCols();for(let r=0;r<t;r++)e.push(U.getColHeader(r));return e}let n=Q.colHeaders;const s=U.toPhysicalColumn(r),o=function(e){const t=[],r=U.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,R.spreadsheetColumnLabel)(r)),n=U.runHooks("modifyColumnHeaderValue",n,e,t),n},this._getColWidthFromSettings=function(e){let t;if(e>=0){t=U.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,t){let r=U._getColWidthFromSettings(e);return r=U.runHooks("modifyColWidth",r,e,t),void 0===r&&(r=N.DEFAULT_COLUMN_WIDTH),r},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,t){let r=U._getRowHeightFromSettings(e);return r=U.runHooks("modifyRowHeight",r,e,t),r},this.countSourceRows=function(){return W.countRows()},this.countSourceCols=function(){return W.countFirstRowKeys()},this.countRows=function(){return B.getLength()},this.countCols=function(){const e=Q.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return U.view._wt.drawn?U.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return U.view._wt.drawn?U.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return U.view._wt.drawn?U.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return U.view._wt.drawn?U.view._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return this.view.getRowHeadersCount()},this.countColHeaders=function(){return this.view.getColumnHeadersCount()},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,w.rangeEachReverse)(U.countRows()-1,(r=>{if(U.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,w.rangeEachReverse)(U.countCols()-1,(r=>{if(U.isEmptyCol(r))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return Q.isEmptyRow.call(U,e)},this.isEmptyCol=function(e){return Q.isEmptyCol.call(U,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])&&z.suspend();const r=ee.selectCells(e);return r&&t&&U.listen(),z.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 ee.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 ee.selectRows(e,t,r)},this.deselectCell=function(){ee.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;z.skipNextScrollCycle(),ee.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,considerHiddenIndexes:i}=null!==(t=e)&&void 0!==t?t:{};let o=n,a=s;if(void 0===i||i){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;o=e?U.rowIndexMapper.getRenderableFromVisualIndex(r):n,a=t?U.columnIndexMapper.getRenderableFromVisualIndex(i):s}const l=Number.isInteger(o),h=Number.isInteger(a);return l&&o>=0&&h&&a>=0?U.view.scrollViewport(U._createCellCoords(o,a),e.horizontalSnap,e.verticalSnap):l&&o>=0&&(h&&a<0||!h)?U.view.scrollViewportVertically(o,e.verticalSnap):!!(h&&a>=0&&(l&&o<0||!l))&&U.view.scrollViewportHorizontally(a,e.horizontalSnap)},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(U._clearTimeouts(),U._clearImmediates(),U.view&&U.view.destroy(),W&&W.destroy(),W=null,this.getShortcutManager().destroy(),q.clearCache(),H.delete(this.guid),(0,T.isRootInstance)(U)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,s.empty)(U.rootElement),V.destroy(),G&&G.destroy(),U.batchExecution((()=>{U.rowIndexMapper.unregisterAll(),U.columnIndexMapper.unregisterAll(),J.getItems().forEach((e=>{let[,t]=e;t.destroy()})),J.clear(),U.runHooks("afterDestroy")}),!0),M.Hooks.getSingleton().destroy(U),(0,u.objectEach)(U,((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)})),U.isDestroyed=!0,B&&B.destroy(),B=null,Y=null,ee=null,G=null,U=null},this.getActiveEditor=function(){return G.getActiveEditor()},this.getFirstRenderedVisibleRow=function(){return U.view.getFirstRenderedVisibleRow()},this.getLastRenderedVisibleRow=function(){return U.view.getLastRenderedVisibleRow()},this.getFirstRenderedVisibleColumn=function(){return U.view.getFirstRenderedVisibleColumn()},this.getLastRenderedVisibleColumn=function(){return U.view.getLastRenderedVisibleColumn()},this.getFirstFullyVisibleRow=function(){return U.view.getFirstFullyVisibleRow()},this.getLastFullyVisibleRow=function(){return U.view.getLastFullyVisibleRow()},this.getFirstFullyVisibleColumn=function(){return U.view.getFirstFullyVisibleColumn()},this.getLastFullyVisibleColumn=function(){return U.view.getLastFullyVisibleColumn()},this.getFirstPartiallyVisibleRow=function(){return U.view.getFirstPartiallyVisibleRow()},this.getLastPartiallyVisibleRow=function(){return U.view.getLastPartiallyVisibleRow()},this.getFirstPartiallyVisibleColumn=function(){return U.view.getFirstPartiallyVisibleColumn()},this.getLastPartiallyVisibleColumn=function(){return U.view.getLastPartiallyVisibleColumn()},this.getPlugin=function(e){const t=(0,E.toUpperCaseFirst)(e);return"UndoRedo"===t?this.undoRedo:J.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:J.getId(e)},this.getInstance=function(){return U},this.addHook=function(e,t,r){M.Hooks.getSingleton().add(e,t,U,r)},this.hasHook=function(e){return M.Hooks.getSingleton().has(e,U)||M.Hooks.getSingleton().has(e)},this.addHookOnce=function(e,t,r){M.Hooks.getSingleton().once(e,t,U,r)},this.removeHook=function(e,t){M.Hooks.getSingleton().remove(e,t,U)},this.runHooks=function(e,t,r,n,s,i,o){return M.Hooks.getSingleton().run(U,e,t,r,n,s,i,o)},this.getTranslatedPhrase=function(e,t){return(0,_.getTranslatedPhrase)(Q.language,e,t)},this.toHTML=()=>(0,p.instanceToHTML)(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,p.instanceToHTML)(this)),e.firstElementChild},this.timeouts=[],this.useTheme=e=>{this.view.getStylesHandler().useTheme(e),this.runHooks("afterSetTheme",e,!!$)},this.getCurrentThemeName=()=>this.view.getStylesHandler().getThemeName(),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._getEditorManager=function(){return G},this.isRtl=function(){return"rtl"===U.rootWindow.getComputedStyle(U.rootElement).direction},this.isLtr=function(){return!U.isRtl()},this.getDirectionFactor=function(){return U.isLtr()?1:-1};const ce=(0,P.createShortcutManager)({handleEvent:()=>U.isListening(),beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||U.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",(e=>{!1===e.ctrlKey&&!1===e.metaKey&&ce.releasePressedKeys()})),this.getShortcutManager=function(){return ce},this.getFocusManager=function(){return j},(0,g.getPluginsNames)().forEach((e=>{const t=(0,g.getPlugin)(e);J.addItem(e,new t(this))})),(0,L.registerAllShortcutContexts)(U),ce.setActiveContextName("grid"),M.Hooks.getSingleton().run(U,"construct")},r(67834),r(15724),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620),r(14846),r(27458),r(69655),r(94364),r(71766);var s=r(62577),i=r(89804),o=r(70505),a=r(25046),l=n(r(70892)),h=n(r(3849)),u=r(25499),c=r(19053),d=r(10587),p=r(96173),g=r(74672),f=r(54852),m=r(8266),y=r(17027),E=r(5893),w=r(22137),C=n(r(33925)),v=n(r(61068)),R=r(87124),S=r(61149),T=r(45435),N=r(50206),M=r(28197),_=r(58570),b=r(1052),A=r(76717),O=r(6521),I=r(97826),x=r(54394),P=r(89616),L=r(92399),D=r(73618);let k=null;const H=new Map;new Set},32741:(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(62577),s=r(71120);function i(e){const t=e.rootDocument.createElement("input");return t.type="text",t.name="__htFocusCatcher",t.classList.add("htFocusCatcher"),e.getSettings().ariaTags&&(0,n.setAttribute)(t,[(0,s.A11Y_PRESENTATION)(),(0,s.A11Y_HIDDEN)()]),t}},20511:(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()}}),h={wrapped:!1,flipped:!1};let u=!0,c=!1,d=!1;e.addHook("afterListen",(()=>l())),e.addHook("afterUnlisten",(()=>a())),e.addHook("afterSelection",((t,n,s,i,o)=>{var a;(c&&(h.wrapped&&h.flipped||d)&&(d=!1,o.value=!0),u)&&(r=null===(a=e.getSelectedRangeLast())||void 0===a?void 0:a.highlight)})),e.addHook("beforeRowWrap",((e,t,r)=>{h.wrapped=!0,h.flipped=r}));const p={keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:n.GRID_GROUP,group:"focusCatcher"};e.getShortcutManager().getContext("grid").addShortcuts([{...p,callback:()=>{const{tabNavigation:t}=e.getSettings();c=!0,e.getSelectedRangeLast()&&!t&&(u=!1),t||(d=!0)},position:"before"},{...p,callback:t=>{const{tabNavigation:n,autoWrapRow:s}=e.getSettings();if(c=!1,u=!0,!n||!e.selection.isSelected()||s&&h.wrapped&&h.flipped||!s&&h.wrapped)return s&&h.wrapped&&h.flipped&&(r=t.shiftKey?i(e):o(e)),h.wrapped=!1,h.flipped=!1,e.deselectCell(),e.unlisten(),!1;t.preventDefault()},position:"after"}])};var n=r(92399),s=r(32741);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)}},39631:(e,t,r)=>{"use strict";t.__esModule=!0,r(67834),r(15724),r(79747),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620),r(14846),r(27458),r(6211),r(69655);var n=r(64924);function s(e,t,r){i(e,t),t.set(e,r)}function i(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function o(e,t,r){return e.set(l(e,t),r),r}function a(e,t){return e.get(l(e,t))}function l(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var h=new WeakMap,u=new WeakMap,c=new WeakMap,d=new WeakSet;function p(e){a(h,this).set(e,[]),a(u,this).set(e,0)}t.HooksBucket=class{constructor(){var e,t;i(e=this,t=d),t.add(e),s(this,h,new Map),s(this,u,new Map),s(this,c,new Set),n.REGISTERED_HOOKS.forEach((e=>l(d,this,p).call(this,e)))}getHooks(e){var t;return null!==(t=a(h,this).get(e))&&void 0!==t?t:[]}add(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};a(h,this).has(e)||(l(d,this,p).call(this,e),n.REGISTERED_HOOKS.push(e));const s=a(h,this).get(e);if(s.find((e=>e.callback===t)))return;const i=Number.isInteger(r.orderIndex)?r.orderIndex:0,o=!!r.runOnce,u=!!r.initialHook;let g=!1;if(u){const e=s.find((e=>e.initialHook));e&&(e.callback=t,g=!0)}if(!g){s.push({callback:t,orderIndex:i,runOnce:o,initialHook:u,skip:!1});let r=a(c,this).has(e);r||0===i||(r=!0,a(c,this).add(e)),r&&s.length>1&&a(h,this).set(e,s.toSorted(((e,t)=>e.orderIndex-t.orderIndex)))}}has(e){return a(h,this).has(e)&&a(h,this).get(e).length>0}remove(e,t){if(!a(h,this).has(e))return!1;const r=a(h,this).get(e),n=r.find((e=>e.callback===t));if(n){let t=a(u,this).get(e);return n.skip=!0,t+=1,t>100&&(a(h,this).set(e,r.filter((e=>!e.skip))),t=0),a(u,this).set(e,t),!0}return!1}destroy(){a(h,this).clear(),a(u,this).clear(),o(h,this,null),o(u,this,null)}}},64924:(e,t)=>{"use strict";t.__esModule=!0;t.REGISTERED_HOOKS=["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","afterSelectionFocusSet","beforeSelectColumns","afterSelectColumns","beforeSelectRows","afterSelectRows","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterSetSourceDataAtCell","afterSetTheme","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","beforeSelectionFocusSet","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeSelectionHighlightSet","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyColHeader","modifyColWidth","modifyFiltersMultiSelectValue","modifyFocusedElement","modifyRowHeader","modifyRowHeight","modifyRowHeightByOverlayName","modifyData","modifySourceData","modifyRowData","modifyGetCellCoords","modifyGetCoordsElement","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","modifyTransformFocus","modifyTransformStart","modifyTransformEnd","afterModifyTransformFocus","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"],t.REMOVED_HOOKS=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"]]),t.DEPRECATED_HOOKS=new Map([[]])},28197:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(15724);var s=n(r(85707)),i=r(10587),o=r(5893),a=r(14859),l=r(21595),h=r(89804),u=r(64924),c=r(39631);const d=l.toSingleLine`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
1116
+ turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&(0,h.setAttribute)(this.rootNode,[(0,u.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,h.setAttribute)(e,[(0,u.A11Y_ROW)(),(0,u.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)]);(0,h.removeClass)(e,[c,d]),(s+1)%2==0?(0,h.addClass)(e,c):(0,h.addClass)(e,d)}this.orderView.end()}}t.default=g},85604:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707));t.default=class{constructor(e){let{cellRenderer:t,stylesHandler:r}=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),(0,s.default)(this,"activeOverlayName",void 0),(0,s.default)(this,"stylesHandler",void 0),this.rootNode=e,this.rootDocument=this.rootNode.ownerDocument,this.cellRenderer=t,this.stylesHandler=r}setActiveOverlayName(e){this.activeOverlayName=e}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),n=this.rowUtils;if(e.firstChild){const t=this.renderedRowToSource(r),s=n.getHeightByOverlayName(t,this.activeOverlayName),i=this.stylesHandler.areCellsBorderBox()?0:1;e.firstChild.style.height=s?s-i+"px":""}}}}},15401:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834);var s=n(r(85707)),i=r(62577),o=r(25499);function a(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 l(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var h=new WeakSet;function u(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 h=Math.abs((0,i.getScrollLeft)(a,a));if(l>h){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-h>=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 h=n.getColumnHeaderHeight();for(let n=1;n<=s;n++)if(h+=t.sumCellSizes(n-1,n),a.top+h-l>=r){e=n-2;break}}}return e}t.default=class{constructor(e){a(this,h),(0,s.default)(this,"dataAccessObject",void 0),this.dataAccessObject=e}scrollViewport(e,t,r){if(e.col<0||e.row<0)return!1;const n=this.scrollViewportHorizontally(e.col,t),s=this.scrollViewportVertically(e.row,r);return n||s}scrollViewportHorizontally(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto";const{drawn:r,totalColumns:n}=this.dataAccessObject;if(!r)return!1;const s=(0,o.createObjectPropListener)(t);if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollHorizontally",e,s),!Number.isInteger(e)||e<0||e>n)return!1;t=s.value;const{fixedColumnsStart:i,inlineStartOverlay:a}=this.dataAccessObject,l="auto"===t;if(l&&e<i)return!1;const h=this.getFirstVisibleColumn(),u=this.getLastVisibleColumn();let c=!1;return(l&&(e<h||e>u)||!l)&&(c=a.scrollTo(e,l?e>=this.getLastPartiallyVisibleColumn():"end"===t)),c}scrollViewportVertically(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto";const{drawn:r,totalRows:n}=this.dataAccessObject;if(!r)return!1;const s=(0,o.createObjectPropListener)(t);if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollVertically",e,s),!Number.isInteger(e)||e<0||e>n)return!1;t=s.value;const{fixedRowsBottom:i,fixedRowsTop:a,topOverlay:l}=this.dataAccessObject,h="auto"===t;if(h&&(e<a||e>n-i-1))return!1;const u=this.getFirstVisibleRow(),c=this.getLastVisibleRow();let d=!1;return(h&&(e<u||e>c)||!h)&&(d=l.scrollTo(e,h?e>=this.getLastPartiallyVisibleRow():"bottom"===t)),d}getFirstVisibleRow(){return this.dataAccessObject.wtTable.getFirstVisibleRow()}getLastVisibleRow(){return l(h,this,c).call(this,this.dataAccessObject.wtTable.getLastVisibleRow())}getFirstPartiallyVisibleRow(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleRow()}getLastPartiallyVisibleRow(){return l(h,this,c).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleRow())}getFirstVisibleColumn(){return this.dataAccessObject.wtTable.getFirstVisibleColumn()}getLastVisibleColumn(){return l(h,this,u).call(this,this.dataAccessObject.wtTable.getLastVisibleColumn())}getFirstPartiallyVisibleColumn(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleColumn()}getLastPartiallyVisibleColumn(){return l(h,this,u).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleColumn())}}},32506:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(62577),s=r(77661),i=r(25499),o=r(25046),a=r(38087);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=(0,a.getCornerStyle)(this.instance),this.cornerCenterPointOffset=-Math.ceil(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}px`,this.cornerStyle.height=`${this.cornerDefaultStyle.height}px`,this.cornerStyle.border=[`${this.cornerDefaultStyle.borderWidth}px`,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),(0,o.isMobileBrowser)()&&this.instance.getSetting("isDataViewInstance")&&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:h,bottomHitArea:u}=this.selectionHandles.styles,c=parseInt(a.borderWidth,10),d=parseInt(a.width,10),p=parseInt(l.width,10),g=this.wot.wtTable.getWidth(),f=this.wot.wtTable.getHeight();a.top=`${parseInt(r-d-1,10)}px`,a[o]=`${parseInt(n-d-1,10)}px`,l.top=`${parseInt(r-p/4*3,10)}px`,l[o]=`${parseInt(n-p/4*3,10)}px`;const m=Math.min(parseInt(n+s,10),g-d-2*c),y=Math.min(parseInt(n+s-p/4,10),g-p-2*c);h[o]=`${m}px`,u[o]=`${y}px`;const E=Math.min(parseInt(r+i,10),f-d-2*c),w=Math.min(parseInt(r+i-p/4,10),f-p-2*c);h.top=`${E}px`,u.top=`${w}px`,this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(a.display="block",l.display="block",this.isPartRange(e,t)?(h.display="none",u.display="none"):(h.display="block",u.display="block")):(a.display="none",h.display="none",l.display="none",u.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;let[t,r,s,i]=e;if(t<0&&s<0||r<0&&i<0)return void this.disappear();const{wtTable:a,rootDocument:l,rootWindow:h}=this.wot,u=t!==s||r!==i,c=a.getFirstRenderedRow(),d=a.getLastRenderedRow(),p=a.getFirstRenderedColumn(),g=a.getLastRenderedColumn();let f;if(u){if(r=Math.max(r,p),i=Math.min(i,g),t=Math.max(t,c),s=Math.min(s,d),i<r||s<t)return void this.disappear();f=a.getCell(this.wot.createCellCoords(t,r))}else if(f=a.getCell(this.wot.createCellCoords(t,r)),!(f instanceof HTMLElement))return void this.disappear();const m=u?a.getCell(this.wot.createCellCoords(s,i)):f,y=(0,n.offset)(f),E=u?(0,n.offset)(m):y,w=(0,n.offset)(a.TABLE),C=y.top,v=y.left,R=this.wot.wtSettings.getSetting("rtlMode");let S=0,T=0;if(R){const e=(0,n.outerWidth)(a.TABLE),t=(0,n.outerWidth)(f),r=h.innerWidth-w.left-e;T=v+t-E.left,S=h.innerWidth-v-t-r-1}else T=E.left+(0,n.outerWidth)(m)-v,S=v-w.left-1;if(this.isEntireColumnSelected(t,s)){const e=t,n=this.getDimensionsFromHeader("columns",r,i,e,w);let s=null;n&&([s,S,T]=n),s&&(f=s)}let N=C-w.top-1,M=E.top+(0,n.outerHeight)(m)-C;if(this.isEntireRowSelected(r,i)){const e=r,n=this.getDimensionsFromHeader("rows",t,s,e,w);let i=null;n&&([i,N,M]=n),i&&(f=i)}const _=h.getComputedStyle(f);parseInt(_.borderTopWidth,10)>0&&(N+=1,M=M>0?M-1:0),parseInt(_[R?"borderRightWidth":"borderLeftWidth"],10)>0&&(S+=1,T=T>0?T-1:0);const b=R?"right":"left";this.topStyle.top=`${N}px`,this.topStyle[b]=`${S}px`,this.topStyle.width=`${T}px`,this.topStyle.display="block",this.startStyle.top=`${N}px`,this.startStyle[b]=`${S}px`,this.startStyle.height=`${M}px`,this.startStyle.display="block";const A=Math.floor(this.settings.border.width/2);this.bottomStyle.top=N+M-A+"px",this.bottomStyle[b]=`${S}px`,this.bottomStyle.width=`${T}px`,this.bottomStyle.display="block",this.endStyle.top=`${N}px`,this.endStyle[b]=S+T-A+"px",this.endStyle.height=`${M+1}px`,this.endStyle.display="block";let O=this.settings.border.cornerVisible;O="function"==typeof O?O(this.settings.layerLevel):O;const I=this.wot.getSetting("onModifyGetCellCoords",s,i,!1,"render");let[x,P]=[s,i];if(I&&Array.isArray(I)&&([,,x,P]=I),(0,o.isMobileBrowser)()||!O||this.isPartRange(x,P))this.cornerStyle.display="none";else{this.cornerStyle.top=N+M+this.cornerCenterPointOffset-this.cornerDefaultStyle.borderWidth+"px",this.cornerStyle[b]=S+T+this.cornerCenterPointOffset-this.cornerDefaultStyle.borderWidth+"px",this.cornerStyle.borderRightWidth=`${this.cornerDefaultStyle.borderWidth}px`,this.cornerStyle.borderLeftWidth=`${this.cornerDefaultStyle.borderWidth}px`,this.cornerStyle.borderBottomWidth=`${this.cornerDefaultStyle.borderWidth}px`,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";let e=(0,n.getTrimmingContainer)(a.TABLE);const t=e===h;t&&(e=l.documentElement);const r=parseInt(this.cornerDefaultStyle.borderWidth,10)-1,o=Math.ceil(parseInt(this.cornerDefaultStyle.width,10)/2),u=Math.ceil(parseInt(this.cornerDefaultStyle.height,10)/2);if(i===this.wot.getSetting("totalColumns")-1){const s=t?m.getBoundingClientRect().left:m.offsetLeft;let i=!1,a=0;R?(a=s-parseInt(this.cornerDefaultStyle.width,10)/2,i=a<0):(a=s+(0,n.outerWidth)(m)+parseInt(this.cornerDefaultStyle.width,10)/2,i=a>=(0,n.innerWidth)(e)),i&&(this.cornerStyle[b]=`${Math.floor(S+T+this.cornerCenterPointOffset-o-r)}px`,this.cornerStyle[R?"borderLeftWidth":"borderRightWidth"]=0)}if(s===this.wot.getSetting("totalRows")-1){(t?m.getBoundingClientRect().top:m.offsetTop)+(0,n.outerHeight)(m)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,n.innerHeight)(e)&&(this.cornerStyle.top=`${Math.floor(N+M+this.cornerCenterPointOffset-u-r)}px`,this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}(0,o.isMobileBrowser)()&&this.instance.getSetting("isDataViewInstance")&&this.updateMultipleSelectionHandlesPosition(s,i,N,S,T,M)}isEntireColumnSelected(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}isEntireRowSelected(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}getDimensionsFromHeader(e,t,r,s,i){const{wtTable:o}=this.wot,a=o.wtRootElement.parentNode;let l=null,h=null,u=null,c=null,d=null,p=null,g=null,f=null;switch(e){case"rows":l=function(){return o.getRowHeader(...arguments)},h=function(){return(0,n.outerHeight)(...arguments)},u="ht__selection--rows",p="top";break;case"columns":l=function(){return o.getColumnHeader(...arguments)},h=function(){return(0,n.outerWidth)(...arguments)},u="ht__selection--columns",p="left"}if(a.classList.contains(u)){const e=this.wot.getSetting("columnHeaders").length;if(g=l(t,e-s),f=l(r,e-s),!g||!f)return!1;const o=(0,n.offset)(g),a=(0,n.offset)(f);return g&&f&&(c=o[p]-i[p]-1,d=a[p]+h(f)-o[p]),[g,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.instance.getSetting("isDataViewInstance")&&(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)}}},38087:(e,t)=>{"use strict";t.__esModule=!0;t.getCornerStyle=e=>{const t=e.stylesHandler;if(t.isClassicTheme())return Object.freeze({width:6,height:6,borderWidth:1,borderStyle:"solid",borderColor:"#FFF"});const r=t.getCSSVariableValue("cell-autofill-size"),n=t.getCSSVariableValue("cell-autofill-border-width"),s=t.getCSSVariableValue("cell-autofill-border-color");return Object.freeze({width:r,height:r,borderWidth:n,borderStyle:"solid",borderColor:s})}},20746:(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"},70471:(e,t,r)=>{"use strict";r(14846),r(69655);var n=r(96784);t.__esModule=!0;var s={SelectionManager:!0,Selection:!0},i=n(r(42157));t.Selection=i.default;var o=r(20746);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(38087);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(67600);t.SelectionManager=l.SelectionManager},67600:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834),r(15724),r(25352),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620),r(14846),r(69655),r(94364);var s=r(62577),i=r(10917),o=n(r(32506));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 h(e,t){return e.get(c(e,t))}function u(e,t,r){return e.set(c(e,t),r),r}function c(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var d=new WeakMap,p=new WeakMap,g=new WeakMap,f=new WeakMap,m=new WeakMap,y=new WeakMap,E=new WeakSet;function w(){const e=h(f,this).get(h(d,this)),t=h(d,this).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=h(d,this).wtTable.TABLE.querySelectorAll(`.${e}`);let i=[];Array.isArray(null===(t=h(p,this).options)||void 0===t?void 0:t.cellAttributes)&&(i=h(p,this).options.cellAttributes.map((e=>e[0]))),Array.isArray(null===(r=h(p,this).options)||void 0===r?void 0:r.headerAttributes)&&(i=[...i,...h(p,this).options.headerAttributes.map((e=>e[0]))]);for(let t=0,r=n.length;t<r;t++)(0,s.removeClass)(n[t],e),(0,s.removeAttribute)(n[t],i)})),e.clear()}t.SelectionManager=class{constructor(e){var t,r;l(t=this,r=E),r.add(t),a(this,d,void 0),a(this,p,void 0),a(this,g,new i.SelectionScanner),a(this,f,new WeakMap),a(this,m,new WeakSet),a(this,y,new Map),u(p,this,e)}setActiveOverlay(e){return u(d,this,e),h(g,this).setActiveOverlay(h(d,this)),h(f,this).has(h(d,this))||h(f,this).set(h(d,this),new Set),this}getFocusSelection(){return null!==h(p,this)?h(p,this).getFocus():null}getAreaSelection(){return null!==h(p,this)?h(p,this).createLayeredArea():null}getBorderInstance(e){if(!e.settings.border)return null;if(h(y,this).has(e)){const t=h(y,this).get(e);if(t.has(h(d,this)))return t.get(h(d,this));const r=new o.default(h(d,this),e.settings);return t.set(h(d,this),r),r}const t=new o.default(h(d,this),e.settings);return h(y,this).set(e,new Map([[h(d,this),t]])),t}getBorderInstances(e){var t,r;return Array.from(null!==(t=null===(r=h(y,this).get(e))||void 0===r?void 0:r.values())&&void 0!==t?t:[])}destroyBorders(e){h(y,this).get(e).forEach((e=>e.destroy())),h(y,this).delete(e)}render(e){if(null===h(p,this))return;e&&c(E,this,w).call(this);const t=Array.from(h(p,this)),r=new Map,n=new Map;for(let e=0;e<t.length;e++){const s=t[e],{className:i,headerAttributes:o,createLayers:a,selectionType:l}=s.settings;h(m,this).has(s)||(h(m,this).add(s),s.addLocalHook("destroy",(()=>this.destroyBorders(s))));const u=this.getBorderInstance(s);if(s.isEmpty()){null==u||u.disappear();continue}if(i){h(g,this).setActiveSelection(s).scan().forEach((e=>{if(r.has(e)){const t=r.get(e);t.has(i)&&!0===a?t.set(i,t.get(i)+1):t.set(i,1)}else r.set(e,new Map([[i,1]]));o&&(n.has(e)||n.set(e,[]),"TH"===e.nodeName&&n.get(e).push(...o))}))}const c=s.getCorners();h(d,this).getSetting("onBeforeDrawBorders",c,l),null==u||u.appear(c)}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=>h(f,this).get(h(d,this)).add(e))),(0,s.addClass)(t,n),"TD"===t.nodeName&&Array.isArray(null===(r=h(p,this).options)||void 0===r?void 0:r.cellAttributes)&&(0,s.setAttribute)(t,h(p,this).options.cellAttributes)})),Array.from(n.keys()).forEach((e=>{(0,s.setAttribute)(e,[...n.get(e)])}))}}},10917:(e,t,r)=>{"use strict";t.__esModule=!0,r(67834),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620);var n=r(62577);function s(e,t,r){i(e,t),t.set(e,r)}function i(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function o(e,t){return e.get(l(e,t))}function a(e,t,r){return e.set(l(e,t),r),r}function l(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var h=new WeakMap,u=new WeakMap,c=new WeakSet;function d(e){let[t,r,n,s]=o(h,this).getCorners();if(t<0&&n<0||r<0&&s<0)return;const{wtTable:i}=o(u,this),a=t!==n||r!==s;if(r=Math.max(r,0),s=Math.max(s,0),t=Math.max(t,0),n=Math.max(n,0),a){if(r=Math.max(r,i.getFirstRenderedColumn()),s=Math.min(s,i.getLastRenderedColumn()),t=Math.max(t,i.getFirstRenderedRow()),n=Math.min(n,i.getLastRenderedRow()),s<r||n<t)return}else{if(!(i.getCell(o(u,this).createCellCoords(t,r))instanceof HTMLElement))return}for(let i=t;i<=n;i+=1)for(let t=r;t<=s;t+=1)e(i,t)}function p(e){const{wtTable:t}=o(u,this),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;i(e=this,t=c),t.add(e),s(this,h,void 0),s(this,u,void 0)}setActiveOverlay(e){return a(u,this,e),this}setActiveSelection(e){return a(h,this,e),this}scan(){const e=o(h,this).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,s]=o(h,this).getCorners(),{wtTable:i}=o(u,this),a=i.getRenderedColumnsCount(),l=i.getColumnHeadersCount();let c=0;for(let d=-i.getRowHeadersCount();d<a;d++){const a=i.columnFilter.renderedToSource(d);if(!(a<r||a>s)){for(let d=-l;d<0;d++){if(d<t||d>n)continue;const p=d+l;let g=i.getColumnHeader(a,p);const f=o(u,this).getSetting("onBeforeHighlightingColumnHeader",a,p,{selectionType:o(h,this).settings.selectionType,columnCursor:c,selectionWidth:s-r+1});null!==f&&(f!==a&&(g=i.getColumnHeader(f,p)),e(g))}c+=1}}}scanRowsInHeadersRange(e){const[t,r,n,s]=o(h,this).getCorners(),{wtTable:i}=o(u,this),a=i.getRenderedRowsCount(),l=i.getRowHeadersCount();let c=0;for(let d=-i.getColumnHeadersCount();d<a;d++){const a=i.rowFilter.renderedToSource(d);if(!(a<t||a>n)){for(let d=-l;d<0;d++){if(d<r||d>s)continue;const p=d+l;let g=i.getRowHeader(a,p);const f=o(u,this).getSetting("onBeforeHighlightingRowHeader",a,p,{selectionType:o(h,this).settings.selectionType,rowCursor:c,selectionHeight:n-t+1});null!==f&&(f!==a&&(g=i.getRowHeader(f,p)),e(g))}c+=1}}}scanCellsRange(e){const{wtTable:t}=o(u,this);l(c,this,d).call(this,((r,s)=>{const i=t.getCell(o(u,this).createCellCoords(r,s)),a=o(u,this).getSetting("onAfterDrawSelection",r,s,o(h,this).settings.layerLevel);"string"==typeof a&&(0,n.addClass)(i,a),e(i)}))}scanRowsInCellsRange(e){const[t,,r]=o(h,this).getCorners(),{wtTable:n}=o(u,this);l(c,this,p).call(this,((s,i)=>{if(s>=t&&s<=r){const t=n.getCell(o(u,this).createCellCoords(s,i));e(t)}}))}scanColumnsInCellsRange(e){const[,t,,r]=o(h,this).getCorners(),{wtTable:n}=o(u,this);l(c,this,p).call(this,((s,i)=>{if(i>=t&&i<=r){const t=n.getCell(o(u,this).createCellCoords(s,i));e(t)}}))}}},42157:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=r(25499),i=n(r(16050));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},34117:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834);var s=n(r(85707)),i=r(62577),o=r(25499);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,currentRowClassName:null,currentColumnClassName:null,preventOverflow:()=>!1,preventWheel:!1,data:void 0,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(){},rowHeightByOverlayName(){},defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,viewportRowRenderingThreshold:null,viewportColumnRenderingThreshold: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,onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onModifyGetCoordsElement:null,onModifyGetCoords: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]}}},7346:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834),r(15724),r(14846),r(69655);var s=n(r(85707)),i=r(62577),o=r(89804),a=n(r(62383)),l=n(r(82217)),h=r(36936),u=n(r(92020)),c=n(r(67920)),d=r(69397),p=r(71120);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 u.default(this.dataAccessObject,this.wtSettings),this.tableRenderer=new h.Renderer({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wtSettings.getSettingPure("cellRenderer"),stylesHandler:this.dataAccessObject.stylesHandler})}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,p.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,p.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,p.A11Y_PRESENTATION)()])),r.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,i.setAttribute)(r,[(0,p.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"),h=t.getSetting("rowHeaders"),u=h.length,c=t.getSetting("columnHeaders"),p=c.length;let g=e;if(this.isMaster&&(r.beforeDraw(),this.holderOffset=(0,i.offset)(this.holder),g=n.createCalculators(g),u&&!t.getSetting("fixedColumnsStart"))){const e=r.inlineStartOverlay.getScrollPosition(),t=this.correctHeaderWidth;this.correctHeaderWidth=0!==e,t!==this.correctHeaderWidth&&(g=!1)}if(g)this.isMaster&&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,p),this.columnFilter=new a.default(t,o,u);let g=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const e={};this.wtSettings.getSetting("beforeDraw",!0,e),g=!0!==e.skipRender}g&&(this.tableRenderer.setHeaderContentRenderers(h,c),(this.is(d.CLONE_BOTTOM)||this.is(d.CLONE_BOTTOM_INLINE_START_CORNER))&&this.tableRenderer.setHeaderContentRenderers(h,[]),this.resetOversizedRows(),this.tableRenderer.setActiveOverlayName(this.name).setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&this.markOversizedColumnHeaders(),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(d.CLONE_BOTTOM))&&this.markOversizedRows(),this.isMaster?(this.wtSettings.getSetting("externalRowCalculator")||n.createVisibleCalculators(),r.refresh(!1),r.applyToDOM(),this.wtSettings.getSetting("onDraw",!0)):this.is(d.CLONE_BOTTOM)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize())}let f=!1;return this.isMaster&&(f=r.topOverlay.resetFixedPosition(),r.bottomOverlay.clone&&(f=r.bottomOverlay.resetFixedPosition()||f),f=r.inlineStartOverlay.resetFixedPosition()||f,r.topInlineStartCornerOverlay&&r.topInlineStartCornerOverlay.resetFixedPosition(),r.bottomInlineStartCornerOverlay&&r.bottomInlineStartCornerOverlay.clone&&r.bottomInlineStartCornerOverlay.resetFixedPosition()),f?(r.refreshAll(),r.adjustElementsSize()):this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(g),this.isMaster&&r.afterDraw(),this.dataAccessObject.drawn=!0,this}markIfOversizedColumnHeader(e){const t=this.columnFilter.renderedToSource(e);let r=this.wtSettings.getSetting("columnHeaders").length;const n=this.dataAccessObject.stylesHandler.getDefaultRowHeight();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,!this.isMaster,"render");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);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);const a=this.wtSettings.getSetting("onModifyGetCoordsElement",s,o);return a&&Array.isArray(a)&&([s,o]=a),this.wot.createCellCoords(s,o)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let e=this.TBODY.childNodes.length;const t=e*this.dataAccessObject.stylesHandler.getDefaultRowHeight(),r=(0,i.innerHeight)(this.TBODY)-1,n=this.wot.stylesHandler.areCellsBorderBox(),s=n?i.outerHeight:i.innerHeight,o=n?0:1,a=n?1:0;let l,h,u,c,d;if(t!==r||this.wtSettings.getSetting("fixedRowsBottom"))for(;e;){e-=1,u=this.rowFilter.renderedToSource(e),l=this.getRowHeight(u),c=this.getTrForRow(u),d=c.querySelector("th");const t=0===u?a:0;h=d?s(d):s(c)-o,(!l&&this.dataAccessObject.stylesHandler.getDefaultRowHeight()<h-t||l<h)&&(n||(h+=1),this.dataAccessObject.wtViewport.oversizedRows[u]=h)}}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)}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}}},55538:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(7346)),i=n(r(96514)),o=n(r(29220)),a=r(25499),l=r(69397);class h extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_BOTTOM)}}(0,a.mixin)(h,i.default),(0,a.mixin)(h,o.default);t.default=h},41618:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(7346)),i=n(r(96514)),o=n(r(11381)),a=r(25499),l=r(69397);class h extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_BOTTOM_INLINE_START_CORNER)}}(0,a.mixin)(h,i.default),(0,a.mixin)(h,o.default);t.default=h},80222:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(7346)),i=n(r(9898)),o=n(r(11381)),a=r(25499),l=r(69397);class h extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_INLINE_START)}}(0,a.mixin)(h,i.default),(0,a.mixin)(h,o.default);t.default=h},78951:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=r(62577),i=n(r(7346)),o=n(r(9898)),a=n(r(29220)),l=r(25499);class h 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 h=e.offsetWidth,u=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 s=parseInt(t.getComputedStyle(n).height,10);r.removeChild(n),0===s&&(u=0)}u=Math.min(u,l),o.height="auto"===n?"auto":`${u}px`,h=Math.min(h,a),o.width=`${h}px`,o.overflow="",this.hasTableHeight="auto"===o.height||u>0,this.hasTableWidth=h>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)(h,o.default),(0,l.mixin)(h,a.default);t.default=h},29220:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(25499);const s={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,n.defineGetter)(s,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});t.default=s},9898:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(25499);const s={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,n.defineGetter)(s,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});t.default=s},11381:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(25499);const s={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,n.defineGetter)(s,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});t.default=s},96514:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(25499);const s={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,n.defineGetter)(s,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});t.default=s},26814:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(25499);const s={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,n.defineGetter)(s,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});t.default=s},94318:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(7346)),i=n(r(26814)),o=n(r(29220)),a=r(25499),l=r(69397);class h extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_TOP)}}(0,a.mixin)(h,i.default),(0,a.mixin)(h,o.default);t.default=h},16318:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(7346)),i=n(r(26814)),o=n(r(11381)),a=r(25499),l=r(69397);class h extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_TOP_INLINE_START_CORNER)}}(0,a.mixin)(h,i.default),(0,a.mixin)(h,o.default);t.default=h},92020:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707));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),this.dataAccessObject=e,this.wtSettings=t}getWidth(e){return this.wtSettings.getSetting("columnWidth",e)||this.wtSettings.getSetting("defaultColumnWidth")}getHeaderHeight(e){let t=this.dataAccessObject.stylesHandler.getDefaultRowHeight();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))}calculateWidths(){const{wtSettings:e}=this;let t=e.getSetting("rowHeaderWidth");if(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)}}}}},76095:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707));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)}}},30303:(e,t)=>{"use strict";t.__esModule=!0;t.WORKING_SPACE_ALL=0,t.WORKING_SPACE_TOP=1,t.WORKING_SPACE_BOTTOM=2},97646:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(44653));t.OrderView=s.default;var i=n(r(7620));t.SharedOrderView=i.default},7620:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(44653));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},44653:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(15724);var s=n(r(85707)),i=r(30303),o=n(r(70074));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(){}}},67744:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707));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}}},70074:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707)),i=n(r(67744)),o=r(30303);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()}}},67920:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707));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}getHeightByOverlayName(e,t){let r=this.wtSettings.getSetting("rowHeightByOverlayName",e,t);const n=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==n&&(r=void 0===r?n:Math.max(r,n)),r}}},52714:(e,t,r)=>{"use strict";t.__esModule=!0,r(67834),r(14846),r(69655);var n=r(62577),s=r(14859);function i(e,t,r){o(e,t),t.set(e,r)}function o(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function a(e,t){return e.get(h(e,t))}function l(e,t,r){return e.set(h(e,t),r),r}function h(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var u=new WeakMap,c=new WeakMap,d=new WeakMap,p=new WeakMap,g=new WeakMap,f=new WeakMap,m=new WeakMap,y=new WeakSet;function E(){const e=this.getCSSVariableValue("line-height"),t=this.getCSSVariableValue("cell-vertical-padding"),r=Math.ceil(parseFloat(this.getStyleForTD("border-bottom-width")));return null===e||null===t||isNaN(r)?null:e+2*t+r}function w(){(0,n.removeClass)(a(c,this),/ht-theme-.*/g),(0,n.addClass)(a(c,this),a(u,this))}function C(){this.isClassicTheme()||l(d,this,getComputedStyle(a(c,this)));const e=h(y,this,v).call(this,["box-sizing","border-bottom-width"]);a(m,this).td={...a(m,this).td,"box-sizing":e["box-sizing"],"border-bottom-width":e["border-bottom-width"]}}function v(e){const t=a(p,this),r=a(c,this),n=t.createElement("table"),s=t.createElement("tbody"),i=t.createElement("tr"),o=t.createElement("tr"),l=t.createElement("td");o.appendChild(l),s.appendChild(i),s.appendChild(o),n.appendChild(s),r.appendChild(n);const h=getComputedStyle(l),u={};return e.forEach((e=>{u[e]=h.getPropertyValue(e)})),r.removeChild(n),u}function R(e){const t=Math.ceil(parseFloat(h(y,this,S).call(this,e)));return Number.isNaN(t)?null:t}function S(e){const t=a(d,this).getPropertyValue(e);return""===t?null:t}function T(){l(m,this,{}),l(f,this,{}),l(g,this,!0)}t.StylesHandler=class{constructor(e){var t,r;o(t=this,r=y),r.add(t),i(this,u,void 0),i(this,c,void 0),i(this,d,void 0),i(this,p,void 0),i(this,g,!0),i(this,f,{}),i(this,m,{}),l(c,this,e.rootTable.parentElement.parentElement),l(p,this,e.rootDocument)}isClassicTheme(){return a(g,this)}getCSSVariableValue(e){var t;if(a(g,this))return null;if(a(f,this)[`--ht-${e}`])return a(f,this)[`--ht-${e}`];const r=null!==(t=h(y,this,R).call(this,`--ht-${e}`))&&void 0!==t?t:h(y,this,S).call(this,`--ht-${e}`);return null!==r?(a(f,this)[`--ht-${e}`]=r,r):void 0}getStyleForTD(e){var t;return null===(t=a(m,this))||void 0===t?void 0:t.td[e]}getDefaultRowHeight(){if(a(g,this))return 23;const e=h(y,this,E).call(this);return!e&&(0,n.hasClass)(a(c,this),"ht-wrapper")?((0,s.warn)(`The "${a(u,this)}" theme is enabled, but its stylesheets are missing or not imported correctly. Import the correct CSS files in order to use that theme.`),l(g,this,!0),this.useTheme(),23):e}areCellsBorderBox(){return"border-box"===this.getStyleForTD("box-sizing")}useTheme(e){if(!e)return h(y,this,C).call(this),l(g,this,!0),void l(u,this,e||void 0);e&&e!==a(u,this)&&(a(u,this)&&h(y,this,T).call(this),l(u,this,e),l(g,this,!1),h(y,this,w).call(this),h(y,this,C).call(this))}getThemeName(){return a(u,this)}removeClassNames(){(0,n.hasClass)(a(c,this),a(u,this))&&(0,n.removeClass)(a(c,this),a(u,this))}}},16598:(e,t,r)=>{"use strict";t.__esModule=!0,r(94364);var n=r(62577),s=r(25499),i=r(63059);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.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.rowsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllRows")?new i.RenderedAllRowsCalculationType:new i.RenderedRowsCalculationType],["fullyVisible",()=>new i.FullyVisibleRowsCalculationType],["partiallyVisible",()=>new i.PartiallyVisibleRowsCalculationType]]),this.columnsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllColumns")?new i.RenderedAllColumnsCalculationType:new i.RenderedColumnsCalculationType],["fullyVisible",()=>new i.FullyVisibleColumnsCalculationType],["partiallyVisible",()=>new i.PartiallyVisibleColumnsCalculationType]]),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}getViewportHeight(){let e=this.getWorkspaceHeight();if(e===1/0)return e;const t=this.getColumnHeaderHeight();return t>0&&(e-=t),e}getWorkspaceWidth(){const{rootDocument:e,rootWindow:t}=this.domBindings,r=this.dataAccessObject.inlineStartOverlayTrimmingContainer;let n;if(r===t){const t=this.wtSettings.getSetting("totalColumns");n=this.wtTable.holder.offsetWidth,this.getRowHeaderWidth()+this.sumColumnWidths(0,t)>n&&(n=e.documentElement.clientWidth)}else n=r.clientWidth;return n}getViewportWidth(){const e=this.getWorkspaceWidth();if(e===1/0)return e;const t=this.getRowHeaderWidth();return t>0?e-t:e}hasVerticalScroll(){return this.wtTable.hider.offsetHeight>this.getWorkspaceHeight()}hasHorizontalScroll(){return this.wtTable.hider.offsetWidth>this.getWorkspaceWidth()}isVerticallyScrollableByWindow(){return this.dataAccessObject.topOverlayTrimmingContainer===this.domBindings.rootWindow}isHorizontallyScrollableByWindow(){return this.dataAccessObject.inlineStartOverlayTrimmingContainer===this.domBindings.rootWindow}sumColumnWidths(e,t){let r=0,n=e;for(;n<t;)r+=this.wtTable.getColumnWidth(n),n+=1;return 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}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}createRowsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rendered","fullyVisible","partiallyVisible"];const{wtSettings:t,wtTable:r}=this;let s,o,a=this.getViewportHeight();this.rowHeaderWidth=NaN;let l=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const h=t.getSetting("fixedRowsTop"),u=t.getSetting("fixedRowsBottom"),c=t.getSetting("totalRows");return h&&l>=0&&(o=this.dataAccessObject.topOverlay.sumCellSizes(0,h),l+=o,a-=o),u&&this.dataAccessObject.bottomOverlay.clone&&(o=this.dataAccessObject.bottomOverlay.sumCellSizes(c-u,c),a-=o),s=r.holder.clientHeight===r.holder.offsetHeight?0:(0,n.getScrollbarWidth)(this.domBindings.rootDocument),new i.ViewportRowsCalculator({calculationTypes:e.map((e=>[e,this.rowsCalculatorTypes.get(e)()])),viewportHeight:a,scrollOffset:l,totalRows:t.getSetting("totalRows"),defaultRowHeight:this.instance.stylesHandler.getDefaultRowHeight(),rowHeightFn:e=>r.getRowHeight(e),overrideFn:t.getSettingPure("viewportRowCalculatorOverride"),horizontalScrollbarHeight:s})}createColumnsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rendered","fullyVisible","partiallyVisible"];const{wtSettings:t,wtTable:r}=this;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({calculationTypes:e.map((e=>[e,this.columnsCalculatorTypes.get(e)()])),viewportWidth:s,scrollOffset:o,totalColumns:t.getSetting("totalColumns"),columnWidthFn:e=>r.getColumnWidth(e),overrideFn:t.getSettingPure("viewportColumnCalculatorOverride"),inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}createCalculators(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,r=this.createRowsCalculator(),n=this.createColumnsCalculator();if(e&&!t.getSetting("renderAllRows")){const t=r.getResultsFor("fullyVisible");e=this.areAllProposedVisibleRowsAlreadyRendered(t)}if(e&&!t.getSetting("renderAllColumns")){const t=n.getResultsFor("fullyVisible");e=this.areAllProposedVisibleColumnsAlreadyRendered(t)}return e||(this.rowsRenderCalculator=r.getResultsFor("rendered"),this.columnsRenderCalculator=n.getResultsFor("rendered")),this.rowsVisibleCalculator=r.getResultsFor("fullyVisible"),this.columnsVisibleCalculator=n.getResultsFor("fullyVisible"),this.rowsPartiallyVisibleCalculator=r.getResultsFor("partiallyVisible"),this.columnsPartiallyVisibleCalculator=n.getResultsFor("partiallyVisible"),e}createVisibleCalculators(){const e=this.createRowsCalculator(["fullyVisible","partiallyVisible"]),t=this.createColumnsCalculator(["fullyVisible","partiallyVisible"]);this.rowsVisibleCalculator=e.getResultsFor("fullyVisible"),this.columnsVisibleCalculator=t.getResultsFor("fullyVisible"),this.rowsPartiallyVisibleCalculator=e.getResultsFor("partiallyVisible"),this.columnsPartiallyVisibleCalculator=t.getResultsFor("partiallyVisible")}areAllProposedVisibleRowsAlreadyRendered(e){if(!this.rowsVisibleCalculator)return!1;let{startRow:t,endRow:r}=e;if(null===t&&null===r){if(!e.isVisibleInTrimmingContainer)return!0;t=this.rowsPartiallyVisibleCalculator.startRow,r=this.rowsPartiallyVisibleCalculator.endRow}const{startRow:n,endRow:s,rowStartOffset:i,rowEndOffset:o}=this.rowsRenderCalculator,a=this.wtSettings.getSetting("totalRows")-1,l=this.wtSettings.getSetting("viewportRowRenderingThreshold");return Number.isInteger(l)&&l>0?(t=Math.max(0,t-Math.min(i,l)),r=Math.min(a,r+Math.min(o,l))):"auto"===l&&(t=Math.max(0,t-Math.ceil(i/2)),r=Math.min(a,r+Math.ceil(o/2))),!(t<n||t===n&&t>0)&&!(r>s||r===s&&r<a)}areAllProposedVisibleColumnsAlreadyRendered(e){if(!this.columnsVisibleCalculator)return!1;let{startColumn:t,endColumn:r}=e;if(null===t&&null===r){if(!e.isVisibleInTrimmingContainer)return!0;t=this.columnsPartiallyVisibleCalculator.startColumn,r=this.columnsPartiallyVisibleCalculator.endColumn}const{startColumn:n,endColumn:s,columnStartOffset:i,columnEndOffset:o}=this.columnsRenderCalculator,a=this.wtSettings.getSetting("totalColumns")-1,l=this.wtSettings.getSetting("viewportColumnRenderingThreshold");return Number.isInteger(l)&&l>0?(t=Math.max(0,t-Math.min(i,l)),r=Math.min(a,r+Math.min(o,l))):"auto"===l&&(t=Math.max(0,t-Math.ceil(i/2)),r=Math.min(a,r+Math.ceil(o/2))),!(t<n||t===n&&t>0)&&!(r>s||r===s&&r<a)}resetHasOversizedColumnHeadersMarked(){(0,s.objectEach)(this.hasOversizedColumnHeadersMarked,((e,t,r)=>{r[t]=void 0}))}}},87935:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(88088);var s=n(r(83497)),i=r(45435),o=r(6521),a=r(28197),l=r(58570),h=r(1791),u=r(10912),c=r(74854),d=r(50206);function p(e,t){const r=new s.default(e,t||{},i.rootInstanceSymbol);return r.init(),r}t.CellCoords=d.CellCoords,t.CellRange=d.CellRange,(0,h.registerCellType)(u.TextCellType),p.editors={BaseEditor:c.BaseEditor},p.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new s.default(e,t,i.rootInstanceSymbol)},p.DefaultSettings=(0,o.metaSchemaFactory)(),p.hooks=a.Hooks.getSingleton(),p.CellCoords=d.CellCoords,p.CellRange=d.CellRange,p.packageName="handsontable",p.buildDate="09/12/2024 14:36:56",p.version="15.0.0-next-c7f1716-20241209",p.languages={dictionaryKeys:l.dictionaryKeys,getLanguageDictionary:l.getLanguageDictionary,getLanguagesDictionaries:l.getLanguagesDictionaries,registerLanguageDictionary:l.registerLanguageDictionary,getTranslatedPhrase:l.getTranslatedPhrase};t.default=p},76527:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(10463),s=r(36759),i=r(25799);const o=t.CELL_TYPE="autocomplete";t.AutocompleteCellType={CELL_TYPE:o,editor:n.AutocompleteEditor,renderer:s.autocompleteRenderer,validator:i.autocompleteValidator}},33023:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(76527);t.AutocompleteCellType=n.AutocompleteCellType,t.CELL_TYPE=n.CELL_TYPE},65829:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(12302),s=r(86510);const i=t.CELL_TYPE="checkbox";t.CheckboxCellType={CELL_TYPE:i,editor:n.CheckboxEditor,renderer:s.checkboxRenderer}},40834:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(65829);t.CELL_TYPE=n.CELL_TYPE,t.CheckboxCellType=n.CheckboxCellType},34135:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(16339),s=r(72375),i=r(5535);const o=t.CELL_TYPE="date";t.DateCellType={CELL_TYPE:o,editor:n.DateEditor,renderer:s.dateRenderer,validator:i.dateValidator}},41031:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(34135);t.CELL_TYPE=n.CELL_TYPE,t.DateCellType=n.DateCellType},62277:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(51034),s=r(24682),i=r(96);const o=t.CELL_TYPE="dropdown";t.DropdownCellType={CELL_TYPE:o,editor:n.DropdownEditor,renderer:s.dropdownRenderer,validator:i.dropdownValidator}},96306:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(62277);t.CELL_TYPE=n.CELL_TYPE,t.DropdownCellType=n.DropdownCellType},74845:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(82518),s=r(32278);const i=t.CELL_TYPE="handsontable";t.HandsontableCellType={CELL_TYPE:i,editor:n.HandsontableEditor,renderer:s.handsontableRenderer}},96618:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(74845);t.CELL_TYPE=n.CELL_TYPE,t.HandsontableCellType=n.HandsontableCellType},14758:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllCellTypes=function(){(0,p.registerCellType)(n.AutocompleteCellType),(0,p.registerCellType)(s.CheckboxCellType),(0,p.registerCellType)(i.DateCellType),(0,p.registerCellType)(o.DropdownCellType),(0,p.registerCellType)(a.HandsontableCellType),(0,p.registerCellType)(l.NumericCellType),(0,p.registerCellType)(h.PasswordCellType),(0,p.registerCellType)(u.SelectCellType),(0,p.registerCellType)(c.TextCellType),(0,p.registerCellType)(d.TimeCellType)};var n=r(33023);t.AutocompleteCellType=n.AutocompleteCellType,t.AUTOCOMPLETE_TYPE=n.CELL_TYPE;var s=r(40834);t.CheckboxCellType=s.CheckboxCellType,t.CHECKBOX_TYPE=s.CELL_TYPE;var i=r(41031);t.DateCellType=i.DateCellType,t.DATE_TYPE=i.CELL_TYPE;var o=r(96306);t.DropdownCellType=o.DropdownCellType,t.DROPDOWN_TYPE=o.CELL_TYPE;var a=r(96618);t.HandsontableCellType=a.HandsontableCellType,t.HANDSONTABLE_TYPE=a.CELL_TYPE;var l=r(15718);t.NumericCellType=l.NumericCellType,t.NUMERIC_TYPE=l.CELL_TYPE;var h=r(20210);t.PasswordCellType=h.PasswordCellType,t.PASSWORD_TYPE=h.CELL_TYPE;var u=r(22315);t.SelectCellType=u.SelectCellType,t.SELECT_TYPE=u.CELL_TYPE;var c=r(10912);t.TextCellType=c.TextCellType,t.TEXT_TYPE=c.CELL_TYPE;var d=r(92858);t.TimeCellType=d.TimeCellType,t.TIME_TYPE=d.CELL_TYPE;var p=r(1791);t.registerCellType=p.registerCellType,t.getCellType=p.getCellType,t.getRegisteredCellTypeNames=p.getRegisteredCellTypeNames,t.getRegisteredCellTypes=p.getRegisteredCellTypes,t.hasCellType=p.hasCellType},15718:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(3421);t.CELL_TYPE=n.CELL_TYPE,t.NumericCellType=n.NumericCellType},3421:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(82304),s=r(17756),i=r(48636);const o=t.CELL_TYPE="numeric";t.NumericCellType={CELL_TYPE:o,editor:n.NumericEditor,renderer:s.numericRenderer,validator:i.numericValidator,dataType:"number"}},20210:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(24157);t.CELL_TYPE=n.CELL_TYPE,t.PasswordCellType=n.PasswordCellType},24157:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(14150),s=r(64910);const i=t.CELL_TYPE="password";t.PasswordCellType={CELL_TYPE:i,editor:n.PasswordEditor,renderer:s.passwordRenderer,copyable:!1}},1791:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t.getCellType=function(e){if(!u(e))throw Error(`You declared cell type "${e}" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by\n "Handsontable.cellTypes.registerCellType" method`);return h(e)},t.registerCellType=function(e,t){"string"!=typeof e&&(e=(t=e).CELL_TYPE);const{editor: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(67834);var s=n(r(28651)),i=r(8266),o=r(54852),a=r(17027);const{register:l,getItem:h,hasItem:u,getNames:c,getValues:d}=(0,s.default)("cellTypes");t.getRegisteredCellTypes=d,t.getRegisteredCellTypeNames=c,t.hasCellType=u},22315:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(19908);t.CELL_TYPE=n.CELL_TYPE,t.SelectCellType=n.SelectCellType},19908:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(63303),s=r(15651);const i=t.CELL_TYPE="select";t.SelectCellType={CELL_TYPE:i,editor:n.SelectEditor,renderer:s.selectRenderer}},10912:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(57489);t.CELL_TYPE=n.CELL_TYPE,t.TextCellType=n.TextCellType},57489:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(66420),s=r(85096);const i=t.CELL_TYPE="text";t.TextCellType={CELL_TYPE:i,editor:n.TextEditor,renderer:s.textRenderer}},92858:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(99421);t.CELL_TYPE=n.CELL_TYPE,t.TimeCellType=n.TimeCellType},99421:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(35442),s=r(70350),i=r(68864);const o=t.CELL_TYPE="time";t.TimeCellType={CELL_TYPE:o,editor:n.TimeEditor,renderer:s.timeRenderer,validator:i.timeValidator}},83497:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t.default=function(e,t){var r,n=this;let F=arguments.length>2&&void 0!==arguments[2]&&arguments[2],U=this;const V=new h.default(U);let B,W,Y,G,j,z,$=!0;(0,T.hasValidParameter)(F)&&(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 K=null!==(r=null==t?void 0:t.layoutDirection)&&void 0!==r?r:"inherit",X=["rtl","ltr"].includes(K)?K:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",X),this.isRtl=function(){return"rtl"===X},this.isLtr=function(){return!U.isRtl()},this.getDirectionFactor=function(){return U.isLtr()?1:-1},t.language=(0,_.getValidLanguageCode)(t.language);const q=new O.MetaManager(U,t,[O.DynamicCellMetaMod,O.ExtendMetaPropertiesMod]),Q=q.getTableMeta(),Z=q.getGlobalMeta(),J=(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),(0,s.addClass)(e,"ht-wrapper"));this.guid=`ht_${(0,E.randomString)()}`,H.set(this.guid,this),this.columnIndexMapper=new S.IndexMapper,this.rowIndexMapper=new S.IndexMapper,this.columnIndexMapper.addLocalHook("indexesSequenceChange",(e=>{U.runHooks("afterColumnSequenceChange",e)})),this.rowIndexMapper.addLocalHook("indexesSequenceChange",(e=>{U.runHooks("afterRowSequenceChange",e)})),W=new v.default(U),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let ee=new A.Selection(Q,{rowIndexMapper:U.rowIndexMapper,columnIndexMapper:U.columnIndexMapper,countCols:()=>U.countCols(),countRows:()=>U.countRows(),propToCol:e=>B.propToCol(e),isEditorOpened:()=>!!U.getActiveEditor()&&U.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),countRenderableRowsInRange:function(){return n.view.countRenderableRowsInRange(...arguments)},countRenderableColumnsInRange:function(){return n.view.countRenderableColumnsInRange(...arguments)},getShortcutManager:()=>U.getShortcutManager(),createCellCoords:(e,t)=>U._createCellCoords(e,t),createCellRange:(e,t,r)=>U._createCellRange(e,t,r),visualToRenderableCoords:e=>{const{row:t,col:r}=e;return U._createCellCoords(t>=0?U.rowIndexMapper.getRenderableFromVisualIndex(t):t,r>=0?U.columnIndexMapper.getRenderableFromVisualIndex(r):r)},renderableToVisualCoords:e=>{const{row:t,col:r}=e;return U._createCellCoords(t>=0?U.rowIndexMapper.getVisualFromRenderableIndex(t):t,r>=0?U.columnIndexMapper.getVisualFromRenderableIndex(r):r)},findFirstNonHiddenRenderableRow:(e,t)=>{const r=t>e?1:-1,n=Math.min(e,t),s=Math.max(e,t),i=U.rowIndexMapper.getNearestNotHiddenIndex(e,r);return null===i||1===r&&i>s||-1===r&&i<n?null:i>=0?U.rowIndexMapper.getRenderableFromVisualIndex(i):i},findFirstNonHiddenRenderableColumn:(e,t)=>{const r=t>e?1:-1,n=Math.min(e,t),s=Math.max(e,t),i=U.columnIndexMapper.getNearestNotHiddenIndex(e,r);return null===i||1===r&&i>s||-1===r&&i<n?null:i>=0?U.columnIndexMapper.getRenderableFromVisualIndex(i):i},isDisabledCellSelection:(e,t)=>e<0||t<0?U.getSettings().disableVisualSelection:U.getCellMeta(e,t).disableVisualSelection});this.selection=ee;const te=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.commit()};function re(e){const t=(0,b.normalizeLanguageCode)(e);(0,_.hasLanguageDictionary)(t)?(U.runHooks("beforeLanguageChange",t),Z.language=t,U.runHooks("afterLanguageChange",t)):(0,b.warnUserAboutLanguageRegistration)(e)}function ne(e,t){const r="className"===e?U.rootElement:U.table;if($)(0,s.addClass)(r,t);else{let n=[],i=[];Z[e]&&(n=Array.isArray(Z[e])?Z[e]:(0,d.stringToArray)(Z[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)}Z[e]=t}function se(){let e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function ie(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function oe(e,t,r){if(!e.length)return void r();const n=U.getActiveEditor(),s=new se;let i=!0;s.onQueueEmpty=()=>{n&&i&&n.cancelChanges(),r()};for(let r=e.length-1;r>=0;r--){const[n,o,,a]=e[r],l=B.propToCol(o);let h;h=Number.isInteger(l)?U.getCellMeta(n,l):{...Object.getPrototypeOf(Q),...Q},"numeric"===h.type&&"string"==typeof a&&(0,w.isNumericLike)(a)&&(e[r][3]=ie(a)),U.getCellValidator(h)&&(s.addValidatorToQueue(),U.validateCell(e[r][3],h,function(t,r){return function(n){if("boolean"!=typeof n)throw new Error("Validation error: result is not boolean");!1===n&&!1===r.allowInvalid&&(i=!1,e.splice(t,1),r.valid=!0),s.removeValidatorFormQueue()}}(r,h),t))}s.checkIfQueueIsEmpty()}function ae(e,t){for(let r=e.length-1;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]>U.countRows()-1;){const{delta:e}=B.createRow(void 0,void 0,{source:t});if(0===e){n=!0;break}}if("array"===U.dataType&&(!Q.columns||0===Q.columns.length)&&Q.allowInsertColumn)for(;B.propToCol(e[r][1])>U.countCols()-1;){const{delta:e}=B.createCol(void 0,void 0,{source:t});if(0===e){n=!0;break}}n||B.set(e[r][0],e[r][1],e[r][3])}}else e.splice(r,1)}const r=e.length>0;if(U.forceFullRender=!0,r){Y.adjustRowsAndCols(),U.runHooks("beforeChangeRender",e,t),G.closeEditor(),U.view.render(),G.prepareEditor(),U.view.adjustElementsSize(),U.runHooks("afterChange",e,t||"edit");const r=U.getActiveEditor();r&&(0,o.isDefined)(r.refreshValue)&&r.refreshValue()}else U.view.render()}function le(e,t,r){return Array.isArray(e)?e:[[e,t,r]]}function he(e,t){const r=U.getActiveEditor(),n=U.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",te),this.rowIndexMapper.addLocalHook("cacheUpdated",te),this.selection.addLocalHook("afterSetRangeEnd",((e,t)=>{const r=(0,u.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,U.colToProp(i.col),o.row,U.colToProp(o.col),r,a),t&&(!r.isTouched()||r.isTouched()&&!r.value)&&z.scrollTo(e);const l=ee.isSelectedByRowHeader(),h=ee.isSelectedByColumnHeader();l&&h?(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")):h?((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"]),"shift"!==ee.getSelectionSource()&&G.closeEditor(null),U.view.render(),G.prepareEditor()})),this.selection.addLocalHook("beforeSetFocus",(e=>{this.runHooks("beforeSelectionFocusSet",e.row,e.col)})),this.selection.addLocalHook("afterSetFocus",(e=>{const t=(0,u.createObjectPropListener)(!1);this.runHooks("afterSelectionFocusSet",e.row,e.col,t),(!t.isTouched()||t.isTouched()&&!t.value)&&z.scrollTo(e),G.closeEditor(),U.view.render(),G.prepareEditor()})),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,U.colToProp(r.col),n.row,U.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",(()=>{G.closeEditor(),U.view.render(),(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("beforeModifyTransformFocus",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("modifyTransformFocus",...t)})).addLocalHook("afterModifyTransformFocus",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("afterModifyTransformFocus",...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"))),Y={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=U.countSourceRows();if(Q.maxRows===a)return;const h="insert_row_below"===e?"below":"above";t=null!==(r=t)&&void 0!==r?r:"below"===h?a:0;const{delta:u,startPhysicalIndex:c}=B.createRow(t,s,{source:i,mode:h});ee.shiftRows(U.toVisualRow(c),u);break;case"insert_col_start":case"insert_col_end":const p="insert_col_end"===e?"end":"start";t=null!==(n=t)&&void 0!==n?n:"end"===p?U.countSourceCols():0;const{delta:g,startPhysicalIndex:f}=B.createCol(t,s,{source:i,mode:p});if(g){if(Array.isArray(Q.colHeaders)){const e=[U.toVisualColumn(f),0];e.length+=g,Array.prototype.splice.apply(Q.colHeaders,e)}ee.shiftColumns(U.toVisualColumn(f),g)}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)?U.countRows()-1:Math.max(r-t,0);Number.isInteger(r)&&(r=Math.max(r-t,0));if(!B.removeRow(r,n,i))return;if(ee.isSelected()){const{row:e}=U.getSelectedRangeLast().highlight;e>=r&&e<=r+n-1&&G.closeEditor(!0)}const a=U.countRows();0===a?ee.deselect():"ContextMenu.removeRow"===i?ee.refresh():ee.shiftRows(r,-n);const l=Q.fixedRowsTop;l>=s+1&&(Q.fixedRowsTop-=Math.min(n,l-s));const h=Q.fixedRowsBottom;h&&s>=a-h&&(Q.fixedRowsBottom-=Math.min(n,h)),t+=n}))};Array.isArray(t)?m(l(t)):m([[t,s]]);break;case"remove_col":const y=e=>{let t=0;(0,d.arrayEach)(e,(e=>{let[r,n]=e;const s=(0,o.isEmpty)(r)?U.countCols()-1:Math.max(r-t,0);let a=U.toPhysicalColumn(s);Number.isInteger(r)&&(r=Math.max(r-t,0));if(!B.removeCol(r,n,i))return;if(ee.isSelected()){const{col:e}=U.getSelectedRangeLast().highlight;e>=r&&e<=r+n-1&&G.closeEditor(!0)}0===U.countCols()?ee.deselect():"ContextMenu.removeColumn"===i?ee.refresh():ee.shiftColumns(r,-n);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)?y(l(t)):y([[t,s]]);break;default:throw new Error(`There is no such action "${e}"`)}U.view.render(),a||Y.adjustRowsAndCols()},adjustRowsAndCols(){const e=Q.minRows,t=Q.minSpareRows,r=Q.minCols,n=Q.minSpareCols;if(e){const t=U.countRows();t<e&&B.createRow(t,e-t,{source:"auto"})}if(t){const e=U.countEmptyRows(!0);if(e<t){const r=t-e,n=Math.min(r,Q.maxRows-U.countSourceRows());B.createRow(U.countRows(),n,{source:"auto"})}}{let e;(r||n)&&(e=U.countEmptyCols(!0));let t=U.countCols();if(r&&!Q.columns&&t<r){const n=r-t;e+=n,B.createCol(t,n,{source:"auto"})}if(n&&!Q.columns&&"array"===U.dataType&&e<n){t=U.countCols();const r=n-e,s=Math.min(r,Q.maxCols-t);B.createCol(t,s,{source:"auto"})}}U.view&&U.view.adjustElementsSize()},populateFromArray(e,t,r,n,s){let i,o,a,l;const h=[],c={},p=[],g=e.row,f=e.col;if(o=t.length,0===o)return!1;let m=0,y=0;switch((0,u.isObject)(r)&&(m=r.col-f+1,y=r.row-g+1),s){case"shift_down":const s=(0,d.pivot)(t),E=s.length,w=Math.max(E,m),C=U.getData().slice(g),v=(0,d.pivot)(C).slice(f,f+w);for(a=0;a<w;a+=1)if(a<E){for(i=0,o=s[a].length;i<y-o;i+=1)s[a].push(s[a][i%o]);a<v.length?p.push(s[a].concat(v[a])):p.push(s[a].concat(new Array(C.length).fill(null)))}else p.push(s[a%E].concat(v[a]));U.populateFromArray(g,f,(0,d.pivot)(p));break;case"shift_right":const R=t.length,S=Math.max(R,y),T=U.getData().slice(g).map((e=>e.slice(f)));for(i=0;i<S;i+=1)if(i<R){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,S).concat(T[i]));U.populateFromArray(g,f,t);break;default:c.row=e.row,c.col=e.col;let N,M=0,_=0,b=!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>U.countRows()-1||c.row>=Q.maxRows);i++){const t=i-M,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=U.getCellMeta(c.row,c.col),"CopyPaste.paste"!==n&&"Autofill.fill"!==n||!N.skipRowOnPaste){for(_=0,a=0;a<l&&!(r&&c.col>r.col&&d>s||!Q.allowInsertColumn&&c.col>U.countCols()-1||c.col>=Q.maxCols);a++){if(N=U.getCellMeta(c.row,c.col),("CopyPaste.paste"===n||"Autofill.fill"===n)&&N.skipColumnOnPaste){_+=1,c.col+=1,l+=1;continue}if(N.readOnly&&"UndoRedo.undo"!==n){c.col+=1;continue}let e=A(t,a-_),r=U.getDataAtCell(c.row,c.col);if(null!==e&&"object"==typeof e)if(Array.isArray(e)&&null===r&&(r=[]),null===r||"object"!=typeof r)b=!1;else{const t=(0,u.duckSchema)(Array.isArray(r)?r:r[0]||r),n=(0,u.duckSchema)(Array.isArray(e)?e:e[0]||e);(0,u.isObjectEqual)(t,n)||Array.isArray(t)&&Array.isArray(n)?e=(0,u.deepClone)(e):b=!1}else null!==r&&"object"==typeof r&&(b=!1);b&&h.push([c.row,c.col,e]),b=!0,c.col+=1}c.row+=1}else M+=1,c.row+=1,o+=1}U.setDataAtCell(h,null,null,n||"populateFromArray")}}},this.init=function(){W.setData(Q.data),U.runHooks("beforeInit"),((0,a.isMobileBrowser)()||(0,a.isIpadOS)())&&(0,s.addClass)(U.rootElement,"mobile"),this.updateSettings(Q,!0),this.view=new C.default(this);const e=Q.themeName||(0,D.getThemeClassName)(U.rootElement);U.useTheme(e),U.view.addClassNameToLicenseElement(U.getCurrentThemeName()),G=l.default.getInstance(U,Q,ee),z=(0,I.createViewportScroller)(U),j=new c.FocusManager(U),(0,T.isRootInstance)(this)&&(0,I.installFocusCatcher)(U),U.runHooks("init"),this.forceFullRender=!0,this.view.render(),$&&null===U.rootElement.offsetParent&&(0,s.observeVisibilityChangeOnce)(U.rootElement,(()=>{U.view._wt.wtOverlays.updateLastSpreaderSize(),U.render(),U.view.adjustElementsSize()})),"object"==typeof $&&(U.runHooks("afterChange",$[0],$[1]),$=!1),U.runHooks("afterInit")},this._createCellCoords=function(e,t){return U.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,r){return U.view._wt.createCellRange(e,t,r)},this.validateCell=function(e,t,r,n){let s=U.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=U.getCell(s,n,!0);if(i&&"TH"!==i.nodeName){const e=U.rowIndexMapper.getRenderableFromVisualIndex(s),t=U.columnIndexMapper.getRenderableFromVisualIndex(n);U.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=U.runHooks("beforeValidate",e,t.visualRow,t.prop,n),U._registerImmediate((()=>{s.call(t,e,(r=>{U&&(r=U.runHooks("afterValidate",r,e,t.visualRow,t.prop,n),t.valid=r,a(r),U.runHooks("postAfterValidate",r,e,t.visualRow,t.prop,n))}))}))):U._registerImmediate((()=>{t.valid=!0,a(t.valid,!1)}))},this.setDataAtCell=function(e,t,r,n){const s=le(e,t,r),i=[];let o,a,l,h=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]:B.colToProp(s[o][1]),i.push([s[o][0],l,W.getAtCell(this.toPhysicalRow(s[o][0]),s[o][1]),s[o][2]])}h||"object"!=typeof e||(h=t);const u=he(i,h);U.runHooks("afterSetDataAtCell",u,h),oe(u,h,(()=>{ae(u,h)}))},this.setDataAtRowProp=function(e,t,r,n){const s=le(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],W.getAtCell(this.toPhysicalRow(s[o][0]),s[o][1]),s[o][2]]);l||"object"!=typeof e||(l=t);const h=he(i,n);U.runHooks("afterSetDataAtRowProp",h,l),oe(h,l,(()=>{ae(h,l)}))},this.listen=function(){U&&!U.isListening()&&(H.forEach((e=>{U!==e&&e.unlisten()})),k=U.guid,U.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(k=null,U.runHooks("afterUnlisten"))},this.isListening=function(){return k===U.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];G.closeEditor(e),U.view.render(),t&&ee.isSelected()&&G.prepareEditor()},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?U._createCellCoords(n,s):null;return Y.populateFromArray(U._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 B.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 B.spliceRow(e,t,r,...s)},this.getSelected=function(){if(ee.isSelected())return(0,d.arrayMap)(ee.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(ee.isSelected())return Array.from(ee.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(!ee.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];(0,d.arrayEach)(ee.getSelectedRange(),(e=>{if(e.isSingleHeader())return;const r=e.getTopStartCorner(),n=e.getBottomEndCorner();(0,w.rangeEach)(r.row,n.row,(e=>{(0,w.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():U.view.render())},this.render=function(){this.view&&(this.renderCall=!0,this.forceFullRender=!0,this.isRenderSuspended()||U.view.render())},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(!U.view)return;const{width:e,height:t}=U.view.getLastSize(),{width:r,height:n}=U.rootElement.getBoundingClientRect(),s=r!==e||n!==t;!1===U.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:r,height:n},s)||((s||U.view._wt.wtOverlays.scrollableElement===U.rootWindow)&&(U.view.setLastSize(r,n),U.render()),U.runHooks("afterRefreshDimensions",{width:e,height:t},{width:r,height:n},s))},this.updateData=function(e,t){(0,O.replaceData)(e,(e=>{B=e}),(e=>{B=e,U.columnIndexMapper.fitToLength(this.getInitialColumnCount()),U.rowIndexMapper.fitToLength(this.countSourceRows()),Y.adjustRowsAndCols(),ee.refresh()}),{hotInstance:U,dataMap:B,dataSource:W,internalSource:"updateData",source:t,metaManager:q,firstRun:$})},this.loadData=function(e,t){(0,O.replaceData)(e,(e=>{B=e}),(()=>{q.clearCellsCache(),U.initIndexMappers(),Y.adjustRowsAndCols(),ee.refresh(),$&&($=[null,"loadData"])}),{hotInstance:U,dataMap:B,dataSource:W,internalSource:"loadData",source:t,metaManager:q,firstRun:$})},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"===U.dataType){const r=this.countSourceCols();for(let n=0;n<r;n+=1)e(n)&&(t+=1)}else"object"!==U.dataType&&"function"!==U.dataType||(t=B.colToPropCache.length);else if((0,o.isDefined)(Q.dataSchema)){const e=B.getSchema();t=Array.isArray(e)?e.length:(0,u.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)?B.getAll():B.getRange(U._createCellCoords(e,t),U._createCellCoords(r,n),B.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,r,n){return B.getCopyableText(U._createCellCoords(e,t),U._createCellCoords(r,n))},this.getCopyableData=function(e,t){return B.getCopyable(e,B.colToProp(t))},this.getSchema=function(){return B.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=($?U.loadData:U.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?re(e.language):"className"===n?ne("className",e.className):"tableClassName"===n&&U.table?(ne("tableClassName",e.tableClassName),U.view._wt.wtOverlays.syncOverlayTableClassNames()):M.Hooks.getSingleton().isRegistered(n)||M.Hooks.getSingleton().isDeprecated(n)?(0,i.isFunction)(e[n])?M.Hooks.getSingleton().addAsFixed(n,e[n],U):Array.isArray(e[n])&&M.Hooks.getSingleton().add(n,e[n],U):!t&&(0,u.hasOwnProperty)(e,n)&&(Z[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&&(B.createMap(),U.initIndexMappers());const l=U.countCols(),h=Q.columns;if(h&&(0,i.isFunction)(h)&&(a=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||q.clearCache(),l>0)for(n=0,s=0;n<l;n++){if(h){const e=a?h(n):h[s];e&&q.updateColumnMeta(s,e)}s+=1}(0,o.isDefined)(e.cell)&&(0,u.objectEach)(e.cell,(e=>{U.setCellMetaObject(e.row,e.col,e)})),U.runHooks("afterCellMetaReset");let c=U.rootElement.style.height;""!==c&&(c=parseInt(U.rootElement.style.height,10));let d=e.height;if((0,i.isFunction)(d)&&(d=d()),t){U.rootElement.getAttribute("style")&&U.rootElement.setAttribute("data-initialstyle",U.rootElement.getAttribute("style"))}if(null===d){const e=U.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?U.rootElement.setAttribute("style",e):(U.rootElement.style.height="",U.rootElement.style.overflow="")}else void 0!==d&&(U.rootElement.style.height=isNaN(d)?`${d}`:`${d}px`,U.rootElement.style.overflow="hidden");if(void 0!==e.width){let t=e.width;(0,i.isFunction)(t)&&(t=t()),U.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}if(!t){if(U.view){U.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),U.view._wt.exportSettingsAsClassNames();const t=U.getCurrentThemeName(),r=(0,u.hasOwnProperty)(e,"themeName");t&&r&&(U.view.getStylesHandler().removeClassNames(),U.view.removeClassNameFromLicenseElement(t));const n=r&&e.themeName||(0,D.getThemeClassName)(U.rootElement);U.useTheme(n),U.view.addClassNameToLicenseElement(U.getCurrentThemeName())}U.runHooks("afterUpdateSettings",e)}Y.adjustRowsAndCols(),U.view&&!$&&(U.forceFullRender=!0,U.view.render(),U.view._wt.wtOverlays.adjustElementsSize()),t||!U.view||""!==c&&""!==d&&void 0!==d||c===d||U.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=U.getSelectedLast();if(Q.getValue){if((0,i.isFunction)(Q.getValue))return Q.getValue.call(U);if(e)return U.getData()[e[0][0]][Q.getValue]}else if(e)return U.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){Y.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||void 0===s||void 0===n?null:U.view.getCellAtCoords(U._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)),U._createCellCoords(s,i)},this.colToProp=function(e){return B.colToProp(e)},this.propToCol=function(e){return B.propToCol(e)},this.toVisualRow=e=>this.rowIndexMapper.getVisualFromPhysicalIndex(e),this.toVisualColumn=e=>this.columnIndexMapper.getVisualFromPhysicalIndex(e),this.toPhysicalRow=e=>this.rowIndexMapper.getPhysicalFromVisualIndex(e),this.toPhysicalColumn=e=>this.columnIndexMapper.getPhysicalFromVisualIndex(e),this.getDataAtCell=function(e,t){return B.get(e,B.colToProp(t))},this.getDataAtRowProp=function(e,t){return B.get(e,t)},this.getDataAtCol=function(e){const t=[],r=B.getRange(U._createCellCoords(0,e),U._createCellCoords(Q.data.length-1,e),B.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=B.getRange(U._createCellCoords(0,B.propToCol(e)),U._createCellCoords(Q.data.length-1,B.propToCol(e)),B.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?W.getData():W.getByRange(U._createCellCoords(e,t),U._createCellCoords(r,n)),s},this.getSourceDataArray=function(e,t,r,n){let s;return s=void 0===e?W.getData(!0):W.getByRange(U._createCellCoords(e,t),U._createCellCoords(r,n),!0),s},this.getSourceDataAtCol=function(e){return W.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,r,n){const s=le(e,t,r),i=this.hasHook("afterSetSourceDataAtCell"),a=[];i&&(0,d.arrayEach)(s,(e=>{let[t,r,n]=e;a.push([t,r,W.getAtCell(t,r),n])})),(0,d.arrayEach)(s,(e=>{let[t,r,n]=e;W.setAtCell(t,r,n)})),i&&this.runHooks("afterSetSourceDataAtCell",a,n),this.render();const l=U.getActiveEditor();l&&(0,o.isDefined)(l.refreshValue)&&l.refreshValue()},this.getSourceDataAtRow=function(e){return W.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return W.getAtCell(e,t)},this.getDataAtRow=function(e){return B.getRange(U._createCellCoords(e,0),U._createCellCoords(e,this.countCols()-1),B.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,h=null,u=null;void 0===a&&(a=i),void 0===l&&(l=o);let c="mixed";return(0,w.rangeEach)(Math.max(Math.min(i,a),0),Math.max(i,a),(e=>{let t=!0;return(0,w.rangeEach)(Math.max(Math.min(o,l),0),Math.max(o,l),(r=>{const n=this.getCellMeta(e,r);return u=n.type,h?t=h===u:h=u,t})),c=t?u:"mixed",t})),c},this.removeCellMeta=function(e,t,r){const[n,s]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let i=q.getCellMetaKeyValue(n,s,r);!1!==U.runHooks("beforeRemoveCellMeta",e,t,r,i)&&(q.removeCellMeta(n,s,r),U.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&&q.removeRow(this.toPhysicalRow(e),t),n.length>0&&(0,d.arrayEach)(n.reverse(),(t=>{q.createRow(this.toPhysicalRow(e)),(0,d.arrayEach)(t,((t,r)=>this.setCellMetaObject(e,r,t)))})),U.render()},this.setCellMetaObject=function(e,t,r){"object"==typeof r&&(0,u.objectEach)(r,((r,n)=>{this.setCellMeta(e,t,n,r)}))},this.setCellMeta=function(e,t,r,n){if(!1===U.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)),q.setCellMeta(s,i,r,n),U.runHooks("afterSetCellMeta",e,t,r,n)},this.getCellsMeta=function(){return q.getCellsMeta()},this.getCellMeta=function(e,t){let r=this.toPhysicalRow(e),n=this.toPhysicalColumn(t);return null===r&&(r=e),null===n&&(n=t),q.getCellMeta(r,n,{visualRow:e,visualColumn:t})},this.getColumnMeta=function(e){return q.getColumnMeta(this.toPhysicalColumn(e))},this.getCellMetaAtRow=function(e){return q.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===U.dataType||Q.columns)},this.getCellRenderer=function(e,t){const r="number"==typeof e?U.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof r?(0,f.getRenderer)(r):(0,o.isUndefined)(r)?(0,f.getRenderer)("text"):r},this.getCellEditor=function(e,t){const r="number"==typeof e?U.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?U.getCellMeta(e,t).validator:e.validator;return"string"==typeof r?(0,y.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 se;e&&(n.onQueueEmpty=e);let s=U.countRows()-1;for(;s>=0;){if(void 0!==t&&-1===t.indexOf(s)){s-=1;continue}let e=U.countCols()-1;for(;e>=0;)void 0===r||-1!==r.indexOf(e)?(n.addValidatorToQueue(),U.validateCell(U.getDataAtCell(s,e),U.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=U.runHooks("modifyRowHeader",r)),void 0===r?(t=[],(0,w.rangeEach)(U.countRows()-1,(e=>{t.push(U.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=U.countCols();e<t;e++)if(U.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const r=U.runHooks("modifyColHeader",e);if(void 0===r){const e=[],t=U.countCols();for(let r=0;r<t;r++)e.push(U.getColHeader(r));return e}let n=Q.colHeaders;const s=U.toPhysicalColumn(r),o=function(e){const t=[],r=U.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,R.spreadsheetColumnLabel)(r)),n=U.runHooks("modifyColumnHeaderValue",n,e,t),n},this._getColWidthFromSettings=function(e){let t;if(e>=0){t=U.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,t){let r=U._getColWidthFromSettings(e);return r=U.runHooks("modifyColWidth",r,e,t),void 0===r&&(r=N.DEFAULT_COLUMN_WIDTH),r},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,t){let r=U._getRowHeightFromSettings(e);return r=U.runHooks("modifyRowHeight",r,e,t),r},this.countSourceRows=function(){return W.countRows()},this.countSourceCols=function(){return W.countFirstRowKeys()},this.countRows=function(){return B.getLength()},this.countCols=function(){const e=Q.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return U.view._wt.drawn?U.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return U.view._wt.drawn?U.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return U.view._wt.drawn?U.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return U.view._wt.drawn?U.view._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return this.view.getRowHeadersCount()},this.countColHeaders=function(){return this.view.getColumnHeadersCount()},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,w.rangeEachReverse)(U.countRows()-1,(r=>{if(U.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,w.rangeEachReverse)(U.countCols()-1,(r=>{if(U.isEmptyCol(r))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return Q.isEmptyRow.call(U,e)},this.isEmptyCol=function(e){return Q.isEmptyCol.call(U,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])&&z.suspend();const r=ee.selectCells(e);return r&&t&&U.listen(),z.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 ee.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 ee.selectRows(e,t,r)},this.deselectCell=function(){ee.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;z.skipNextScrollCycle(),ee.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,considerHiddenIndexes:i}=null!==(t=e)&&void 0!==t?t:{};let o=n,a=s;if(void 0===i||i){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;o=e?U.rowIndexMapper.getRenderableFromVisualIndex(r):n,a=t?U.columnIndexMapper.getRenderableFromVisualIndex(i):s}const l=Number.isInteger(o),h=Number.isInteger(a);return l&&o>=0&&h&&a>=0?U.view.scrollViewport(U._createCellCoords(o,a),e.horizontalSnap,e.verticalSnap):l&&o>=0&&(h&&a<0||!h)?U.view.scrollViewportVertically(o,e.verticalSnap):!!(h&&a>=0&&(l&&o<0||!l))&&U.view.scrollViewportHorizontally(a,e.horizontalSnap)},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(U._clearTimeouts(),U._clearImmediates(),U.view&&U.view.destroy(),W&&W.destroy(),W=null,this.getShortcutManager().destroy(),q.clearCache(),H.delete(this.guid),(0,T.isRootInstance)(U)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,s.empty)(U.rootElement),V.destroy(),G&&G.destroy(),U.batchExecution((()=>{U.rowIndexMapper.unregisterAll(),U.columnIndexMapper.unregisterAll(),J.getItems().forEach((e=>{let[,t]=e;t.destroy()})),J.clear(),U.runHooks("afterDestroy")}),!0),M.Hooks.getSingleton().destroy(U),(0,u.objectEach)(U,((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)})),U.isDestroyed=!0,B&&B.destroy(),B=null,Y=null,ee=null,G=null,U=null},this.getActiveEditor=function(){return G.getActiveEditor()},this.getFirstRenderedVisibleRow=function(){return U.view.getFirstRenderedVisibleRow()},this.getLastRenderedVisibleRow=function(){return U.view.getLastRenderedVisibleRow()},this.getFirstRenderedVisibleColumn=function(){return U.view.getFirstRenderedVisibleColumn()},this.getLastRenderedVisibleColumn=function(){return U.view.getLastRenderedVisibleColumn()},this.getFirstFullyVisibleRow=function(){return U.view.getFirstFullyVisibleRow()},this.getLastFullyVisibleRow=function(){return U.view.getLastFullyVisibleRow()},this.getFirstFullyVisibleColumn=function(){return U.view.getFirstFullyVisibleColumn()},this.getLastFullyVisibleColumn=function(){return U.view.getLastFullyVisibleColumn()},this.getFirstPartiallyVisibleRow=function(){return U.view.getFirstPartiallyVisibleRow()},this.getLastPartiallyVisibleRow=function(){return U.view.getLastPartiallyVisibleRow()},this.getFirstPartiallyVisibleColumn=function(){return U.view.getFirstPartiallyVisibleColumn()},this.getLastPartiallyVisibleColumn=function(){return U.view.getLastPartiallyVisibleColumn()},this.getPlugin=function(e){const t=(0,E.toUpperCaseFirst)(e);return"UndoRedo"===t?this.undoRedo:J.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:J.getId(e)},this.getInstance=function(){return U},this.addHook=function(e,t,r){M.Hooks.getSingleton().add(e,t,U,r)},this.hasHook=function(e){return M.Hooks.getSingleton().has(e,U)||M.Hooks.getSingleton().has(e)},this.addHookOnce=function(e,t,r){M.Hooks.getSingleton().once(e,t,U,r)},this.removeHook=function(e,t){M.Hooks.getSingleton().remove(e,t,U)},this.runHooks=function(e,t,r,n,s,i,o){return M.Hooks.getSingleton().run(U,e,t,r,n,s,i,o)},this.getTranslatedPhrase=function(e,t){return(0,_.getTranslatedPhrase)(Q.language,e,t)},this.toHTML=()=>(0,p.instanceToHTML)(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,p.instanceToHTML)(this)),e.firstElementChild},this.timeouts=[],this.useTheme=e=>{this.view.getStylesHandler().useTheme(e),this.runHooks("afterSetTheme",e,!!$)},this.getCurrentThemeName=()=>this.view.getStylesHandler().getThemeName(),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._getEditorManager=function(){return G},this.isRtl=function(){return"rtl"===U.rootWindow.getComputedStyle(U.rootElement).direction},this.isLtr=function(){return!U.isRtl()},this.getDirectionFactor=function(){return U.isLtr()?1:-1};const ce=(0,P.createShortcutManager)({handleEvent:()=>U.isListening(),beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||U.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",(e=>{!1===e.ctrlKey&&!1===e.metaKey&&ce.releasePressedKeys()})),this.getShortcutManager=function(){return ce},this.getFocusManager=function(){return j},(0,g.getPluginsNames)().forEach((e=>{const t=(0,g.getPlugin)(e);J.addItem(e,new t(this))})),(0,L.registerAllShortcutContexts)(U),ce.setActiveContextName("grid"),M.Hooks.getSingleton().run(U,"construct")},r(67834),r(15724),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620),r(14846),r(27458),r(69655),r(94364),r(71766);var s=r(62577),i=r(89804),o=r(70505),a=r(25046),l=n(r(70892)),h=n(r(3849)),u=r(25499),c=r(19053),d=r(10587),p=r(96173),g=r(74672),f=r(54852),m=r(8266),y=r(17027),E=r(5893),w=r(22137),C=n(r(33925)),v=n(r(61068)),R=r(87124),S=r(61149),T=r(45435),N=r(50206),M=r(28197),_=r(58570),b=r(1052),A=r(76717),O=r(6521),I=r(97826),x=r(54394),P=r(89616),L=r(92399),D=r(73618);let k=null;const H=new Map;new Set},32741:(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(62577),s=r(71120);function i(e){const t=e.rootDocument.createElement("input");return t.type="text",t.name="__htFocusCatcher",t.classList.add("htFocusCatcher"),e.getSettings().ariaTags&&(0,n.setAttribute)(t,[(0,s.A11Y_PRESENTATION)(),(0,s.A11Y_HIDDEN)()]),t}},20511:(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()}}),h={wrapped:!1,flipped:!1};let u=!0,c=!1,d=!1;e.addHook("afterListen",(()=>l())),e.addHook("afterUnlisten",(()=>a())),e.addHook("afterSelection",((t,n,s,i,o)=>{var a;(c&&(h.wrapped&&h.flipped||d)&&(d=!1,o.value=!0),u)&&(r=null===(a=e.getSelectedRangeLast())||void 0===a?void 0:a.highlight)})),e.addHook("beforeRowWrap",((e,t,r)=>{h.wrapped=!0,h.flipped=r}));const p={keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:n.GRID_GROUP,group:"focusCatcher"};e.getShortcutManager().getContext("grid").addShortcuts([{...p,callback:()=>{const{tabNavigation:t}=e.getSettings();c=!0,e.getSelectedRangeLast()&&!t&&(u=!1),t||(d=!0)},position:"before"},{...p,callback:t=>{const{tabNavigation:n,autoWrapRow:s}=e.getSettings();if(c=!1,u=!0,!n||!e.selection.isSelected()||s&&h.wrapped&&h.flipped||!s&&h.wrapped)return s&&h.wrapped&&h.flipped&&(r=t.shiftKey?i(e):o(e)),h.wrapped=!1,h.flipped=!1,e.deselectCell(),e.unlisten(),!1;t.preventDefault()},position:"after"}])};var n=r(92399),s=r(32741);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)}},39631:(e,t,r)=>{"use strict";t.__esModule=!0,r(67834),r(15724),r(79747),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620),r(14846),r(27458),r(6211),r(69655);var n=r(64924);function s(e,t,r){i(e,t),t.set(e,r)}function i(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function o(e,t,r){return e.set(l(e,t),r),r}function a(e,t){return e.get(l(e,t))}function l(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var h=new WeakMap,u=new WeakMap,c=new WeakMap,d=new WeakSet;function p(e){a(h,this).set(e,[]),a(u,this).set(e,0)}t.HooksBucket=class{constructor(){var e,t;i(e=this,t=d),t.add(e),s(this,h,new Map),s(this,u,new Map),s(this,c,new Set),n.REGISTERED_HOOKS.forEach((e=>l(d,this,p).call(this,e)))}getHooks(e){var t;return null!==(t=a(h,this).get(e))&&void 0!==t?t:[]}add(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};a(h,this).has(e)||(l(d,this,p).call(this,e),n.REGISTERED_HOOKS.push(e));const s=a(h,this).get(e);if(s.find((e=>e.callback===t)))return;const i=Number.isInteger(r.orderIndex)?r.orderIndex:0,o=!!r.runOnce,u=!!r.initialHook;let g=!1;if(u){const e=s.find((e=>e.initialHook));e&&(e.callback=t,g=!0)}if(!g){s.push({callback:t,orderIndex:i,runOnce:o,initialHook:u,skip:!1});let r=a(c,this).has(e);r||0===i||(r=!0,a(c,this).add(e)),r&&s.length>1&&a(h,this).set(e,s.toSorted(((e,t)=>e.orderIndex-t.orderIndex)))}}has(e){return a(h,this).has(e)&&a(h,this).get(e).length>0}remove(e,t){if(!a(h,this).has(e))return!1;const r=a(h,this).get(e),n=r.find((e=>e.callback===t));if(n){let t=a(u,this).get(e);return n.skip=!0,t+=1,t>100&&(a(h,this).set(e,r.filter((e=>!e.skip))),t=0),a(u,this).set(e,t),!0}return!1}destroy(){a(h,this).clear(),a(u,this).clear(),o(h,this,null),o(u,this,null)}}},64924:(e,t)=>{"use strict";t.__esModule=!0;t.REGISTERED_HOOKS=["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","afterSelectionFocusSet","beforeSelectColumns","afterSelectColumns","beforeSelectRows","afterSelectRows","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterSetSourceDataAtCell","afterSetTheme","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","beforeSelectionFocusSet","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeSelectionHighlightSet","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyColHeader","modifyColWidth","modifyFiltersMultiSelectValue","modifyFocusedElement","modifyRowHeader","modifyRowHeight","modifyRowHeightByOverlayName","modifyData","modifySourceData","modifyRowData","modifyGetCellCoords","modifyGetCoordsElement","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","modifyTransformFocus","modifyTransformStart","modifyTransformEnd","afterModifyTransformFocus","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"],t.REMOVED_HOOKS=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"]]),t.DEPRECATED_HOOKS=new Map([[]])},28197:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(15724);var s=n(r(85707)),i=r(10587),o=r(5893),a=r(14859),l=r(21595),h=r(89804),u=r(64924),c=r(39631);const d=l.toSingleLine`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
1117
1117
  Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\x20
1118
- learn about the migration path.`;class p{constructor(){(0,s.default)(this,"globalBucket",new c.HooksBucket)}static getSingleton(){return g}getBucket(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=new c.HooksBucket),e.pluginHookBucket):this.globalBucket}add(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3?arguments[3]:void 0;return Array.isArray(t)?(0,i.arrayEach)(t,(t=>this.add(e,t,r))):(u.REMOVED_HOOKS.has(e)&&(0,a.warn)((0,o.substitute)(d,{hookName:e,removedInVersion:u.REMOVED_HOOKS.get(e)})),u.DEPRECATED_HOOKS.has(e)&&(0,a.warn)(u.DEPRECATED_HOOKS.get(e)),this.getBucket(r).add(e,t,{orderIndex:n,runOnce:!1})),this}once(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3?arguments[3]:void 0;return Array.isArray(t)?(0,i.arrayEach)(t,(t=>this.once(e,t,r))):this.getBucket(r).add(e,t,{orderIndex:n,runOnce:!0}),this}addAsFixed(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Array.isArray(t)?(0,i.arrayEach)(t,(t=>this.addAsFixed(e,t,r))):this.getBucket(r).add(e,t,{initialHook:!0}),this}remove(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return this.getBucket(r).remove(e,t)}has(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getBucket(t).has(e)}run(e,t,r,n,s,i,o,a){{const l=this.getBucket().getHooks(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].callback,e,r,n,s,i,o,a);void 0!==u&&(r=u),l[c]&&l[c].runOnce&&this.remove(t,l[c].callback),c+=1}}{const l=this.getBucket(e).getHooks(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].callback,e,r,n,s,i,o,a);void 0!==u&&(r=u),l[c]&&l[c].runOnce&&this.remove(t,l[c].callback,e),c+=1}}return r}destroy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.getBucket(e).destroy()}register(e){this.isRegistered(e)||u.REGISTERED_HOOKS.push(e)}deregister(e){this.isRegistered(e)&&u.REGISTERED_HOOKS.splice(u.REGISTERED_HOOKS.indexOf(e),1)}isDeprecated(e){return u.DEPRECATED_HOOKS.has(e)||u.REMOVED_HOOKS.has(e)}isRegistered(e){return u.REGISTERED_HOOKS.indexOf(e)>=0}getRegistered(){return u.REGISTERED_HOOKS}}t.Hooks=p;const g=new p;t.default=p},97826:(e,t,r)=>{"use strict";r(14846),r(69655),t.__esModule=!0;var n=r(20511);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}));var s=r(92104);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}))},92104:(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(c){var d;if(r||u)return void(r=!1);let p;t.isFocusSelectionChanged()?p=(0,i.focusScrollStrategy)(e):t.isSelectedByCorner()?p=(0,s.cornerHeaderScrollStrategy)(e):t.isSelectedByRowHeader()?p=(0,l.rowHeaderScrollStrategy)(e):t.isSelectedByColumnHeader()?p=(0,n.columnHeaderScrollStrategy)(e):1===t.getSelectedRange().size()&&t.isMultiple()?p=(0,o.multipleScrollStrategy)(e):1!==t.getSelectedRange().size()||t.isMultiple()?t.getSelectedRange().size()>1&&(p=(0,a.noncontiguousScrollStrategy)(e)):p=(0,h.singleScrollStrategy)(e),null===(d=p)||void 0===d||d(c)}}};var n=r(58007),s=r(85924),i=r(53720),o=r(13312),a=r(70671),l=r(71725),h=r(39068)},58007:(e,t)=>{"use strict";t.__esModule=!0,t.columnHeaderScrollStrategy=function(e){return t=>{let{col:r}=t;e.scrollViewportTo({col:r})}}},85924:(e,t)=>{"use strict";t.__esModule=!0,t.cornerHeaderScrollStrategy=function(){return()=>{}}},53720:(e,t)=>{"use strict";t.__esModule=!0,t.focusScrollStrategy=function(e){return t=>{e.scrollViewportTo(t.toObject())}}},13312:(e,t)=>{"use strict";t.__esModule=!0,t.multipleScrollStrategy=function(e){return t=>{e.scrollViewportTo(t.toObject())}}},70671:(e,t)=>{"use strict";t.__esModule=!0,t.noncontiguousScrollStrategy=function(e){return t=>{e.scrollViewportTo(t.toObject())}}},71725:(e,t)=>{"use strict";t.__esModule=!0,t.rowHeaderScrollStrategy=function(e){return t=>{let{row:r}=t;e.scrollViewportTo({row:r})}}},39068:(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})}}}},78747:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834),r(15724),r(14846),r(27458),r(69655);var s=n(r(85707)),i=r(42354),o=r(87124),a=r(25499),l=r(10587),h=r(22137),u=r(70505);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,u.isDefined)(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){const t=this.propToColCache.get(e);if((0,u.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 u=this.tableMeta.maxRows,c=this.getSchema().length,d=[];for(;o<t&&s+o<u;){let e=null;"array"===this.hot.dataType?this.tableMeta.dataSchema?e=(0,a.deepClone)(this.getSchema()):(e=[],(0,h.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 p=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",p,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 h=this.hot.countSourceRows();let u=this.hot.countCols(),c=0,d=l;"end"===n&&(d=Math.min(d+1,o));const p=d;for(;c<t&&u<i;){if("number"!=typeof a||a>=u)if(h>0)for(let e=0;e<h;e+=1)void 0===s[e]&&(s[e]=[]),s[e].push(null);else s.push([null]);else for(let e=0;e<h;e++)s[e].splice(d,0,null);c+=1,d+=1,u+=1}this.hot.columnIndexMapper.insertIndexes(a,c),c>0&&(null==e?this.metaManager.createColumn(null,c):"auto"!==r&&this.metaManager.createColumn(p,t));const g=this.hot.toVisualColumn(p);return this.hot.runHooks("afterCreateCol",g,c,r),this.hot.forceFullRender=!0,this.refreshDuckSchema(),{delta:c,startPhysicalIndex:p}}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,u.isDefined)(this.tableMeta.columns)||(0,u.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),h=3;h<o;h++)a[h-3]=arguments[h];(0,l.extendArray)(a,i);let u=0;for(;u<r;)a.push(null),u+=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),h=3;h<o;h++)a[h-3]=arguments[h];(0,l.extendArray)(a,i);let u=0;for(;u<r;)a.push(null),u+=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;const{dataDotNotation:i}=this.hot.getSettings();let o=null;if(n&&n.hasOwnProperty&&(0,a.hasOwnProperty)(n,t))o=n[t];else if(i&&"string"==typeof t&&t.indexOf(".")>-1){let e=n;if(!e)return null;const r=t.split(".");for(let t=0,n=r.length;t<n;t++)if(e=e[r[t]],void 0===e)return null;o=e}else"function"==typeof t&&(o=t(this.dataSource.slice(r,r+1)[0]));if(this.hot.hasHook("modifyData")){const e=(0,a.createObjectPropListener)(o);this.hot.runHooks("modifyData",r,this.propToCol(t),e,"get"),e.isTouched()&&(o=e.value)}return o}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)}const{dataDotNotation:l}=this.hot.getSettings();if(i&&i.hasOwnProperty&&(0,a.hasOwnProperty)(i,t))i[t]=s;else if(l&&"string"==typeof t&&t.indexOf(".")>-1){let e,r=i,n=0;const o=t.split(".");for(n=0,e=o.length-1;n<e;n++)void 0===r[o[n]]&&(r[o[n]]={}),r=r[o[n]];r[o[n]]=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 h=r===c.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,u=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<=u;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(h.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},61068:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(15724),r(14846),r(69655);var s=n(r(85707)),i=r(25499),o=r(87124),a=r(10587),l=r(22137),h=r(89804);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,{dataDotNotation:o}=this.hot.getSettings();let a=null,u=null;if(a=this.modifyRowData(e),Array.isArray(a))u=[],s?a.forEach(((t,r)=>{u[r]=this.getAtPhysicalCell(e,r,a)})):(0,l.rangeEach)(t,r,(r=>{u[r-t]=this.getAtPhysicalCell(e,r,a)}));else if((0,i.isObject)(a)||(0,h.isFunction)(a))if(u=n?[]:{},!s||n){const s=0,h=this.countFirstRowKeys()-1;(0,l.rangeEach)(s,h,(l=>{const c=this.colToProp(l);if(l>=(t||s)&&l<=(r||h)&&!Number.isInteger(c)){const t=this.getAtPhysicalCell(e,c,a);n?u.push(t):o?(0,i.setProperty)(u,c,t):u[c]=t}}))}else(0,i.objectEach)(a,((t,r)=>{const n=this.getAtPhysicalCell(e,r,a);o?(0,i.setProperty)(u,r,n):u[r]=n}));return u}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)if("string"==typeof t){const{dataDotNotation:e}=this.hot.getSettings();n=e?(0,i.getProperty)(r,t):r[t]}else n="function"==typeof t?t(r):r[t];if(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 h=[];return(0,l.rangeEach)(s,o,(e=>{h.push(n?this.getAtRow(e,void 0,void 0,r):this.getAtRow(e,i,a,r))})),h}countRows(){if(this.hot.hasHook("modifySourceLength")){const e=this.hot.runHooks("modifySourceLength");if(Number.isInteger(e))return e}return this.data.length}countFirstRowKeys(){return(0,o.countFirstRowKeys)(this.data)}destroy(){this.data=null,this.hot=null}}},6521:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(78747));t.DataMap=s.default;var i=n(r(47746));t.MetaManager=i.default;var o=n(r(954));t.metaSchemaFactory=o.default;var a=r(32465);t.replaceData=a.replaceData;var l=r(59594);t.DynamicCellMetaMod=l.DynamicCellMetaMod;var h=r(13944);t.ExtendMetaPropertiesMod=h.ExtendMetaPropertiesMod},47746:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834),r(14846),r(69655);var s=n(r(98960)),i=n(r(7229)),o=n(r(72653)),a=n(r(66535)),l=n(r(16050)),h=r(25499);class u{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=u,(0,h.mixin)(u,l.default)},86310:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(15724),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620);var s=n(r(85707)),i=r(10587),o=r(62979);class a{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)}[Symbol.iterator](){return this.entries()}}t.default=a},66535:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(15724);var s=n(r(85707)),i=r(25499),o=r(62979),a=n(r(86310)),l=r(70505);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))}}},72653:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707)),i=r(25499),o=r(62979),a=n(r(86310));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}}},98960:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707)),i=r(25499),o=r(62979),a=n(r(954));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)}}},7229:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707)),i=r(25499),o=r(62979);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)}}},954:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(70505),s=r(25499);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,dataDotNotation:!0,dataSchema:void 0,dateFormat:"DD/MM/YYYY",timeFormat:"h:mm:ss a",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,headerClassName:void 0,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,themeName: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",viewportColumnRenderingThreshold:0,viewportRowRenderingThreshold:0,visibleRows:10,width:void 0,wordWrap:!0})},59594:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620);var s=n(r(85707)),i=r(28197),o=r(25499),a=r(89804);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.Hooks.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,h=l.colToProp(i);e.prop=h,l.runHooks("beforeGetCellMeta",s,i,e);const u=(0,o.hasOwnProperty)(e,"type")?e.type:null;let c=(0,a.isFunction)(e.cells)?e.cells(r,n,h):null;var d;u&&(c?c.type=null!==(d=c.type)&&void 0!==d?d:u:c={type:u});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)}}},13944:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834),r(15724),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620),r(14846),r(69655);var s=n(r(85707));function i(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)}function o(e,t){return e.get(function(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}(e,t))}var a=new WeakMap;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",{initOnly:!0}],["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",{initOnly:!0}],["renderAllColumns",{initOnly:!0}],["renderAllRows",{initOnly:!0}]])),i(this,a,((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{initOnly:r,target:n,onChange:s}=e,i="string"==typeof n,l=i?n:t,h=`_${l}`;this.metaManager.globalMeta.meta[h]=this.metaManager.globalMeta.meta[l],s?(this.installPropWatcher(t,h,s),i&&this.installPropWatcher(n,h,s)):r&&(this.installPropWatcher(t,h,o(a,this)),this.metaManager.globalMeta.meta._initOnlySettings||(this.metaManager.globalMeta.meta._initOnlySettings=[]),this.metaManager.globalMeta.meta._initOnlySettings.push(t))}))}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})}}},62979:(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(67834),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620);var n=r(25499),s=r(1791)},32465:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t.replaceData=function(e,t,r,n){const{hotInstance:u,dataMap:c,dataSource:d,internalSource:p,source:g,metaManager:f,firstRun:m}=n,y=(0,s.toUpperCaseFirst)(p),E=u.getSettings();Array.isArray(E.dataSchema)?u.dataType="array":(0,i.isFunction)(E.dataSchema)?u.dataType="function":u.dataType="object";c&&c.destroy();e=u.runHooks(`before${y}`,e,m,g);const w=new o.default(u,e,f);if(t(w),"object"==typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error(`${p} only accepts array of objects or array of arrays (${typeof e} given)`);{const t=w.getSchema();let r;e=[];let n=0,s=0;for(n=0,s=E.startRows;n<s;n++)if("object"!==u.dataType&&"function"!==u.dataType||!E.dataSchema)if("array"===u.dataType)r=(0,a.deepClone)(t[0]),e.push(r);else{r=[];for(let e=0,t=E.startCols;e<t;e++)r.push(null);e.push(r)}else r=(0,a.deepClone)(t),e.push(r)}}Array.isArray(e[0])&&(u.dataType="array");E.data=e,w.dataSource=e,d.data=e,d.dataType=u.dataType,d.colToProp=w.colToProp.bind(w),d.propToCol=w.propToCol.bind(w),d.countCachedColumns=w.countCachedColumns.bind(w),r(w),u.runHooks(`after${y}`,e,m,g),m||(u.runHooks("afterChange",null,p),u.render());u.getSettings().ariaTags&&(0,l.setAttribute)(u.rootElement,[(0,h.A11Y_ROWCOUNT)(-1),(0,h.A11Y_COLCOUNT)(u.countCols()+(u.view?u.countRowHeaders():0))])},r(67834),r(15724);var s=r(5893),i=r(89804),o=n(r(78747)),a=r(25499),l=r(62577),h=r(71120)},70892:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834);var s=n(r(85707)),i=r(83445),o=r(77661),a=r(8266),l=n(r(3849));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 u(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var c=new WeakSet;class d{constructor(e,t,r){h(this,c),(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,"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=>u(c,this,p).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)=>u(c,this,g).call(this,e,t,r)))}getActiveEditor(){return this.activeEditor}prepareEditor(){var e;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,!1,"meta");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(e):this.tableMeta.enterMoves};e.shiftKey&&(t.row=-t.row,t.col=-t.col),this.hot.selection.isMultiple()?this.selection.transformFocus(t.row,t.col):this.selection.transformStart(t.row,t.col,!0)}destroy(){this.destroyed=!0,this.eventManager.destroy()}}function p(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;(!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&((0,i.isFunctionKey)(r)||(0,i.isCtrlMetaKey)(r)||n||this.isEditorOpened()||this.openEditor("",e))}function g(e,t){t.isCell()&&this.openEditor(null,e,!0)}const f=new WeakMap;d.getInstance=function(e,t,r){let n=f.get(e);return n||(n=new d(e,t,r),f.set(e,n)),n};t.default=d},28474:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834),r(15724),r(14846),r(27458),r(6211),r(90458);var s=n(r(85707)),i=r(82518),o=r(10587),a=r(62577),l=r(70505),h=r(5893),u=r(83445),c=r(85096),d=r(71120);function p(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)}function g(e,t){return e.get(function(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}(e,t))}const f=t.EDITOR_TYPE="autocomplete";var m=new WeakMap;class y extends i.HandsontableEditor{constructor(){super(...arguments),(0,s.default)(this,"query",null),(0,s.default)(this,"strippedChoices",[]),(0,s.default)(this,"rawChoices",[]),p(this,m,this.hot.guid.slice(0,9)),(0,s.default)(this,"sortByRelevance",(function(e,t,r){const n=[],s=[],i=e.length;let o,a,u,c,d=t.length;if(0===i){for(u=0;u<d;u++)s.push(u);return s}for(u=0;u<d;u++){if(a=(0,h.stripTags)((0,l.stringify)(t[u])),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:u,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})),u=0,d=n.length;u<d;u++)s.push(n[u].baseIndex);return s}))}static get EDITOR_TYPE(){return f}getValue(){const e=this.rawChoices.find((e=>this.stripValueIfNeeded(e)===this.TEXTAREA.value));return(0,l.isDefined)(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),(0,a.addClass)(this.htContainer,"autocompleteEditor"),(0,a.addClass)(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&(0,a.setAttribute)(this.TEXTAREA,[(0,d.A11Y_TEXT)(),(0,d.A11Y_COMBOBOX)(),(0,d.A11Y_HASPOPUP)("listbox"),(0,d.A11Y_AUTOCOMPLETE)()])}prepare(e,t,r,n,s,i){super.prepare(e,t,r,n,s,i),this.hot.getSettings().ariaTags&&(0,a.setAttribute)(this.TEXTAREA,[(0,d.A11Y_EXPANDED)("false"),(0,d.A11Y_CONTROLS)(`${g(m,this)}-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:i}=this;this.showEditableElement(),this.focus(),this.addHook("beforeKeyDown",(e=>this.onBeforeKeyDown(e))),this.htEditor.updateSettings({colWidths:e?[(0,a.outerWidth)(this.TEXTAREA)-2]:void 0,autoColumnSize:!0,autoRowSize:!0,renderer:(e,s,i,o,h,u,p)=>{(0,c.textRenderer)(e,s,i,o,h,u,p);const{filteringCaseSensitive:g,allowHtml:f,locale:m}=this.cellProperties,y=this.query;let E,w,C=(0,l.stringify)(u);C&&!f&&(E=!0===g?C.indexOf(y):C.toLocaleLowerCase(m).indexOf(y.toLocaleLowerCase(m)),-1!==E&&(w=C.substr(E,y.length),C=C.replace(w,`<strong>${w}</strong>`))),t&&(0,a.setAttribute)(s,[(0,d.A11Y_OPTION)(),...r?[(0,d.A11Y_SETSIZE)(n)]:[],...r?[(0,d.A11Y_POSINSET)(r.indexOf(u)+1)]:[],["id",`${this.htEditor.rootElement.id}_${i}-${o}`]]),s.innerHTML=C},afterSelectionEnd:(e,r)=>{if(t){const t=this.htEditor.getCell(e,r,!0);(0,a.setAttribute)(t,[(0,d.A11Y_SELECTED)()]),(0,a.setAttribute)(this.TEXTAREA,...(0,d.A11Y_ACTIVEDESCENDANT)(t.id))}}}),t&&((0,a.setAttribute)(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...(0,d.A11Y_PRESENTATION)()),(0,a.setAttribute)(this.htEditor.rootElement,[(0,d.A11Y_LISTBOX)(),(0,d.A11Y_LIVE)("polite"),(0,d.A11Y_RELEVANT)("text"),["id",`${g(m,this)}-listbox-${s}-${i}`]]),(0,a.setAttribute)(this.TEXTAREA,...(0,d.A11Y_EXPANDED)("true"))),this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}))}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&(0,a.setAttribute)(this.TEXTAREA,[(0,d.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,a.getCaretPosition)(this.TEXTAREA),r=(0,a.getSelectionEndPosition)(this.TEXTAREA),n=this.cellProperties.sortByRelevance,s=this.cellProperties.filter;let i=null,l=null,h=e;n&&(i=this.sortByRelevance(this.stripValueIfNeeded(this.getValue()),h,this.cellProperties.filteringCaseSensitive));const u=Array.isArray(i)?i.length:0;if(!1===s)u&&(l=i[0]);else{const e=[];for(let t=0,r=h.length;t<r&&!(n&&u<=t);t++)u?e.push(h[i[t]]):e.push(h[t]);l=0,h=e}this.strippedChoices=h,0===h.length?this.htEditor.rootElement.style.display="none":this.htEditor.rootElement.style.display="",this.htEditor.loadData((0,o.pivot)([h])),h.length>0&&(this.updateDropdownDimensions(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(l)),this.hot.listen(),(0,a.setCaretPosition)(this.TEXTAREA,t,t===r?void 0:r)}flipDropdownIfNeeded(){const e=(0,a.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,a.offset)(this.TEXTAREA),s=(0,a.outerHeight)(this.TEXTAREA),i=this.getHeight(),o=e.scrollTop,l=(0,a.outerHeight)(this.hot.view._wt.wtTable.THEAD),h=(0,a.offset)(e),u=n.top-h.top-l+o,c=e.scrollHeight-u-l-s,d=i>c&&u>c;return d?this.flipDropdown(i):this.unflipDropdown(),this.limitDropdownIfNeeded(d?u: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.getDefaultRowHeight(),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}updateDropdownDimensions(){this.htEditor.updateSettings({width:this.getWidth(),height:this.getHeight()}),this.htEditor.view.hasVerticalScroll()&&this.htEditor.updateSettings({width:this.htEditor.getSettings().width+(0,a.getScrollbarWidth)(this.hot.rootDocument)}),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()}getHeight(){const e=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore")),t=parseInt(e.borderTopWidth,10)+parseInt(e.borderBottomWidth,10),r=Math.min(this.cellProperties.visibleRows,this.strippedChoices.length);return Array.from({length:r},((e,t)=>t)).reduce(((e,t)=>e+this.htEditor.getRowHeight(t)),0)+t+1}getWidth(){const e=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore")),t=parseInt(e.borderInlineStartWidth,10)+parseInt(e.borderInlineEndWidth,10);return this.htEditor.getColWidth(0)+t}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){const{allowHtml:t}=this.cellProperties,r=(0,o.arrayMap)(e,(e=>(0,l.stringify)(e)));return(0,o.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===u.KEY_CODES.ARROW_DOWN&&r>0&&r<this.htEditor.countRows()-1&&(n=!0),e===u.KEY_CODES.ARROW_UP&&r>-1&&(n=!0),n}onBeforeKeyDown(e){if((0,u.isPrintableChar)(e.keyCode)||e.keyCode===u.KEY_CODES.BACKSPACE||e.keyCode===u.KEY_CODES.DELETE||e.keyCode===u.KEY_CODES.INSERT){let t=10;if(e.keyCode===u.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=y},10463:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(28474);t.EDITOR_TYPE=n.EDITOR_TYPE,t.AutocompleteEditor=n.AutocompleteEditor},60448:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834);var s=n(r(85707)),i=r(70505),o=r(25499),a=n(r(70292)),l=r(62577);const h=t.EDITOR_TYPE="base",u=t.EDITOR_STATE=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});class c{static get EDITOR_TYPE(){return h}constructor(e){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"state",u.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=this.isOpened()?this.state:u.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let r,n,s,i;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]),i=Math.max(e[1],e[3])}else[r,n,s,i]=[this.row,this.col,null,null];const o=this.hot.runHooks("modifyGetCellCoords",r,n,!1,"meta");Array.isArray(o)&&([r,n]=o),this.hot.populateFromArray(r,n,e,s,i,"edit")}beginEditing(e,t){if(this.state!==u.VIRGIN)return;const r=this.hot,n=r.rowIndexMapper.getRenderableFromVisualIndex(this.row),s=r.columnIndexMapper.getRenderableFromVisualIndex(this.col),o=()=>{if(this.state=u.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)};this.hot.addHookOnce("afterScroll",o);r.view.scrollViewport(r._createCellCoords(n,s))||(this.hot.removeHook("afterScroll",o),o())}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())if(this.state!==u.VIRGIN){if(this.state===u.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=u.WAITING,this.saveValue(n,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",(e=>{this.state=u.FINISHED,this.discardEditor(e)})):(this.state=u.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout((()=>{this._fireCallbacks(!0)}))}cancelChanges(){this.state=u.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===u.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=u.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=u.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===u.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,l.offset)(t),o=(0,l.outerWidth)(t),a=(0,l.offset)(this.hot.rootElement),h=(0,l.outerWidth)(this.hot.rootElement),u=r.topOverlay.holder,c=r.inlineStartOverlay.holder,d=u!==s?u.scrollTop:0,p=c!==s?c.scrollLeft:0,g=s.innerWidth-a.left-h,{wtTable:f}=null!==(e=r.getParentOverlay(t))&&void 0!==e?e:this.hot.view._wt,m=f.name,y=["master","inline_start"].includes(m)?d:0,E=["master","top","bottom"].includes(m)?p:0,w=i.top===a.top?0:1;let C=i.top-a.top-w-y,v=0;v=this.hot.isRtl()?s.innerWidth-i.left-o-g-1+E:i.left-a.left-1-E,["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 R=this.hot.hasColHeaders(),S=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),T=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),N=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(R&&S<=0||S===N)&&(C+=1),T<=0&&(v+=1);const M=n.rowsRenderCalculator.startPosition,_=n.columnsRenderCalculator.startPosition,b=Math.abs(r.inlineStartOverlay.getScrollPosition()),A=r.topOverlay.getScrollPosition(),O=(0,l.getScrollbarWidth)(this.hot.rootDocument);let I=t.offsetTop;if(["inline_start","master"].includes(m)&&(I+=M-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?f.getWidth()-t.offsetLeft:Math.abs(x),x+=_-b-o):["top","master","bottom"].includes(m)&&(x+=_-b);const P=s.getComputedStyle(this.TD),L=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",D=parseInt(P[L],10)>0?0:1,k=parseInt(P.borderTopWidth,10)>0?0:1,H=(0,l.outerWidth)(t)+D,F=(0,l.outerHeight)(t)+k,U=(0,l.hasVerticalScrollbar)(u)?O:0,V=(0,l.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,this.hot.view.getDefaultRowHeight()),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=c,(0,o.mixin)(c,a.default)},74854:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(60448);t.EDITOR_STATE=n.EDITOR_STATE,t.EDITOR_TYPE=n.EDITOR_TYPE,t.BaseEditor=n.BaseEditor},11476:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(74854),s=r(62577);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},12302:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(11476);t.EDITOR_TYPE=n.EDITOR_TYPE,t.CheckboxEditor=n.CheckboxEditor},28150:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834);var s=n(r(85707)),i=n(r(6671)),o=n(r(44499)),a=r(74854),l=r(66420),h=r(62577),u=r(25499),c=r(83445);const d=t.EDITOR_TYPE="date",p="dateEditor";class g extends l.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 d}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()})),this.hot.addHook("afterSetTheme",((e,t)=>{t||((0,h.removeClass)(this.datePicker,/ht-theme-.*/g),(0,h.addClass)(this.datePicker,e))}))}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,h.addClass)(this.datePicker,"htDatepickerHolder");const e=this.hot.getCurrentThemeName();(0,h.removeClass)(this.datePicker,/ht-theme-.*/g),(0,h.addClass)(this.datePicker,e),this.hot.rootDocument.body.appendChild(this.datePicker),this.eventManager.addEventListener(this.datePicker,"mousedown",(e=>{(0,h.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");this.showDatepicker(e),super.open(),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:p})}close(){var e;this._opened=!1,null!==(e=this.$datePicker)&&void 0!==e&&e.destroy&&this.$datePicker.destroy(),this.hot._registerTimeout((()=>{const e=this.hot._getEditorManager();e.closeEditor(),this.hot.view.render(),e.prepareEditor()}));this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(p),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.cellProperties.dateFormat||this.defaultDateFormat,r=this.hot.view.isMouseDown(),n=!!e&&(0,c.isFunctionKey)(e.keyCode);let s;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.originalValue?(s=this.originalValue,(0,i.default)(s,t,!0).isValid()&&this.$datePicker.setMoment((0,i.default)(s,t),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),n||r||this.setValue("")):this.cellProperties.defaultDate?(s=this.cellProperties.defaultDate,(0,i.default)(s,t,!0).isValid()&&this.$datePicker.setMoment((0,i.default)(s,t),!0),n||r||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}refreshDimensions(e){var t;if(super.refreshDimensions(e),this.state!==a.EDITOR_STATE.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.hideDatepicker();const{rowIndexMapper:r,columnIndexMapper:n}=this.hot,{wtOverlays:s}=this.hot.view._wt,{wtTable:i}=null!==(t=s.getParentOverlay(this.TD))&&void 0!==t?t:this.hot.view._wt,o=r.getVisualFromRenderableIndex(i.getFirstPartiallyVisibleRow()),l=r.getVisualFromRenderableIndex(i.getLastPartiallyVisibleRow()),u=n.getVisualFromRenderableIndex(i.getFirstPartiallyVisibleColumn()),c=n.getVisualFromRenderableIndex(i.getLastPartiallyVisibleColumn());if(this.row>=o&&this.row<=l&&this.col>=u&&this.col<=c){const e=this.TD.getBoundingClientRect();this.datePickerStyle.top=`${this.hot.rootWindow.pageYOffset+e.top+(0,h.outerHeight)(this.TD)}px`;let t=this.hot.rootWindow.pageXOffset;this.hot.isRtl()?t+=e.right-(0,h.outerWidth)(this.datePicker):t+=e.left,this.datePickerStyle.left=`${t}px`}else this.hideDatepicker()}}t.DateEditor=g},16339:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(28150);t.EDITOR_TYPE=n.EDITOR_TYPE,t.DateEditor=n.DateEditor},97328:(e,t,r)=>{"use strict";t.__esModule=!0,r(14846),r(27458);var n=r(10463),s=r(28197);const i=t.EDITOR_TYPE="dropdown";class o extends n.AutocompleteEditor{static get EDITOR_TYPE(){return i}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=o,s.Hooks.getSingleton().add("beforeValidate",(function(e,t,r){const n=this.propToCol(r);if(Number.isInteger(n)){const e=this.getCellMeta(t,n);e.editor===o&&void 0===e.strict&&(e.filter=!1,e.strict=!0)}}))},51034:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(97328);t.EDITOR_TYPE=n.EDITOR_TYPE,t.DropdownEditor=n.DropdownEditor},37300:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(66420),s=r(62577),i=r(77661),o=r(25499),a=r(92399);const l="handsontableEditor",h=t.EDITOR_TYPE="handsontable";class u extends n.TextEditor{static get EDITOR_TYPE(){return h}open(){super.open();const e=this.htContainer.style;this.htEditor&&(this.htEditor.destroy(),e.width="",e.height="",e.overflow=""),"none"===e.display&&(e.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.htEditor.updateSettings({width:this.getWidth(),height:this.getHeight()}),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,themeName:this.hot.getCurrentThemeName(),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)}getHeight(){return this.htEditor.view.getTableHeight()+1}getWidth(){return this.htEditor.view.getTableWidth()}assignHooks(){this.hot.addHook("afterDestroy",(()=>{this.htEditor&&this.htEditor.destroy()})),this.hot.addHook("afterSetTheme",((e,t)=>{t||this.htEditor.useTheme(e)}))}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();const t={group:l,relativeToGroup:a.EDITOR_EDIT_GROUP,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=u},82518:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(37300);t.EDITOR_TYPE=n.EDITOR_TYPE,t.HandsontableEditor=n.HandsontableEditor},14417:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllEditors=function(){(0,g.registerEditor)(s.BaseEditor),(0,g.registerEditor)(n.AutocompleteEditor),(0,g.registerEditor)(i.CheckboxEditor),(0,g.registerEditor)(o.DateEditor),(0,g.registerEditor)(a.DropdownEditor),(0,g.registerEditor)(l.HandsontableEditor),(0,g.registerEditor)(h.NumericEditor),(0,g.registerEditor)(u.PasswordEditor),(0,g.registerEditor)(c.SelectEditor),(0,g.registerEditor)(d.TextEditor),(0,g.registerEditor)(p.TimeEditor)};var n=r(10463);t.AutocompleteEditor=n.AutocompleteEditor,t.AUTOCOMPLETE_EDITOR=n.EDITOR_TYPE;var s=r(74854);t.BaseEditor=s.BaseEditor,t.BASE_EDITOR=s.EDITOR_TYPE;var i=r(12302);t.CheckboxEditor=i.CheckboxEditor,t.CHECKBOX_EDITOR=i.EDITOR_TYPE;var o=r(16339);t.DateEditor=o.DateEditor,t.DATE_EDITOR=o.EDITOR_TYPE;var a=r(51034);t.DropdownEditor=a.DropdownEditor,t.DROPDOWN_EDITOR=a.EDITOR_TYPE;var l=r(82518);t.HandsontableEditor=l.HandsontableEditor,t.HANDSONTABLE_EDITOR=l.EDITOR_TYPE;var h=r(82304);t.NumericEditor=h.NumericEditor,t.NUMERIC_EDITOR=h.EDITOR_TYPE;var u=r(14150);t.PasswordEditor=u.PasswordEditor,t.PASSWORD_EDITOR=u.EDITOR_TYPE;var c=r(63303);t.SelectEditor=c.SelectEditor,t.SELECT_EDITOR=c.EDITOR_TYPE;var d=r(66420);t.TextEditor=d.TextEditor,t.TEXT_EDITOR=d.EDITOR_TYPE;var p=r(35442);t.TimeEditor=p.TimeEditor,t.TIME_EDITOR=p.EDITOR_TYPE;var g=r(8266);t.registerEditor=g.registerEditor,t.RegisteredEditor=g.RegisteredEditor,t._getEditorInstance=g._getEditorInstance,t.getEditor=g.getEditor,t.getEditorInstance=g.getEditorInstance,t.getRegisteredEditorNames=g.getRegisteredEditorNames,t.getRegisteredEditors=g.getRegisteredEditors,t.hasEditor=g.hasEditor},82304:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(90146);t.EDITOR_TYPE=n.EDITOR_TYPE,t.NumericEditor=n.NumericEditor},90146:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(66420);const s=t.EDITOR_TYPE="numeric";class i extends n.TextEditor{static get EDITOR_TYPE(){return s}}t.NumericEditor=i},14150:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(93884);t.EDITOR_TYPE=n.EDITOR_TYPE,t.PasswordEditor=n.PasswordEditor},93884:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707)),i=r(66420),o=r(17207),a=r(62577);const l=t.EDITOR_TYPE="password";class h extends i.TextEditor{constructor(){super(...arguments),(0,s.default)(this,"autoResize",(0,o.createInputElementResizer)(this.hot.rootDocument,{textContent:e=>"•".repeat(e.value.length)}))}static get EDITOR_TYPE(){return l}createElements(){super.createElements(),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,(0,a.empty)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}t.PasswordEditor=h},8266:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t.RegisteredEditor=d,t.getEditorInstance=t._getEditorInstance=function(e,t){let r;if("function"==typeof e)o.get(e)||p(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(!h(e))throw Error(`No registered editor found under "${e}" name`);return l(e).getConstructor()},t.registerEditor=p,r(67834);var s=r(28197),i=n(r(28651));const o=new WeakMap,{register:a,getItem:l,hasItem:h,getNames:u,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.Hooks.getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function p(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=u,t.hasEditor=h},63303:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(70638);t.EDITOR_TYPE=n.EDITOR_TYPE,t.SelectEditor=n.SelectEditor},70638:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(74854),s=r(62577),i=r(25499),o=r(71120);const a="ht_editor_visible",l="selectEditor",h=t.EDITOR_TYPE="select";class u extends n.BaseEditor{static get EDITOR_TYPE(){return h}init(){this.selectWrapper=this.hot.rootDocument.createElement("div"),this.select=this.hot.rootDocument.createElement("select"),this.select.setAttribute("data-hot-input","true"),this.selectWrapper.style.display="none";const e=this.hot.rootDocument.createElement("DIV"),t=this.hot.getSettings().ariaTags;e.className="htAutocompleteArrow",t&&e.setAttribute(...(0,o.A11Y_HIDDEN)()),e.appendChild(this.hot.rootDocument.createTextNode(String.fromCharCode(9660))),(0,s.addClass)(this.selectWrapper,"htSelectEditor"),this.selectWrapper.appendChild(this.select),this.selectWrapper.insertBefore(e,this.selectWrapper.firstChild),this.hot.rootElement.appendChild(this.selectWrapper),this.registerHooks()}getValue(){return this.select.value}setValue(e){this.select.value=e}open(){this._opened=!0,this.refreshDimensions(),this.selectWrapper.style.display="";this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.selectWrapper.style.display="none",(0,s.hasClass)(this.selectWrapper,a)&&(0,s.removeClass)(this.selectWrapper,a),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 h;h="function"==typeof l?this.prepareOptions(l(this.row,this.col,this.prop)):this.prepareOptions(l),(0,s.empty)(this.select),(0,i.objectEach)(h,((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(),o=this.selectWrapper.style;o.height=`${i}px`,o.width=`${r}px`,o.top=`${e}px`,o[this.hot.isRtl()?"right":"left"]=`${t}px`,o.margin="0px",(0,s.addClass)(this.selectWrapper,a)}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={group:l};this.isInFullEditMode()&&e.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{const e=this.select.selectedIndex-1;e>=0&&(this.select[e].selected=!0)}},{keys:[["ArrowDown"]],callback:()=>{const e=this.select.selectedIndex+1;e<=this.select.length-1&&(this.select[e].selected=!0)}}],t)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(l)}}t.SelectEditor=u},96667:(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(62577)},66420:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(85856);t.EDITOR_TYPE=n.EDITOR_TYPE,t.TextEditor=n.TextEditor},85856:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707)),i=r(74854),o=n(r(3849)),a=r(25046),l=r(62577),h=r(22137),u=r(17207),c=r(70505),d=r(96667),p=r(71120);const g="ht_editor_hidden",f="textEditor",m=t.EDITOR_TYPE="text";class y extends i.BaseEditor{static get EDITOR_TYPE(){return m}constructor(e){super(e),(0,s.default)(this,"eventManager",new o.default(this)),(0,s.default)(this,"autoResize",(0,u.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.isOpened()&&(this.TEXTAREA.value=""),a===i.EDITOR_STATE.FINISHED||this.isOpened()||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,p.A11Y_TABINDEX)(-1)]),(0,l.addClass)(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=e.createElement("DIV"),(0,l.addClass)(this.TEXTAREA_PARENT,"handsontableInputHolder"),(0,l.hasClass)(this.TEXTAREA_PARENT,this.layerClass)&&(0,l.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,l.addClass)(this.TEXTAREA_PARENT,g),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,g)}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,h.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,g)&&(0,l.removeClass)(this.TEXTAREA_PARENT,g),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 l=this.hot.rootWindow.getComputedStyle(this.TD);this.TEXTAREA.style.fontSize=l.fontSize,this.TEXTAREA.style.fontFamily=l.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor,this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(n,s),minHeight:Math.min(o,a),maxWidth:s,maxHeight:a},!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().getContext("editor"),t={runOnlyIf:()=>(0,c.isDefined)(this.hot.getSelected()),group:f},r=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};e.addShortcuts([{keys:[["Control","Enter"]],callback:()=>(r(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e.altKey},{keys:[["Meta","Enter"]],callback:()=>(r(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(r(),!1)},{keys:[["Home"]],callback:(e,t)=>{let[r]=t;(0,d.updateCaretPosition)(r,this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{let[r]=t;(0,d.updateCaretPosition)(r,this.TEXTAREA)}}],t)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(f)}}t.TextEditor=y},35442:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(55736);t.EDITOR_TYPE=n.EDITOR_TYPE,t.TimeEditor=n.TimeEditor},55736:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(66420);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},3849:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t.getListenersCounter=function(){return o},r(15724);var s=n(r(85707)),i=r(77661);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)}}},19053:(e,t,r)=>{"use strict";t.__esModule=!0,r(67834);var n=r(14859),s=r(62577),i=r(89804);function o(e,t,r){a(e,t),t.set(e,r)}function a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function l(e,t){return e.get(u(e,t))}function h(e,t,r){return e.set(u(e,t),r),r}function u(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}const c=Object.freeze({CELL:"cell",MIXED:"mixed"});var d=new WeakMap,p=new WeakMap,g=new WeakMap,f=new WeakMap,m=new WeakMap,y=new WeakSet;function E(e){var t;const r=null===(t=l(d,this).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!r||!l(d,this).selection.isCellVisible(r))return void e(null);const n=l(d,this).getCell(r.row,r.col,!0);null===n?l(d,this).addHookOnce("afterScroll",(()=>{e(l(d,this).getCell(r.row,r.col,!0))})):e(n)}function w(){u(y,this,E).call(this,(e=>{const{activeElement:t}=l(d,this).rootDocument;t&&(0,s.isOutsideInput)(t)&&t.blur(),this.focusOnHighlightedCell(e)}))}function C(){u(y,this,E).call(this,(e=>{this.getFocusMode()===c.MIXED&&"TD"===e.nodeName&&this.refocusToEditorTextarea()}))}function v(e){"boolean"==typeof e.imeFastEdit&&this.setFocusMode(e.imeFastEdit?c.MIXED:c.CELL)}t.FocusManager=class{constructor(e){var t,r,n=this;a(t=this,r=y),r.add(t),o(this,d,void 0),o(this,p,void 0),o(this,g,1),o(this,f,null),o(this,m,new Map);const s=e.getSettings();h(d,this,e),h(p,this,s.imeFastEdit?c.MIXED:c.CELL),l(d,this).addHook("afterUpdateSettings",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return u(y,n,v).call(n,...t)})),l(d,this).addHook("afterSelection",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return u(y,n,w).call(n,...t)})),l(d,this).addHook("afterSelectionFocusSet",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return u(y,n,w).call(n,...t)})),l(d,this).addHook("afterSelectionEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return u(y,n,C).call(n,...t)}))}getFocusMode(){return l(p,this)}setFocusMode(e){Object.values(c).includes(e)?h(p,this,e):(0,n.warn)(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return l(g,this)}setRefocusDelay(e){h(g,this,e)}setRefocusElementGetter(e){h(f,this,e)}getRefocusElement(){var e;return"function"==typeof l(f,this)?l(f,this).call(this):null===(e=l(d,this).getActiveEditor())||void 0===e?void 0:e.TEXTAREA}focusOnHighlightedCell(e){const t=e=>{var t,r;const n=null===(t=l(d,this).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!n)return;let s=l(d,this).runHooks("modifyFocusedElement",n.row,n.col,e);s instanceof HTMLElement||(s=e),!s||null!==(r=l(d,this).getActiveEditor())&&void 0!==r&&r.isOpened()||s.focus({preventScroll:!0})};e?t(e):u(y,this,E).call(this,(e=>t(e)))}refocusToEditorTextarea(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l(g,this);!l(d,this).getSettings().imeFastEdit||null!==(e=l(d,this).getActiveEditor())&&void 0!==e&&e.isOpened()||(l(m,this).has(t)||l(m,this).set(t,(0,i.debounce)((()=>{var e;null===(e=this.getRefocusElement())||void 0===e||e.select()}),t)),l(m,this).get(t)())}}},71120:(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_MENU_ITEM_CHECKBOX=()=>["role","menuitemcheckbox"];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]},10587:(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(15724),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620),r(14846),r(27458)},25046:(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=h;var n=r(25499),s=r(85992);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 h(){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(),h())},14859:(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(70505)},87124:(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(15724),r(14846),r(63333),r(69655);var n=r(25499);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}},95976:(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}},62577:(e,t,r)=>{"use strict";t.__esModule=!0,t.addClass=h,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];p.test(t)?e.innerHTML=r?(0,n.sanitize)(t):t:g(e,t)},t.fastInnerText=g,t.findFirstParentWithClass=function(e,t){const r={element:void 0,classNames:[]};let n=e;for(;null!==n&&n!==e.ownerDocument.documentElement&&!r.element;){if("string"==typeof t&&n.classList.contains(t))r.element=n,r.classNames.push(t);else if(t instanceof RegExp){const e=Array.from(n.classList).filter((e=>t.test(e)));e.length&&(r.element=n,r.classNames.push(...e))}n=n.parentElement}return r},t.getCaretPosition=function(e){if(e.selectionStart)return e.selectionStart;return 0},t.getCssTransform=function(e){let t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];return-1},t.getFrameElement=i,t.getMaximumScrollLeft=function(e){return e.scrollWidth-e.clientWidth},t.getMaximumScrollTop=function(e){return e.scrollHeight-e.clientHeight},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 f(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===y&&(y=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 y},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=r.getComputedStyle(e);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=r.getComputedStyle(n),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=f,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=E,t.isOutsideInput=w,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,n=t.ownerDocument.defaultView;let s=t;for(;s!==r;){if(null===s)return!1;if(s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(s.host){if(s.host.impl)return e(s.host.impl);if(s.host)return e(s.host);throw new Error("Lost in Web Components world")}return!1}if("none"===n.getComputedStyle(s).display)return!1;s=s.parentNode}return!0},t.makeElementContentEditableAndSelectItsContent=C,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=u,t.removeContentEditableFromElementAndDeselect=v,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];C(e,r),t(),v(e,r)},t.selectElementIfAllowed=function(e){w(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(67834),r(15724),r(14846),r(27458),r(69655);var n=r(5893),s=r(71120);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 h(e,t){"string"==typeof t&&(t=t.split(" ")),(t=a(t)).length>0&&e.classList.add(...t)}function u(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 p=t.HTML_CHARACTERS=/(<(.*)>|&(.*);)/;function g(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 f(){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}let y;function E(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function w(e){return E(e)&&!1===e.hasAttribute("data-hot-input")}function C(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&&h(e,"invisibleSelection"),i.selectNodeContents(e),o.removeAllRanges(),o.addRange(i)}function v(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&&u(e,"invisibleSelection"),e.removeAttribute("contenteditable")}},77661:(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.isTouchEvent=function(e){return e instanceof TouchEvent},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}},85992:(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)}},89804:(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(10587),s=r(70505);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 h=!1;n.lastCallThrottled=!0,r||(r=l,h=!0);const u=t-(l-r);return h?(n.lastCallThrottled=!1,e.apply(this,o)):(s&&clearTimeout(s),s=setTimeout((()=>{n.lastCallThrottled=!1,e.apply(this,o),r=0,s=void 0}),u)),n}}},70505:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t._injectProductInfo=function(e,t){const r=!a(e),n="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),i="15.0.0-next-fdd4480-20241205";let o,w="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|=(u(`${u(h(t)+(h(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=p(e||""));if(r||n||v)if(v){const t=(0,s.default)("11/12/2024","DD/MM/YYYY"),r=Math.floor(t.toDate().getTime()/864e5),n=g(e);o=(0,s.default)(864e5*(n+1),"x").format("MMMM DD, YYYY"),r>n?(w="expired",C="expired"):(w="valid",C="valid")}else n?(w="non_commercial",C="valid"):(w="invalid",C="invalid");else w="missing",C="missing";f()&&(w="valid",C="valid");if(!m&&"valid"!==w){y[w]({keyValidityDate:o,hotVersion:i})&&console["non_commercial"===w?"info":"warn"](y[w]({keyValidityDate:o,hotVersion:i})),m=!0}if("valid"!==C&&t.parentNode){if(E[C]({keyValidityDate:o,hotVersion:i})){const e=document.createElement("div");e.className="handsontable hot-display-license-info",e.innerHTML=E[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(6671)),i=r(21595);function o(e){return void 0===e}function a(e){return null===e||""===e||o(e)}const l="length",h=e=>parseInt(e,16),u=e=>parseInt(e,10),c=(e,t,r)=>e.substr(t,r),d=e=>e.codePointAt(0)-65,p=e=>`${e}`.replace(/\-/g,""),g=e=>h(c(p(e),h("12"),d("F")))/(h(c(p(e),d("B"),~~![][l]))||9),f=()=>"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 y={invalid:()=>i.toSingleLine`
1118
+ learn about the migration path.`;class p{constructor(){(0,s.default)(this,"globalBucket",new c.HooksBucket)}static getSingleton(){return g}getBucket(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=new c.HooksBucket),e.pluginHookBucket):this.globalBucket}add(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3?arguments[3]:void 0;return Array.isArray(t)?(0,i.arrayEach)(t,(t=>this.add(e,t,r))):(u.REMOVED_HOOKS.has(e)&&(0,a.warn)((0,o.substitute)(d,{hookName:e,removedInVersion:u.REMOVED_HOOKS.get(e)})),u.DEPRECATED_HOOKS.has(e)&&(0,a.warn)(u.DEPRECATED_HOOKS.get(e)),this.getBucket(r).add(e,t,{orderIndex:n,runOnce:!1})),this}once(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3?arguments[3]:void 0;return Array.isArray(t)?(0,i.arrayEach)(t,(t=>this.once(e,t,r))):this.getBucket(r).add(e,t,{orderIndex:n,runOnce:!0}),this}addAsFixed(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Array.isArray(t)?(0,i.arrayEach)(t,(t=>this.addAsFixed(e,t,r))):this.getBucket(r).add(e,t,{initialHook:!0}),this}remove(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return this.getBucket(r).remove(e,t)}has(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getBucket(t).has(e)}run(e,t,r,n,s,i,o,a){{const l=this.getBucket().getHooks(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].callback,e,r,n,s,i,o,a);void 0!==u&&(r=u),l[c]&&l[c].runOnce&&this.remove(t,l[c].callback),c+=1}}{const l=this.getBucket(e).getHooks(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].callback,e,r,n,s,i,o,a);void 0!==u&&(r=u),l[c]&&l[c].runOnce&&this.remove(t,l[c].callback,e),c+=1}}return r}destroy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.getBucket(e).destroy()}register(e){this.isRegistered(e)||u.REGISTERED_HOOKS.push(e)}deregister(e){this.isRegistered(e)&&u.REGISTERED_HOOKS.splice(u.REGISTERED_HOOKS.indexOf(e),1)}isDeprecated(e){return u.DEPRECATED_HOOKS.has(e)||u.REMOVED_HOOKS.has(e)}isRegistered(e){return u.REGISTERED_HOOKS.indexOf(e)>=0}getRegistered(){return u.REGISTERED_HOOKS}}t.Hooks=p;const g=new p;t.default=p},97826:(e,t,r)=>{"use strict";r(14846),r(69655),t.__esModule=!0;var n=r(20511);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}));var s=r(92104);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}))},92104:(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(c){var d;if(r||u)return void(r=!1);let p;t.isFocusSelectionChanged()?p=(0,i.focusScrollStrategy)(e):t.isSelectedByCorner()?p=(0,s.cornerHeaderScrollStrategy)(e):t.isSelectedByRowHeader()?p=(0,l.rowHeaderScrollStrategy)(e):t.isSelectedByColumnHeader()?p=(0,n.columnHeaderScrollStrategy)(e):1===t.getSelectedRange().size()&&t.isMultiple()?p=(0,o.multipleScrollStrategy)(e):1!==t.getSelectedRange().size()||t.isMultiple()?t.getSelectedRange().size()>1&&(p=(0,a.noncontiguousScrollStrategy)(e)):p=(0,h.singleScrollStrategy)(e),null===(d=p)||void 0===d||d(c)}}};var n=r(58007),s=r(85924),i=r(53720),o=r(13312),a=r(70671),l=r(71725),h=r(39068)},58007:(e,t)=>{"use strict";t.__esModule=!0,t.columnHeaderScrollStrategy=function(e){return t=>{let{col:r}=t;e.scrollViewportTo({col:r})}}},85924:(e,t)=>{"use strict";t.__esModule=!0,t.cornerHeaderScrollStrategy=function(){return()=>{}}},53720:(e,t)=>{"use strict";t.__esModule=!0,t.focusScrollStrategy=function(e){return t=>{e.scrollViewportTo(t.toObject())}}},13312:(e,t)=>{"use strict";t.__esModule=!0,t.multipleScrollStrategy=function(e){return t=>{e.scrollViewportTo(t.toObject())}}},70671:(e,t)=>{"use strict";t.__esModule=!0,t.noncontiguousScrollStrategy=function(e){return t=>{e.scrollViewportTo(t.toObject())}}},71725:(e,t)=>{"use strict";t.__esModule=!0,t.rowHeaderScrollStrategy=function(e){return t=>{let{row:r}=t;e.scrollViewportTo({row:r})}}},39068:(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})}}}},78747:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834),r(15724),r(14846),r(27458),r(69655);var s=n(r(85707)),i=r(42354),o=r(87124),a=r(25499),l=r(10587),h=r(22137),u=r(70505);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,u.isDefined)(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){const t=this.propToColCache.get(e);if((0,u.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 u=this.tableMeta.maxRows,c=this.getSchema().length,d=[];for(;o<t&&s+o<u;){let e=null;"array"===this.hot.dataType?this.tableMeta.dataSchema?e=(0,a.deepClone)(this.getSchema()):(e=[],(0,h.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 p=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",p,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 h=this.hot.countSourceRows();let u=this.hot.countCols(),c=0,d=l;"end"===n&&(d=Math.min(d+1,o));const p=d;for(;c<t&&u<i;){if("number"!=typeof a||a>=u)if(h>0)for(let e=0;e<h;e+=1)void 0===s[e]&&(s[e]=[]),s[e].push(null);else s.push([null]);else for(let e=0;e<h;e++)s[e].splice(d,0,null);c+=1,d+=1,u+=1}this.hot.columnIndexMapper.insertIndexes(a,c),c>0&&(null==e?this.metaManager.createColumn(null,c):"auto"!==r&&this.metaManager.createColumn(p,t));const g=this.hot.toVisualColumn(p);return this.hot.runHooks("afterCreateCol",g,c,r),this.hot.forceFullRender=!0,this.refreshDuckSchema(),{delta:c,startPhysicalIndex:p}}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,u.isDefined)(this.tableMeta.columns)||(0,u.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),h=3;h<o;h++)a[h-3]=arguments[h];(0,l.extendArray)(a,i);let u=0;for(;u<r;)a.push(null),u+=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),h=3;h<o;h++)a[h-3]=arguments[h];(0,l.extendArray)(a,i);let u=0;for(;u<r;)a.push(null),u+=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;const{dataDotNotation:i}=this.hot.getSettings();let o=null;if(n&&n.hasOwnProperty&&(0,a.hasOwnProperty)(n,t))o=n[t];else if(i&&"string"==typeof t&&t.indexOf(".")>-1){let e=n;if(!e)return null;const r=t.split(".");for(let t=0,n=r.length;t<n;t++)if(e=e[r[t]],void 0===e)return null;o=e}else"function"==typeof t&&(o=t(this.dataSource.slice(r,r+1)[0]));if(this.hot.hasHook("modifyData")){const e=(0,a.createObjectPropListener)(o);this.hot.runHooks("modifyData",r,this.propToCol(t),e,"get"),e.isTouched()&&(o=e.value)}return o}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)}const{dataDotNotation:l}=this.hot.getSettings();if(i&&i.hasOwnProperty&&(0,a.hasOwnProperty)(i,t))i[t]=s;else if(l&&"string"==typeof t&&t.indexOf(".")>-1){let e,r=i,n=0;const o=t.split(".");for(n=0,e=o.length-1;n<e;n++)void 0===r[o[n]]&&(r[o[n]]={}),r=r[o[n]];r[o[n]]=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 h=r===c.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,u=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<=u;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(h.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},61068:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(15724),r(14846),r(69655);var s=n(r(85707)),i=r(25499),o=r(87124),a=r(10587),l=r(22137),h=r(89804);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,{dataDotNotation:o}=this.hot.getSettings();let a=null,u=null;if(a=this.modifyRowData(e),Array.isArray(a))u=[],s?a.forEach(((t,r)=>{u[r]=this.getAtPhysicalCell(e,r,a)})):(0,l.rangeEach)(t,r,(r=>{u[r-t]=this.getAtPhysicalCell(e,r,a)}));else if((0,i.isObject)(a)||(0,h.isFunction)(a))if(u=n?[]:{},!s||n){const s=0,h=this.countFirstRowKeys()-1;(0,l.rangeEach)(s,h,(l=>{const c=this.colToProp(l);if(l>=(t||s)&&l<=(r||h)&&!Number.isInteger(c)){const t=this.getAtPhysicalCell(e,c,a);n?u.push(t):o?(0,i.setProperty)(u,c,t):u[c]=t}}))}else(0,i.objectEach)(a,((t,r)=>{const n=this.getAtPhysicalCell(e,r,a);o?(0,i.setProperty)(u,r,n):u[r]=n}));return u}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)if("string"==typeof t){const{dataDotNotation:e}=this.hot.getSettings();n=e?(0,i.getProperty)(r,t):r[t]}else n="function"==typeof t?t(r):r[t];if(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 h=[];return(0,l.rangeEach)(s,o,(e=>{h.push(n?this.getAtRow(e,void 0,void 0,r):this.getAtRow(e,i,a,r))})),h}countRows(){if(this.hot.hasHook("modifySourceLength")){const e=this.hot.runHooks("modifySourceLength");if(Number.isInteger(e))return e}return this.data.length}countFirstRowKeys(){return(0,o.countFirstRowKeys)(this.data)}destroy(){this.data=null,this.hot=null}}},6521:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(78747));t.DataMap=s.default;var i=n(r(47746));t.MetaManager=i.default;var o=n(r(954));t.metaSchemaFactory=o.default;var a=r(32465);t.replaceData=a.replaceData;var l=r(59594);t.DynamicCellMetaMod=l.DynamicCellMetaMod;var h=r(13944);t.ExtendMetaPropertiesMod=h.ExtendMetaPropertiesMod},47746:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834),r(14846),r(69655);var s=n(r(98960)),i=n(r(7229)),o=n(r(72653)),a=n(r(66535)),l=n(r(16050)),h=r(25499);class u{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=u,(0,h.mixin)(u,l.default)},86310:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(15724),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620);var s=n(r(85707)),i=r(10587),o=r(62979);class a{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)}[Symbol.iterator](){return this.entries()}}t.default=a},66535:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(15724);var s=n(r(85707)),i=r(25499),o=r(62979),a=n(r(86310)),l=r(70505);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))}}},72653:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707)),i=r(25499),o=r(62979),a=n(r(86310));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}}},98960:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707)),i=r(25499),o=r(62979),a=n(r(954));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)}}},7229:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707)),i=r(25499),o=r(62979);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)}}},954:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(70505),s=r(25499);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,dataDotNotation:!0,dataSchema:void 0,dateFormat:"DD/MM/YYYY",timeFormat:"h:mm:ss a",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,headerClassName:void 0,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,themeName: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",viewportColumnRenderingThreshold:0,viewportRowRenderingThreshold:0,visibleRows:10,width:void 0,wordWrap:!0})},59594:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620);var s=n(r(85707)),i=r(28197),o=r(25499),a=r(89804);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.Hooks.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,h=l.colToProp(i);e.prop=h,l.runHooks("beforeGetCellMeta",s,i,e);const u=(0,o.hasOwnProperty)(e,"type")?e.type:null;let c=(0,a.isFunction)(e.cells)?e.cells(r,n,h):null;var d;u&&(c?c.type=null!==(d=c.type)&&void 0!==d?d:u:c={type:u});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)}}},13944:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834),r(15724),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620),r(14846),r(69655);var s=n(r(85707));function i(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)}function o(e,t){return e.get(function(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}(e,t))}var a=new WeakMap;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",{initOnly:!0}],["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",{initOnly:!0}],["renderAllColumns",{initOnly:!0}],["renderAllRows",{initOnly:!0}]])),i(this,a,((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{initOnly:r,target:n,onChange:s}=e,i="string"==typeof n,l=i?n:t,h=`_${l}`;this.metaManager.globalMeta.meta[h]=this.metaManager.globalMeta.meta[l],s?(this.installPropWatcher(t,h,s),i&&this.installPropWatcher(n,h,s)):r&&(this.installPropWatcher(t,h,o(a,this)),this.metaManager.globalMeta.meta._initOnlySettings||(this.metaManager.globalMeta.meta._initOnlySettings=[]),this.metaManager.globalMeta.meta._initOnlySettings.push(t))}))}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})}}},62979:(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(67834),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620);var n=r(25499),s=r(1791)},32465:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t.replaceData=function(e,t,r,n){const{hotInstance:u,dataMap:c,dataSource:d,internalSource:p,source:g,metaManager:f,firstRun:m}=n,y=(0,s.toUpperCaseFirst)(p),E=u.getSettings();Array.isArray(E.dataSchema)?u.dataType="array":(0,i.isFunction)(E.dataSchema)?u.dataType="function":u.dataType="object";c&&c.destroy();e=u.runHooks(`before${y}`,e,m,g);const w=new o.default(u,e,f);if(t(w),"object"==typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error(`${p} only accepts array of objects or array of arrays (${typeof e} given)`);{const t=w.getSchema();let r;e=[];let n=0,s=0;for(n=0,s=E.startRows;n<s;n++)if("object"!==u.dataType&&"function"!==u.dataType||!E.dataSchema)if("array"===u.dataType)r=(0,a.deepClone)(t[0]),e.push(r);else{r=[];for(let e=0,t=E.startCols;e<t;e++)r.push(null);e.push(r)}else r=(0,a.deepClone)(t),e.push(r)}}Array.isArray(e[0])&&(u.dataType="array");E.data=e,w.dataSource=e,d.data=e,d.dataType=u.dataType,d.colToProp=w.colToProp.bind(w),d.propToCol=w.propToCol.bind(w),d.countCachedColumns=w.countCachedColumns.bind(w),r(w),u.runHooks(`after${y}`,e,m,g),m||(u.runHooks("afterChange",null,p),u.render());u.getSettings().ariaTags&&(0,l.setAttribute)(u.rootElement,[(0,h.A11Y_ROWCOUNT)(-1),(0,h.A11Y_COLCOUNT)(u.countCols()+(u.view?u.countRowHeaders():0))])},r(67834),r(15724);var s=r(5893),i=r(89804),o=n(r(78747)),a=r(25499),l=r(62577),h=r(71120)},70892:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834);var s=n(r(85707)),i=r(83445),o=r(77661),a=r(8266),l=n(r(3849));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 u(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var c=new WeakSet;class d{constructor(e,t,r){h(this,c),(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,"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=>u(c,this,p).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)=>u(c,this,g).call(this,e,t,r)))}getActiveEditor(){return this.activeEditor}prepareEditor(){var e;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,!1,"meta");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(e):this.tableMeta.enterMoves};e.shiftKey&&(t.row=-t.row,t.col=-t.col),this.hot.selection.isMultiple()?this.selection.transformFocus(t.row,t.col):this.selection.transformStart(t.row,t.col,!0)}destroy(){this.destroyed=!0,this.eventManager.destroy()}}function p(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;(!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&((0,i.isFunctionKey)(r)||(0,i.isCtrlMetaKey)(r)||n||this.isEditorOpened()||this.openEditor("",e))}function g(e,t){t.isCell()&&this.openEditor(null,e,!0)}const f=new WeakMap;d.getInstance=function(e,t,r){let n=f.get(e);return n||(n=new d(e,t,r),f.set(e,n)),n};t.default=d},28474:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834),r(15724),r(14846),r(27458),r(6211),r(90458);var s=n(r(85707)),i=r(82518),o=r(10587),a=r(62577),l=r(70505),h=r(5893),u=r(83445),c=r(85096),d=r(71120);function p(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)}function g(e,t){return e.get(function(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}(e,t))}const f=t.EDITOR_TYPE="autocomplete";var m=new WeakMap;class y extends i.HandsontableEditor{constructor(){super(...arguments),(0,s.default)(this,"query",null),(0,s.default)(this,"strippedChoices",[]),(0,s.default)(this,"rawChoices",[]),p(this,m,this.hot.guid.slice(0,9)),(0,s.default)(this,"sortByRelevance",(function(e,t,r){const n=[],s=[],i=e.length;let o,a,u,c,d=t.length;if(0===i){for(u=0;u<d;u++)s.push(u);return s}for(u=0;u<d;u++){if(a=(0,h.stripTags)((0,l.stringify)(t[u])),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:u,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})),u=0,d=n.length;u<d;u++)s.push(n[u].baseIndex);return s}))}static get EDITOR_TYPE(){return f}getValue(){const e=this.rawChoices.find((e=>this.stripValueIfNeeded(e)===this.TEXTAREA.value));return(0,l.isDefined)(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),(0,a.addClass)(this.htContainer,"autocompleteEditor"),(0,a.addClass)(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&(0,a.setAttribute)(this.TEXTAREA,[(0,d.A11Y_TEXT)(),(0,d.A11Y_COMBOBOX)(),(0,d.A11Y_HASPOPUP)("listbox"),(0,d.A11Y_AUTOCOMPLETE)()])}prepare(e,t,r,n,s,i){super.prepare(e,t,r,n,s,i),this.hot.getSettings().ariaTags&&(0,a.setAttribute)(this.TEXTAREA,[(0,d.A11Y_EXPANDED)("false"),(0,d.A11Y_CONTROLS)(`${g(m,this)}-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:i}=this;this.showEditableElement(),this.focus(),this.addHook("beforeKeyDown",(e=>this.onBeforeKeyDown(e))),this.htEditor.updateSettings({colWidths:e?[(0,a.outerWidth)(this.TEXTAREA)-2]:void 0,autoColumnSize:!0,autoRowSize:!0,renderer:(e,s,i,o,h,u,p)=>{(0,c.textRenderer)(e,s,i,o,h,u,p);const{filteringCaseSensitive:g,allowHtml:f,locale:m}=this.cellProperties,y=this.query;let E,w,C=(0,l.stringify)(u);C&&!f&&(E=!0===g?C.indexOf(y):C.toLocaleLowerCase(m).indexOf(y.toLocaleLowerCase(m)),-1!==E&&(w=C.substr(E,y.length),C=C.replace(w,`<strong>${w}</strong>`))),t&&(0,a.setAttribute)(s,[(0,d.A11Y_OPTION)(),...r?[(0,d.A11Y_SETSIZE)(n)]:[],...r?[(0,d.A11Y_POSINSET)(r.indexOf(u)+1)]:[],["id",`${this.htEditor.rootElement.id}_${i}-${o}`]]),s.innerHTML=C},afterSelectionEnd:(e,r)=>{if(t){const t=this.htEditor.getCell(e,r,!0);(0,a.setAttribute)(t,[(0,d.A11Y_SELECTED)()]),(0,a.setAttribute)(this.TEXTAREA,...(0,d.A11Y_ACTIVEDESCENDANT)(t.id))}}}),t&&((0,a.setAttribute)(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...(0,d.A11Y_PRESENTATION)()),(0,a.setAttribute)(this.htEditor.rootElement,[(0,d.A11Y_LISTBOX)(),(0,d.A11Y_LIVE)("polite"),(0,d.A11Y_RELEVANT)("text"),["id",`${g(m,this)}-listbox-${s}-${i}`]]),(0,a.setAttribute)(this.TEXTAREA,...(0,d.A11Y_EXPANDED)("true"))),this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}))}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&(0,a.setAttribute)(this.TEXTAREA,[(0,d.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,a.getCaretPosition)(this.TEXTAREA),r=(0,a.getSelectionEndPosition)(this.TEXTAREA),n=this.cellProperties.sortByRelevance,s=this.cellProperties.filter;let i=null,l=null,h=e;n&&(i=this.sortByRelevance(this.stripValueIfNeeded(this.getValue()),h,this.cellProperties.filteringCaseSensitive));const u=Array.isArray(i)?i.length:0;if(!1===s)u&&(l=i[0]);else{const e=[];for(let t=0,r=h.length;t<r&&!(n&&u<=t);t++)u?e.push(h[i[t]]):e.push(h[t]);l=0,h=e}this.strippedChoices=h,0===h.length?this.htEditor.rootElement.style.display="none":this.htEditor.rootElement.style.display="",this.htEditor.loadData((0,o.pivot)([h])),h.length>0&&(this.updateDropdownDimensions(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(l)),this.hot.listen(),(0,a.setCaretPosition)(this.TEXTAREA,t,t===r?void 0:r)}flipDropdownIfNeeded(){const e=(0,a.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,a.offset)(this.TEXTAREA),s=(0,a.outerHeight)(this.TEXTAREA),i=this.getHeight(),o=e.scrollTop,l=(0,a.outerHeight)(this.hot.view._wt.wtTable.THEAD),h=(0,a.offset)(e),u=n.top-h.top-l+o,c=e.scrollHeight-u-l-s,d=i>c&&u>c;return d?this.flipDropdown(i):this.unflipDropdown(),this.limitDropdownIfNeeded(d?u: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.getDefaultRowHeight(),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}updateDropdownDimensions(){this.htEditor.updateSettings({width:this.getWidth(),height:this.getHeight()}),this.htEditor.view.hasVerticalScroll()&&this.htEditor.updateSettings({width:this.htEditor.getSettings().width+(0,a.getScrollbarWidth)(this.hot.rootDocument)}),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()}getHeight(){const e=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore")),t=parseInt(e.borderTopWidth,10)+parseInt(e.borderBottomWidth,10),r=Math.min(this.cellProperties.visibleRows,this.strippedChoices.length);return Array.from({length:r},((e,t)=>t)).reduce(((e,t)=>e+this.htEditor.getRowHeight(t)),0)+t+1}getWidth(){const e=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore")),t=parseInt(e.borderInlineStartWidth,10)+parseInt(e.borderInlineEndWidth,10);return this.htEditor.getColWidth(0)+t}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){const{allowHtml:t}=this.cellProperties,r=(0,o.arrayMap)(e,(e=>(0,l.stringify)(e)));return(0,o.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===u.KEY_CODES.ARROW_DOWN&&r>0&&r<this.htEditor.countRows()-1&&(n=!0),e===u.KEY_CODES.ARROW_UP&&r>-1&&(n=!0),n}onBeforeKeyDown(e){if((0,u.isPrintableChar)(e.keyCode)||e.keyCode===u.KEY_CODES.BACKSPACE||e.keyCode===u.KEY_CODES.DELETE||e.keyCode===u.KEY_CODES.INSERT){let t=10;if(e.keyCode===u.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=y},10463:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(28474);t.EDITOR_TYPE=n.EDITOR_TYPE,t.AutocompleteEditor=n.AutocompleteEditor},60448:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834);var s=n(r(85707)),i=r(70505),o=r(25499),a=n(r(70292)),l=r(62577);const h=t.EDITOR_TYPE="base",u=t.EDITOR_STATE=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});class c{static get EDITOR_TYPE(){return h}constructor(e){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"state",u.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=this.isOpened()?this.state:u.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let r,n,s,i;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]),i=Math.max(e[1],e[3])}else[r,n,s,i]=[this.row,this.col,null,null];const o=this.hot.runHooks("modifyGetCellCoords",r,n,!1,"meta");Array.isArray(o)&&([r,n]=o),this.hot.populateFromArray(r,n,e,s,i,"edit")}beginEditing(e,t){if(this.state!==u.VIRGIN)return;const r=this.hot,n=r.rowIndexMapper.getRenderableFromVisualIndex(this.row),s=r.columnIndexMapper.getRenderableFromVisualIndex(this.col),o=()=>{if(this.state=u.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)};this.hot.addHookOnce("afterScroll",o);r.view.scrollViewport(r._createCellCoords(n,s))||(this.hot.removeHook("afterScroll",o),o())}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())if(this.state!==u.VIRGIN){if(this.state===u.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=u.WAITING,this.saveValue(n,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",(e=>{this.state=u.FINISHED,this.discardEditor(e)})):(this.state=u.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout((()=>{this._fireCallbacks(!0)}))}cancelChanges(){this.state=u.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===u.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=u.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=u.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===u.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,l.offset)(t),o=(0,l.outerWidth)(t),a=(0,l.offset)(this.hot.rootElement),h=(0,l.outerWidth)(this.hot.rootElement),u=r.topOverlay.holder,c=r.inlineStartOverlay.holder,d=u!==s?u.scrollTop:0,p=c!==s?c.scrollLeft:0,g=s.innerWidth-a.left-h,{wtTable:f}=null!==(e=r.getParentOverlay(t))&&void 0!==e?e:this.hot.view._wt,m=f.name,y=["master","inline_start"].includes(m)?d:0,E=["master","top","bottom"].includes(m)?p:0,w=i.top===a.top?0:1;let C=i.top-a.top-w-y,v=0;v=this.hot.isRtl()?s.innerWidth-i.left-o-g-1+E:i.left-a.left-1-E,["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 R=this.hot.hasColHeaders(),S=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),T=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),N=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(R&&S<=0||S===N)&&(C+=1),T<=0&&(v+=1);const M=n.rowsRenderCalculator.startPosition,_=n.columnsRenderCalculator.startPosition,b=Math.abs(r.inlineStartOverlay.getScrollPosition()),A=r.topOverlay.getScrollPosition(),O=(0,l.getScrollbarWidth)(this.hot.rootDocument);let I=t.offsetTop;if(["inline_start","master"].includes(m)&&(I+=M-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?f.getWidth()-t.offsetLeft:Math.abs(x),x+=_-b-o):["top","master","bottom"].includes(m)&&(x+=_-b);const P=s.getComputedStyle(this.TD),L=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",D=parseInt(P[L],10)>0?0:1,k=parseInt(P.borderTopWidth,10)>0?0:1,H=(0,l.outerWidth)(t)+D,F=(0,l.outerHeight)(t)+k,U=(0,l.hasVerticalScrollbar)(u)?O:0,V=(0,l.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,this.hot.view.getDefaultRowHeight()),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=c,(0,o.mixin)(c,a.default)},74854:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(60448);t.EDITOR_STATE=n.EDITOR_STATE,t.EDITOR_TYPE=n.EDITOR_TYPE,t.BaseEditor=n.BaseEditor},11476:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(74854),s=r(62577);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},12302:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(11476);t.EDITOR_TYPE=n.EDITOR_TYPE,t.CheckboxEditor=n.CheckboxEditor},28150:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834);var s=n(r(85707)),i=n(r(6671)),o=n(r(44499)),a=r(74854),l=r(66420),h=r(62577),u=r(25499),c=r(83445);const d=t.EDITOR_TYPE="date",p="dateEditor";class g extends l.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 d}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()})),this.hot.addHook("afterSetTheme",((e,t)=>{t||((0,h.removeClass)(this.datePicker,/ht-theme-.*/g),(0,h.addClass)(this.datePicker,e))}))}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,h.addClass)(this.datePicker,"htDatepickerHolder");const e=this.hot.getCurrentThemeName();(0,h.removeClass)(this.datePicker,/ht-theme-.*/g),(0,h.addClass)(this.datePicker,e),this.hot.rootDocument.body.appendChild(this.datePicker),this.eventManager.addEventListener(this.datePicker,"mousedown",(e=>{(0,h.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");this.showDatepicker(e),super.open(),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:p})}close(){var e;this._opened=!1,null!==(e=this.$datePicker)&&void 0!==e&&e.destroy&&this.$datePicker.destroy(),this.hot._registerTimeout((()=>{const e=this.hot._getEditorManager();e.closeEditor(),this.hot.view.render(),e.prepareEditor()}));this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(p),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.cellProperties.dateFormat||this.defaultDateFormat,r=this.hot.view.isMouseDown(),n=!!e&&(0,c.isFunctionKey)(e.keyCode);let s;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.originalValue?(s=this.originalValue,(0,i.default)(s,t,!0).isValid()&&this.$datePicker.setMoment((0,i.default)(s,t),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),n||r||this.setValue("")):this.cellProperties.defaultDate?(s=this.cellProperties.defaultDate,(0,i.default)(s,t,!0).isValid()&&this.$datePicker.setMoment((0,i.default)(s,t),!0),n||r||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}refreshDimensions(e){var t;if(super.refreshDimensions(e),this.state!==a.EDITOR_STATE.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.hideDatepicker();const{rowIndexMapper:r,columnIndexMapper:n}=this.hot,{wtOverlays:s}=this.hot.view._wt,{wtTable:i}=null!==(t=s.getParentOverlay(this.TD))&&void 0!==t?t:this.hot.view._wt,o=r.getVisualFromRenderableIndex(i.getFirstPartiallyVisibleRow()),l=r.getVisualFromRenderableIndex(i.getLastPartiallyVisibleRow()),u=n.getVisualFromRenderableIndex(i.getFirstPartiallyVisibleColumn()),c=n.getVisualFromRenderableIndex(i.getLastPartiallyVisibleColumn());if(this.row>=o&&this.row<=l&&this.col>=u&&this.col<=c){const e=this.TD.getBoundingClientRect();this.datePickerStyle.top=`${this.hot.rootWindow.pageYOffset+e.top+(0,h.outerHeight)(this.TD)}px`;let t=this.hot.rootWindow.pageXOffset;this.hot.isRtl()?t+=e.right-(0,h.outerWidth)(this.datePicker):t+=e.left,this.datePickerStyle.left=`${t}px`}else this.hideDatepicker()}}t.DateEditor=g},16339:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(28150);t.EDITOR_TYPE=n.EDITOR_TYPE,t.DateEditor=n.DateEditor},97328:(e,t,r)=>{"use strict";t.__esModule=!0,r(14846),r(27458);var n=r(10463),s=r(28197);const i=t.EDITOR_TYPE="dropdown";class o extends n.AutocompleteEditor{static get EDITOR_TYPE(){return i}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=o,s.Hooks.getSingleton().add("beforeValidate",(function(e,t,r){const n=this.propToCol(r);if(Number.isInteger(n)){const e=this.getCellMeta(t,n);e.editor===o&&void 0===e.strict&&(e.filter=!1,e.strict=!0)}}))},51034:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(97328);t.EDITOR_TYPE=n.EDITOR_TYPE,t.DropdownEditor=n.DropdownEditor},37300:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(66420),s=r(62577),i=r(77661),o=r(25499),a=r(92399);const l="handsontableEditor",h=t.EDITOR_TYPE="handsontable";class u extends n.TextEditor{static get EDITOR_TYPE(){return h}open(){super.open();const e=this.htContainer.style;this.htEditor&&(this.htEditor.destroy(),e.width="",e.height="",e.overflow=""),"none"===e.display&&(e.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.htEditor.updateSettings({width:this.getWidth(),height:this.getHeight()}),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,themeName:this.hot.getCurrentThemeName(),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)}getHeight(){return this.htEditor.view.getTableHeight()+1}getWidth(){return this.htEditor.view.getTableWidth()}assignHooks(){this.hot.addHook("afterDestroy",(()=>{this.htEditor&&this.htEditor.destroy()})),this.hot.addHook("afterSetTheme",((e,t)=>{t||this.htEditor.useTheme(e)}))}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();const t={group:l,relativeToGroup:a.EDITOR_EDIT_GROUP,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=u},82518:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(37300);t.EDITOR_TYPE=n.EDITOR_TYPE,t.HandsontableEditor=n.HandsontableEditor},14417:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllEditors=function(){(0,g.registerEditor)(s.BaseEditor),(0,g.registerEditor)(n.AutocompleteEditor),(0,g.registerEditor)(i.CheckboxEditor),(0,g.registerEditor)(o.DateEditor),(0,g.registerEditor)(a.DropdownEditor),(0,g.registerEditor)(l.HandsontableEditor),(0,g.registerEditor)(h.NumericEditor),(0,g.registerEditor)(u.PasswordEditor),(0,g.registerEditor)(c.SelectEditor),(0,g.registerEditor)(d.TextEditor),(0,g.registerEditor)(p.TimeEditor)};var n=r(10463);t.AutocompleteEditor=n.AutocompleteEditor,t.AUTOCOMPLETE_EDITOR=n.EDITOR_TYPE;var s=r(74854);t.BaseEditor=s.BaseEditor,t.BASE_EDITOR=s.EDITOR_TYPE;var i=r(12302);t.CheckboxEditor=i.CheckboxEditor,t.CHECKBOX_EDITOR=i.EDITOR_TYPE;var o=r(16339);t.DateEditor=o.DateEditor,t.DATE_EDITOR=o.EDITOR_TYPE;var a=r(51034);t.DropdownEditor=a.DropdownEditor,t.DROPDOWN_EDITOR=a.EDITOR_TYPE;var l=r(82518);t.HandsontableEditor=l.HandsontableEditor,t.HANDSONTABLE_EDITOR=l.EDITOR_TYPE;var h=r(82304);t.NumericEditor=h.NumericEditor,t.NUMERIC_EDITOR=h.EDITOR_TYPE;var u=r(14150);t.PasswordEditor=u.PasswordEditor,t.PASSWORD_EDITOR=u.EDITOR_TYPE;var c=r(63303);t.SelectEditor=c.SelectEditor,t.SELECT_EDITOR=c.EDITOR_TYPE;var d=r(66420);t.TextEditor=d.TextEditor,t.TEXT_EDITOR=d.EDITOR_TYPE;var p=r(35442);t.TimeEditor=p.TimeEditor,t.TIME_EDITOR=p.EDITOR_TYPE;var g=r(8266);t.registerEditor=g.registerEditor,t.RegisteredEditor=g.RegisteredEditor,t._getEditorInstance=g._getEditorInstance,t.getEditor=g.getEditor,t.getEditorInstance=g.getEditorInstance,t.getRegisteredEditorNames=g.getRegisteredEditorNames,t.getRegisteredEditors=g.getRegisteredEditors,t.hasEditor=g.hasEditor},82304:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(90146);t.EDITOR_TYPE=n.EDITOR_TYPE,t.NumericEditor=n.NumericEditor},90146:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(66420);const s=t.EDITOR_TYPE="numeric";class i extends n.TextEditor{static get EDITOR_TYPE(){return s}}t.NumericEditor=i},14150:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(93884);t.EDITOR_TYPE=n.EDITOR_TYPE,t.PasswordEditor=n.PasswordEditor},93884:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707)),i=r(66420),o=r(17207),a=r(62577);const l=t.EDITOR_TYPE="password";class h extends i.TextEditor{constructor(){super(...arguments),(0,s.default)(this,"autoResize",(0,o.createInputElementResizer)(this.hot.rootDocument,{textContent:e=>"•".repeat(e.value.length)}))}static get EDITOR_TYPE(){return l}createElements(){super.createElements(),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,(0,a.empty)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}t.PasswordEditor=h},8266:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t.RegisteredEditor=d,t.getEditorInstance=t._getEditorInstance=function(e,t){let r;if("function"==typeof e)o.get(e)||p(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(!h(e))throw Error(`No registered editor found under "${e}" name`);return l(e).getConstructor()},t.registerEditor=p,r(67834);var s=r(28197),i=n(r(28651));const o=new WeakMap,{register:a,getItem:l,hasItem:h,getNames:u,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.Hooks.getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function p(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=u,t.hasEditor=h},63303:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(70638);t.EDITOR_TYPE=n.EDITOR_TYPE,t.SelectEditor=n.SelectEditor},70638:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(74854),s=r(62577),i=r(25499),o=r(71120);const a="ht_editor_visible",l="selectEditor",h=t.EDITOR_TYPE="select";class u extends n.BaseEditor{static get EDITOR_TYPE(){return h}init(){this.selectWrapper=this.hot.rootDocument.createElement("div"),this.select=this.hot.rootDocument.createElement("select"),this.select.setAttribute("data-hot-input","true"),this.selectWrapper.style.display="none";const e=this.hot.rootDocument.createElement("DIV"),t=this.hot.getSettings().ariaTags;e.className="htAutocompleteArrow",t&&e.setAttribute(...(0,o.A11Y_HIDDEN)()),e.appendChild(this.hot.rootDocument.createTextNode(String.fromCharCode(9660))),(0,s.addClass)(this.selectWrapper,"htSelectEditor"),this.selectWrapper.appendChild(this.select),this.selectWrapper.insertBefore(e,this.selectWrapper.firstChild),this.hot.rootElement.appendChild(this.selectWrapper),this.registerHooks()}getValue(){return this.select.value}setValue(e){this.select.value=e}open(){this._opened=!0,this.refreshDimensions(),this.selectWrapper.style.display="";this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.selectWrapper.style.display="none",(0,s.hasClass)(this.selectWrapper,a)&&(0,s.removeClass)(this.selectWrapper,a),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 h;h="function"==typeof l?this.prepareOptions(l(this.row,this.col,this.prop)):this.prepareOptions(l),(0,s.empty)(this.select),(0,i.objectEach)(h,((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(),o=this.selectWrapper.style;o.height=`${i}px`,o.width=`${r}px`,o.top=`${e}px`,o[this.hot.isRtl()?"right":"left"]=`${t}px`,o.margin="0px",(0,s.addClass)(this.selectWrapper,a)}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={group:l};this.isInFullEditMode()&&e.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{const e=this.select.selectedIndex-1;e>=0&&(this.select[e].selected=!0)}},{keys:[["ArrowDown"]],callback:()=>{const e=this.select.selectedIndex+1;e<=this.select.length-1&&(this.select[e].selected=!0)}}],t)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(l)}}t.SelectEditor=u},96667:(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(62577)},66420:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(85856);t.EDITOR_TYPE=n.EDITOR_TYPE,t.TextEditor=n.TextEditor},85856:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707)),i=r(74854),o=n(r(3849)),a=r(25046),l=r(62577),h=r(22137),u=r(17207),c=r(70505),d=r(96667),p=r(71120);const g="ht_editor_hidden",f="textEditor",m=t.EDITOR_TYPE="text";class y extends i.BaseEditor{static get EDITOR_TYPE(){return m}constructor(e){super(e),(0,s.default)(this,"eventManager",new o.default(this)),(0,s.default)(this,"autoResize",(0,u.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.isOpened()&&(this.TEXTAREA.value=""),a===i.EDITOR_STATE.FINISHED||this.isOpened()||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,p.A11Y_TABINDEX)(-1)]),(0,l.addClass)(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=e.createElement("DIV"),(0,l.addClass)(this.TEXTAREA_PARENT,"handsontableInputHolder"),(0,l.hasClass)(this.TEXTAREA_PARENT,this.layerClass)&&(0,l.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,l.addClass)(this.TEXTAREA_PARENT,g),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,g)}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,h.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,g)&&(0,l.removeClass)(this.TEXTAREA_PARENT,g),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 l=this.hot.rootWindow.getComputedStyle(this.TD);this.TEXTAREA.style.fontSize=l.fontSize,this.TEXTAREA.style.fontFamily=l.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor,this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(n,s),minHeight:Math.min(o,a),maxWidth:s,maxHeight:a},!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().getContext("editor"),t={runOnlyIf:()=>(0,c.isDefined)(this.hot.getSelected()),group:f},r=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};e.addShortcuts([{keys:[["Control","Enter"]],callback:()=>(r(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e.altKey},{keys:[["Meta","Enter"]],callback:()=>(r(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(r(),!1)},{keys:[["Home"]],callback:(e,t)=>{let[r]=t;(0,d.updateCaretPosition)(r,this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{let[r]=t;(0,d.updateCaretPosition)(r,this.TEXTAREA)}}],t)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(f)}}t.TextEditor=y},35442:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(55736);t.EDITOR_TYPE=n.EDITOR_TYPE,t.TimeEditor=n.TimeEditor},55736:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(66420);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},3849:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t.getListenersCounter=function(){return o},r(15724);var s=n(r(85707)),i=r(77661);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)}}},19053:(e,t,r)=>{"use strict";t.__esModule=!0,r(67834);var n=r(14859),s=r(62577),i=r(89804);function o(e,t,r){a(e,t),t.set(e,r)}function a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function l(e,t){return e.get(u(e,t))}function h(e,t,r){return e.set(u(e,t),r),r}function u(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}const c=Object.freeze({CELL:"cell",MIXED:"mixed"});var d=new WeakMap,p=new WeakMap,g=new WeakMap,f=new WeakMap,m=new WeakMap,y=new WeakSet;function E(e){var t;const r=null===(t=l(d,this).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!r||!l(d,this).selection.isCellVisible(r))return void e(null);const n=l(d,this).getCell(r.row,r.col,!0);null===n?l(d,this).addHookOnce("afterScroll",(()=>{e(l(d,this).getCell(r.row,r.col,!0))})):e(n)}function w(){u(y,this,E).call(this,(e=>{const{activeElement:t}=l(d,this).rootDocument;t&&(0,s.isOutsideInput)(t)&&t.blur(),this.focusOnHighlightedCell(e)}))}function C(){u(y,this,E).call(this,(e=>{this.getFocusMode()===c.MIXED&&"TD"===e.nodeName&&this.refocusToEditorTextarea()}))}function v(e){"boolean"==typeof e.imeFastEdit&&this.setFocusMode(e.imeFastEdit?c.MIXED:c.CELL)}t.FocusManager=class{constructor(e){var t,r,n=this;a(t=this,r=y),r.add(t),o(this,d,void 0),o(this,p,void 0),o(this,g,1),o(this,f,null),o(this,m,new Map);const s=e.getSettings();h(d,this,e),h(p,this,s.imeFastEdit?c.MIXED:c.CELL),l(d,this).addHook("afterUpdateSettings",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return u(y,n,v).call(n,...t)})),l(d,this).addHook("afterSelection",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return u(y,n,w).call(n,...t)})),l(d,this).addHook("afterSelectionFocusSet",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return u(y,n,w).call(n,...t)})),l(d,this).addHook("afterSelectionEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return u(y,n,C).call(n,...t)}))}getFocusMode(){return l(p,this)}setFocusMode(e){Object.values(c).includes(e)?h(p,this,e):(0,n.warn)(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return l(g,this)}setRefocusDelay(e){h(g,this,e)}setRefocusElementGetter(e){h(f,this,e)}getRefocusElement(){var e;return"function"==typeof l(f,this)?l(f,this).call(this):null===(e=l(d,this).getActiveEditor())||void 0===e?void 0:e.TEXTAREA}focusOnHighlightedCell(e){const t=e=>{var t,r;const n=null===(t=l(d,this).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!n)return;let s=l(d,this).runHooks("modifyFocusedElement",n.row,n.col,e);s instanceof HTMLElement||(s=e),!s||null!==(r=l(d,this).getActiveEditor())&&void 0!==r&&r.isOpened()||s.focus({preventScroll:!0})};e?t(e):u(y,this,E).call(this,(e=>t(e)))}refocusToEditorTextarea(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l(g,this);!l(d,this).getSettings().imeFastEdit||null!==(e=l(d,this).getActiveEditor())&&void 0!==e&&e.isOpened()||(l(m,this).has(t)||l(m,this).set(t,(0,i.debounce)((()=>{var e;null===(e=this.getRefocusElement())||void 0===e||e.select()}),t)),l(m,this).get(t)())}}},71120:(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_MENU_ITEM_CHECKBOX=()=>["role","menuitemcheckbox"];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]},10587:(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(15724),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620),r(14846),r(27458)},25046:(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=h;var n=r(25499),s=r(85992);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 h(){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(),h())},14859:(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(70505)},87124:(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(15724),r(14846),r(63333),r(69655);var n=r(25499);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}},95976:(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}},62577:(e,t,r)=>{"use strict";t.__esModule=!0,t.addClass=h,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];p.test(t)?e.innerHTML=r?(0,n.sanitize)(t):t:g(e,t)},t.fastInnerText=g,t.findFirstParentWithClass=function(e,t){const r={element:void 0,classNames:[]};let n=e;for(;null!==n&&n!==e.ownerDocument.documentElement&&!r.element;){if("string"==typeof t&&n.classList.contains(t))r.element=n,r.classNames.push(t);else if(t instanceof RegExp){const e=Array.from(n.classList).filter((e=>t.test(e)));e.length&&(r.element=n,r.classNames.push(...e))}n=n.parentElement}return r},t.getCaretPosition=function(e){if(e.selectionStart)return e.selectionStart;return 0},t.getCssTransform=function(e){let t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];return-1},t.getFrameElement=i,t.getMaximumScrollLeft=function(e){return e.scrollWidth-e.clientWidth},t.getMaximumScrollTop=function(e){return e.scrollHeight-e.clientHeight},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 f(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===y&&(y=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 y},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=r.getComputedStyle(e);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=r.getComputedStyle(n),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=f,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=E,t.isOutsideInput=w,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,n=t.ownerDocument.defaultView;let s=t;for(;s!==r;){if(null===s)return!1;if(s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(s.host){if(s.host.impl)return e(s.host.impl);if(s.host)return e(s.host);throw new Error("Lost in Web Components world")}return!1}if("none"===n.getComputedStyle(s).display)return!1;s=s.parentNode}return!0},t.makeElementContentEditableAndSelectItsContent=C,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=u,t.removeContentEditableFromElementAndDeselect=v,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];C(e,r),t(),v(e,r)},t.selectElementIfAllowed=function(e){w(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(67834),r(15724),r(14846),r(27458),r(69655);var n=r(5893),s=r(71120);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 h(e,t){"string"==typeof t&&(t=t.split(" ")),(t=a(t)).length>0&&e.classList.add(...t)}function u(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 p=t.HTML_CHARACTERS=/(<(.*)>|&(.*);)/;function g(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 f(){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}let y;function E(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function w(e){return E(e)&&!1===e.hasAttribute("data-hot-input")}function C(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&&h(e,"invisibleSelection"),i.selectNodeContents(e),o.removeAllRanges(),o.addRange(i)}function v(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&&u(e,"invisibleSelection"),e.removeAttribute("contenteditable")}},77661:(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.isTouchEvent=function(e){return e instanceof TouchEvent},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}},85992:(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)}},89804:(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(10587),s=r(70505);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 h=!1;n.lastCallThrottled=!0,r||(r=l,h=!0);const u=t-(l-r);return h?(n.lastCallThrottled=!1,e.apply(this,o)):(s&&clearTimeout(s),s=setTimeout((()=>{n.lastCallThrottled=!1,e.apply(this,o),r=0,s=void 0}),u)),n}}},70505:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t._injectProductInfo=function(e,t){const r=!a(e),n="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),i="15.0.0-next-c7f1716-20241209";let o,w="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|=(u(`${u(h(t)+(h(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=p(e||""));if(r||n||v)if(v){const t=(0,s.default)("11/12/2024","DD/MM/YYYY"),r=Math.floor(t.toDate().getTime()/864e5),n=g(e);o=(0,s.default)(864e5*(n+1),"x").format("MMMM DD, YYYY"),r>n?(w="expired",C="expired"):(w="valid",C="valid")}else n?(w="non_commercial",C="valid"):(w="invalid",C="invalid");else w="missing",C="missing";f()&&(w="valid",C="valid");if(!m&&"valid"!==w){y[w]({keyValidityDate:o,hotVersion:i})&&console["non_commercial"===w?"info":"warn"](y[w]({keyValidityDate:o,hotVersion:i})),m=!0}if("valid"!==C&&t.parentNode){if(E[C]({keyValidityDate:o,hotVersion:i})){const e=document.createElement("div");e.className="handsontable hot-display-license-info",e.innerHTML=E[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(6671)),i=r(21595);function o(e){return void 0===e}function a(e){return null===e||""===e||o(e)}const l="length",h=e=>parseInt(e,16),u=e=>parseInt(e,10),c=(e,t,r)=>e.substr(t,r),d=e=>e.codePointAt(0)-65,p=e=>`${e}`.replace(/\-/g,""),g=e=>h(c(p(e),h("12"),d("F")))/(h(c(p(e),d("B"),~~![][l]))||9),f=()=>"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 y={invalid:()=>i.toSingleLine`
1119
1119
  The license key for Handsontable is invalid.\x20
1120
1120
  If you need any help, contact us at support@handsontable.com.`,expired:e=>{let{keyValidityDate:t,hotVersion:r}=e;return i.toSingleLine`
1121
1121
  The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
@@ -1170,7 +1170,7 @@ the last node, the show column modification can be applied.`);const{crossHiddenC
1170
1170
  columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);const n=(0,p.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,u.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),c=this.tableProps.createCellCoords(i-1,s),d=this.tableProps.createCellRange(u,u,c).isValid({countRows:i,countCols:o,countRowHeaders:0,countColHeaders:a});if(d){let e=0,t=0;Number.isInteger(null==r?void 0:r.row)&&Number.isInteger(null==r?void 0:r.col)?(e=(0,h.clamp)(r.row,l,i-1),t=(0,h.clamp)(r.col,Math.min(n,s),Math.max(n,s))):(e=(0,h.clamp)(r,l,i-1),t=n);const o=this.tableProps.createCellCoords(e,t),u=0===a?0:(0,h.clamp)(o.row,l,-1),c=i-1,d=this.tableProps.createCellCoords(u,n),p=this.tableProps.createCellCoords(c,s);this.runLocalHooks("beforeSelectColumns",d,p,o),d.row=u,p.row=c,this.setRangeStartOnly(d,void 0,o),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(p),this.runLocalHooks("afterSelectColumns",d,p,o),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){let n=0,a=0;Number.isInteger(null==r?void 0:r.row)&&Number.isInteger(null==r?void 0:r.col)?(n=(0,h.clamp)(r.row,Math.min(e,t),Math.max(e,t)),a=(0,h.clamp)(r.col,o,s-1)):(n=e,a=(0,h.clamp)(r,o,s-1));const l=this.tableProps.createCellCoords(n,a),u=0===i?0:(0,h.clamp)(l.col,o,-1),c=s-1,d=this.tableProps.createCellCoords(e,u),p=this.tableProps.createCellCoords(t,c);this.runLocalHooks("beforeSelectRows",d,p,l),d.col=u,p.col=c,this.setRangeStartOnly(d,void 0,l),this.selectedByRowHeader.add(this.getLayerLevel()),this.setRangeEnd(p),this.runLocalHooks("afterSelectRows",d,p,l),this.finish()}return u}refresh(){if(!this.isSelected())return;const e=this.tableProps.countRows(),t=this.tableProps.countCols();if(0===e||0===t)return void this.deselect();const r=this.selectedRange.peekByIndex(this.selectedRange.size()-1),{from:n,to:s,highlight:i}=r;this.clear(),i.assign({row:(0,h.clamp)(i.row,-1/0,e-1),col:(0,h.clamp)(i.col,-1/0,t-1)}),n.assign({row:(0,h.clamp)(n.row,-1/0,e-1),col:(0,h.clamp)(n.col,-1/0,t-1)}),s.assign({row:(0,h.clamp)(s.row,0,e-1),col:(0,h.clamp)(s.col,0,t-1)}),this.selectedRange.ranges.push(r),this.highlight.getFocus().add(i).commit().syncWith(r),this.applyAndCommit(r)}commit(){if(this.highlight.getCustomSelections().forEach((e=>{e.commit()})),!this.isSelected())return;const e=this.getLayerLevel(),t=this.selectedRange.current();this.highlight.isEnabledFor(i.FOCUS_TYPE,t.highlight)&&this.highlight.getFocus().commit().syncWith(t);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(),h=this.highlight.createColumnHighlight();t.commit(),r.commit(),n.commit(),s.commit(),i.commit(),o.commit(),a.commit(),l.commit(),h.commit()}this.highlight.useLayerLevel(e)}}(0,a.mixin)(_,c.default);t.default=_},88988:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834);var s=r(25499),i=n(r(16050));function o(e,t,r){a(e,t),t.set(e,r)}function a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function l(e,t){return e.get(u(e,t))}function h(e,t,r){return e.set(u(e,t),r),r}function u(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var c=new WeakMap,d=new WeakMap,p=new WeakMap,g=new WeakSet;class f{constructor(e,t){var r,n;a(r=this,n=g),n.add(r),o(this,c,void 0),o(this,d,void 0),o(this,p,{x:0,y:0}),h(c,this,e),h(d,this,t)}transformStart(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=l(d,this).createCellCoords(e,t);let i=l(c,this).current().highlight;const o=l(d,this).visualToRenderableCoords(i);let a=0,h=0;if(this.runLocalHooks("beforeTransformStart",n),null!==o.row&&null!==o.col){const{width:e,height:t}=u(g,this,y).call(this),{row:o,col:c}=u(g,this,C).call(this,i),p=l(d,this).fixedRowsBottom(),f=l(d,this).minSpareRows(),E=l(d,this).minSpareCols(),w=l(d,this).autoWrapRow(),R=l(d,this).autoWrapCol(),S=l(d,this).createCellCoords(o+n.row,c+n.col);if(S.row>=t){const n=(0,s.createObjectPropListener)(r&&f>0&&0===p),i=S.col+1,o=l(d,this).createCellCoords(S.row-t,i>=e?i-e:i);this.runLocalHooks("beforeColumnWrap",n,u(g,this,v).call(this,o),i>=e),n.value?this.runLocalHooks("insertRowRequire",l(d,this).countRenderableRows()):R&&S.assign(o)}else if(S.row<0){const r=(0,s.createObjectPropListener)(R),n=S.col-1,i=l(d,this).createCellCoords(t+S.row,n<0?e+n:n);this.runLocalHooks("beforeColumnWrap",r,u(g,this,v).call(this,i),n<0),R&&S.assign(i)}if(S.col>=e){const n=(0,s.createObjectPropListener)(r&&E>0),i=S.row+1,o=l(d,this).createCellCoords(i>=t?i-t:i,S.col-e);this.runLocalHooks("beforeRowWrap",n,u(g,this,v).call(this,o),i>=t),n.value?this.runLocalHooks("insertColRequire",l(d,this).countRenderableColumns()):w&&S.assign(o)}else if(S.col<0){const r=(0,s.createObjectPropListener)(w),n=S.row-1,i=l(d,this).createCellCoords(n<0?t+n:n,e+S.col);this.runLocalHooks("beforeRowWrap",r,u(g,this,v).call(this,i),n<0),w&&S.assign(i)}const{rowDir:T,colDir:N}=u(g,this,m).call(this,S);a=T,h=N,i=u(g,this,v).call(this,S)}return this.runLocalHooks("afterTransformStart",i,a,h),i}transformEnd(e,t){const r=l(d,this).createCellCoords(e,t),n=l(c,this).current(),s=l(d,this).visualToRenderableCoords(n.highlight),i=u(g,this,E).call(this,n.to.row,n.from.row),o=u(g,this,w).call(this,n.to.col,n.from.col),a=n.to.clone();let h=0,p=0;if(this.runLocalHooks("beforeTransformEnd",r),null!==s.row&&null!==s.col&&null!==i&&null!==o){const{row:e,col:t}=u(g,this,C).call(this,n.highlight),s=l(d,this).createCellCoords(i+r.row,o+r.col),c=n.getTopStartCorner(),f=n.getTopEndCorner(),y=n.getBottomEndCorner();if(r.col<0&&o>=t&&s.col<t){const e=s.col-t;s.col=u(g,this,w).call(this,c.col,f.col)+e}else if(r.col>0&&o<=t&&s.col>t){const e=u(g,this,w).call(this,f.col,c.col),t=Math.max(s.col-e,1);s.col=e+t}if(r.row<0&&i>=e&&s.row<e){const t=s.row-e;s.row=u(g,this,E).call(this,c.row,y.row)+t}else if(r.row>0&&i<=e&&s.row>e){const e=u(g,this,E).call(this,y.row,c.row),t=Math.max(s.row-e,1);s.row=e+t}const{rowDir:R,colDir:S}=u(g,this,m).call(this,s);h=R,p=S;const T=u(g,this,v).call(this,s);0===r.row&&0!==r.col?a.col=T.col:0!==r.row&&0===r.col?a.row=T.row:(a.row=T.row,a.col=T.col)}return this.runLocalHooks("afterTransformEnd",a,h,p),a}setOffsetSize(e){let{x:t,y:r}=e;h(p,this,{x:t,y:r})}resetOffsetSize(){h(p,this,{x:0,y:0})}}function m(e){const{width:t,height:r}=u(g,this,y).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 y(){return{width:l(p,this).x+l(d,this).countRenderableColumns(),height:l(p,this).y+l(d,this).countRenderableRows()}}function E(e,t){const r=l(d,this).findFirstNonHiddenRenderableRow(e,t);return null===r?null:l(p,this).y+r}function w(e,t){const r=l(d,this).findFirstNonHiddenRenderableColumn(e,t);return null===r?null:l(p,this).x+r}function C(e){const{row:t,col:r}=l(d,this).visualToRenderableCoords(e);if(null===t||null===r)throw new Error("Renderable coords are not visible.");return l(d,this).createCellCoords(l(p,this).y+t,l(p,this).x+r)}function v(e){const t=e.clone();return t.col=e.col-l(p,this).x,t.row=e.row-l(p,this).y,l(d,this).renderableToVisualCoords(t)}(0,s.mixin)(f,i.default);t.default=f},13208:(e,t,r)=>{"use strict";t.__esModule=!0,t.detectSelectionType=g,t.normalizeSelectionFactory=f,t.transformSelectionToColumnDistance=function(e){const t=g(e.getSelected());if(t===o||t===a)return[];const r=f(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=g(e.getSelected());if(t===o||t===a)return[];const r=f(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(67834),r(15724),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620),r(14846),r(75568);var n=r(50206),s=r(10587),i=r(70505);const o=t.SELECTION_TYPE_UNRECOGNIZED=0,a=t.SELECTION_TYPE_EMPTY=1,l=t.SELECTION_TYPE_ARRAY=2,h=t.SELECTION_TYPE_OBJECT=3,u=t.SELECTION_TYPES=[h,l],c=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],d=Symbol("root"),p=Symbol("child");function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;if(t!==d&&t!==p)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=h;else if(s&&Array.isArray(t))i=g(t,p);else if(e.length>=2&&e.length<=4){!e.some(((e,t)=>!c[t].includes(typeof e)))&&(i=l)}}return i}function f(e){let{createCellCoords:t,createCellRange:r,keepDirection:n=!1,propToCol:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!u.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(o){const a=e===h;let l=a?o.from.row:o[0],u=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 u&&(u=s(u)),"string"==typeof d&&(d=s(d))),(0,i.isUndefined)(c)&&(c=l),(0,i.isUndefined)(d)&&(d=u),!n){const e=l,t=u,r=c,n=d;l=Math.min(e,r),u=Math.min(t,n),c=Math.max(e,r),d=Math.max(t,n)}const p=t(l,u),g=t(c,d);return r(p,p,g)}}},22016:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"editorCloseAndSave",callback(e){e._getEditorManager().closeEditorAndSaveChanges()}}},86952:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(74854);t.command={name:"editorCloseAndSaveByArrowKeys",callback(e,t,r){const s=e._getEditorManager(),i=s.getActiveEditor();i.isInFullEditMode()&&i.state===n.EDITOR_STATE.EDITING||(s.closeEditorAndSaveChanges(),e.getSelected()&&(r.includes("arrowdown")?e.selection.transformStart(1,0):r.includes("arrowup")?e.selection.transformStart(-1,0):r.includes("arrowleft")?e.selection.transformStart(0,-1*e.getDirectionFactor()):r.includes("arrowright")&&e.selection.transformStart(0,e.getDirectionFactor())),t.preventDefault())}}},59399:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"editorCloseAndSaveByEnter",callback(e,t){const r=e._getEditorManager();r.closeEditorAndSaveChanges(t.ctrlKey||t.metaKey),r.moveSelectionAfterEnter(t)}}},298:(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()}}},86446:(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)}}},53558:(e,t,r)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[n.command,s.command,i.command,o.command,a.command,l.command]};var n=r(22016),s=r(86952),i=r(59399),o=r(298),a=r(86446),l=r(53936)},53936:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(77661);t.command={name:"editorOpen",callback(e,t,r){const s=e._getEditorManager(),i=e.getSelectedRangeLast(),{highlight:o}=i;if(e.selection.isMultiple()&&!i.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0){const n=e.getSettings(),s="function"==typeof n.enterMoves?n.enterMoves(t):n.enterMoves;r.includes("shift")?e.selection.transformFocus(-s.row,-s.col):e.selection.transformFocus(s.row,s.col)}else o.isHeader()||(e.getSettings().enterBeginsEditing?s.cellProperties.readOnly?s.moveSelectionAfterEnter(t):s.openEditor(null,t,!0):s.moveSelectionAfterEnter(t),(0,n.stopImmediatePropagation)(t))}}},34413:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e._getEditorManager().prepareEditor()}}},6036:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionDown",callback(e){const{highlight:t}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()||e.selection.isSelectedByCorner()||!(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())||e.selection.transformEnd(1,0)}}},88900:(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.getFirstFullyVisibleRow(),i=Math.min(r.row-s,e.countRows()-1);e.selection.setRangeEnd(r),e.scrollViewportTo({row:i,verticalSnap:"top",horizontalSnap:"start"})}}}},51002:(e,t,r)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[n.command,s.command,i.command,o.command,a.command,l.command,h.command,u.command,c.command,d.command,p.command,g.command,f.command,m.command]};var n=r(6036),s=r(88900),i=r(34885),o=r(15076),a=r(28878),l=r(83269),h=r(5154),u=r(28703),c=r(17023),d=r(40574),p=r(20619),g=r(67616),f=r(9601),m=r(67525)},34885:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionLeft",callback(e){const{highlight:t}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()||e.selection.isSelectedByCorner()||!(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())||e.selection.transformEnd(0,-1*e.getDirectionFactor())}}},15076:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionRight",callback(e){const{highlight:t}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()||e.selection.isSelectedByCorner()||!(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())||e.selection.transformEnd(0,e.getDirectionFactor())}}},28878:(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)}}},83269:(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 a=r.getNearestNotHiddenIndex(e.countRows()-1,-1),l=s.clone();l.row=n.row,t.setRangeStart(l,void 0,!1,n.clone()),o&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(a,i.col))}}}},5154:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:r}=e,{highlight:n,from:s,to:i}=e.getSelectedRangeLast();if(!e.selection.isSelectedByRowHeader()&&!e.selection.isSelectedByCorner()&&n.isCell()){const o=r.getNearestNotHiddenIndex(e.countCols()-1,-1),a=s.clone();a.col=n.col,t.setRangeStart(a,void 0,!1,n.clone()),t.setRangeEnd(e._createCellCoords(i.row,o))}}}},28703:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:r}=e,{highlight:n,from:s,to:i}=e.getSelectedRangeLast();if(!e.selection.isSelectedByRowHeader()&&!e.selection.isSelectedByCorner()&&n.isCell()){const o=parseInt(e.getSettings().fixedColumnsStart,10),a=r.getNearestNotHiddenIndex(o,1),l=s.clone();l.col=n.col,t.setRangeStart(l,void 0,!1,n.clone()),t.setRangeEnd(e._createCellCoords(i.row,a))}}}},17023:(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 a=r.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]),l=s.clone();l.col=n.col,t.setRangeStart(l,void 0,!1,n.clone()),o&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(i.row,a))}}}},40574:(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 a=r.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]),l=s.clone();l.col=n.col,t.setRangeStart(l,void 0,!1,n.clone()),o&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(i.row,a))}}}},20619:(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 a=r.getNearestNotHiddenIndex(0,1),l=s.clone();l.row=n.row,t.setRangeStart(l,void 0,!1,n.clone()),o&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(a,i.col))}}}},67616:(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)}}},9601:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionUp",callback(e){const{highlight:t}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()||e.selection.isSelectedByCorner()||!(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())||e.selection.transformEnd(-1,0)}}},67525:(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.getFirstFullyVisibleRow(),i=Math.max(r.row-s,0);e.selection.setRangeEnd(r),e.scrollViewportTo({row:i,verticalSnap:"top",horizontalSnap:"start"})}}}},84302:(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},r(14846),r(69655);var n=r(53558),s=r(51002),i=r(4184),o=r(34413),a=r(29511),l=r(74544),h=r(14001),u=r(51262);const c=[...(0,n.getAllCommands)(),...(0,s.getAllCommands)(),...(0,i.getAllCommands)(),o.command,a.command,l.command,h.command,u.command]},77646:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionDown",callback(e){let{selection:t}=e;t.transformStart(1,0)}}},36846:(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})}}},4184:(e,t,r)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[n.command,s.command,i.command,o.command,a.command,l.command,h.command,u.command,c.command,d.command,p.command,g.command,f.command,m.command,y.command,E.command]};var n=r(77646),s=r(36846),i=r(53354),o=r(74007),a=r(76967),l=r(37830),h=r(72739),u=r(9033),c=r(71580),d=r(12677),p=r(98613),g=r(51572),f=r(14701),m=r(43702),y=r(47375),E=r(22763)},53354:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionInlineEnd",callback(e,t){const r=e.getSettings(),n=e.getSelectedRangeLast(),s="function"==typeof r.tabMoves?r.tabMoves(t):r.tabMoves;e.selection.isMultiple()&&!n.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?e.selection.transformFocus(-s.row,-s.col):e.selection.transformStart(-s.row,-s.col)}}},74007:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionInlineStart",callback(e,t){const r=e.getSettings(),n=e.getSelectedRangeLast(),s="function"==typeof r.tabMoves?r.tabMoves(t):r.tabMoves;e.selection.isMultiple()&&!n.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?e.selection.transformFocus(s.row,s.col):e.selection.transformStart(s.row,s.col)}}},76967:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionLeft",callback(e){e.selection.transformStart(0,-1*e.getDirectionFactor())}}},37830:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionRight",callback(e){e.selection.transformStart(0,e.getDirectionFactor())}}},72739:(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))}}},9033:(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))}}},71580:(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)))}}},12677:(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))}}},98613:(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))}}},51572:(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))}}},14701:(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))}}},43702:(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))}}},47375:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionUp",callback(e){let{selection:t}=e;t.transformStart(-1,0)}}},22763:(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})}}},51262:(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()))}}},29511:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"scrollToFocusedCell",callback(e){const{highlight:t}=e.getSelectedRangeLast(),r=e.getFirstFullyVisibleRow()-1,n=e.getFirstFullyVisibleColumn()-1,s=e.getLastFullyVisibleRow()+1,i=e.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"})}}}},74544:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"selectAllCells",callback(e){e.selection.selectAll(!0,!0,{disableHeadersHighlight:!0})}}},14001:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"selectAllCellsAndHeaders",callback(e){e.selection.selectAll(!0,!0,{disableHeadersHighlight:!1})}}},72466:(e,t)=>{"use strict";t.__esModule=!0;t.GRID_GROUP="gridDefault",t.EDITOR_EDIT_GROUP="editorManager.handlingEditor"},4894:(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.editorCloseAndSaveByEnter(e,t)},{keys:[["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],captureCtrl:!0,callback:(e,t)=>r.editorCloseAndSaveByEnter(e,t)},{keys:[["Tab"],["Tab","Shift"],["PageDown"],["PageUp"]],forwardToContext:e.getShortcutManager().getContext("grid"),callback:(e,t)=>r.editorCloseAndSave(e,t)},{keys:[["ArrowDown"],["ArrowUp"],["ArrowLeft"],["ArrowRight"]],preventDefault:!1,callback:(e,t)=>r.editorCloseAndSaveByArrowKeys(e,t)},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>r.editorCloseWithoutSaving()}],i)};var n=r(72466),s=r(84302)},33803:(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(),runOnlyIf:()=>{var t;return!(null!==(t=e.getSelectedRangeLast())&&void 0!==t&&t.highlight.isHeader())}},{keys:[["Control/Meta","A"]],callback:()=>{},runOnlyIf:()=>{var t;return null===(t=e.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isHeader()},preventDefault:!0},{keys:[["Control/Meta","Shift","Space"]],callback:()=>r.selectAllCellsAndHeaders()},{keys:[["Control/Meta","Enter"]],callback:()=>r.populateSelectedCellsData(),runOnlyIf:()=>{var t,r;return!(null!==(t=e.getSelectedRangeLast())&&void 0!==t&&t.highlight.isHeader())&&(null===(r=e.getSelectedRangeLast())||void 0===r?void 0:r.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:e=>r.moveCellSelectionInlineStart(e)},{keys:[["Shift","Tab"]],preventDefault:!1,callback:e=>r.moveCellSelectionInlineEnd(e)},{keys:[["Control/Meta","Backspace"]],callback:()=>r.scrollToFocusedCell()}],o)};var n=r(70505),s=r(72466),i=r(84302)},92399:(e,t,r)=>{"use strict";t.__esModule=!0;var n={registerAllShortcutContexts:!0};t.registerAllShortcutContexts=function(e){[i.shortcutsGridContext,s.shortcutsEditorContext].forEach((t=>t(e)))},r(14846),r(69655);var s=r(4894),i=r(33803),o=r(72466);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]))}))},49491:(e,t,r)=>{"use strict";t.__esModule=!0,t.isContextObject=u,r(67834),r(15724),r(14846),r(27458),r(69655);var n=r(54394),s=r(17577),i=r(70505),o=r(89804),a=r(25499),l=r(21595);const h=Symbol("shortcut-context");function u(e){return(0,a.isObject)(e)&&e.__kindOf===h}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:h=!1,preventDefault:c=!0,stopPropagation:d=!1,relativeToGroup:p,position:g,forwardToContext:f}=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
1171
1171
  using the KeyboardEvent.key properties:\x20
1172
1172
  https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`);const m={callback:r,group:n,runOnlyIf:a,captureCtrl:h,preventDefault:c,stopPropagation:d};(0,i.isDefined)(p)&&(m.relativeToGroup=p,m.position=g),u(f)&&(m.forwardToContext=f),e.forEach((e=>{const r=(0,s.normalizeKeys)(e);if(t.hasItem(r)){const e=t.getItem(r);let n=e.findIndex((e=>e.group===p));-1!==n?"before"===g?n-=1:n+=1:n=e.length,e.splice(n,0,m)}else t.addItem(r,[m])}))},c=e=>{const r=(0,s.normalizeKeys)(e);t.removeItem(r)};return{__kindOf:h,addShortcut:r,addShortcuts:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach((e=>{(0,a.objectEach)(t,((r,n)=>{!1===Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=t[n])})),r(e)}))},getShortcuts:e=>{const r=(0,s.normalizeKeys)(e),n=t.getItem(r);return(0,i.isDefined)(n)?n.slice():[]},hasShortcut:e=>{const r=(0,s.normalizeKeys)(e);return t.hasItem(r)},removeShortcutsByKeys:c,removeShortcutsByGroup:e=>{t.getItems().forEach((t=>{let[r,n]=t;const i=n.filter((t=>t.group!==e));0===i.length?c((0,s.getKeysList)(r)):(n.length=0,n.push(...i))}))}}}},89616:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(94747);t.createShortcutManager=n.createShortcutManager},86353:(e,t,r)=>{"use strict";t.__esModule=!0,t.createKeysObserver=function(){const e=new Set;return{press(t){e.add(t)},release(t){e.delete(t)},releaseAll(){e.clear()},isPressed:t=>e.has(t)}},r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620)},94747:(e,t,r)=>{"use strict";t.__esModule=!0,r(67834);var n=r(54394),s=r(77661),i=r(49491),o=r(1584),a=r(21595);t.createShortcutManager=e=>{let{ownerWindow:t,handleEvent:r,beforeKeyDown:l,afterKeyDown:h}=e;const u=(0,n.createUniqueMap)({errorIdExists:e=>`The "${e}" context name is already registered.`});let c="grid";const d=()=>c,p=e=>u.getItem(e);let g=!1;const f=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d();const n=(0,i.isContextObject)(r)?r:p(r);let o=!1;if(!n.hasShortcut(t))return o;const a=n.getShortcuts(t);for(let r=0;r<a.length;r++){const{callback:n,runOnlyIf:i,preventDefault:l,stopPropagation:h,captureCtrl:u,forwardToContext:c}=a[r];if(!0===i(e)){if(g=u,o=!1===n(e,t),g=!1,l&&e.preventDefault(),h&&((0,s.stopImmediatePropagation)(e),e.stopPropagation()),o)break;c&&f(e,t,c)}}return o},m=(0,o.useRecorder)(t,r,l,h,f);return m.mount(),{addContext:e=>{const t=(0,i.createContext)(e);return u.addItem(e,t),t},getActiveContextName:d,getContext:p,setActiveContextName:e=>{if(!u.hasItem(e))throw new Error(a.toSingleLine`You've tried to activate the "${e}" shortcut context\x20
1173
- that does not exist. Before activation, register the context using the "addContext" method.`);c=e},isCtrlPressed:()=>!g&&(m.isPressed("control")||m.isPressed("meta")),releasePressedKeys:()=>m.releasePressedKeys(),destroy:()=>m.unmount()}}},1584:(e,t,r)=>{"use strict";t.__esModule=!0,t.useRecorder=function(e,t,r,n,d){const p=e=>l.includes(e),g=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=[];return e.altKey&&r.push("alt"),t&&(e.ctrlKey||e.metaKey)?r.push("control/meta"):(e.ctrlKey&&r.push("control"),e.metaKey&&r.push("meta")),e.shiftKey&&r.push("shift"),r},f=e=>{if(!1===t(e))return;if(!1===r(e)||229===e.keyCode||"string"!=typeof e.key||(0,i.isImmediatePropagationStopped)(e))return;const o=(0,s.normalizeEventKey)(e);let l=[];p(o)||(l=g(e));const h=[o].concat(l);!d(e,h)&&((0,a.isMacOS)()&&l.includes("meta")||!(0,a.isMacOS)()&&l.includes("control"))&&d(e,[o].concat(g(e,!0))),n(e)},m=e=>{if("string"==typeof e.key){const t=(0,s.normalizeEventKey)(e);p(t)&&h.press(t)}},y=e=>{if("string"==typeof e.key){const t=(0,s.normalizeEventKey)(e);p(t)&&h.release(t)}},E=()=>{h.releaseAll()};return{mount:()=>{let t=e;for(c+=1;t;)1===c&&(t.document.documentElement.addEventListener("keydown",m),u.push({event:"keydown",listener:m}),t.document.documentElement.addEventListener("keyup",y),u.push({event:"keyup",listener:y})),t.document.documentElement.addEventListener("keydown",f),t.document.documentElement.addEventListener("blur",E),t=(0,o.getParentWindow)(t)},unmount:()=>{let t=e;for(c-=1;t;){if(0===c){for(let e=0;e<u.length;e++){const{event:r,listener:n}=u[e];t.document.documentElement.removeEventListener(r,n)}u.length=0}t.document.documentElement.removeEventListener("keydown",f),t.document.documentElement.removeEventListener("blur",E),t=(0,o.getParentWindow)(t)}},isPressed:e=>h.isPressed(e),releasePressedKeys:()=>h.releaseAll()}},r(15724);var n=r(86353),s=r(17577),i=r(77661),o=r(62577),a=r(25046);const l=["meta","alt","shift","control"],h=(0,n.createKeysObserver)(),u=[];let c=0},17577:(e,t,r)=>{"use strict";t.__esModule=!0,r(94364);const n=new Map([[" ","space"],["spacebar","space"],["scroll","scrolllock"],["del","delete"],["esc","escape"],["medianexttrack","mediatracknext"],["mediaprevioustrack","mediatrackprevious"],["volumeup","audiovolumeup"],["volumedown","audiovolumedown"],["volumemute","audiovolumemute"],["multiply","*"],["add","+"],["divide","/"],["subtract","-"],["left","arrowleft"],["right","arrowright"],["up","arrowup"],["down","arrowdown"]]);t.normalizeKeys=e=>e.map((e=>{const t=e.toLowerCase();return n.has(t)?n.get(t):t})).sort().join("+");t.getKeysList=e=>e.split("+");const s=new Map([[96,"numpad0"],[97,"numpad1"],[98,"numpad2"],[99,"numpad3"],[100,"numpad4"],[101,"numpad5"],[102,"numpad6"],[103,"numpad7"],[104,"numpad8"],[105,"numpad9"],[106,"multiply"],[107,"add"],[108,"decimal"],[109,"subtract"],[110,"decimal"],[111,"divide"],[112,"f1"],[113,"f2"],[114,"f3"],[115,"f4"],[116,"f5"],[117,"f6"],[118,"f7"],[119,"f8"],[120,"f9"],[121,"f10"],[122,"f11"],[123,"f12"],[186,"semicolon"],[187,"equal"],[188,"comma"],[189,"minus"],[190,"period"],[191,"slash"],[192,"backquote"],[219,"bracketleft"],[220,"backslash"],[221,"bracketright"],[222,"quote"]]);t.normalizeEventKey=e=>{let{which:t,key:r}=e;if(s.has(t))return s.get(t);const n=String.fromCharCode(t).toLowerCase();return/^[a-z0-9]$/.test(n)?n:r.toLowerCase()}},33925:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834),r(15724);var s=n(r(85707)),i=r(62577),o=n(r(3849)),a=r(77661),l=n(r(50206)),h=r(87642),u=r(45435),c=r(71120);function d(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){return e.get(m(e,t))}function f(e,t,r){return e.set(m(e,t),r),r}function m(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var y=new WeakMap,E=new WeakMap,w=new WeakMap,C=new WeakMap,v=new WeakMap,R=new WeakMap,S=new WeakMap,T=new WeakSet;function N(){return parseInt(this.hot.rootElement.getAttribute((0,c.A11Y_COLCOUNT)()[0]),10)}function M(e){const t=m(T,this,N).call(this)+e;(0,i.setAttribute)(this.hot.rootElement,...(0,c.A11Y_COLCOUNT)(t))}function _(){const e=this.hot.rootElement;this.hasVerticalScroll()?(0,i.addClass)(e,"htHasScrollY"):(0,i.removeClass)(e,"htHasScrollY"),this.hasHorizontalScroll()?(0,i.addClass)(e,"htHasScrollX"):(0,i.removeClass)(e,"htHasScrollX")}t.default=class{constructor(e){var t,r;p(t=this,r=T),r.add(t),(0,s.default)(this,"hot",void 0),(0,s.default)(this,"eventManager",void 0),(0,s.default)(this,"settings",void 0),(0,s.default)(this,"THEAD",void 0),(0,s.default)(this,"TBODY",void 0),(0,s.default)(this,"_wt",void 0),(0,s.default)(this,"activeWt",void 0),d(this,y,0),d(this,E,0),(0,s.default)(this,"postponedAdjustElementsSize",!1),d(this,w,!1),d(this,C,void 0),d(this,v,void 0),d(this,R,0),d(this,S,0),this.hot=e,this.eventManager=new o.default(this.hot),this.settings=this.hot.getSettings(),this.createElements(),this.registerEvents(),this.initializeWalkontable()}render(){this.hot.isRenderSuspended()||(this.hot.runHooks("beforeRender",this.hot.forceFullRender),this.postponedAdjustElementsSize&&(this.postponedAdjustElementsSize=!1,this.adjustElementsSize()),this._wt.draw(!this.hot.forceFullRender),m(T,this,_).call(this),this.hot.runHooks("afterRender",this.hot.forceFullRender),this.hot.forceFullRender=!1,this.hot.renderCall=!1)}adjustElementsSize(){this.hot.isRenderSuspended()?this.postponedAdjustElementsSize=!0:this._wt.wtOverlays.adjustElementsSize()}getCellAtCoords(e,t){const r=this._wt.getCell(e,t);return r<0?null:r}scrollViewport(e,t,r){return this._wt.scrollViewport(e,t,r)}scrollViewportHorizontally(e,t){return this._wt.scrollViewportHorizontally(e,t)}scrollViewportVertically(e,t){return this._wt.scrollViewportVertically(e,t)}createElements(){const{rootElement:e,rootDocument:t}=this.hot,r=e.getAttribute("style");r&&e.setAttribute("data-originalstyle",r),(0,i.addClass)(e,"handsontable"),f(v,this,t.createElement("TABLE")),(0,i.addClass)(g(v,this),"htCore"),this.hot.getSettings().tableClassName&&(0,i.addClass)(g(v,this),this.hot.getSettings().tableClassName),this.settings.ariaTags&&((0,i.setAttribute)(g(v,this),[(0,c.A11Y_PRESENTATION)()]),(0,i.setAttribute)(e,[(0,c.A11Y_TREEGRID)(),(0,c.A11Y_ROWCOUNT)(-1),(0,c.A11Y_COLCOUNT)(this.hot.countCols()),(0,c.A11Y_MULTISELECTABLE)()])),this.THEAD=t.createElement("THEAD"),g(v,this).appendChild(this.THEAD),this.TBODY=t.createElement("TBODY"),g(v,this).appendChild(this.TBODY),this.hot.table=g(v,this),this.hot.container.insertBefore(g(v,this),this.hot.container.firstChild)}registerEvents(){const{rootElement:e,rootDocument:t,selection:r,rootWindow:n}=this.hot,s=t.documentElement;this.eventManager.addEventListener(e,"mousedown",(e=>{f(w,this,!0),this.isTextSelectionAllowed(e.target)||((0,i.clearTextSelection)(n),e.preventDefault(),n.focus())})),this.eventManager.addEventListener(e,"mouseup",(()=>{f(w,this,!1)})),this.eventManager.addEventListener(e,"mousemove",(e=>{g(w,this)&&!this.isTextSelectionAllowed(e.target)&&(this.settings.fragmentSelection&&(0,i.clearTextSelection)(n),e.preventDefault())})),this.eventManager.addEventListener(s,"keyup",(e=>{r.isInProgress()&&!e.shiftKey&&r.finish()})),this.eventManager.addEventListener(s,"mouseup",(n=>{r.isInProgress()&&(0,a.isLeftClick)(n)&&r.finish(),f(C,this,!1);const s=(0,i.isOutsideInput)(t.activeElement);(0,i.isInput)(t.activeElement)&&!s||!s&&(r.isSelected()||r.isSelectedByAnyHeader()||e.contains(n.target)||(0,a.isRightClick)(n))||this.hot.unlisten()})),this.eventManager.addEventListener(s,"contextmenu",(e=>{r.isInProgress()&&(0,a.isRightClick)(e)&&(r.finish(),f(C,this,!1))})),this.eventManager.addEventListener(s,"touchend",(()=>{r.isInProgress()&&r.finish(),f(C,this,!1)})),this.eventManager.addEventListener(s,"mousedown",(r=>{const n=r.target,o=r.x||r.clientX,a=r.y||r.clientY;let l=r.target;if(g(C,this)||!e||!this.hot.view)return;const{holder:h}=this._wt.wtTable;if(l===h){const e=(0,i.getScrollbarWidth)(t);if(t.elementFromPoint(o+e,a)!==h||t.elementFromPoint(o,a+e)!==h)return}else for(;l!==s;){if(null===l){if(r.isTargetWebComponent)break;return}if(l===e)return;l=l.parentNode}("function"==typeof this.settings.outsideClickDeselects?this.settings.outsideClickDeselects(n):this.settings.outsideClickDeselects)?this.hot.deselectCell():this.hot.destroyEditor(!1,!1)}));let o=(0,i.getParentWindow)(n);for(;null!==o;)this.eventManager.addEventListener(o.document.documentElement,"click",(()=>{this.hot.unlisten()})),o=(0,i.getParentWindow)(o);this.eventManager.addEventListener(g(v,this),"selectstart",(e=>{this.settings.fragmentSelection||(0,i.isInput)(e.target)||e.preventDefault()}))}translateFromRenderableToVisualCoords(e){let{row:t,col:r}=e;return this.hot._createCellCoords(...this.translateFromRenderableToVisualIndex(t,r))}translateFromRenderableToVisualIndex(e,t){let r=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e,n=t>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(t):t;return null===r&&(r=e),null===n&&(n=t),[r,n]}countRenderableIndexes(e,t){const r=Math.min(e.getNotTrimmedIndexesLength(),t),n=e.getNearestNotHiddenIndex(r-1,-1);return null===n?0:e.getRenderableFromVisualIndex(n)+1}countRenderableColumns(){return this.countRenderableIndexes(this.hot.columnIndexMapper,this.settings.maxCols)}countRenderableRows(){return this.countRenderableIndexes(this.hot.rowIndexMapper,this.settings.maxRows)}countNotHiddenRowIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.rowIndexMapper,this.countRenderableRows())}countNotHiddenColumnIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.columnIndexMapper,this.countRenderableColumns())}countNotHiddenIndexes(e,t,r,n){if(isNaN(e)||e<0)return 0;const s=r.getNearestNotHiddenIndex(e,t),i=r.getRenderableFromVisualIndex(s);if(!Number.isInteger(i))return 0;let o=0;return t<0?o=i+1:t>0&&(o=n-i),o}countNotHiddenFixedColumnsStart(){const e=this.hot.countCols(),t=Math.min(parseInt(this.settings.fixedColumnsStart,10),e)-1;return this.countNotHiddenColumnIndexes(t,-1)}countNotHiddenFixedRowsTop(){const e=this.hot.countRows(),t=Math.min(parseInt(this.settings.fixedRowsTop,10),e)-1;return this.countNotHiddenRowIndexes(t,-1)}countNotHiddenFixedRowsBottom(){const e=this.hot.countRows(),t=Math.max(e-parseInt(this.settings.fixedRowsBottom,10),0);return this.countNotHiddenRowIndexes(t,1)}countRenderableColumnsInRange(e,t){let r=0;for(let n=e;n<=t;n++)null!==this.hot.columnIndexMapper.getRenderableFromVisualIndex(n)&&(r+=1);return r}countRenderableRowsInRange(e,t){let r=0;for(let n=e;n<=t;n++)null!==this.hot.rowIndexMapper.getRenderableFromVisualIndex(n)&&(r+=1);return r}getStylesHandler(){return this._wt.stylesHandler}getDefaultRowHeight(){return this._wt.stylesHandler.getDefaultRowHeight()}addClassNameToLicenseElement(e){var t;const r=null===(t=this.hot.rootElement.parentNode)||void 0===t?void 0:t.querySelector(".hot-display-license-info");r&&(0,i.addClass)(r,e)}removeClassNameFromLicenseElement(e){var t;const r=null===(t=this.hot.rootElement.parentNode)||void 0===t?void 0:t.querySelector(".hot-display-license-info");r&&(0,i.removeClass)(r,e)}isMainTableNotFullyCoveredByOverlays(){const e=this.countNotHiddenFixedRowsTop()+this.countNotHiddenFixedRowsBottom(),t=this.countNotHiddenFixedColumnsStart();return this.hot.countRenderedRows()>e&&this.hot.countRenderedCols()>t}initializeWalkontable(){const e={ariaTags:this.settings.ariaTags,rtlMode:this.hot.isRtl(),externalRowCalculator:this.hot.getPlugin("autoRowSize")&&this.hot.getPlugin("autoRowSize").isEnabled(),table:g(v,this),isDataViewInstance:()=>(0,u.isRootInstance)(this.hot),preventOverflow:()=>this.settings.preventOverflow,preventWheel:()=>this.settings.preventWheel,viewportColumnRenderingThreshold:()=>this.settings.viewportColumnRenderingThreshold,viewportRowRenderingThreshold:()=>this.settings.viewportRowRenderingThreshold,data:(e,t)=>this.hot.getDataAtCell(...this.translateFromRenderableToVisualIndex(e,t)),totalRows:()=>this.countRenderableRows(),totalColumns:()=>this.countRenderableColumns(),fixedColumnsStart:()=>this.countNotHiddenFixedColumnsStart(),fixedRowsTop:()=>this.countNotHiddenFixedRowsTop(),fixedRowsBottom:()=>this.countNotHiddenFixedRowsBottom(),shouldRenderInlineStartOverlay:()=>this.settings.fixedColumnsStart>0||e.rowHeaders().length>0,shouldRenderTopOverlay:()=>this.settings.fixedRowsTop>0||e.columnHeaders().length>0,shouldRenderBottomOverlay:()=>this.settings.fixedRowsBottom>0,minSpareRows:()=>this.settings.minSpareRows,renderAllRows:this.settings.renderAllRows,renderAllColumns:this.settings.renderAllColumns,rowHeaders:()=>{const e=[];return this.hot.hasRowHeaders()&&e.push(((e,t)=>{const r=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e;this.appendRowHeader(r,t)})),this.hot.runHooks("afterGetRowHeaderRenderers",e),f(E,this,e.length),this.hot.getSettings().ariaTags&&m(T,this,N).call(this)===this.hot.countCols()&&m(T,this,M).call(this,g(E,this)),e},columnHeaders:()=>{const e=[];return this.hot.hasColHeaders()&&e.push(((e,t)=>{const r=e>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(e):e;this.appendColHeader(r,t)})),this.hot.runHooks("afterGetColumnHeaderRenderers",e),f(y,this,e.length),e},columnWidth:e=>{const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e);return this.hot.getColWidth(null===t?e:t)},rowHeight:e=>{const t=this.hot.rowIndexMapper.getVisualFromRenderableIndex(e);return this.hot.getRowHeight(null===t?e:t)},rowHeightByOverlayName:(e,t)=>{const r=this.hot.rowIndexMapper.getVisualFromRenderableIndex(e),n=null===r?e:r;return this.hot.runHooks("modifyRowHeightByOverlayName",this.hot.getRowHeight(n),n,t)},cellRenderer:(e,t,r)=>{const[n,s]=this.translateFromRenderableToVisualIndex(e,t),i=this.hot.runHooks("modifyGetCellCoords",n,s,!1,"meta");let o=n,a=s;Array.isArray(i)&&([o,a]=i);const l=this.hot.getCellMeta(o,a),h=this.hot.colToProp(a);let u=this.hot.getDataAtRowProp(o,h);this.hot.hasHook("beforeValueRender")&&(u=this.hot.runHooks("beforeValueRender",u,l)),this.hot.runHooks("beforeRenderer",r,n,s,h,u,l),this.hot.getCellRenderer(l)(this.hot,r,n,s,h,u,l),this.hot.runHooks("afterRenderer",r,n,s,h,u,l)},selections:this.hot.selection.highlight,hideBorderOnMouseDownOver:()=>this.settings.fragmentSelection,onWindowResize:()=>{this.hot&&!this.hot.isDestroyed&&this.hot.refreshDimensions()},onContainerElementResize:()=>{this.hot&&!this.hot.isDestroyed&&(0,i.isVisible)(this.hot.rootElement)&&this.hot.refreshDimensions()},onCellMouseDown:(e,t,r,n)=>{const s=this.translateFromRenderableToVisualCoords(t),i={row:!1,column:!1,cell:!1};this.hot.listen(),this.activeWt=n,f(C,this,!0),this.hot.runHooks("beforeOnCellMouseDown",e,s,r,i),(0,a.isImmediatePropagationStopped)(e)||((0,h.handleMouseEvent)(e,{coords:s,selection:this.hot.selection,controller:i,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseDown",e,s,r),this.activeWt=this._wt)},onCellContextMenu:(e,t,r,n)=>{const s=this.translateFromRenderableToVisualCoords(t);this.activeWt=n,f(C,this,!1),this.hot.selection.isInProgress()&&this.hot.selection.finish(),this.hot.runHooks("beforeOnCellContextMenu",e,s,r),(0,a.isImmediatePropagationStopped)(e)||(this.hot.runHooks("afterOnCellContextMenu",e,s,r),this.activeWt=this._wt)},onCellMouseOut:(e,t,r,n)=>{const s=this.translateFromRenderableToVisualCoords(t);this.activeWt=n,this.hot.runHooks("beforeOnCellMouseOut",e,s,r),(0,a.isImmediatePropagationStopped)(e)||(this.hot.runHooks("afterOnCellMouseOut",e,s,r),this.activeWt=this._wt)},onCellMouseOver:(e,t,r,n)=>{const s=this.translateFromRenderableToVisualCoords(t),i={row:!1,column:!1,cell:!1};this.activeWt=n,this.hot.runHooks("beforeOnCellMouseOver",e,s,r,i),(0,a.isImmediatePropagationStopped)(e)||(g(C,this)&&(0,h.handleMouseEvent)(e,{coords:s,selection:this.hot.selection,controller:i,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseOver",e,s,r),this.activeWt=this._wt)},onCellMouseUp:(e,t,r,n)=>{const s=this.translateFromRenderableToVisualCoords(t);this.activeWt=n,this.hot.runHooks("beforeOnCellMouseUp",e,s,r),(0,a.isImmediatePropagationStopped)(e)||this.hot.isDestroyed||(this.hot.runHooks("afterOnCellMouseUp",e,s,r),this.activeWt=this._wt)},onCellCornerMouseDown:e=>{e.preventDefault(),this.hot.runHooks("afterOnCellCornerMouseDown",e)},onCellCornerDblClick:e=>{e.preventDefault(),this.hot.runHooks("afterOnCellCornerDblClick",e)},beforeDraw:(e,t)=>this.beforeRender(e,t),onDraw:e=>this.afterRender(e),onBeforeViewportScrollVertically:(e,t)=>{const r=this.hot.rowIndexMapper,n=e<0;let s=e;return n||(s=r.getVisualFromRenderableIndex(e),null!==s)?(s=this.hot.runHooks("beforeViewportScrollVertically",s,t),this.hot.runHooks("beforeViewportScroll"),n?s:r.getRenderableFromVisualIndex(s)):e},onBeforeViewportScrollHorizontally:(e,t)=>{const r=this.hot.columnIndexMapper,n=e<0;let s=e;return n||(s=r.getVisualFromRenderableIndex(e),null!==s)?(s=this.hot.runHooks("beforeViewportScrollHorizontally",s,t),this.hot.runHooks("beforeViewportScroll"),n?s:r.getRenderableFromVisualIndex(s)):e},onScrollVertically:()=>{this.hot.runHooks("afterScrollVertically"),this.hot.runHooks("afterScroll")},onScrollHorizontally:()=>{this.hot.runHooks("afterScrollHorizontally"),this.hot.runHooks("afterScroll")},onBeforeRemoveCellClassNames:()=>this.hot.runHooks("beforeRemoveCellClassNames"),onBeforeHighlightingRowHeader:(e,t,r)=>{const n=this.hot.rowIndexMapper,s=e<0;let i=e;s||(i=n.getVisualFromRenderableIndex(e));const o=this.hot.runHooks("beforeHighlightingRowHeader",i,t,r);return s?o:n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(o,1))},onBeforeHighlightingColumnHeader:(e,t,r)=>{const n=this.hot.columnIndexMapper,s=e<0;let i=e;s||(i=n.getVisualFromRenderableIndex(e));const o=this.hot.runHooks("beforeHighlightingColumnHeader",i,t,r);return s?o:n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(o,1))},onAfterDrawSelection:(e,t,r)=>{let n;const[s,i]=this.translateFromRenderableToVisualIndex(e,t),o=this.hot.selection.getSelectedRange();if(o.size()>0){const e=o.peekByIndex(null!=r?r:0);n=[e.from.row,e.from.col,e.to.row,e.to.col]}return this.hot.runHooks("afterDrawSelection",s,i,n,r)},onBeforeDrawBorders:(e,t)=>{const[r,n,s,i]=e,o=[this.hot.rowIndexMapper.getVisualFromRenderableIndex(r),this.hot.columnIndexMapper.getVisualFromRenderableIndex(n),this.hot.rowIndexMapper.getVisualFromRenderableIndex(s),this.hot.columnIndexMapper.getVisualFromRenderableIndex(i)];return this.hot.runHooks("beforeDrawBorders",o,t)},onBeforeTouchScroll:()=>this.hot.runHooks("beforeTouchScroll"),onAfterMomentumScroll:()=>this.hot.runHooks("afterMomentumScroll"),onModifyRowHeaderWidth:e=>this.hot.runHooks("modifyRowHeaderWidth",e),onModifyGetCellCoords:(e,t,r,n)=>{const s=this.hot.rowIndexMapper,i=this.hot.columnIndexMapper,o=t>=0?i.getVisualFromRenderableIndex(t):t,a=e>=0?s.getVisualFromRenderableIndex(e):e,l=this.hot.runHooks("modifyGetCellCoords",a,o,r,n);if(Array.isArray(l)){const[e,t,r,n]=l;return[e>=0?s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(e,1)):e,t>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(t,1)):t,r>=0?s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(r,-1)):r,n>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(n,-1)):n]}},onModifyGetCoordsElement:(e,t)=>{const r=this.hot.rowIndexMapper,n=this.hot.columnIndexMapper,s=t>=0?n.getVisualFromRenderableIndex(t):t,i=e>=0?r.getVisualFromRenderableIndex(e):e,o=this.hot.runHooks("modifyGetCoordsElement",i,s);if(Array.isArray(o)){const[e,t]=o;return[e>=0?r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(e,1)):e,t>=0?n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(t,1)):t]}},viewportRowCalculatorOverride:e=>{let t=this.settings.viewportRowRenderingOffset;if("auto"===t&&this.settings.fixedRowsTop&&(t=10),t>0||"auto"===t){const r=this.countRenderableRows(),n=e.startRow,s=e.endRow;if("number"==typeof t)e.startRow=Math.max(n-t,0),e.endRow=Math.min(s+t,r-1);else if("auto"===t){const t=Math.max(1,Math.ceil(s/r*12));e.startRow=Math.max(n-t,0),e.endRow=Math.min(s+t,r-1)}}this.hot.runHooks("afterViewportRowCalculatorOverride",e)},viewportColumnCalculatorOverride:e=>{let t=this.settings.viewportColumnRenderingOffset;if("auto"===t&&this.settings.fixedColumnsStart&&(t=10),t>0||"auto"===t){const r=this.countRenderableColumns(),n=e.startColumn,s=e.endColumn;if("number"==typeof t&&(e.startColumn=Math.max(n-t,0),e.endColumn=Math.min(s+t,r-1)),"auto"===t){const t=Math.max(1,Math.ceil(s/r*6));e.startColumn=Math.max(n-t,0),e.endColumn=Math.min(s+t,r-1)}}this.hot.runHooks("afterViewportColumnCalculatorOverride",e)},rowHeaderWidth:()=>this.settings.rowHeaderWidth,columnHeaderHeight:()=>{const e=this.hot.runHooks("modifyColumnHeaderHeight");return this.settings.columnHeaderHeight||e}};this.hot.runHooks("beforeInitWalkontable",e),this._wt=new l.default(e),this.activeWt=this._wt;const t=this._wt.wtTable.spreader,{width:r,height:n}=this.hot.rootElement.getBoundingClientRect();this.setLastSize(r,n),this.eventManager.addEventListener(t,"mousedown",(e=>{e.target===t&&3===e.which&&e.stopPropagation()})),this.eventManager.addEventListener(t,"contextmenu",(e=>{e.target===t&&3===e.which&&e.stopPropagation()})),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"click",(()=>{this.settings.observeDOMVisibility&&this._wt.drawInterrupted&&(this.hot.forceFullRender=!0,this.render())}))}isTextSelectionAllowed(e){if((0,i.isInput)(e))return!0;const t=(0,i.isChildOf)(e,this._wt.wtTable.spreader);return!(!0!==this.settings.fragmentSelection||!t)||(!("cell"!==this.settings.fragmentSelection||!this.isSelectedOnlyCell()||!t)||!(this.settings.fragmentSelection||!this.isCellEdited()||!this.isSelectedOnlyCell()))}isMouseDown(){return g(C,this)}isSelectedOnlyCell(){var e,t;return null!==(e=null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingleCell())&&void 0!==e&&e}isCellEdited(){const e=this.hot.getActiveEditor();return e&&e.isOpened()}beforeRender(e,t){e&&this.hot.runHooks("beforeViewRender",this.hot.forceFullRender,t)}afterRender(e){e&&this.hot.runHooks("afterViewRender",this.hot.forceFullRender)}appendRowHeader(e,t){if(t.firstChild){const r=t.firstChild;if(!(0,i.hasClass)(r,"relative"))return(0,i.empty)(t),void this.appendRowHeader(e,t);this.updateCellHeader(r.querySelector(".rowHeader"),e,this.hot.getRowHeader)}else{const{rootDocument:r,getRowHeader:n}=this.hot,s=r.createElement("div"),i=r.createElement("span");s.className="relative",i.className="rowHeader",this.updateCellHeader(i,e,n),s.appendChild(i),t.appendChild(s)}this.hot.runHooks("afterGetRowHeader",e,t)}appendColHeader(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hot.getColHeader,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const s=()=>{const t=e>=0?this.hot.getColumnMeta(e).headerClassName:null;return t?t.split(" "):[]};if(t.firstChild){const o=t.firstChild;(0,i.hasClass)(o,"relative")?(this.updateCellHeader(o.querySelector(".colHeader"),e,r,n),o.className="",(0,i.addClass)(o,["relative",...s()])):((0,i.empty)(t),this.appendColHeader(e,t,r,n))}else{const{rootDocument:o}=this.hot,a=o.createElement("div"),l=o.createElement("span"),h=s();a.classList.add("relative",...h),l.className="colHeader",this.settings.ariaTags&&((0,i.setAttribute)(a,...(0,c.A11Y_PRESENTATION)()),(0,i.setAttribute)(l,...(0,c.A11Y_PRESENTATION)())),this.updateCellHeader(l,e,r,n),a.appendChild(l),t.appendChild(a)}this.hot.runHooks("afterGetColHeader",e,t,n)}updateCellHeader(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=t;const o=this._wt.wtOverlays.getParentOverlay(e)||this._wt;e.parentNode&&((0,i.hasClass)(e,"colHeader")?s=o.wtTable.columnFilter.sourceToRendered(t):(0,i.hasClass)(e,"rowHeader")&&(s=o.wtTable.rowFilter.sourceToRendered(t))),s>-1?(0,i.fastInnerHTML)(e,r(t,n)):((0,i.fastInnerText)(e,String.fromCharCode(160)),(0,i.addClass)(e,"cornerHeader"))}maximumVisibleElementWidth(e){const t=this._wt.wtViewport.getWorkspaceWidth()-e;return t>0?t:0}maximumVisibleElementHeight(e){const t=this._wt.wtViewport.getWorkspaceHeight()-e;return t>0?t:0}setLastSize(e,t){f(R,this,e),f(S,this,t)}getLastSize(){return{width:g(R,this),height:g(S,this)}}getFirstRenderedVisibleRow(){if(!this._wt.wtViewport.rowsRenderCalculator)return null;const e=this.hot.rowIndexMapper,t=e.getVisualFromRenderableIndex(this._wt.wtTable.getFirstRenderedRow());return e.getNearestNotHiddenIndex(null!=t?t:0,1)}getLastRenderedVisibleRow(){if(!this._wt.wtViewport.rowsRenderCalculator)return null;const e=this.hot.rowIndexMapper,t=e.getVisualFromRenderableIndex(this._wt.wtTable.getLastRenderedRow());return e.getNearestNotHiddenIndex(null!=t?t:this.hot.countRows()-1,-1)}getFirstRenderedVisibleColumn(){if(!this._wt.wtViewport.columnsRenderCalculator)return null;const e=this.hot.columnIndexMapper,t=e.getVisualFromRenderableIndex(this._wt.wtTable.getFirstRenderedColumn());return e.getNearestNotHiddenIndex(null!=t?t:0,1)}getLastRenderedVisibleColumn(){if(!this._wt.wtViewport.columnsRenderCalculator)return null;const e=this.hot.columnIndexMapper,t=e.getVisualFromRenderableIndex(this._wt.wtTable.getLastRenderedColumn());return e.getNearestNotHiddenIndex(null!=t?t:this.hot.countCols()-1,-1)}getFirstFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstVisibleRow())}getLastFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastVisibleRow())}getFirstFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstVisibleColumn())}getLastFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastVisibleColumn())}getFirstPartiallyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstPartiallyVisibleRow())}getLastPartiallyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastPartiallyVisibleRow())}getFirstPartiallyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstPartiallyVisibleColumn())}getLastPartiallyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastPartiallyVisibleColumn())}getColumnHeadersCount(){return g(y,this)}getRowHeadersCount(){return g(E,this)}getViewportWidth(){return this._wt.wtViewport.getViewportWidth()}getWorkspaceWidth(){return this._wt.wtViewport.getWorkspaceWidth()}getViewportHeight(){return this._wt.wtViewport.getViewportHeight()}getWorkspaceHeight(){return this._wt.wtViewport.getWorkspaceHeight()}getElementOverlayName(e){var t;return(null!==(t=this._wt.wtOverlays.getParentOverlay(e))&&void 0!==t?t:this._wt).wtTable.name}getOverlayByName(e){return this._wt.getOverlayByName(e)}getActiveOverlayName(){return this._wt.activeOverlayName}isVisible(){return this._wt.wtTable.isVisible()}hasVerticalScroll(){return this._wt.wtViewport.hasVerticalScroll()}hasHorizontalScroll(){return this._wt.wtViewport.hasHorizontalScroll()}getTableWidth(){return this._wt.wtTable.getWidth()}getTableHeight(){return this._wt.wtTable.getHeight()}getRowHeaderWidth(){return this._wt.wtViewport.getRowHeaderWidth()}getColumnHeaderHeight(){return this._wt.wtViewport.getColumnHeaderHeight()}isVerticallyScrollableByWindow(){return this._wt.wtViewport.isVerticallyScrollableByWindow()}isHorizontallyScrollableByWindow(){return this._wt.wtViewport.isHorizontallyScrollableByWindow()}destroy(){this._wt.destroy(),this.eventManager.destroy()}}},73001:(e,t,r)=>{"use strict";t.__esModule=!0,r(67834),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620),r(14846),r(69655);var n=r(68838),s=r(89027);function i(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)}function o(e,t){return e.get(l(e,t))}function a(e,t,r){return e.set(l(e,t),r),r}function l(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var h=new WeakMap,u=new WeakMap,c=new WeakMap,d=new WeakMap,p=new WeakMap;t.ChangesObservable=class{constructor(){let{initialIndexValue:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,h,new Set),i(this,u,[]),i(this,c,[]),i(this,d,!1),i(this,p,!1),a(p,this,null!=e&&e)}createObserver(){const e=new n.ChangesObserver;return o(h,this).add(e),e.addLocalHook("unsubscribe",(()=>{o(h,this).delete(e)})),e._writeInitialChanges((0,s.arrayDiff)(o(u,this),o(c,this))),e}emit(e){let t=o(c,this);o(d,this)&&o(u,this).length===e.length||(0===e.length?e=new Array(t.length).fill(o(p,this)):a(u,this,new Array(e.length).fill(o(p,this))),o(d,this)||(a(d,this,!0),t=o(u,this)));const r=(0,s.arrayDiff)(t,e);o(h,this).forEach((e=>e._write(r))),a(c,this,e)}}},68838:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834);var s=r(25499),i=n(r(16050));function o(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)}function a(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var l=new WeakMap;class h{constructor(){o(this,l,[])}subscribe(e){var t,r;return this.addLocalHook("change",e),this._write((r=this,(t=l).get(a(t,r)))),this}unsubscribe(){return this.runLocalHooks("unsubscribe"),this.clearLocalHooks(),this}_write(e){return e.length>0&&this.runLocalHooks("change",e),this}_writeInitialChanges(e){var t,r,n;r=this,n=e,(t=l).set(a(t,r),n)}}t.ChangesObserver=h,(0,s.mixin)(h,i.default)},89027:(e,t,r)=>{"use strict";t.__esModule=!0,t.arrayDiff=function(e,t){const r=[];let n=0,s=0;for(;n<e.length&&s<t.length;n++,s++)e[n]!==t[s]&&r.push({op:"replace",index:s,oldValue:e[n],newValue:t[s]});for(;n<t.length;n++)r.push({op:"insert",index:n,oldValue:void 0,newValue:t[n]});for(;s<e.length;s++)r.push({op:"remove",index:s,oldValue:e[s],newValue:void 0});return r},r(15724)},61149:(e,t,r)=>{"use strict";r(14846),r(69655),t.__esModule=!0;var n={IndexMapper:!0,getRegisteredMapsCounter:!0,getIncreasedIndexes:!0,getDecreasedIndexes:!0,alterUtilsFactory:!0},s=r(81667);t.IndexMapper=s.IndexMapper;var i=r(47675);t.getRegisteredMapsCounter=i.getRegisteredMapsCounter;var o=r(88795);t.getIncreasedIndexes=o.getIncreasedIndexes,t.getDecreasedIndexes=o.getDecreasedIndexes,t.alterUtilsFactory=o.alterUtilsFactory;var a=r(74761);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===a[e]||(t[e]=a[e]))}))},81667:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707));r(67834),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620),r(14846),r(27458),r(94364),r(75568);var i=r(10587),o=r(74761),a=r(98045),l=n(r(16050)),h=r(25499),u=r(70505),c=r(73001);new Set;class d{constructor(){(0,s.default)(this,"indexesSequence",new o.IndexesSequence),(0,s.default)(this,"trimmingMapsCollection",new a.AggregatedCollection((e=>e.some((e=>!0===e))),!1)),(0,s.default)(this,"hidingMapsCollection",new a.AggregatedCollection((e=>e.some((e=>!0===e))),!1)),(0,s.default)(this,"variousMapsCollection",new a.MapCollection),(0,s.default)(this,"hidingChangesObservable",new c.ChangesObservable({initialIndexValue:!1})),(0,s.default)(this,"notTrimmedIndexesCache",[]),(0,s.default)(this,"notHiddenIndexesCache",[]),(0,s.default)(this,"isBatched",!1),(0,s.default)(this,"indexesSequenceChanged",!1),(0,s.default)(this,"indexesChangeSource",void 0),(0,s.default)(this,"trimmedIndexesChanged",!1),(0,s.default)(this,"hiddenIndexesChanged",!1),(0,s.default)(this,"renderablePhysicalIndexesCache",[]),(0,s.default)(this,"fromPhysicalToVisualIndexesCache",new Map),(0,s.default)(this,"fromVisualToRenderableIndexesCache",new Map),this.indexesSequence.addLocalHook("change",(()=>{this.indexesSequenceChanged=!0,this.updateCache(),this.runLocalHooks("indexesSequenceChange",this.indexesChangeSource),this.runLocalHooks("change",this.indexesSequence,null)})),this.trimmingMapsCollection.addLocalHook("change",(e=>{this.trimmedIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.trimmingMapsCollection)})),this.hidingMapsCollection.addLocalHook("change",(e=>{this.hiddenIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.hidingMapsCollection)})),this.variousMapsCollection.addLocalHook("change",(e=>{this.runLocalHooks("change",e,this.variousMapsCollection)}))}suspendOperations(){this.isBatched=!0}resumeOperations(){this.isBatched=!1,this.updateCache()}createChangesObserver(e){if("hiding"!==e)throw new Error(`Unsupported index map type "${e}".`);return this.hidingChangesObservable.createObserver()}createAndRegisterIndexMap(e,t,r){return this.registerMap(e,(0,o.createIndexMap)(t,r))}registerMap(e,t){if(this.trimmingMapsCollection.get(e)||this.hidingMapsCollection.get(e)||this.variousMapsCollection.get(e))throw Error(`Map with name "${e}" has been already registered.`);t instanceof o.TrimmingMap?this.trimmingMapsCollection.register(e,t):t instanceof o.HidingMap?this.hidingMapsCollection.register(e,t):this.variousMapsCollection.register(e,t);const r=this.getNumberOfIndexes();return r>0&&t.init(r),t}unregisterMap(e){this.trimmingMapsCollection.unregister(e),this.hidingMapsCollection.unregister(e),this.variousMapsCollection.unregister(e)}unregisterAll(){this.trimmingMapsCollection.unregisterAll(),this.hidingMapsCollection.unregisterAll(),this.variousMapsCollection.unregisterAll()}getPhysicalFromVisualIndex(e){const t=this.notTrimmedIndexesCache[e];return(0,u.isDefined)(t)?t:null}getPhysicalFromRenderableIndex(e){const t=this.renderablePhysicalIndexesCache[e];return(0,u.isDefined)(t)?t:null}getVisualFromPhysicalIndex(e){const t=this.fromPhysicalToVisualIndexesCache.get(e);return(0,u.isDefined)(t)?t:null}getVisualFromRenderableIndex(e){return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(e))}getRenderableFromVisualIndex(e){const t=this.fromVisualToRenderableIndexesCache.get(e);return(0,u.isDefined)(t)?t:null}getNearestNotHiddenIndex(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null===this.getPhysicalFromVisualIndex(e))return null;if(this.fromVisualToRenderableIndexesCache.has(e))return e;const n=Array.from(this.fromVisualToRenderableIndexesCache.keys());let s=-1;return s=t>0?n.findIndex((t=>t>e)):n.reverse().findIndex((t=>t<e)),-1===s?r?this.getNearestNotHiddenIndex(e,-t,!1):null:n[s]}initToLength(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getNumberOfIndexes();this.notTrimmedIndexesCache=[...new Array(e).keys()],this.notHiddenIndexesCache=[...new Array(e).keys()],this.suspendOperations(),this.indexesChangeSource="init",this.indexesSequence.init(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.initEvery(e),this.resumeOperations(),this.suspendOperations(),this.hidingMapsCollection.initEvery(e),this.variousMapsCollection.initEvery(e),this.resumeOperations(),this.runLocalHooks("init")}fitToLength(e){const t=this.getNumberOfIndexes();if(e<t){const t=[...Array(this.getNumberOfIndexes()-e).keys()].map((t=>t+e));this.removeIndexes(t)}else this.insertIndexes(t,e-t)}getIndexesSequence(){return this.indexesSequence.getValues()}setIndexesSequence(e){void 0===this.indexesChangeSource&&(this.indexesChangeSource="update"),this.indexesSequence.setValues(e),"update"===this.indexesChangeSource&&(this.indexesChangeSource=void 0)}getNotTrimmedIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.notTrimmedIndexesCache;return this.getIndexesSequence().filter((e=>!1===this.isTrimmed(e)))}getNotTrimmedIndexesLength(){return this.getNotTrimmedIndexes().length}getNotHiddenIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.notHiddenIndexesCache;return this.getIndexesSequence().filter((e=>!1===this.isHidden(e)))}getNotHiddenIndexesLength(){return this.getNotHiddenIndexes().length}getRenderableIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.renderablePhysicalIndexesCache;return this.getNotTrimmedIndexes().filter((e=>!1===this.isHidden(e)))}getRenderableIndexesLength(){return this.getRenderableIndexes().length}getNumberOfIndexes(){return this.getIndexesSequence().length}moveIndexes(e,t){"number"==typeof e&&(e=[e]);const r=(0,i.arrayMap)(e,(e=>this.getPhysicalFromVisualIndex(e))),n=this.getNotTrimmedIndexesLength(),s=e.length,a=(0,o.getListWithRemovedItems)(this.getIndexesSequence(),r),l=a.filter((e=>!1===this.isTrimmed(e)));let h=a.indexOf(l[l.length-1])+1;if(t+s<n){const e=l[t];h=a.indexOf(e)}this.indexesChangeSource="move",this.setIndexesSequence((0,o.getListWithInsertedItems)(a,h,r)),this.indexesChangeSource=void 0}isTrimmed(e){return this.trimmingMapsCollection.getMergedValueAtIndex(e)}isHidden(e){return this.hidingMapsCollection.getMergedValueAtIndex(e)}insertIndexes(e,t){const r=this.getNotTrimmedIndexes()[e],n=(0,u.isDefined)(r)?r:this.getNumberOfIndexes(),s=this.getIndexesSequence().includes(r)?this.getIndexesSequence().indexOf(r):this.getNumberOfIndexes(),o=(0,i.arrayMap)(new Array(t).fill(n),((e,t)=>e+t));this.suspendOperations(),this.indexesChangeSource="insert",this.indexesSequence.insert(s,o),this.indexesChangeSource=void 0,this.trimmingMapsCollection.insertToEvery(s,o),this.hidingMapsCollection.insertToEvery(s,o),this.variousMapsCollection.insertToEvery(s,o),this.resumeOperations()}removeIndexes(e){this.suspendOperations(),this.indexesChangeSource="remove",this.indexesSequence.remove(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.removeFromEvery(e),this.hidingMapsCollection.removeFromEvery(e),this.variousMapsCollection.removeFromEvery(e),this.resumeOperations()}updateCache(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.indexesSequenceChanged||this.trimmedIndexesChanged||this.hiddenIndexesChanged;(!0===e||!1===this.isBatched&&!0===t)&&(this.trimmingMapsCollection.updateCache(),this.hidingMapsCollection.updateCache(),this.notTrimmedIndexesCache=this.getNotTrimmedIndexes(!1),this.notHiddenIndexesCache=this.getNotHiddenIndexes(!1),this.renderablePhysicalIndexesCache=this.getRenderableIndexes(!1),this.cacheFromPhysicalToVisualIndexes(),this.cacheFromVisualToRenderableIndexes(),this.hiddenIndexesChanged&&this.hidingChangesObservable.emit(this.hidingMapsCollection.getMergedValues()),this.runLocalHooks("cacheUpdated",{indexesSequenceChanged:this.indexesSequenceChanged,trimmedIndexesChanged:this.trimmedIndexesChanged,hiddenIndexesChanged:this.hiddenIndexesChanged}),this.indexesSequenceChanged=!1,this.trimmedIndexesChanged=!1,this.hiddenIndexesChanged=!1)}cacheFromPhysicalToVisualIndexes(){const e=this.getNotTrimmedIndexesLength();this.fromPhysicalToVisualIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromVisualIndex(t);this.fromPhysicalToVisualIndexesCache.set(e,t)}}cacheFromVisualToRenderableIndexes(){const e=this.getRenderableIndexesLength();this.fromVisualToRenderableIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromRenderableIndex(t),r=this.getVisualFromPhysicalIndex(e);this.fromVisualToRenderableIndexesCache.set(r,t)}}}t.IndexMapper=d,(0,h.mixin)(d,l.default)},21928:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(15724);var s=n(r(85707)),i=r(47675),o=r(10587),a=r(70505);class l extends i.MapCollection{constructor(e,t){super(),(0,s.default)(this,"mergedValuesCache",[]),(0,s.default)(this,"aggregationFunction",void 0),(0,s.default)(this,"fallbackValue",void 0),this.aggregationFunction=e,this.fallbackValue=t}getMergedValues(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.mergedValuesCache;if(0===this.getLength())return[];const e=(0,o.arrayMap)(this.get(),(e=>e.getValues())),t=[],r=(0,a.isDefined)(e[0])&&e[0].length||0;for(let n=0;n<r;n+=1){const r=[];for(let t=0;t<this.getLength();t+=1)r.push(e[t][n]);t.push(r)}return(0,o.arrayMap)(t,this.aggregationFunction)}getMergedValueAtIndex(e,t){const r=this.getMergedValues(t)[e];return(0,a.isDefined)(r)?r:this.fallbackValue}updateCache(){this.mergedValuesCache=this.getMergedValues(!1)}}t.AggregatedCollection=l},98045:(e,t,r)=>{"use strict";r(14846),r(69655),t.__esModule=!0;var n=r(21928);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}));var s=r(47675);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}))},47675:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t.getRegisteredMapsCounter=function(){return l},r(14846),r(69655);var s=n(r(85707)),i=r(70505),o=r(25499),a=n(r(16050));let l=0;class h{constructor(){(0,s.default)(this,"collection",new Map)}register(e,t){!1===this.collection.has(e)&&(this.collection.set(e,t),t.addLocalHook("change",(()=>this.runLocalHooks("change",t))),l+=1)}unregister(e){const t=this.collection.get(e);(0,i.isDefined)(t)&&(t.destroy(),this.collection.delete(e),this.runLocalHooks("change",t),l-=1)}unregisterAll(){this.collection.forEach(((e,t)=>this.unregister(t))),this.collection.clear()}get(e){return(0,i.isUndefined)(e)?Array.from(this.collection.values()):this.collection.get(e)}getLength(){return this.collection.size}removeFromEvery(e){this.collection.forEach((t=>{t.remove(e)}))}insertToEvery(e,t){this.collection.forEach((r=>{r.insert(e,t)}))}initEvery(e){this.collection.forEach((t=>{t.init(e)}))}}t.MapCollection=h,(0,o.mixin)(h,a.default)},72810:(e,t,r)=>{"use strict";t.__esModule=!0,r(15724);var n=r(15898),s=r(10587);class i extends n.PhysicalIndexToValueMap{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getHiddenIndexes(){return(0,s.arrayReduce)(this.getValues(),((e,t,r)=>(t&&e.push(r),e)),[])}}t.HidingMap=i},74761:(e,t,r)=>{"use strict";r(14846),r(69655),t.__esModule=!0;var n={createIndexMap:!0,HidingMap:!0,IndexMap:!0,LinkedPhysicalIndexToValueMap:!0,PhysicalIndexToValueMap:!0,TrimmingMap:!0};t.createIndexMap=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!c.has(e))throw new Error(`The provided map type ("${e}") does not exist.`);return new(c.get(e))(t)},r(67834);var s=r(72810);t.HidingMap=s.HidingMap;var i=r(17783);t.IndexMap=i.IndexMap;var o=r(38189);t.LinkedPhysicalIndexToValueMap=o.LinkedPhysicalIndexToValueMap;var a=r(15898);t.PhysicalIndexToValueMap=a.PhysicalIndexToValueMap;var l=r(90008);t.TrimmingMap=l.TrimmingMap;var h=r(70836);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===h[e]||(t[e]=h[e]))}));var u=r(18046);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===u[e]||(t[e]=u[e]))}));const c=new Map([["hiding",s.HidingMap],["index",i.IndexMap],["linkedPhysicalIndexToValue",o.LinkedPhysicalIndexToValueMap],["physicalIndexToValue",a.PhysicalIndexToValueMap],["trimming",l.TrimmingMap]])},17783:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(15724);var s=n(r(85707)),i=r(22137),o=r(25499),a=r(89804),l=n(r(16050));class h{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,s.default)(this,"indexedValues",[]),(0,s.default)(this,"initValueOrFn",void 0),this.initValueOrFn=e}getValues(){return this.indexedValues}getValueAtIndex(e){const t=this.indexedValues;if(e<t.length)return t[e]}setValues(e){this.indexedValues=e.slice(),this.runLocalHooks("change")}setValueAtIndex(e,t){return e<this.indexedValues.length&&(this.indexedValues[e]=t,this.runLocalHooks("change"),!0)}clear(){this.setDefaultValues()}getLength(){return this.getValues().length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.indexedValues.length=0,(0,a.isFunction)(this.initValueOrFn)?(0,i.rangeEach)(e-1,(e=>this.indexedValues.push(this.initValueOrFn(e)))):(0,i.rangeEach)(e-1,(()=>this.indexedValues.push(this.initValueOrFn))),this.runLocalHooks("change")}init(e){return this.setDefaultValues(e),this.runLocalHooks("init"),this}insert(){this.runLocalHooks("change")}remove(){this.runLocalHooks("change")}destroy(){this.clearLocalHooks(),this.indexedValues=null,this.initValueOrFn=null}}t.IndexMap=h,(0,o.mixin)(h,l.default)},70836:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(17783),s=r(18046),i=r(88795);class o extends n.IndexMap{constructor(){super((e=>e))}insert(e,t){const r=(0,i.getIncreasedIndexes)(this.indexedValues,t);this.indexedValues=(0,s.getListWithInsertedItems)(r,e,t),super.insert(e,t)}remove(e){const t=(0,s.getListWithRemovedItems)(this.indexedValues,e);this.indexedValues=(0,i.getDecreasedIndexes)(t,e),super.remove(e)}}t.IndexesSequence=o},38189:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(94364);var s=n(r(85707)),i=r(17783),o=r(4440),a=r(18046),l=r(15501),h=r(89804);class u extends i.IndexMap{constructor(){super(...arguments),(0,s.default)(this,"orderOfIndexes",[])}getValues(){return this.orderOfIndexes.map((e=>this.indexedValues[e]))}setValues(e){this.orderOfIndexes=[...Array(e.length).keys()],super.setValues(e)}setValueAtIndex(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.orderOfIndexes.length;return e<this.indexedValues.length&&(this.indexedValues[e]=t,!1===this.orderOfIndexes.includes(e)&&this.orderOfIndexes.splice(r,0,e),this.runLocalHooks("change"),!0)}clearValue(e){this.orderOfIndexes=(0,a.getListWithRemovedItems)(this.orderOfIndexes,[e]),(0,h.isFunction)(this.initValueOrFn)?super.setValueAtIndex(e,this.initValueOrFn(e)):super.setValueAtIndex(e,this.initValueOrFn)}getLength(){return this.orderOfIndexes.length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.orderOfIndexes.length=0,super.setDefaultValues(e)}insert(e,t){this.indexedValues=(0,o.getListWithInsertedItems)(this.indexedValues,e,t,this.initValueOrFn),this.orderOfIndexes=(0,l.getIncreasedIndexes)(this.orderOfIndexes,t),super.insert(e,t)}remove(e){this.indexedValues=(0,o.getListWithRemovedItems)(this.indexedValues,e),this.orderOfIndexes=(0,a.getListWithRemovedItems)(this.orderOfIndexes,e),this.orderOfIndexes=(0,l.getDecreasedIndexes)(this.orderOfIndexes,e),super.remove(e)}getEntries(){return this.orderOfIndexes.map((e=>[e,this.getValueAtIndex(e)]))}}t.LinkedPhysicalIndexToValueMap=u},15898:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(17783),s=r(4440);class i extends n.IndexMap{insert(e,t){this.indexedValues=(0,s.getListWithInsertedItems)(this.indexedValues,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){this.indexedValues=(0,s.getListWithRemovedItems)(this.indexedValues,e),super.remove(e)}}t.PhysicalIndexToValueMap=i},90008:(e,t,r)=>{"use strict";t.__esModule=!0,r(15724);var n=r(15898),s=r(10587);class i extends n.PhysicalIndexToValueMap{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getTrimmedIndexes(){return(0,s.arrayReduce)(this.getValues(),((e,t,r)=>(t&&e.push(r),e)),[])}}t.TrimmingMap=i},15501:(e,t,r)=>{"use strict";t.__esModule=!0,t.getDecreasedIndexes=function(e,t){return(0,n.arrayMap)(e,(e=>e-t.filter((t=>t<e)).length))},t.getIncreasedIndexes=function(e,t){const r=t[0],s=t.length;return(0,n.arrayMap)(e,(e=>e>=r?e+s:e))},r(14846),r(27458);var n=r(10587)},88795:(e,t,r)=>{"use strict";t.__esModule=!0,r(67834);var n=r(15501);t.getDecreasedIndexes=n.getDecreasedIndexes,t.getIncreasedIndexes=n.getIncreasedIndexes;var s=r(18046),i=r(4440);const o=new Map([["indexesSequence",{getListWithInsertedItems:s.getListWithInsertedItems,getListWithRemovedItems:s.getListWithRemovedItems}],["physicallyIndexed",{getListWithInsertedItems:i.getListWithInsertedItems,getListWithRemovedItems:i.getListWithRemovedItems}]]);t.alterUtilsFactory=e=>{if(!1===o.has(e))throw new Error(`Alter strategy with ID '${e}' does not exist.`);return o.get(e)}},18046:(e,t,r)=>{"use strict";t.__esModule=!0,t.getListWithInsertedItems=function(e,t,r){return[...e.slice(0,t),...r,...e.slice(t)]},t.getListWithRemovedItems=function(e,t){return(0,n.arrayFilter)(e,(e=>!1===t.includes(e)))};var n=r(10587)},4440:(e,t,r)=>{"use strict";t.__esModule=!0,t.getListWithInsertedItems=function(e,t,r,s){const i=r.length?r[0]:void 0;return[...e.slice(0,i),...r.map(((e,t)=>(0,n.isFunction)(s)?s(e,t):s)),...void 0===i?[]:e.slice(i)]},t.getListWithRemovedItems=function(e,t){return(0,s.arrayFilter)(e,((e,r)=>!1===t.includes(r)))},r(94364);var n=r(89804),s=r(10587)},17207:(e,t)=>{"use strict";function r(e,t,r){e.addEventListener(t,r,!1)}function n(e,t,r){e.removeEventListener(t,r,!1)}function s(e){return e.ownerDocument.defaultView.getComputedStyle(e)}t.__esModule=!0,t.createInputElementResizer=function(e){const t={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300,textContent:e=>e.value,...arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}},i=e.body,o=e.createTextNode(""),a=e.createElement("span");let l;function h(){var e,r;o.textContent=t.textContent(l),a.style.position="absolute",a.style.fontSize=s(l).fontSize,a.style.fontFamily=s(l).fontFamily,a.style.whiteSpace="pre",i.appendChild(a);const n=parseInt((null===(e=s(l))||void 0===e?void 0:e.paddingInlineStart)||0,10),h=parseInt((null===(r=s(l))||void 0===r?void 0:r.paddingInlineEnd)||0,10),u=a.clientWidth+2+n+h;i.removeChild(a);const c=l.style;c.height=`${t.minHeight}px`,t.minWidth>u?c.width=`${t.minWidth}px`:u>t.maxWidth?c.width=`${t.maxWidth}px`:c.width=`${u}px`;const d=l.scrollHeight?l.scrollHeight-1:0;t.minHeight>d?c.height=`${t.minHeight}px`:t.maxHeight<d?(c.height=`${t.maxHeight}px`,c.overflowY="visible"):c.height=`${d}px`}function u(){e.defaultView.setTimeout(h,0)}return{init:function(e,n){let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];l=e,function(e){if(e&&e.minHeight)if("inherit"===e.minHeight)t.minHeight=l.clientHeight;else{const r=parseInt(e.minHeight,10);isNaN(r)||(t.minHeight=r)}if(e&&e.maxHeight)if("inherit"===e.maxHeight)t.maxHeight=l.clientHeight;else{const r=parseInt(e.maxHeight,10);isNaN(r)||(t.maxHeight=r)}if(e&&e.minWidth)if("inherit"===e.minWidth)t.minWidth=l.clientWidth;else{const r=parseInt(e.minWidth,10);isNaN(r)||(t.minWidth=r)}if(e&&e.maxWidth)if("inherit"===e.maxWidth)t.maxWidth=l.clientWidth;else{const r=parseInt(e.maxWidth,10);isNaN(r)||(t.maxWidth=r)}a.firstChild||(a.className="autoResize",a.style.display="inline-block",a.appendChild(o))}(n),"TEXTAREA"===l.nodeName&&(l.style.resize="none",l.style.height=`${t.minHeight}px`,l.style.minWidth=`${t.minWidth}px`,l.style.maxWidth=`${t.maxWidth}px`,l.style.overflowY="hidden"),s&&(r(l,"input",h),r(l,"keydown",u)),h()},resize:h,unObserve(){n(l,"input",h),n(l,"keydown",u)}}}},30480:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707));class i{constructor(e){(0,s.default)(this,"data",void 0),(0,s.default)(this,"next",null),(0,s.default)(this,"prev",null),this.data=e}}t.NodeStructure=i;t.default=class{constructor(){(0,s.default)(this,"first",null),(0,s.default)(this,"last",null)}push(e){const t=new i(e);if(null===this.first)this.first=t,this.last=t;else{const e=this.last;this.last=t,t.prev=e,e.next=t}return t}unshift(e){const t=new i(e);if(null===this.first)this.first=t,this.last=t;else{const e=this.first;this.first=t,t.next=e,e.prev=t}}inorder(e){let t=this.first;for(;t;){const r=e(t);if(t===this.last||!0===r)break;t=t.next}}remove(e){if(null===this.first)return!1;let t,r,n=this.first;for(;n;){if(n.data===e)return t=n.next,r=n.prev,t&&(t.prev=r),r&&(r.next=t),n===this.first&&(this.first=t),n===this.last&&(this.last=r),!0;n=n.next}return!1}hasCycle(){let e=this.first,t=this.first;for(;;){if(null===e)return!1;if(e=e.next,null===e)return!1;if(e=e.next,t=t.next,e===t)return!0}}pop(){if(null===this.last)return null;const e=this.last;return this.last=this.last.prev,e}shift(){if(null===this.first)return null;const e=this.first;return this.first=this.first.next,e}recursiveReverse(){if(!this.first)return;!function e(t,r){r&&(e(r,r.next),r.next=t)}(this.first,this.first.next),this.first.next=null;const e=this.first;this.first=this.last,this.last=e}reverse(){if(!this.first||!this.first.next)return;let e,t=this.first.next,r=this.first;for(;t;)e=t.next,t.next=r,r.prev=t,r=t,t=e;this.first.next=null,this.last.prev=null,e=this.first,this.first=r,this.last=e}}},38439:(e,t,r)=>{"use strict";t.__esModule=!0,t.createPriorityMap=function(){let{errorPriorityExists:e,errorPriorityNaN:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=new Map;return e=(0,s.isFunction)(e)?e:l,t=(0,s.isFunction)(t)?t:h,{addItem:function(s,i){if(!(0,n.isNumeric)(s))throw new Error(t(s));if(r.has(s))throw new Error(e(s));r.set(s,i)},getItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;const[t,n]=a.get(e)||a.get(i);return[...r].sort(((e,r)=>e[0]<r[0]?t:n)).map((e=>e[1]))}}},r(67834),r(94364);var n=r(22137),s=r(89804);const i=t.ASC="asc",o=t.DESC="desc",a=new Map([[i,[-1,1]],[o,[1,-1]]]),l=e=>`The priority '${e}' is already declared in a map.`,h=e=>`The priority '${e}' is not a number.`},51097:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t.depthFirstPreOrder=o;var s=n(r(85707));r(67834),r(15724);const i=t.TRAVERSAL_DF_PRE="DF-pre-order";function o(e,t){let r=e.call(t,this);for(let n=0;n<this.childs.length;n++){if(!1===r)return!1;r=o.call(this.childs[n],e,t)}return r}const a=t.TRAVERSAL_DF_POST="DF-post-order";const l=t.TRAVERSAL_BF="BF";const h=l,u=new Map([[i,o],[a,function e(t,r){for(let n=0;n<this.childs.length;n++){if(!1===e.call(this.childs[n],t,r))return!1}return t.call(r,this)}],[l,function(e,t){const r=[this];!function n(){if(0===r.length)return;const s=r.shift();r.push(...s.childs),!1!==e.call(t,s)&&n()}()}]]);class c{constructor(e){(0,s.default)(this,"data",{}),(0,s.default)(this,"parent",null),(0,s.default)(this,"childs",[]),this.data=e}addChild(e){e.parent=this,this.childs.push(e)}cloneTree(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;const t=new c({...e.data});for(let r=0;r<e.childs.length;r++)t.addChild(this.cloneTree(e.childs[r]));return t}replaceTreeWith(e){this.data={...e.data},this.childs=[];for(let t=0;t<e.childs.length;t++)this.addChild(e.childs[t])}walkDown(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h;if(!u.has(t))throw new Error(`Traversal strategy "${t}" does not exist`);u.get(t).call(this,e,this)}walkUp(e){const t=this,r=n=>{!1!==e.call(t,n)&&null!==n.parent&&r(n.parent)};r(this)}}t.default=c},54394:(e,t,r)=>{"use strict";t.__esModule=!0,t.createUniqueMap=function(){let{errorIdExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Map;function r(){return[...t]}function i(e){return t.has(e)}return e=(0,n.isFunction)(e)?e:s,{addItem:function(r,n){if(i(r))throw new Error(e(r));t.set(r,n)},clear:function(){t.clear()},getId:function(e){const[t]=r().find((t=>{let[r,n]=t;return e===n&&r}))||[null];return t},getItem:function(e){return t.get(e)},getItems:r,hasItem:i,removeItem:function(e){return t.delete(e)}}},r(67834),r(14846),r(6211);var n=r(89804);const s=e=>`The id '${e}' is already declared in a map.`},74784:(e,t,r)=>{"use strict";t.__esModule=!0,t.createUniqueSet=function(){let{errorItemExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Set;return e=(0,n.isFunction)(e)?e:s,{addItem:function(r){if(t.has(r))throw new Error(e(r));t.add(r)},clear:function(){t.clear()},getItems:function(){return[...t]}}},r(67834),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620);var n=r(89804);const s=e=>`'${e}' value is already declared in a unique set.`},4965:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834),r(15724),r(14846),r(69655);var s=n(r(85707)),i=r(62577),o=r(10587);t.default=class{constructor(e){(0,s.default)(this,"hot",null),(0,s.default)(this,"container",null),(0,s.default)(this,"injected",!1),(0,s.default)(this,"rows",[]),(0,s.default)(this,"columns",[]),(0,s.default)(this,"samples",null),(0,s.default)(this,"settings",{useHeaders:!0}),this.hot=e}addRow(e,t){if(this.columns.length)throw new Error("Doesn't support multi-dimensional table");this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));const r={row:e};this.rows.push(r),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol(e)),this.table.tr.appendChild(this.createRow(e)),this.container.container.appendChild(this.table.fragment),r.table=this.table.table}addColumnHeadersRow(e){const t=this.hot.getColHeader(0);if(null!=t){const t={row:-1};this.rows.push(t),this.container=this.createContainer(this.hot.rootElement.className),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.appendColumnHeadersRow(),this.container.container.appendChild(this.table.fragment),t.table=this.table.table}}addColumn(e,t){if(this.rows.length)throw new Error("Doesn't support multi-dimensional table");this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));const r={col:e};this.columns.push(r),this.samples=t,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&null!==this.hot.getColHeader(e)&&this.hot.view.appendColHeader(e,this.table.th,void 0,-1),this.table.tBody.appendChild(this.createCol(e)),this.container.container.appendChild(this.table.fragment),r.table=this.table.table}getHeights(e){this.injected||this.injectTable();const t=this.hot.view.getStylesHandler().areCellsBorderBox()?0:1;(0,o.arrayEach)(this.rows,(r=>{const{height:n}=r.table.getBoundingClientRect();e(r.row,Math.ceil(n)-t)}))}getWidths(e){this.injected||this.injectTable(),(0,o.arrayEach)(this.columns,(t=>{const{width:r}=t.table.getBoundingClientRect();e(t.col,Math.ceil(r))}))}setSettings(e){this.settings=e}setSetting(e,t){this.settings||(this.settings={}),this.settings[e]=t}getSettings(){return this.settings}getSetting(e){return this.settings?this.settings[e]:null}createColGroupsCol(e){const t=this.hot.rootDocument.createDocumentFragment();return this.hot.hasRowHeaders()&&t.appendChild(this.createColElement(-1,-1)),this.samples.forEach((r=>{(0,o.arrayEach)(r.strings,(r=>{t.appendChild(this.createColElement(r.col,e))}))})),t}createRow(e){const{rootDocument:t}=this.hot,r=t.createDocumentFragment(),n=t.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,n),r.appendChild(n)),this.samples.forEach((n=>{(0,o.arrayEach)(n.strings,(n=>{const s=n.col,i=this.hot.getCellMeta(e,s),o=this.hot.getCellRenderer(i),a=t.createElement("td");a.setAttribute("ghost-table",1),o(this.hot,a,e,s,this.hot.colToProp(s),n.value,i),r.appendChild(a)}))})),r}appendColumnHeadersRow(){const{rootDocument:e}=this.hot,t=e.createDocumentFragment(),r=[];if(this.hot.hasRowHeaders()){const n=e.createElement("th");r.push([-1,n]),t.appendChild(n)}this.samples.forEach((n=>{(0,o.arrayEach)(n.strings,(n=>{const s=n.col,i=e.createElement("th");r.push([s,i]),t.appendChild(i)}))})),this.table.tHead.appendChild(t),(0,o.arrayEach)(r,(e=>{const[t,r]=e;this.hot.view.appendColHeader(t,r)}))}createCol(e){const{rootDocument:t}=this.hot,r=t.createDocumentFragment();return this.samples.forEach((n=>{(0,o.arrayEach)(n.strings,(n=>{const s=n.row,i=this.hot.getCellMeta(s,e),o=this.hot.getCellRenderer(i),a=t.createElement("td"),l=t.createElement("tr");a.setAttribute("ghost-table",1),o(this.hot,a,s,e,this.hot.colToProp(e),n.value,i),l.appendChild(a),r.appendChild(l)}))})),r}clean(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()}injectTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.injected||((e||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}removeTable(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}createColElement(e,t){const r=this.hot.rootDocument.createElement("col");let n=0;t>=0&&e>=0&&(n=this.hot.getCellMeta(t,e).colspan);let s=this.hot.getColWidth(e);if(n>1)for(let t=e+1;t<e+n;t++)s+=this.hot.getColWidth(t);return r.style.width=`${s}px`,r}createTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,r=t.createDocumentFragment(),n=t.createElement("table"),s=t.createElement("thead"),o=t.createElement("tbody"),a=t.createElement("colgroup"),l=t.createElement("tr"),h=t.createElement("th");return this.isVertical()&&n.appendChild(a),this.isHorizontal()&&(l.appendChild(h),s.appendChild(l),n.style.tableLayout="auto",n.style.width="auto"),n.appendChild(s),this.isVertical()&&o.appendChild(l),n.appendChild(o),(0,i.addClass)(n,e),r.appendChild(n),{fragment:r,table:n,tHead:s,tBody:o,colGroup:a,tr:l,th:h}}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,r=t.createDocumentFragment(),n=t.createElement("div"),s=`htGhostTable htAutoSize ${e.trim()}`;return(0,i.addClass)(n,s),r.appendChild(n),{fragment:r,container:n}}isVertical(){return!(!this.rows.length||this.columns.length)}isHorizontal(){return!(!this.columns.length||this.rows.length)}}},27453:(e,t,r)=>{"use strict";t.__esModule=!0,t.createPaginator=function(e){let{initialPage:t=-1,size:r=()=>0,onItemSelect:s=()=>{},onClear:i=()=>{}}=e;const o=new Set;let a=(0,n.clamp)(t,-1,h()-1);function l(e,t){const r=h()-1;if(e<0&&(e=r),e>r&&(e=0),o.has(e))return-1;o.add(e);return!1===s(e,!1)&&(e=l(1===t?++e:--e,t)),e}function h(){return Math.max(r(),0)}return{setCurrentPage:function(e){e>-1&&e<h()&&!1!==s(e,!0)&&(a=e)},getCurrentPage:function(){return a},toFirstItem:function(){h()>0&&(o.clear(),a=l(0,1))},toLastItem:function(){h()>0&&(o.clear(),a=l(h()-1,-1))},toNextItem:function(){h()>0&&(o.clear(),a=l(++a,1))},toPreviousItem:function(){h()>0&&(o.clear(),a=l(--a,-1))},getSize:h,clear:function(){o.clear(),a=t,i()}}},r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620);var n=r(22137)},96173:(e,t,r)=>{"use strict";t.__esModule=!0,t._dataToHTML=function(e){const t=e.length,r=["<table>"];for(let s=0;s<t;s+=1){const i=e[s],o=i.length,a=[];0===s&&r.push("<tbody>");for(let e=0;e<o;e+=1){const t=i[e],r=(0,n.isEmpty)(t)?"":t.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20{2,}/gi,(e=>`<span style="mso-spacerun: yes">${"&nbsp;".repeat(e.length-1)} </span>`)).replace(/\t/gi,"&#9;");a.push(`<td>${r}</td>`)}r.push("<tr>",...a,"</tr>"),s+1===t&&r.push("</tbody>")}return r.push("</table>"),r.join("")},t.htmlToGridSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;const r={},n=t.createDocumentFragment(),o=t.createElement("div");n.appendChild(o);let a=e;if("string"==typeof a){const e=a.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g,(e=>{const t=e.match(/<td\b[^>]*?>/g)[0];return`${t}${e.substring(t.length,e.lastIndexOf("<")).trim().replaceAll(/\n\s+/g," ").replaceAll(/<p.*?>/g,"\n").replace("\n","").replaceAll(/<\/(.*)>\s+$/gm,"</$1>").replace(/(<(?!br)([^>]+)>)/gi,"").replaceAll(/^&nbsp;$/gm,"")}</td>`}));o.insertAdjacentHTML("afterbegin",`${e}`),a=o.querySelector("table")}if(!a||!function(e){return"TABLE"===(e&&e.nodeName||"")}(a))return;const l=o.querySelector('meta[name$="enerator"]'),h=null!==a.querySelector("tbody th"),u=a.querySelector("tr"),c=u?Array.from(u.cells).reduce(((e,t)=>e+t.colSpan),0)-(h?1:0):0,d=a.tFoot&&Array.from(a.tFoot.rows)||[],p=[];let g=!1,f=0,m=0;if(a.tHead){const e=Array.from(a.tHead.rows).filter((e=>{const t=null!==e.querySelector("td");return t&&p.push(e),!t}));f=e.length,g=f>0,f>1?r.nestedHeaders=Array.from(e).reduce(((e,t)=>{const r=Array.from(t.cells).reduce(((e,t,r)=>{if(h&&0===r)return e;const{colSpan:n,innerHTML:s}=t,i=n>1?{label:s,colspan:n}:s;return e.push(i),e}),[]);return e.push(r),e}),[]):g&&(r.colHeaders=Array.from(e[0].children).reduce(((e,t,r)=>(h&&0===r||e.push(t.innerHTML),e)),[]))}p.length&&(r.fixedRowsTop=p.length);d.length&&(r.fixedRowsBottom=d.length);const y=[...p,...Array.from(a.tBodies).reduce(((e,t)=>(e.push(...Array.from(t.rows)),e)),[]),...d];m=y.length;const E=new Array(m);for(let e=0;e<m;e++)E[e]=new Array(c);const w=[],C=[];for(let e=0;e<m;e++){const t=y[e],r=Array.from(t.cells),n=r.length;for(let t=0;t<n;t++){const n=r[t],{nodeName:o,innerHTML:a,rowSpan:h,colSpan:u}=n,c=E[e].findIndex((e=>void 0===e));if("TD"===o){if(h>1||u>1){for(let t=e;t<e+h;t++)if(t<m)for(let e=c;e<c+u;e++)E[t][e]=null;const t=n.getAttribute("style");t&&t.includes("mso-ignore:colspan")||w.push({col:c,row:e,rowspan:h,colspan:u})}let t="";t=l&&/excel/gi.test(l.content)?a.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,"\r\n"):a.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n"),E[e][c]=t.replace(i,(e=>s[e]))}else C.push(a)}}w.length&&(r.mergeCells=w);C.length&&(r.rowHeaders=C);E.length&&(r.data=E);return r},t.instanceToHTML=function(e){const t=e.hasColHeaders(),r=e.hasRowHeaders(),s=[t?-1:0,r?-1:0,e.countRows()-1,e.countCols()-1],i=e.getData(...s),o=i.length,a=o>0?i[0].length:0,l=["<table>","</table>"],h=t?["<thead>","</thead>"]:[],u=["<tbody>","</tbody>"],c=r?1:0,d=t?1:0;for(let s=0;s<o;s+=1){const o=t&&0===s,l=[];for(let t=0;t<a;t+=1){const a=!o&&r&&0===t;let h="";if(o)h=`<th>${e.getColHeader(t-c)}</th>`;else if(a)h=`<th>${e.getRowHeader(s-d)}</th>`;else{const r=i[s][t],{hidden:o,rowspan:a,colspan:l}=e.getCellMeta(s-d,t-c);if(!o){const e=[];if(a&&e.push(`rowspan="${a}"`),l&&e.push(`colspan="${l}"`),(0,n.isEmpty)(r))h=`<td ${e.join(" ")}></td>`;else{const t=r.toString().replace("<","&lt;").replace(">","&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");h=`<td ${e.join(" ")}>${t}</td>`}}}l.push(h)}const p=["<tr>",...l,"</tr>"].join("");o?h.splice(1,0,p):u.splice(-1,0,p)}return l.splice(1,0,h.join(""),u.join("")),l.join("")},r(15724),r(64552),r(14846),r(27458),r(94364),r(90458);var n=r(70505);const s={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">"},i=new RegExp(Object.keys(s).map((e=>`(${e})`)).join("|"),"gi")},45435:(e,t)=>{"use strict";t.__esModule=!0,t.hasValidParameter=function(e){return e===n},t.isRootInstance=function(e){return r.has(e)},t.registerAsRootInstance=function(e){r.set(e,!0)};const r=t.holder=new WeakMap,n=t.rootInstanceSymbol=Symbol("rootInstance")},93968:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834),r(15724);var s=n(r(85707)),i=r(25499),o=r(22137),a=r(70505);class l{static get SAMPLE_COUNT(){return 3}constructor(e){(0,s.default)(this,"samples",null),(0,s.default)(this,"dataFactory",null),(0,s.default)(this,"customSampleCount",null),(0,s.default)(this,"allowDuplicates",!1),this.dataFactory=e}getSampleCount(){return this.customSampleCount?this.customSampleCount:l.SAMPLE_COUNT}setSampleCount(e){this.customSampleCount=e}setAllowDuplicates(e){this.allowDuplicates=e}generateRowSamples(e,t){return this.generateSamples("row",t,e)}generateColumnSamples(e,t){return this.generateSamples("col",t,e)}generateSamples(e,t,r){const n=new Map,{from:s,to:i}="number"==typeof r?{from:r,to:r}:r;return(0,o.rangeEach)(s,i,(r=>{const s=this.generateSample(e,t,r);n.set(r,s)})),n}generateSample(e,t,r){if("row"!==e&&"col"!==e)throw new Error("Unsupported sample type");const n=new Map,s="row"===e?"col":"row",l=[];return(0,o.rangeEach)(t.from,t.to,(t=>{const o="row"===e?this.dataFactory(r,t):this.dataFactory(t,r);if(!1===o)return;const{value:h,bundleSeed:u}=o,c="string"==typeof u&&u.length>0;let d;d=c?u:(0,i.isObject)(h)?`${Object.keys(h).length}`:Array.isArray(h)?`${h.length}`:`${(0,a.stringify)(h).length}`,n.has(d)||n.set(d,{needed:this.getSampleCount(),strings:[]});const p=n.get(d);if(p.needed){(!(l.indexOf(h)>-1)||this.allowDuplicates||c)&&(p.strings.push({value:h,[s]:t}),l.push(h),p.needed-=1)}})),n}}t.default=l},28651:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";r.has(e)||r.set(e,new Map);const t=r.get(e);return{register:function(e,r){t.set(e,r)},getItem:function(e){return t.get(e)},hasItem:function(e){return t.has(e)},getNames:function(){return[...t.keys()]},getValues:function(){return[...t.values()]}}};const r=t.collection=new Map},39385:(e,t)=>{"use strict";t.__esModule=!0,t.autocompleteValidator=n;const r=t.VALIDATOR_TYPE="autocomplete";function n(e,t){let r=e;null==r&&(r=""),this.allowEmpty&&""===r?t(!0):this.strict&&this.source?"function"==typeof this.source?this.source(r,s(r,t)):s(r,t)(this.source):t(!0)}function s(e,t){const r=e;return function(e){let n=!1;for(let t=0,s=e.length;t<s;t++)if(r===e[t]){n=!0;break}t(n)}}n.VALIDATOR_TYPE=r},25799:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(39385);t.VALIDATOR_TYPE=n.VALIDATOR_TYPE,t.autocompleteValidator=n.autocompleteValidator},88993:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t.correctFormat=u,t.dateValidator=h;var s=n(r(6671)),i=r(8266),o=r(16339),a=r(95976);const l=t.VALIDATOR_TYPE="date";function h(e,t){const r=(0,i.getEditorInstance)(o.EDITOR_TYPE,this.instance);let n=e,a=!0;null==n&&(n="");let l=(0,s.default)(n,this.dateFormat||r.defaultDateFormat,!0).isValid(),h=(0,s.default)(new Date(n)).isValid()||l;if(this.allowEmpty&&""===n&&(h=!0,l=!0),h||(a=!1),!h&&l&&(a=!0),h&&!l)if(!0===this.correctFormat){const e=u(n,this.dateFormat);this.instance.setDataAtCell(this.visualRow,this.visualCol,e,"dateValidator"),a=!0}else a=!1;t(a)}function u(e,t){const r=(0,s.default)((0,a.getNormalizedDate)(e)),n=(0,s.default)(e,t),i=e.search(/[A-z]/g)>-1;let o;return o=r.isValid()&&r.format("x")===n.format("x")||!n.isValid()||i?r:n,o.format(t)}h.VALIDATOR_TYPE=l},5535:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(88993);t.VALIDATOR_TYPE=n.VALIDATOR_TYPE,t.correctFormat=n.correctFormat,t.dateValidator=n.dateValidator},5105:(e,t,r)=>{"use strict";t.__esModule=!0,t.dropdownValidator=i;var n=r(39385);const s=t.VALIDATOR_TYPE="dropdown";function i(e,t){n.autocompleteValidator.apply(this,[e,t])}i.VALIDATOR_TYPE=s},96:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(5105);t.VALIDATOR_TYPE=n.VALIDATOR_TYPE,t.dropdownValidator=n.dropdownValidator},41602:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllValidators=function(){(0,l.registerValidator)(n.autocompleteValidator),(0,l.registerValidator)(i.dropdownValidator),(0,l.registerValidator)(s.dateValidator),(0,l.registerValidator)(o.numericValidator),(0,l.registerValidator)(a.timeValidator)};var n=r(25799);t.autocompleteValidator=n.autocompleteValidator,t.AUTOCOMPLETE_VALIDATOR=n.VALIDATOR_TYPE;var s=r(5535);t.dateValidator=s.dateValidator,t.DATE_VALIDATOR=s.VALIDATOR_TYPE;var i=r(96);t.dropdownValidator=i.dropdownValidator,t.DROPDOWN_VALIDATOR=i.VALIDATOR_TYPE;var o=r(48636);t.numericValidator=o.numericValidator,t.NUMERIC_VALIDATOR=o.VALIDATOR_TYPE;var a=r(68864);t.timeValidator=a.timeValidator,t.TIME_VALIDATOR=a.VALIDATOR_TYPE;var l=r(17027);t.registerValidator=l.registerValidator,t.getRegisteredValidatorNames=l.getRegisteredValidatorNames,t.getRegisteredValidators=l.getRegisteredValidators,t.getValidator=l.getValidator,t.hasValidator=l.hasValidator},48636:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(62365);t.VALIDATOR_TYPE=n.VALIDATOR_TYPE,t.numericValidator=n.numericValidator},62365:(e,t,r)=>{"use strict";t.__esModule=!0,t.numericValidator=i;var n=r(22137);const s=t.VALIDATOR_TYPE="numeric";function i(e,t){let r=e;null==r&&(r=""),this.allowEmpty&&""===r?t(!0):t(""!==r&&(0,n.isNumeric)(e))}i.VALIDATOR_TYPE=s},17027:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t.getValidator=function(e){if("function"==typeof e)return e;if(!a(e))throw Error(`No registered validator found under "${e}" name`);return o(e)},t.registerValidator=function(e,t){"string"!=typeof e&&(e=(t=e).VALIDATOR_TYPE);i(e,t)},r(67834);var s=n(r(28651));const{register:i,getItem:o,hasItem:a,getNames:l,getValues:h}=(0,s.default)("validators");t.getRegisteredValidators=h,t.getRegisteredValidatorNames=l,t.hasValidator=a},68864:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(94845);t.VALIDATOR_TYPE=n.VALIDATOR_TYPE,t.timeValidator=n.timeValidator},94845:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t.timeValidator=a;var s=n(r(6671));const i=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"],o=t.VALIDATOR_TYPE="time";function a(e,t){const r=this.timeFormat||"h:mm:ss a";let n=!0,o=e;null===o&&(o=""),o=/^\d{3,}$/.test(o)?parseInt(o,10):o;const a=/^\d{1,2}$/.test(o);a&&(o+=":00");const l=(0,s.default)(o,i,!0).isValid()?(0,s.default)(o):(0,s.default)(o,r);let h=l.isValid(),u=(0,s.default)(o,r,!0).isValid()&&!a;if(this.allowEmpty&&""===o&&(h=!0,u=!0),h||(n=!1),!h&&u&&(n=!0),h&&!u)if(!0===this.correctFormat){const e=l.format(r);this.instance.setDataAtCell(this.visualRow,this.visualCol,e,"timeValidator"),n=!0}else n=!1;t(n)}a.VALIDATOR_TYPE=o},83012:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Alternation:()=>Me,CstParser:()=>Hr,EMPTY_ALT:()=>Dr,EOF:()=>pe,EarlyExitException:()=>Qt,EmbeddedActionsParser:()=>Fr,Flat:()=>Ce,GAstVisitor:()=>xe,Lexer:()=>J,LexerDefinitionErrorType:()=>q,MismatchedTokenException:()=>Kt,NoViableAltException:()=>Xt,NonTerminal:()=>Ee,NotAllInputParsedException:()=>qt,Option:()=>ve,Parser:()=>kr,ParserDefinitionErrorType:()=>xr,Repetition:()=>Te,RepetitionMandatory:()=>Re,RepetitionMandatoryWithSeparator:()=>Se,RepetitionWithSeparator:()=>Ne,Rule:()=>we,Terminal:()=>_e,VERSION:()=>n,assignOccurrenceIndices:()=>Bt,clearCache:()=>qr,createSyntaxDiagramsCode:()=>Ur,createToken:()=>de,createTokenInstance:()=>ge,defaultGrammarResolverErrorProvider:()=>Dt,defaultGrammarValidatorErrorProvider:()=>kt,defaultLexerErrorProvider:()=>Q,defaultParserErrorProvider:()=>Lt,generateParserFactory:()=>Kr,generateParserModule:()=>Xr,isRecognitionException:()=>$t,resolveGrammar:()=>Ut,serializeGrammar:()=>be,serializeProduction:()=>Ae,tokenLabel:()=>ee,tokenMatcher:()=>fe,tokenName:()=>te,validateGrammar:()=>Vt});var n="6.5.0",s=r(86596),i=r(49879),o={},a=new i.RegExpParser;function l(e){var t=e.toString();if(o.hasOwnProperty(t))return o[t];var r=a.pattern(t);return o[t]=r,r}var h,u=(h=function(e,t){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},h(e,t)},function(e,t){function r(){this.constructor=e}h(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),c="Complement Sets are not supported for first char optimization",d='Unable to use "first char" lexer optimizations:\n';function p(e,t){void 0===t&&(t=!1);try{var r=l(e);return g(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===c)t&&(0,s.x5)(d+"\tUnable to optimize: < "+e.toString()+" >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.");else{var n="";t&&(n="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),(0,s.Zi)(d+"\n\tFailed parsing: < "+e.toString()+" >\n\tUsing the regexp-to-ast library version: "+i.VERSION+"\n\tPlease open an issue at: https://github.com/bd82/regexp-to-ast/issues"+n)}}return[]}function g(e,t,r){switch(e.type){case"Disjunction":for(var n=0;n<e.value.length;n++)g(e.value[n],t,r);break;case"Alternative":var i=e.value;for(n=0;n<i.length;n++){var o=i[n];switch(o.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}var a=o;switch(a.type){case"Character":f(a.value,t,r);break;case"Set":if(!0===a.complement)throw Error(c);(0,s.jJ)(a.value,(function(e){if("number"==typeof e)f(e,t,r);else{var n=e;if(!0===r)for(var s=n.from;s<=n.to;s++)f(s,t,r);else{for(s=n.from;s<=n.to&&s<F;s++)f(s,t,r);if(n.to>=F)for(var i=n.from>=F?n.from:F,o=n.to,a=U(i),l=U(o),h=a;h<=l;h++)t[h]=h}}}));break;case"Group":g(a.value,t,r);break;default:throw Error("Non Exhaustive Match")}var l=void 0!==a.quantifier&&0===a.quantifier.atLeast;if("Group"===a.type&&!1===y(a)||"Group"!==a.type&&!1===l)break}break;default:throw Error("non exhaustive match!")}return(0,s.zu)(t)}function f(e,t,r){var n=U(e);t[n]=n,!0===r&&function(e,t){var r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){t[s=U(n.charCodeAt(0))]=s}else{var s,i=r.toLowerCase();if(i!==r)t[s=U(i.charCodeAt(0))]=s}}(e,t)}function m(e,t){return(0,s.I6)(e.value,(function(e){if("number"==typeof e)return(0,s.gR)(t,e);var r=e;return void 0!==(0,s.I6)(t,(function(e){return r.from<=e&&e<=r.to}))}))}function y(e){return!(!e.quantifier||0!==e.quantifier.atLeast)||!!e.value&&((0,s.cy)(e.value)?(0,s.Si)(e.value,y):y(e.value))}var E=function(e){function t(t){var r=e.call(this)||this;return r.targetCharCodes=t,r.found=!1,r}return u(t,e),t.prototype.visitChildren=function(t){if(!0!==this.found){switch(t.type){case"Lookahead":return void this.visitLookahead(t);case"NegativeLookahead":return void this.visitNegativeLookahead(t)}e.prototype.visitChildren.call(this,t)}},t.prototype.visitCharacter=function(e){(0,s.gR)(this.targetCharCodes,e.value)&&(this.found=!0)},t.prototype.visitSet=function(e){e.complement?void 0===m(e,this.targetCharCodes)&&(this.found=!0):void 0!==m(e,this.targetCharCodes)&&(this.found=!0)},t}(i.BaseRegExpVisitor);function w(e,t){if(t instanceof RegExp){var r=l(t),n=new E(e);return n.visit(r),n.found}return void 0!==(0,s.I6)(t,(function(t){return(0,s.gR)(e,t.charCodeAt(0))}))}var C=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),v="PATTERN",R="defaultMode",S="modes",T="boolean"==typeof new RegExp("(?:)").sticky;function N(e,t){var r,n=(t=(0,s.NT)(t,{useSticky:T,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:function(e,t){return t()}})).tracer;n("initCharCodeToOptimizedIndexMap",(function(){!function(){if((0,s.Im)(V)){V=new Array(65536);for(var e=0;e<65536;e++)V[e]=e>255?255+~~(e/255):e}}()})),n("Reject Lexer.NA",(function(){r=(0,s.ku)(e,(function(e){return e[v]===J.NA}))}));var i,o,a,l,h,u,c,g,f,m,y,E=!1;n("Transform Patterns",(function(){E=!1,i=(0,s.Tj)(r,(function(e){var r=e[v];if((0,s.gd)(r)){var n=r.source;return 1===n.length&&"^"!==n&&"$"!==n&&"."!==n?n:2!==n.length||"\\"!==n[0]||(0,s.gR)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],n[1])?t.useSticky?O(r):A(r):n[1]}if((0,s.Tn)(r))return E=!0,{exec:r};if((0,s.zy)(r,"exec"))return E=!0,r;if("string"==typeof r){if(1===r.length)return r;var i=r.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),o=new RegExp(i);return t.useSticky?O(o):A(o)}throw Error("non exhaustive match")}))})),n("misc mapping",(function(){o=(0,s.Tj)(r,(function(e){return e.tokenTypeIdx})),a=(0,s.Tj)(r,(function(e){var t=e.GROUP;if(t!==J.SKIPPED){if((0,s.Kg)(t))return t;if((0,s.b0)(t))return!1;throw Error("non exhaustive match")}})),l=(0,s.Tj)(r,(function(e){var t=e.LONGER_ALT;if(t)return(0,s.qh)(r,t)})),h=(0,s.Tj)(r,(function(e){return e.PUSH_MODE})),u=(0,s.Tj)(r,(function(e){return(0,s.zy)(e,"POP_MODE")}))})),n("Line Terminator Handling",(function(){var e=k(t.lineTerminatorCharacters);c=(0,s.Tj)(r,(function(e){return!1})),"onlyOffset"!==t.positionTracking&&(c=(0,s.Tj)(r,(function(t){return(0,s.zy)(t,"LINE_BREAKS")?t.LINE_BREAKS:!1===D(t,e)?w(e,t.PATTERN):void 0})))})),n("Misc Mapping #2",(function(){g=(0,s.Tj)(r,x),f=(0,s.Tj)(i,P),m=(0,s.TS)(r,(function(e,t){var r=t.GROUP;return(0,s.Kg)(r)&&r!==J.SKIPPED&&(e[r]=[]),e}),{}),y=(0,s.Tj)(i,(function(e,t){return{pattern:i[t],longerAlt:l[t],canLineTerminator:c[t],isCustom:g[t],short:f[t],group:a[t],push:h[t],pop:u[t],tokenTypeIdx:o[t],tokenType:r[t]}}))}));var C=!0,R=[];return t.safeMode||n("First Char Optimization",(function(){R=(0,s.TS)(r,(function(e,r,n){if("string"==typeof r.PATTERN){var i=U(r.PATTERN.charCodeAt(0));H(e,i,y[n])}else if((0,s.cy)(r.START_CHARS_HINT)){var o;(0,s.jJ)(r.START_CHARS_HINT,(function(t){var r=U("string"==typeof t?t.charCodeAt(0):t);o!==r&&(o=r,H(e,r,y[n]))}))}else if((0,s.gd)(r.PATTERN))if(r.PATTERN.unicode)C=!1,t.ensureOptimizations&&(0,s.Zi)(d+"\tUnable to analyze < "+r.PATTERN.toString()+" > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE");else{var a=p(r.PATTERN,t.ensureOptimizations);(0,s.Im)(a)&&(C=!1),(0,s.jJ)(a,(function(t){H(e,t,y[n])}))}else t.ensureOptimizations&&(0,s.Zi)(d+"\tTokenType: <"+r.name+"> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE"),C=!1;return e}),[])})),n("ArrayPacking",(function(){R=(0,s.VS)(R)})),{emptyGroups:m,patternIdxToConfig:y,charCodeToPatternIdxToConfig:R,hasCustom:E,canBeOptimized:C}}function M(e,t){var r=[],n=function(e){var t=(0,s.pb)(e,(function(e){return!(0,s.zy)(e,v)})),r=(0,s.Tj)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:q.MISSING_PATTERN,tokenTypes:[e]}})),n=(0,s.iv)(e,t);return{errors:r,valid:n}}(e);r=r.concat(n.errors);var o=function(e){var t=(0,s.pb)(e,(function(e){var t=e[v];return!((0,s.gd)(t)||(0,s.Tn)(t)||(0,s.zy)(t,"exec")||(0,s.Kg)(t))})),r=(0,s.Tj)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:q.INVALID_PATTERN,tokenTypes:[e]}})),n=(0,s.iv)(e,t);return{errors:r,valid:n}}(n.valid),a=o.valid;return r=(r=r.concat(o.errors)).concat(function(e){var t=[],r=(0,s.pb)(e,(function(e){return(0,s.gd)(e[v])}));return t=t.concat(function(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return C(t,e),t.prototype.visitEndAnchor=function(e){this.found=!0},t}(i.BaseRegExpVisitor),r=(0,s.pb)(e,(function(e){var r=e[v];try{var n=l(r),s=new t;return s.visit(n),s.found}catch(e){return _.test(r.source)}})),n=(0,s.Tj)(r,(function(e){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:q.EOI_ANCHOR_FOUND,tokenTypes:[e]}}));return n}(r)),t=t.concat(function(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return C(t,e),t.prototype.visitStartAnchor=function(e){this.found=!0},t}(i.BaseRegExpVisitor),r=(0,s.pb)(e,(function(e){var r=e[v];try{var n=l(r),s=new t;return s.visit(n),s.found}catch(e){return b.test(r.source)}})),n=(0,s.Tj)(r,(function(e){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:q.SOI_ANCHOR_FOUND,tokenTypes:[e]}}));return n}(r)),t=t.concat(function(e){var t=(0,s.pb)(e,(function(e){var t=e[v];return t instanceof RegExp&&(t.multiline||t.global)})),r=(0,s.Tj)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:q.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}}));return r}(r)),t=t.concat(function(e){var t=[],r=(0,s.Tj)(e,(function(r){return(0,s.TS)(e,(function(e,n){return r.PATTERN.source!==n.PATTERN.source||(0,s.gR)(t,n)||n.PATTERN===J.NA||(t.push(n),e.push(n)),e}),[])}));r=(0,s.oE)(r);var n=(0,s.pb)(r,(function(e){return e.length>1})),i=(0,s.Tj)(n,(function(e){var t=(0,s.Tj)(e,(function(e){return e.name}));return{message:"The same RegExp pattern ->"+(0,s.$1)(e).PATTERN+"<-has been used in all of the following Token Types: "+t.join(", ")+" <-",type:q.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}}));return i}(r)),t=t.concat(function(e){var t=(0,s.pb)(e,(function(e){return e[v].test("")})),r=(0,s.Tj)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:q.EMPTY_MATCH_PATTERN,tokenTypes:[e]}}));return r}(r)),t}(a)),r=r.concat(function(e){var t=(0,s.pb)(e,(function(e){if(!(0,s.zy)(e,"GROUP"))return!1;var t=e.GROUP;return t!==J.SKIPPED&&t!==J.NA&&!(0,s.Kg)(t)})),r=(0,s.Tj)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:q.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}}));return r}(a)),r=r.concat(function(e,t){var r=(0,s.pb)(e,(function(e){return void 0!==e.PUSH_MODE&&!(0,s.gR)(t,e.PUSH_MODE)})),n=(0,s.Tj)(r,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+e.PUSH_MODE+"<-which does not exist",type:q.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}}));return n}(a,t)),r=r.concat(function(e){var t=[],r=(0,s.TS)(e,(function(e,t,r){var n,i,o=t.PATTERN;return o===J.NA||((0,s.Kg)(o)?e.push({str:o,idx:r,tokenType:t}):(0,s.gd)(o)&&(n=o,i=[".","\\","[","]","|","^","$","(",")","?","*","+","{"],void 0===(0,s.I6)(i,(function(e){return-1!==n.source.indexOf(e)})))&&e.push({str:o.source,idx:r,tokenType:t})),e}),[]);return(0,s.jJ)(e,(function(e,n){(0,s.jJ)(r,(function(r){var i=r.str,o=r.idx,a=r.tokenType;if(n<o&&function(e,t){if((0,s.gd)(t)){var r=t.exec(e);return null!==r&&0===r.index}if((0,s.Tn)(t))return t(e,0,[],{});if((0,s.zy)(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}(i,e.PATTERN)){var l="Token: ->"+a.name+"<- can never be matched.\nBecause it appears AFTER the Token Type ->"+e.name+"<-in the lexer's definition.\nSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNREACHABLE";t.push({message:l,type:q.UNREACHABLE_PATTERN,tokenTypes:[e,a]})}}))})),t}(a)),r}var _=/[^\\][\$]/;var b=/[^\\[][\^]|^\^/;function A(e){var t=e.ignoreCase?"i":"";return new RegExp("^(?:"+e.source+")",t)}function O(e){var t=e.ignoreCase?"iy":"y";return new RegExp(""+e.source,t)}function I(e,t,r){var n=[],i=!1,o=(0,s.oE)((0,s.Bq)((0,s.LG)(e.modes,(function(e){return e})))),a=(0,s.ku)(o,(function(e){return e[v]===J.NA})),l=k(r);return t&&(0,s.jJ)(a,(function(e){var t=D(e,l);if(!1!==t){var r=function(e,t){if(t.issue===q.IDENTIFY_TERMINATOR)return"Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <"+e.name+"> Token Type\n\t Root cause: "+t.errMsg+".\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(t.issue===q.CUSTOM_LINE_BREAK)return"Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <"+e.name+"> Token Type\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}(e,t),o={message:r,type:t.issue,tokenType:e};n.push(o)}else(0,s.zy)(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(i=!0):w(l,e.PATTERN)&&(i=!0)})),t&&!i&&n.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:q.NO_LINE_BREAKS_FLAGS}),n}function x(e){var t=e.PATTERN;if((0,s.gd)(t))return!1;if((0,s.Tn)(t))return!0;if((0,s.zy)(t,"exec"))return!0;if((0,s.Kg)(t))return!1;throw Error("non exhaustive match")}function P(e){return!(!(0,s.Kg)(e)||1!==e.length)&&e.charCodeAt(0)}var L={test:function(e){for(var t=e.length,r=this.lastIndex;r<t;r++){var n=e.charCodeAt(r);if(10===n)return this.lastIndex=r+1,!0;if(13===n)return 10===e.charCodeAt(r+1)?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},lastIndex:0};function D(e,t){if((0,s.zy)(e,"LINE_BREAKS"))return!1;if((0,s.gd)(e.PATTERN)){try{w(t,e.PATTERN)}catch(e){return{issue:q.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if((0,s.Kg)(e.PATTERN))return!1;if(x(e))return{issue:q.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function k(e){return(0,s.Tj)(e,(function(e){return(0,s.Kg)(e)&&e.length>0?e.charCodeAt(0):e}))}function H(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}var F=256;function U(e){return e<F?e:V[e]}var V=[];function B(e,t){var r=e.tokenTypeIdx;return r===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[r]}function W(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var Y=1,G={};function j(e){var t=function(e){var t=(0,s.T9)(e),r=e,n=!0;for(;n;){r=(0,s.oE)((0,s.Bq)((0,s.Tj)(r,(function(e){return e.CATEGORIES}))));var i=(0,s.iv)(r,t);t=t.concat(i),(0,s.Im)(i)?n=!1:r=i}return t}(e);!function(e){(0,s.jJ)(e,(function(e){var t;$(e)||(G[Y]=e,e.tokenTypeIdx=Y++),K(e)&&!(0,s.cy)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),K(e)||(e.CATEGORIES=[]),t=e,(0,s.zy)(t,"categoryMatches")||(e.categoryMatches=[]),function(e){return(0,s.zy)(e,"categoryMatchesMap")}(e)||(e.categoryMatchesMap={})}))}(t),function(e){(0,s.jJ)(e,(function(e){z([],e)}))}(t),function(e){(0,s.jJ)(e,(function(e){e.categoryMatches=[],(0,s.jJ)(e.categoryMatchesMap,(function(t,r){e.categoryMatches.push(G[r].tokenTypeIdx)}))}))}(t),(0,s.jJ)(t,(function(e){e.isParent=e.categoryMatches.length>0}))}function z(e,t){(0,s.jJ)(e,(function(e){t.categoryMatchesMap[e.tokenTypeIdx]=!0})),(0,s.jJ)(t.CATEGORIES,(function(r){var n=e.concat(t);(0,s.gR)(n,r)||z(n,r)}))}function $(e){return(0,s.zy)(e,"tokenTypeIdx")}function K(e){return(0,s.zy)(e,"CATEGORIES")}function X(e){return(0,s.zy)(e,"tokenTypeIdx")}var q,Q={buildUnableToPopLexerModeMessage:function(e){return"Unable to pop Lexer Mode after encountering Token ->"+e.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(e,t,r,n,s){return"unexpected character: ->"+e.charAt(t)+"<- at offset: "+t+", skipped "+r+" characters."}};!function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"}(q||(q={}));var Z={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Q,traceInitPerf:!1,skipValidations:!1};Object.freeze(Z);var J=function(){function e(e,t){var r=this;if(void 0===t&&(t=Z),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},"boolean"==typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=(0,s.h1)(Z,t);var n=this.config.traceInitPerf;!0===n?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof n&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",(function(){var n,i=!0;r.TRACE_INIT("Lexer Config handling",(function(){if(r.config.lineTerminatorsPattern===Z.lineTerminatorsPattern)r.config.lineTerminatorsPattern=L;else if(r.config.lineTerminatorCharacters===Z.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');r.trackStartLines=/full|onlyStart/i.test(r.config.positionTracking),r.trackEndLines=/full/i.test(r.config.positionTracking),(0,s.cy)(e)?((n={modes:{}}).modes[R]=(0,s.T9)(e),n[R]=R):(i=!1,n=(0,s.lR)(e))})),!1===r.config.skipValidations&&(r.TRACE_INIT("performRuntimeChecks",(function(){r.lexerDefinitionErrors=r.lexerDefinitionErrors.concat(function(e){var t=[];return(0,s.zy)(e,R)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+R+"> property in its definition\n",type:q.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,s.zy)(e,S)||t.push({message:"A MultiMode Lexer cannot be initialized without a <modes> property in its definition\n",type:q.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,s.zy)(e,S)&&(0,s.zy)(e,R)&&!(0,s.zy)(e.modes,e.defaultMode)&&t.push({message:"A MultiMode Lexer cannot be initialized with a "+R+": <"+e.defaultMode+">which does not exist\n",type:q.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,s.zy)(e,S)&&(0,s.jJ)(e.modes,(function(e,r){(0,s.jJ)(e,(function(e,n){(0,s.b0)(e)&&t.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:<"+r+"> at index: <"+n+">\n",type:q.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})}))})),t}(n,r.trackStartLines,r.config.lineTerminatorCharacters))})),r.TRACE_INIT("performWarningRuntimeChecks",(function(){r.lexerDefinitionWarning=r.lexerDefinitionWarning.concat(I(n,r.trackStartLines,r.config.lineTerminatorCharacters))}))),n.modes=n.modes?n.modes:{},(0,s.jJ)(n.modes,(function(e,t){n.modes[t]=(0,s.ku)(e,(function(e){return(0,s.b0)(e)}))}));var a=(0,s.HP)(n.modes);if((0,s.jJ)(n.modes,(function(e,n){r.TRACE_INIT("Mode: <"+n+"> processing",(function(){var i;(r.modes.push(n),!1===r.config.skipValidations&&r.TRACE_INIT("validatePatterns",(function(){r.lexerDefinitionErrors=r.lexerDefinitionErrors.concat(M(e,a))})),(0,s.Im)(r.lexerDefinitionErrors))&&(j(e),r.TRACE_INIT("analyzeTokenTypes",(function(){i=N(e,{lineTerminatorCharacters:r.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:r.TRACE_INIT.bind(r)})})),r.patternIdxToConfig[n]=i.patternIdxToConfig,r.charCodeToPatternIdxToConfig[n]=i.charCodeToPatternIdxToConfig,r.emptyGroups=(0,s.h1)(r.emptyGroups,i.emptyGroups),r.hasCustom=i.hasCustom||r.hasCustom,r.canModeBeOptimized[n]=i.canBeOptimized)}))})),r.defaultMode=n.defaultMode,!(0,s.Im)(r.lexerDefinitionErrors)&&!r.config.deferDefinitionErrorsHandling){var l=(0,s.Tj)(r.lexerDefinitionErrors,(function(e){return e.message})).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+l)}(0,s.jJ)(r.lexerDefinitionWarning,(function(e){(0,s.x5)(e.message)})),r.TRACE_INIT("Choosing sub-methods implementations",(function(){if(T?(r.chopInput=s.zK,r.match=r.matchWithTest):(r.updateLastIndex=s.tE,r.match=r.matchWithExec),i&&(r.handleModes=s.tE),!1===r.trackStartLines&&(r.computeNewColumn=s.zK),!1===r.trackEndLines&&(r.updateTokenEndLineColumnLocation=s.tE),/full/i.test(r.config.positionTracking))r.createTokenInstance=r.createFullToken;else if(/onlyStart/i.test(r.config.positionTracking))r.createTokenInstance=r.createStartOnlyToken;else{if(!/onlyOffset/i.test(r.config.positionTracking))throw Error('Invalid <positionTracking> config option: "'+r.config.positionTracking+'"');r.createTokenInstance=r.createOffsetOnlyToken}r.hasCustom?(r.addToken=r.addTokenUsingPush,r.handlePayload=r.handlePayloadWithCustom):(r.addToken=r.addTokenUsingMemberAccess,r.handlePayload=r.handlePayloadNoCustom)})),r.TRACE_INIT("Failed Optimization Warnings",(function(){var e=(0,s.TS)(r.canModeBeOptimized,(function(e,t,r){return!1===t&&e.push(r),e}),[]);if(t.ensureOptimizations&&!(0,s.Im)(e))throw Error("Lexer Modes: < "+e.join(", ")+' > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.')})),r.TRACE_INIT("clearRegExpParserCache",(function(){o={}})),r.TRACE_INIT("toFastProperties",(function(){(0,s.Bl)(r)}))}))}return e.prototype.tokenize=function(e,t){if(void 0===t&&(t=this.defaultMode),!(0,s.Im)(this.lexerDefinitionErrors)){var r=(0,s.Tj)(this.lexerDefinitionErrors,(function(e){return e.message})).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+r)}return this.tokenizeInternal(e,t)},e.prototype.tokenizeInternal=function(e,t){var r,n,i,o,a,l,h,u,c,d,p,g,f,m,y,E,w,C=this,v=e,R=v.length,S=0,T=0,N=this.hasCustom?0:Math.floor(e.length/10),M=new Array(N),_=[],b=this.trackStartLines?1:void 0,A=this.trackStartLines?1:void 0,O=(y=this.emptyGroups,E={},w=(0,s.HP)(y),(0,s.jJ)(w,(function(e){var t=y[e];if(!(0,s.cy)(t))throw Error("non exhaustive match");E[e]=[]})),E),I=this.trackStartLines,x=this.config.lineTerminatorsPattern,P=0,L=[],D=[],k=[],H=[];Object.freeze(H);var F=void 0;function V(){return L}function B(e){var t=U(e),r=D[t];return void 0===r?H:r}var W,Y=function(e){if(1===k.length&&void 0===e.tokenType.PUSH_MODE){var t=C.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);_.push({offset:e.startOffset,line:void 0!==e.startLine?e.startLine:void 0,column:void 0!==e.startColumn?e.startColumn:void 0,length:e.image.length,message:t})}else{k.pop();var r=(0,s.HV)(k);L=C.patternIdxToConfig[r],D=C.charCodeToPatternIdxToConfig[r],P=L.length;var n=C.canModeBeOptimized[r]&&!1===C.config.safeMode;F=D&&n?B:V}};function G(e){k.push(e),D=this.charCodeToPatternIdxToConfig[e],L=this.patternIdxToConfig[e],P=L.length,P=L.length;var t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;F=D&&t?B:V}for(G.call(this,t);S<R;){a=null;var j=v.charCodeAt(S),z=F(j),$=z.length;for(r=0;r<$;r++){var K=(W=z[r]).pattern;if(l=null,!1!==(se=W.short)?j===se&&(a=K):!0===W.isCustom?null!==(m=K.exec(v,S,M,O))?(a=m[0],void 0!==m.payload&&(l=m.payload)):a=null:(this.updateLastIndex(K,S),a=this.match(K,e,S)),null!==a){if(void 0!==(o=W.longerAlt)){var X=L[o],q=X.pattern;h=null,!0===X.isCustom?null!==(m=q.exec(v,S,M,O))?(i=m[0],void 0!==m.payload&&(h=m.payload)):i=null:(this.updateLastIndex(q,S),i=this.match(q,e,S)),i&&i.length>a.length&&(a=i,l=h,W=X)}break}}if(null!==a){if(u=a.length,void 0!==(c=W.group)&&(d=W.tokenTypeIdx,p=this.createTokenInstance(a,S,d,W.tokenType,b,A,u),this.handlePayload(p,l),!1===c?T=this.addToken(M,T,p):O[c].push(p)),e=this.chopInput(e,u),S+=u,A=this.computeNewColumn(A,u),!0===I&&!0===W.canLineTerminator){var Q=0,Z=void 0,J=void 0;x.lastIndex=0;do{!0===(Z=x.test(a))&&(J=x.lastIndex-1,Q++)}while(!0===Z);0!==Q&&(b+=Q,A=u-J,this.updateTokenEndLineColumnLocation(p,c,J,Q,b,A,u))}this.handleModes(W,Y,G,p)}else{for(var ee=S,te=b,re=A,ne=!1;!ne&&S<R;)for(v.charCodeAt(S),e=this.chopInput(e,1),S++,n=0;n<P;n++){var se,ie=L[n];K=ie.pattern;if(!1!==(se=ie.short)?v.charCodeAt(S)===se&&(ne=!0):!0===ie.isCustom?ne=null!==K.exec(v,S,M,O):(this.updateLastIndex(K,S),ne=null!==K.exec(e)),!0===ne)break}g=S-ee,f=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(v,ee,g,te,re),_.push({offset:ee,line:te,column:re,length:g,message:f})}}return this.hasCustom||(M.length=T),{tokens:M,groups:O,errors:_}},e.prototype.handleModes=function(e,t,r,n){if(!0===e.pop){var s=e.push;t(n),void 0!==s&&r.call(this,s)}else void 0!==e.push&&r.call(this,e.push)},e.prototype.chopInput=function(e,t){return e.substring(t)},e.prototype.updateLastIndex=function(e,t){e.lastIndex=t},e.prototype.updateTokenEndLineColumnLocation=function(e,t,r,n,s,i,o){var a,l;void 0!==t&&(l=(a=r===o-1)?-1:0,1===n&&!0===a||(e.endLine=s+l,e.endColumn=i-1-l))},e.prototype.computeNewColumn=function(e,t){return e+t},e.prototype.createTokenInstance=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return null},e.prototype.createOffsetOnlyToken=function(e,t,r,n){return{image:e,startOffset:t,tokenTypeIdx:r,tokenType:n}},e.prototype.createStartOnlyToken=function(e,t,r,n,s,i){return{image:e,startOffset:t,startLine:s,startColumn:i,tokenTypeIdx:r,tokenType:n}},e.prototype.createFullToken=function(e,t,r,n,s,i,o){return{image:e,startOffset:t,endOffset:t+o-1,startLine:s,endLine:s,startColumn:i,endColumn:i+o-1,tokenTypeIdx:r,tokenType:n}},e.prototype.addToken=function(e,t,r){return 666},e.prototype.addTokenUsingPush=function(e,t,r){return e.push(r),t},e.prototype.addTokenUsingMemberAccess=function(e,t,r){return e[t]=r,++t},e.prototype.handlePayload=function(e,t){},e.prototype.handlePayloadNoCustom=function(e,t){},e.prototype.handlePayloadWithCustom=function(e,t){null!==t&&(e.payload=t)},e.prototype.match=function(e,t,r){return null},e.prototype.matchWithTest=function(e,t,r){return!0===e.test(t)?t.substring(r,e.lastIndex):null},e.prototype.matchWithExec=function(e,t){var r=e.exec(t);return null!==r?r[0]:r},e.prototype.TRACE_INIT=function(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;var r=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+"--\x3e <"+e+">");var n=(0,s.O1)(t),i=n.time,o=n.value,a=i>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(r+"<-- <"+e+"> time: "+i+"ms"),this.traceInitIndent--,o}return t()},e.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",e.NA=/NOT_APPLICABLE/,e}();function ee(e){return re(e)?e.LABEL:e.name}function te(e){return e.name}function re(e){return(0,s.Kg)(e.LABEL)&&""!==e.LABEL}var ne="parent",se="categories",ie="label",oe="group",ae="push_mode",le="pop_mode",he="longer_alt",ue="line_breaks",ce="start_chars_hint";function de(e){return function(e){var t=e.pattern,r={};r.name=e.name,(0,s.b0)(t)||(r.PATTERN=t);if((0,s.zy)(e,ne))throw"The parent property is no longer supported.\nSee: https://github.com/SAP/chevrotain/issues/564#issuecomment-349062346 for details.";(0,s.zy)(e,se)&&(r.CATEGORIES=e[se]);j([r]),(0,s.zy)(e,ie)&&(r.LABEL=e[ie]);(0,s.zy)(e,oe)&&(r.GROUP=e[oe]);(0,s.zy)(e,le)&&(r.POP_MODE=e[le]);(0,s.zy)(e,ae)&&(r.PUSH_MODE=e[ae]);(0,s.zy)(e,he)&&(r.LONGER_ALT=e[he]);(0,s.zy)(e,ue)&&(r.LINE_BREAKS=e[ue]);(0,s.zy)(e,ce)&&(r.START_CHARS_HINT=e[ce]);return r}(e)}var pe=de({name:"EOF",pattern:J.NA});function ge(e,t,r,n,s,i,o,a){return{image:t,startOffset:r,endOffset:n,startLine:s,endLine:i,startColumn:o,endColumn:a,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function fe(e,t){return B(e,t)}j([pe]);var me=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ye=function(){function e(e){this.definition=e}return e.prototype.accept=function(e){e.visit(this),(0,s.jJ)(this.definition,(function(t){t.accept(e)}))},e}(),Ee=function(e){function t(t){var r=e.call(this,[])||this;return r.idx=1,(0,s.kp)(r,(0,s.Up)(t,(function(e){return void 0!==e}))),r}return me(t,e),Object.defineProperty(t.prototype,"definition",{get:function(){return void 0!==this.referencedRule?this.referencedRule.definition:[]},set:function(e){},enumerable:!0,configurable:!0}),t.prototype.accept=function(e){e.visit(this)},t}(ye),we=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.orgText="",(0,s.kp)(r,(0,s.Up)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(ye),Ce=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.ignoreAmbiguities=!1,(0,s.kp)(r,(0,s.Up)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(ye),ve=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,s.kp)(r,(0,s.Up)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(ye),Re=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,s.kp)(r,(0,s.Up)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(ye),Se=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,s.kp)(r,(0,s.Up)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(ye),Te=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,s.kp)(r,(0,s.Up)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(ye),Ne=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,s.kp)(r,(0,s.Up)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(ye),Me=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,r.ignoreAmbiguities=!1,r.hasPredicates=!1,(0,s.kp)(r,(0,s.Up)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(ye),_e=function(){function e(e){this.idx=1,(0,s.kp)(this,(0,s.Up)(e,(function(e){return void 0!==e})))}return e.prototype.accept=function(e){e.visit(this)},e}();function be(e){return(0,s.Tj)(e,Ae)}function Ae(e){function t(e){return(0,s.Tj)(e,Ae)}if(e instanceof Ee)return{type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};if(e instanceof Ce)return{type:"Flat",definition:t(e.definition)};if(e instanceof ve)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Re)return{type:"RepetitionMandatory",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof Se)return{type:"RepetitionMandatoryWithSeparator",name:e.name,idx:e.idx,separator:Ae(new _e({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Ne)return{type:"RepetitionWithSeparator",name:e.name,idx:e.idx,separator:Ae(new _e({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Te)return{type:"Repetition",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof Me)return{type:"Alternation",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof _e){var r={type:"Terminal",name:e.terminalType.name,label:ee(e.terminalType),idx:e.idx},n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=(0,s.gd)(n)?n.source:n),r}if(e instanceof we)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}var Oe=function(){function e(){}return e.prototype.walk=function(e,t){var r=this;void 0===t&&(t=[]),(0,s.jJ)(e.definition,(function(n,i){var o=(0,s.gv)(e.definition,i+1);if(n instanceof Ee)r.walkProdRef(n,o,t);else if(n instanceof _e)r.walkTerminal(n,o,t);else if(n instanceof Ce)r.walkFlat(n,o,t);else if(n instanceof ve)r.walkOption(n,o,t);else if(n instanceof Re)r.walkAtLeastOne(n,o,t);else if(n instanceof Se)r.walkAtLeastOneSep(n,o,t);else if(n instanceof Ne)r.walkManySep(n,o,t);else if(n instanceof Te)r.walkMany(n,o,t);else{if(!(n instanceof Me))throw Error("non exhaustive match");r.walkOr(n,o,t)}}))},e.prototype.walkTerminal=function(e,t,r){},e.prototype.walkProdRef=function(e,t,r){},e.prototype.walkFlat=function(e,t,r){var n=t.concat(r);this.walk(e,n)},e.prototype.walkOption=function(e,t,r){var n=t.concat(r);this.walk(e,n)},e.prototype.walkAtLeastOne=function(e,t,r){var n=[new ve({definition:e.definition})].concat(t,r);this.walk(e,n)},e.prototype.walkAtLeastOneSep=function(e,t,r){var n=Ie(e,t,r);this.walk(e,n)},e.prototype.walkMany=function(e,t,r){var n=[new ve({definition:e.definition})].concat(t,r);this.walk(e,n)},e.prototype.walkManySep=function(e,t,r){var n=Ie(e,t,r);this.walk(e,n)},e.prototype.walkOr=function(e,t,r){var n=this,i=t.concat(r);(0,s.jJ)(e.definition,(function(e){var t=new Ce({definition:[e]});n.walk(t,i)}))},e}();function Ie(e,t,r){return[new ve({definition:[new _e({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}var xe=function(){function e(){}return e.prototype.visit=function(e){var t=e;switch(t.constructor){case Ee:return this.visitNonTerminal(t);case Ce:return this.visitFlat(t);case ve:return this.visitOption(t);case Re:return this.visitRepetitionMandatory(t);case Se:return this.visitRepetitionMandatoryWithSeparator(t);case Ne:return this.visitRepetitionWithSeparator(t);case Te:return this.visitRepetition(t);case Me:return this.visitAlternation(t);case _e:return this.visitTerminal(t);case we:return this.visitRule(t);default:throw Error("non exhaustive match")}},e.prototype.visitNonTerminal=function(e){},e.prototype.visitFlat=function(e){},e.prototype.visitOption=function(e){},e.prototype.visitRepetition=function(e){},e.prototype.visitRepetitionMandatory=function(e){},e.prototype.visitRepetitionMandatoryWithSeparator=function(e){},e.prototype.visitRepetitionWithSeparator=function(e){},e.prototype.visitAlternation=function(e){},e.prototype.visitTerminal=function(e){},e.prototype.visitRule=function(e){},e}(),Pe=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Le(e,t){return void 0===t&&(t=[]),!!(e instanceof ve||e instanceof Te||e instanceof Ne)||(e instanceof Me?(0,s.zN)(e.definition,(function(e){return Le(e,t)})):!(e instanceof Ee&&(0,s.gR)(t,e))&&(e instanceof ye&&(e instanceof Ee&&t.push(e),(0,s.Si)(e.definition,(function(e){return Le(e,t)})))))}function De(e){if(e instanceof Ee)return"SUBRULE";if(e instanceof ve)return"OPTION";if(e instanceof Me)return"OR";if(e instanceof Re)return"AT_LEAST_ONE";if(e instanceof Se)return"AT_LEAST_ONE_SEP";if(e instanceof Ne)return"MANY_SEP";if(e instanceof Te)return"MANY";if(e instanceof _e)return"CONSUME";throw Error("non exhaustive match")}var ke=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.separator="-",t.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},t}return Pe(t,e),t.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},t.prototype.visitTerminal=function(e){var t=e.terminalType.name+this.separator+"Terminal";(0,s.zy)(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},t.prototype.visitNonTerminal=function(e){var t=e.nonTerminalName+this.separator+"Terminal";(0,s.zy)(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},t.prototype.visitOption=function(e){this.dslMethods.option.push(e)},t.prototype.visitRepetitionWithSeparator=function(e){this.dslMethods.repetitionWithSeparator.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.dslMethods.repetitionMandatory.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)},t.prototype.visitRepetition=function(e){this.dslMethods.repetition.push(e)},t.prototype.visitAlternation=function(e){this.dslMethods.alternation.push(e)},t}(xe),He=new ke;function Fe(e){if(e instanceof Ee)return Fe(e.referencedRule);if(e instanceof _e)return[e.terminalType];if(function(e){return e instanceof Ce||e instanceof ve||e instanceof Te||e instanceof Re||e instanceof Se||e instanceof Ne||e instanceof _e||e instanceof we}(e))return function(e){var t,r=[],n=e.definition,i=0,o=n.length>i,a=!0;for(;o&&a;)a=Le(t=n[i]),r=r.concat(Fe(t)),i+=1,o=n.length>i;return(0,s.sb)(r)}(e);if(function(e){return e instanceof Me}(e))return function(e){var t=(0,s.Tj)(e.definition,(function(e){return Fe(e)}));return(0,s.sb)((0,s.Bq)(t))}(e);throw Error("non exhaustive match")}var Ue="_~IN~_",Ve=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Be=function(e){function t(t){var r=e.call(this)||this;return r.topProd=t,r.follows={},r}return Ve(t,e),t.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},t.prototype.walkTerminal=function(e,t,r){},t.prototype.walkProdRef=function(e,t,r){var n,s,i=(n=e.referencedRule,s=e.idx,n.name+s+Ue+this.topProd.name),o=t.concat(r),a=Fe(new Ce({definition:o}));this.follows[i]=a},t}(Oe);var We=256,Ye=512,Ge=768,je=1024,ze=1280,$e=1536;function Ke(e,t,r){return r|t|e}function Xe(e,t,r,n){var s=n+1<<24;return Ke(e,t,r)|s}var qe=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Qe(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset)}function Ze(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function Je(e,t,r){void 0===e.children[t]?e.children[t]=[r]:e.children[t].push(r)}var et=function(e){function t(t){var r=e.call(this)||this;return r.result=[],r.ruleIdx=t,r}return qe(t,e),t.prototype.collectNamedDSLMethod=function(e,t,r){if(!(0,s.b0)(e.name)){var n=void 0;if(e instanceof ve||e instanceof Te||e instanceof Re||e instanceof Me)n=new t({definition:e.definition,idx:e.idx});else{if(!(e instanceof Se||e instanceof Ne))throw Error("non exhaustive match");n=new t({definition:e.definition,idx:e.idx,separator:e.separator})}var i=[n],o=Ke(this.ruleIdx,r,e.idx);this.result.push({def:i,key:o,name:e.name,orgProd:e})}},t.prototype.visitOption=function(e){this.collectNamedDSLMethod(e,ve,Ye)},t.prototype.visitRepetition=function(e){this.collectNamedDSLMethod(e,Te,Ge)},t.prototype.visitRepetitionMandatory=function(e){this.collectNamedDSLMethod(e,Re,je)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.collectNamedDSLMethod(e,Se,$e)},t.prototype.visitRepetitionWithSeparator=function(e){this.collectNamedDSLMethod(e,Ne,ze)},t.prototype.visitAlternation=function(e){var t=this;this.collectNamedDSLMethod(e,Me,We);var r=e.definition.length>1;(0,s.jJ)(e.definition,(function(n,i){if(!(0,s.b0)(n.name)){var o=n.definition;o=r?[new ve({definition:n.definition})]:n.definition;var a=Xe(t.ruleIdx,We,e.idx,i);t.result.push({def:o,key:a,name:n.name,orgProd:n})}}))},t}(xe);var tt=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),rt=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.path=r,n.nextTerminalName="",n.nextTerminalOccurrence=0,n.nextTerminalName=n.path.lastTok.name,n.nextTerminalOccurrence=n.path.lastTokOccurrence,n}return tt(t,e),t.prototype.walkTerminal=function(e,t,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){var n=t.concat(r),s=new Ce({definition:n});this.possibleTokTypes=Fe(s),this.found=!0}},t}(function(e){function t(t,r){var n=e.call(this)||this;return n.topProd=t,n.path=r,n.possibleTokTypes=[],n.nextProductionName="",n.nextProductionOccurrence=0,n.found=!1,n.isAtEndOfPath=!1,n}return tt(t,e),t.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=(0,s.T9)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,s.T9)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},t.prototype.walk=function(t,r){void 0===r&&(r=[]),this.found||e.prototype.walk.call(this,t,r)},t.prototype.walkProdRef=function(e,t,r){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){var n=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,n)}},t.prototype.updateExpectedNext=function(){(0,s.Im)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},t}(Oe)),nt=function(e){function t(t,r){var n=e.call(this)||this;return n.topRule=t,n.occurrence=r,n.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},n}return tt(t,e),t.prototype.startWalking=function(){return this.walk(this.topRule),this.result},t}(Oe),st=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tt(t,e),t.prototype.walkMany=function(t,r,n){if(t.idx===this.occurrence){var i=(0,s.$1)(r.concat(n));this.result.isEndOfRule=void 0===i,i instanceof _e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else e.prototype.walkMany.call(this,t,r,n)},t}(nt),it=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tt(t,e),t.prototype.walkManySep=function(t,r,n){if(t.idx===this.occurrence){var i=(0,s.$1)(r.concat(n));this.result.isEndOfRule=void 0===i,i instanceof _e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else e.prototype.walkManySep.call(this,t,r,n)},t}(nt),ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tt(t,e),t.prototype.walkAtLeastOne=function(t,r,n){if(t.idx===this.occurrence){var i=(0,s.$1)(r.concat(n));this.result.isEndOfRule=void 0===i,i instanceof _e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else e.prototype.walkAtLeastOne.call(this,t,r,n)},t}(nt),at=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tt(t,e),t.prototype.walkAtLeastOneSep=function(t,r,n){if(t.idx===this.occurrence){var i=(0,s.$1)(r.concat(n));this.result.isEndOfRule=void 0===i,i instanceof _e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else e.prototype.walkAtLeastOneSep.call(this,t,r,n)},t}(nt);function lt(e,t,r){void 0===r&&(r=[]),r=(0,s.T9)(r);var n=[],i=0;function o(o){var a=lt(o.concat((0,s.gv)(e,i+1)),t,r);return n.concat(a)}for(;r.length<t&&i<e.length;){var a=e[i];if(a instanceof Ce)return o(a.definition);if(a instanceof Ee)return o(a.definition);if(a instanceof ve)n=o(a.definition);else{if(a instanceof Re)return o(l=a.definition.concat([new Te({definition:a.definition})]));if(a instanceof Se)return o(l=[new Ce({definition:a.definition}),new Te({definition:[new _e({terminalType:a.separator})].concat(a.definition)})]);if(a instanceof Ne){var l=a.definition.concat([new Te({definition:[new _e({terminalType:a.separator})].concat(a.definition)})]);n=o(l)}else if(a instanceof Te){l=a.definition.concat([new Te({definition:a.definition})]);n=o(l)}else{if(a instanceof Me)return(0,s.jJ)(a.definition,(function(e){n=o(e.definition)})),n;if(!(a instanceof _e))throw Error("non exhaustive match");r.push(a.terminalType)}}i++}return n.push({partialPath:r,suffixDef:(0,s.gv)(e,i)}),n}function ht(e,t,r,n){var i="EXIT_NONE_TERMINAL",o=[i],a="EXIT_ALTERNATIVE",l=!1,h=t.length,u=h-n-1,c=[],d=[];for(d.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!(0,s.Im)(d);){var p=d.pop();if(p!==a){var g=p.def,f=p.idx,m=p.ruleStack,y=p.occurrenceStack;if(!(0,s.Im)(g)){var E=g[0];if(E===i){var w={idx:f,def:(0,s.gv)(g),ruleStack:(0,s.gc)(m),occurrenceStack:(0,s.gc)(y)};d.push(w)}else if(E instanceof _e)if(f<h-1){var C=f+1;if(r(t[C],E.terminalType)){w={idx:C,def:(0,s.gv)(g),ruleStack:m,occurrenceStack:y};d.push(w)}}else{if(f!==h-1)throw Error("non exhaustive match");c.push({nextTokenType:E.terminalType,nextTokenOccurrence:E.idx,ruleStack:m,occurrenceStack:y}),l=!0}else if(E instanceof Ee){var v=(0,s.T9)(m);v.push(E.nonTerminalName);var R=(0,s.T9)(y);R.push(E.idx);w={idx:f,def:E.definition.concat(o,(0,s.gv)(g)),ruleStack:v,occurrenceStack:R};d.push(w)}else if(E instanceof ve){var S={idx:f,def:(0,s.gv)(g),ruleStack:m,occurrenceStack:y};d.push(S),d.push(a);var T={idx:f,def:E.definition.concat((0,s.gv)(g)),ruleStack:m,occurrenceStack:y};d.push(T)}else if(E instanceof Re){var N=new Te({definition:E.definition,idx:E.idx});w={idx:f,def:E.definition.concat([N],(0,s.gv)(g)),ruleStack:m,occurrenceStack:y};d.push(w)}else if(E instanceof Se){var M=new _e({terminalType:E.separator});N=new Te({definition:[M].concat(E.definition),idx:E.idx}),w={idx:f,def:E.definition.concat([N],(0,s.gv)(g)),ruleStack:m,occurrenceStack:y};d.push(w)}else if(E instanceof Ne){S={idx:f,def:(0,s.gv)(g),ruleStack:m,occurrenceStack:y};d.push(S),d.push(a);M=new _e({terminalType:E.separator});var _=new Te({definition:[M].concat(E.definition),idx:E.idx});T={idx:f,def:E.definition.concat([_],(0,s.gv)(g)),ruleStack:m,occurrenceStack:y};d.push(T)}else if(E instanceof Te){S={idx:f,def:(0,s.gv)(g),ruleStack:m,occurrenceStack:y};d.push(S),d.push(a);_=new Te({definition:E.definition,idx:E.idx}),T={idx:f,def:E.definition.concat([_],(0,s.gv)(g)),ruleStack:m,occurrenceStack:y};d.push(T)}else if(E instanceof Me)for(var b=E.definition.length-1;b>=0;b--){var A={idx:f,def:E.definition[b].definition.concat((0,s.gv)(g)),ruleStack:m,occurrenceStack:y};d.push(A),d.push(a)}else if(E instanceof Ce)d.push({idx:f,def:E.definition.concat((0,s.gv)(g)),ruleStack:m,occurrenceStack:y});else{if(!(E instanceof we))throw Error("non exhaustive match");d.push(ut(E,f,m,y))}}}else l&&(0,s.HV)(d).idx<=u&&d.pop()}return c}function ut(e,t,r,n){var i=(0,s.T9)(r);i.push(e.name);var o=(0,s.T9)(n);return o.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:o}}var ct,dt=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"}(ct||(ct={}));var pt=function(e){function t(t,r,n){var s=e.call(this)||this;return s.topProd=t,s.targetOccurrence=r,s.targetProdType=n,s}return dt(t,e),t.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},t.prototype.checkIsTarget=function(e,t,r,n){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=r.concat(n),!0)},t.prototype.walkOption=function(t,r,n){this.checkIsTarget(t,ct.OPTION,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkAtLeastOne=function(t,r,n){this.checkIsTarget(t,ct.REPETITION_MANDATORY,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkAtLeastOneSep=function(t,r,n){this.checkIsTarget(t,ct.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkMany=function(t,r,n){this.checkIsTarget(t,ct.REPETITION,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkManySep=function(t,r,n){this.checkIsTarget(t,ct.REPETITION_WITH_SEPARATOR,r,n)||e.prototype.walkOption.call(this,t,r,n)},t}(Oe),gt=function(e){function t(t,r,n){var s=e.call(this)||this;return s.targetOccurrence=t,s.targetProdType=r,s.targetRef=n,s.result=[],s}return dt(t,e),t.prototype.checkIsTarget=function(e,t){e.idx!==this.targetOccurrence||this.targetProdType!==t||void 0!==this.targetRef&&e!==this.targetRef||(this.result=e.definition)},t.prototype.visitOption=function(e){this.checkIsTarget(e,ct.OPTION)},t.prototype.visitRepetition=function(e){this.checkIsTarget(e,ct.REPETITION)},t.prototype.visitRepetitionMandatory=function(e){this.checkIsTarget(e,ct.REPETITION_MANDATORY)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.checkIsTarget(e,ct.REPETITION_MANDATORY_WITH_SEPARATOR)},t.prototype.visitRepetitionWithSeparator=function(e){this.checkIsTarget(e,ct.REPETITION_WITH_SEPARATOR)},t.prototype.visitAlternation=function(e){this.checkIsTarget(e,ct.ALTERNATION)},t}(xe);function ft(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=[];return t}function mt(e){for(var t=[""],r=0;r<e.length;r++){for(var n=e[r],s=[],i=0;i<t.length;i++){var o=t[i];s.push(o+"_"+n.tokenTypeIdx);for(var a=0;a<n.categoryMatches.length;a++){var l="_"+n.categoryMatches[a];s.push(o+l)}}t=s}return t}function yt(e,t,r){for(var n=0;n<e.length;n++)if(n!==r)for(var s=e[n],i=0;i<t.length;i++){if(!0===s[t[i]])return!1}return!0}function Et(e,t){for(var r=(0,s.Tj)(e,(function(e){return lt([e],1)})),n=ft(r.length),i=(0,s.Tj)(r,(function(e){var t={};return(0,s.jJ)(e,(function(e){var r=mt(e.partialPath);(0,s.jJ)(r,(function(e){t[e]=!0}))})),t})),o=r,a=1;a<=t;a++){var l=o;o=ft(l.length);for(var h=function(e){for(var r=l[e],h=0;h<r.length;h++){var u=r[h].partialPath,c=r[h].suffixDef,d=mt(u);if(yt(i,d,e)||(0,s.Im)(c)||u.length===t){var p=n[e];if(!1===vt(p,u)){p.push(u);for(var g=0;g<d.length;g++){var f=d[g];i[e][f]=!0}}}else{var m=lt(c,a+1,u);o[e]=o[e].concat(m),(0,s.jJ)(m,(function(t){var r=mt(t.partialPath);(0,s.jJ)(r,(function(t){i[e][t]=!0}))}))}}},u=0;u<l.length;u++)h(u)}return n}function wt(e,t,r,n){var s=new gt(e,ct.ALTERNATION,n);return t.accept(s),Et(s.result,r)}function Ct(e,t,r,n){var s=new gt(e,r);t.accept(s);var i=s.result,o=new pt(t,e,r).startWalking();return Et([new Ce({definition:i}),new Ce({definition:o})],n)}function vt(e,t){e:for(var r=0;r<e.length;r++){var n=e[r];if(n.length===t.length){for(var s=0;s<n.length;s++){var i=t[s],o=n[s];if(!1===(i===o||void 0!==o.categoryMatchesMap[i.tokenTypeIdx]))continue e}return!0}}return!1}function Rt(e){return(0,s.Si)(e,(function(e){return(0,s.Si)(e,(function(e){return(0,s.Si)(e,(function(e){return(0,s.Im)(e.categoryMatches)}))}))}))}var St=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Tt(e,t,r,n,i,o){var a=s.Tj(e,(function(e){return function(e,t){var r=new _t;e.accept(r);var n=r.allProductions,i=s.$z(n,Nt),o=s.Up(i,(function(e){return e.length>1})),a=s.Tj(s.zu(o),(function(r){var n=s.$1(r),i=t.buildDuplicateFoundError(e,r),o=De(n),a={message:i,type:xr.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:o,occurrence:n.idx},l=Mt(n);return l&&(a.parameter=l),a}));return a}(e,i)})),l=s.Tj(e,(function(e){return Ot(e,e,i)})),h=[],u=[],c=[];(0,s.Si)(l,s.Im)&&(h=(0,s.Tj)(e,(function(e){return function(e,t){var r=new xt;e.accept(r);var n=r.alternations,i=s.TS(n,(function(r,n){var i=s.gc(n.definition),o=s.Tj(i,(function(r,i){var o=ht([r],[],null,1);return s.Im(o)?{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:i}),type:xr.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:i+1}:null}));return r.concat(s.oE(o))}),[]);return i}(e,i)})),u=(0,s.Tj)(e,(function(e){return function(e,t,r,n){var i=new xt;e.accept(i);var o=i.alternations,a=r[e.name];a&&(o=(0,s.ku)(o,(function(e){return a[De(e)+(0===e.idx?"":e.idx)]})));o=(0,s.ku)(o,(function(e){return!0===e.ignoreAmbiguities}));var l=s.TS(o,(function(r,i){var o=i.idx,a=i.maxLookahead||t,l=wt(o,e,a,i),h=function(e,t,r,n){var i=[],o=(0,s.TS)(e,(function(r,n,o){return!0===t.definition[o].ignoreAmbiguities||(0,s.jJ)(n,(function(n){var a=[o];(0,s.jJ)(e,(function(e,r){o!==r&&vt(e,n)&&!0!==t.definition[r].ignoreAmbiguities&&a.push(r)})),a.length>1&&!vt(i,n)&&(i.push(n),r.push({alts:a,path:n}))})),r}),[]),a=s.Tj(o,(function(e){var i=(0,s.Tj)(e.alts,(function(e){return e+1}));return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:xr.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:[e.alts]}}));return a}(l,i,e,n),u=function(e,t,r,n){var i=[],o=(0,s.TS)(e,(function(e,t,r){var n=(0,s.Tj)(t,(function(e){return{idx:r,path:e}}));return e.concat(n)}),[]);return(0,s.jJ)(o,(function(e){if(!0!==t.definition[e.idx].ignoreAmbiguities){var a=e.idx,l=e.path,h=(0,s.JW)(o,(function(e){return!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx<a&&(r=e.path,n=l,r.length<n.length&&(0,s.Si)(r,(function(e,t){var r=n[t];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]})));var r,n})),u=(0,s.Tj)(h,(function(e){var s=[e.idx+1,a+1],i=0===t.idx?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:s,prefixPath:e.path}),type:xr.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:i,alternatives:s}}));i=i.concat(u)}})),i}(l,i,e,n);return r.concat(h,u)}),[]);return l}(e,t,n,i)})),c=function(e,t,r){var n=[];return(0,s.jJ)(e,(function(e){var i=new Pt;e.accept(i);var o=i.allProductions;(0,s.jJ)(o,(function(i){var o=function(e){if(e instanceof ve)return ct.OPTION;if(e instanceof Te)return ct.REPETITION;if(e instanceof Re)return ct.REPETITION_MANDATORY;if(e instanceof Se)return ct.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof Ne)return ct.REPETITION_WITH_SEPARATOR;if(e instanceof Me)return ct.ALTERNATION;throw Error("non exhaustive match")}(i),a=i.maxLookahead||t,l=Ct(i.idx,e,o,a)[0];if((0,s.Im)((0,s.Bq)(l))){var h=r.buildEmptyRepetitionError({topLevelRule:e,repetition:i});n.push({message:h,type:xr.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}}))})),n}(e,t,i));var d=function(e,t,r){var n=[],i=(0,s.Tj)(t,(function(e){return e.name}));return(0,s.jJ)(e,(function(e){var t=e.name;if((0,s.gR)(i,t)){var o=r.buildNamespaceConflictError(e);n.push({message:o,type:xr.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}})),n}(e,r,i),p=s.Tj(r,(function(e){return function(e,t){var r=[];e.name.match(bt)||r.push({message:t.buildTokenNameError({tokenType:e,expectedPattern:bt}),type:xr.INVALID_TOKEN_NAME});return r}(e,i)})),g=function(e,t){var r=[];return(0,s.jJ)(e,(function(e){var n=new et("");e.accept(n);var i=(0,s.Tj)(n.result,(function(e){return e.orgProd}));r.push((0,s.Tj)(i,(function(r){return function(e,t,r){var n,s=[];t.name.match(At)||(n=r.buildInvalidNestedRuleNameError(e,t),s.push({message:n,type:xr.INVALID_NESTED_RULE_NAME,ruleName:e.name}));return s}(e,r,t)})))})),(0,s.Bq)(r)}(e,i),f=function(e,t){var r=[];return(0,s.jJ)(e,(function(e){var n=new et("");e.accept(n);var i=(0,s.$z)(n.result,(function(e){return e.name})),o=(0,s.Up)(i,(function(e){return e.length>1}));(0,s.jJ)((0,s.zu)(o),(function(n){var i=(0,s.Tj)(n,(function(e){return e.orgProd})),o=t.buildDuplicateNestedRuleNameError(e,i);r.push({message:o,type:xr.DUPLICATE_NESTED_NAME,ruleName:e.name})}))})),r}(e,i),m=(0,s.Tj)(e,(function(e){return function(e,t){var r=new xt;e.accept(r);var n=r.alternations,i=s.TS(n,(function(r,n){return n.definition.length>255&&r.push({message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:xr.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}),r}),[]);return i}(e,i)})),y=(0,s.Tj)(e,(function(e){return function(e,t){var r=[],n=e.name;n.match(bt)||r.push({message:t.buildInvalidRuleNameError({topLevelRule:e,expectedPattern:bt}),type:xr.INVALID_RULE_NAME,ruleName:n});return r}(e,i)})),E=(0,s.Tj)(e,(function(t){return function(e,t,r,n){var i=[],o=(0,s.TS)(t,(function(t,r){return r.name===e.name?t+1:t}),0);if(o>1){var a=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});i.push({message:a,type:xr.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}(t,e,o,i)}));return s.Bq(a.concat(p,g,f,c,l,h,u,d,m,y,E))}function Nt(e){return De(e)+"_#_"+e.idx+"_#_"+Mt(e)}function Mt(e){return e instanceof _e?e.terminalType.name:e instanceof Ee?e.nonTerminalName:""}var _t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return St(t,e),t.prototype.visitNonTerminal=function(e){this.allProductions.push(e)},t.prototype.visitOption=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetition=function(e){this.allProductions.push(e)},t.prototype.visitAlternation=function(e){this.allProductions.push(e)},t.prototype.visitTerminal=function(e){this.allProductions.push(e)},t}(xe),bt=/^[a-zA-Z_]\w*$/,At=new RegExp(bt.source.replace("^","^\\$"));function Ot(e,t,r,n){void 0===n&&(n=[]);var i=[],o=It(t.definition);if(s.Im(o))return[];var a=e.name;s.gR(o,e)&&i.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:xr.LEFT_RECURSION,ruleName:a});var l=s.iv(o,n.concat([e])),h=s.Tj(l,(function(t){var i=s.T9(n);return i.push(t),Ot(e,t,r,i)}));return i.concat(s.Bq(h))}function It(e){var t=[];if(s.Im(e))return t;var r=s.$1(e);if(r instanceof Ee)t.push(r.referencedRule);else if(r instanceof Ce||r instanceof ve||r instanceof Re||r instanceof Se||r instanceof Ne||r instanceof Te)t=t.concat(It(r.definition));else if(r instanceof Me)t=s.Bq(s.Tj(r.definition,(function(e){return It(e.definition)})));else if(!(r instanceof _e))throw Error("non exhaustive match");var n=Le(r),i=e.length>1;if(n&&i){var o=s.gv(e);return t.concat(It(o))}return t}var xt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.alternations=[],t}return St(t,e),t.prototype.visitAlternation=function(e){this.alternations.push(e)},t}(xe);var Pt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return St(t,e),t.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetition=function(e){this.allProductions.push(e)},t}(xe);var Lt={buildMismatchTokenMessage:function(e){var t=e.expected,r=e.actual;e.previous,e.ruleName;return"Expecting "+(re(t)?"--\x3e "+ee(t)+" <--":"token of type --\x3e "+t.name+" <--")+" but found --\x3e '"+r.image+"' <--"},buildNotAllInputParsedMessage:function(e){var t=e.firstRedundant;e.ruleName;return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage:function(e){var t=e.expectedPathsPerAlt,r=e.actual,n=(e.previous,e.customUserDescription),i=(e.ruleName,"Expecting: "),o="\nbut found: '"+(0,s.$1)(r).image+"'";if(n)return i+n+o;var a=(0,s.TS)(t,(function(e,t){return e.concat(t)}),[]),l=(0,s.Tj)(a,(function(e){return"["+(0,s.Tj)(e,(function(e){return ee(e)})).join(", ")+"]"}));return i+("one of these possible Token sequences:\n"+(0,s.Tj)(l,(function(e,t){return" "+(t+1)+". "+e})).join("\n"))+o},buildEarlyExitMessage:function(e){var t=e.expectedIterationPaths,r=e.actual,n=e.customUserDescription,i=(e.ruleName,"Expecting: "),o="\nbut found: '"+(0,s.$1)(r).image+"'";return n?i+n+o:i+("expecting at least one iteration which starts with one of these possible Token sequences::\n <"+(0,s.Tj)(t,(function(e){return"["+(0,s.Tj)(e,(function(e){return ee(e)})).join(",")+"]"})).join(" ,")+">")+o}};Object.freeze(Lt);var Dt={buildRuleNotFoundError:function(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"}},kt={buildDuplicateFoundError:function(e,t){var r,n=e.name,i=(0,s.$1)(t),o=i.idx,a=De(i),l=(r=i)instanceof _e?r.terminalType.name:r instanceof Ee?r.nonTerminalName:"",h="->"+a+(o>0?o:"")+"<- "+(l?"with argument: ->"+l+"<-":"")+"\n appears more than once ("+t.length+" times) in the top level rule: ->"+n+"<-. \n For further details see: https://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES \n ";return h=(h=h.replace(/[ \t]+/g," ")).replace(/\s\s+/g,"\n")},buildInvalidNestedRuleNameError:function(e,t){return"Invalid nested rule name: ->"+t.name+"<- inside rule: ->"+e.name+"<-\nit must match the pattern: ->"+At.toString()+"<-.\nNote that this means a nested rule name must start with the '$'(dollar) sign."},buildDuplicateNestedRuleNameError:function(e,t){return"Duplicate nested rule name: ->"+(0,s.$1)(t).name+"<- inside rule: ->"+e.name+"<-\nA nested name must be unique in the scope of a top level grammar rule."},buildNamespaceConflictError:function(e){return"Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+e.name+">.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter."},buildAlternationPrefixAmbiguityError:function(e){var t=(0,s.Tj)(e.prefixPath,(function(e){return ee(e)})).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;return"Ambiguous alternatives: <"+e.ambiguityIndices.join(" ,")+"> due to common lookahead prefix\nin <OR"+r+"> inside <"+e.topLevelRule.name+"> Rule,\n<"+t+"> may appears as a prefix path in all these alternatives.\nSee: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details."},buildAlternationAmbiguityError:function(e){var t=(0,s.Tj)(e.prefixPath,(function(e){return ee(e)})).join(", "),r=0===e.alternation.idx?"":e.alternation.idx,n="Ambiguous Alternatives Detected: <"+e.ambiguityIndices.join(" ,")+"> in <OR"+r+"> inside <"+e.topLevelRule.name+"> Rule,\n<"+t+"> may appears as a prefix path in all these alternatives.\n";return n+="See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details."},buildEmptyRepetitionError:function(e){var t=De(e.repetition);return 0!==e.repetition.idx&&(t+=e.repetition.idx),"The repetition <"+t+"> within Rule <"+e.topLevelRule.name+"> can never consume any tokens.\nThis could lead to an infinite loop."},buildTokenNameError:function(e){return"Invalid Grammar Token name: ->"+e.tokenType.name+"<- it must match the pattern: ->"+e.expectedPattern.toString()+"<-"},buildEmptyAlternationError:function(e){return"Ambiguous empty alternative: <"+(e.emptyChoiceIdx+1)+"> in <OR"+e.alternation.idx+"> inside <"+e.topLevelRule.name+"> Rule.\nOnly the last alternative may be an empty alternative."},buildTooManyAlternativesError:function(e){return"An Alternation cannot have more than 256 alternatives:\n<OR"+e.alternation.idx+"> inside <"+e.topLevelRule.name+"> Rule.\n has "+(e.alternation.definition.length+1)+" alternatives."},buildLeftRecursionError:function(e){var t=e.topLevelRule.name;return"Left Recursion found in grammar.\nrule: <"+t+"> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n "+(t+" --\x3e "+s.Tj(e.leftRecursionPath,(function(e){return e.name})).concat([t]).join(" --\x3e "))+"\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring."},buildInvalidRuleNameError:function(e){return"Invalid grammar rule name: ->"+e.topLevelRule.name+"<- it must match the pattern: ->"+e.expectedPattern.toString()+"<-"},buildDuplicateRuleNameError:function(e){return"Duplicate definition, rule: ->"+(e.topLevelRule instanceof we?e.topLevelRule.name:e.topLevelRule)+"<- is already defined in the grammar: ->"+e.grammarName+"<-"}},Ht=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();var Ft=function(e){function t(t,r){var n=e.call(this)||this;return n.nameToTopRule=t,n.errMsgProvider=r,n.errors=[],n}return Ht(t,e),t.prototype.resolveRefs=function(){var e=this;(0,s.jJ)((0,s.zu)(this.nameToTopRule),(function(t){e.currTopLevel=t,t.accept(e)}))},t.prototype.visitNonTerminal=function(e){var t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{var r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:xr.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}},t}(xe);function Ut(e){e=(0,s.NT)(e,{errMsgProvider:Dt});var t,r,n,i={};return(0,s.jJ)(e.rules,(function(e){i[e.name]=e})),t=i,r=e.errMsgProvider,(n=new Ft(t,r)).resolveRefs(),n.errors}function Vt(e){return Tt((e=(0,s.NT)(e,{errMsgProvider:kt,ignoredIssues:{}})).rules,e.maxLookahead,e.tokenTypes,e.ignoredIssues,e.errMsgProvider,e.grammarName)}function Bt(e){(0,s.jJ)(e.rules,(function(e){var t=new ke;e.accept(t),(0,s.jJ)(t.dslMethods,(function(e){(0,s.jJ)(e,(function(e,t){e.idx=t+1}))}))}))}var Wt="MismatchedTokenException",Yt="NoViableAltException",Gt="EarlyExitException",jt="NotAllInputParsedException",zt=[Wt,Yt,Gt,jt];function $t(e){return(0,s.gR)(zt,e.name)}function Kt(e,t,r){this.name=Wt,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}function Xt(e,t,r){this.name=Yt,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}function qt(e,t){this.name=jt,this.message=e,this.token=t,this.resyncedTokens=[]}function Qt(e,t,r){this.name=Gt,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}Object.freeze(zt),Kt.prototype=Error.prototype,Xt.prototype=Error.prototype,qt.prototype=Error.prototype,Qt.prototype=Error.prototype;var Zt={},Jt="InRuleRecoveryException";function er(e){this.name=Jt,this.message=e}er.prototype=Error.prototype;var tr=function(){function e(){}return e.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,s.zy)(e,"recoveryEnabled")?e.recoveryEnabled:Pr.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=rr)},e.prototype.getTokenToInsert=function(e){var t=ge(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t},e.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},e.prototype.tryInRepetitionRecovery=function(e,t,r,n){for(var i=this,o=this.findReSyncTokenType(),a=this.exportLexerState(),l=[],h=!1,u=this.LA(1),c=this.LA(1),d=function(){var e=i.LA(0),t=new Kt(i.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:u,previous:e,ruleName:i.getCurrRuleFullName()}),u,i.LA(0));t.resyncedTokens=(0,s.gc)(l),i.SAVE_ERROR(t)};!h;){if(this.tokenMatcher(c,n))return void d();if(r.call(this))return d(),void e.apply(this,t);this.tokenMatcher(c,o)?h=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,l))}this.importLexerState(a)},e.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,r){return!1!==r&&(void 0!==e&&void 0!==t&&(!this.tokenMatcher(this.LA(1),e)&&(!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))))},e.prototype.getFollowsForInRuleRecovery=function(e,t){var r=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(r)},e.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){var r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new er("sad sad panda")},e.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},e.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var r=this;if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if((0,s.Im)(t))return!1;var n=this.LA(1);return void 0!==(0,s.I6)(t,(function(e){return r.tokenMatcher(n,e)}))},e.prototype.canRecoverWithSingleTokenDeletion=function(e){return this.tokenMatcher(this.LA(2),e)},e.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return(0,s.gR)(r,e)},e.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),r=2;;){var n=t.tokenType;if((0,s.gR)(e,n))return n;t=this.LA(r),r++}},e.prototype.getCurrFollowKey=function(){if(1===this.RULE_STACK.length)return Zt;var e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)}},e.prototype.buildFullFollowKeyStack=function(){var e=this,t=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return(0,s.Im)(this.LAST_EXPLICIT_RULE_STACK)||(t=(0,s.Tj)(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.RULE_STACK[t]})),r=(0,s.Tj)(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.RULE_OCCURRENCE_STACK[t]}))),(0,s.Tj)(t,(function(n,s){return 0===s?Zt:{ruleName:e.shortRuleNameToFullName(n),idxInCallingRule:r[s],inRule:e.shortRuleNameToFullName(t[s-1])}}))},e.prototype.flattenFollowSet=function(){var e=this,t=(0,s.Tj)(this.buildFullFollowKeyStack(),(function(t){return e.getFollowSetFromFollowKey(t)}));return(0,s.Bq)(t)},e.prototype.getFollowSetFromFollowKey=function(e){if(e===Zt)return[pe];var t=e.ruleName+e.idxInCallingRule+Ue+e.inRule;return this.resyncFollows[t]},e.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,pe)||t.push(e),t},e.prototype.reSyncTo=function(e){for(var t=[],r=this.LA(1);!1===this.tokenMatcher(r,e);)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return(0,s.gc)(t)},e.prototype.attemptInRepetitionRecovery=function(e,t,r,n,s,i,o){},e.prototype.getCurrentGrammarPath=function(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:(0,s.T9)(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}},e.prototype.getHumanReadableRuleStack=function(){var e=this;return(0,s.Im)(this.LAST_EXPLICIT_RULE_STACK)?(0,s.Tj)(this.RULE_STACK,(function(t){return e.shortRuleNameToFullName(t)})):(0,s.Tj)(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.shortRuleNameToFullName(e.RULE_STACK[t])}))},e}();function rr(e,t,r,n,s,i,o){var a=this.getKeyForAutomaticLookahead(n,s),l=this.firstAfterRepMap[a];if(void 0===l){var h=this.getCurrRuleFullName();l=new i(this.getGAstProductions()[h],s).startWalking(),this.firstAfterRepMap[a]=l}var u=l.token,c=l.occurrence,d=l.isEndOfRule;1===this.RULE_STACK.length&&d&&void 0===u&&(u=pe,c=1),this.shouldInRepetitionRecoveryBeTried(u,c,o)&&this.tryInRepetitionRecovery(e,t,r,u)}var nr=function(){function e(){}return e.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=(0,s.zy)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Pr.dynamicTokensEnabled,this.maxLookahead=(0,s.zy)(e,"maxLookahead")?e.maxLookahead:Pr.maxLookahead,this.lookAheadFuncsCache=(0,s.rF)()?new Map:[],(0,s.rF)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},e.prototype.preComputeLookaheadFunctions=function(e){var t=this;(0,s.jJ)(e,(function(e){t.TRACE_INIT(e.name+" Rule Lookahead",(function(){var r=function(e){He.reset(),e.accept(He);var t=He.dslMethods;return He.reset(),t}(e),n=r.alternation,i=r.repetition,o=r.option,a=r.repetitionMandatory,l=r.repetitionMandatoryWithSeparator,h=r.repetitionWithSeparator;(0,s.jJ)(n,(function(r){var n=0===r.idx?"":r.idx;t.TRACE_INIT(""+De(r)+n,(function(){var n,s,i,o,a,l,h,u=(n=r.idx,s=e,i=r.maxLookahead||t.maxLookahead,o=r.hasPredicates,a=t.dynamicTokensEnabled,l=t.lookAheadBuilderForAlternatives,h=wt(n,s,i),l(h,o,Rt(h)?W:B,a)),c=Ke(t.fullRuleNameToShort[e.name],We,r.idx);t.setLaFuncCache(c,u)}))})),(0,s.jJ)(i,(function(r){t.computeLookaheadFunc(e,r.idx,Ge,ct.REPETITION,r.maxLookahead,De(r))})),(0,s.jJ)(o,(function(r){t.computeLookaheadFunc(e,r.idx,Ye,ct.OPTION,r.maxLookahead,De(r))})),(0,s.jJ)(a,(function(r){t.computeLookaheadFunc(e,r.idx,je,ct.REPETITION_MANDATORY,r.maxLookahead,De(r))})),(0,s.jJ)(l,(function(r){t.computeLookaheadFunc(e,r.idx,$e,ct.REPETITION_MANDATORY_WITH_SEPARATOR,r.maxLookahead,De(r))})),(0,s.jJ)(h,(function(r){t.computeLookaheadFunc(e,r.idx,ze,ct.REPETITION_WITH_SEPARATOR,r.maxLookahead,De(r))}))}))}))},e.prototype.computeLookaheadFunc=function(e,t,r,n,s,i){var o=this;this.TRACE_INIT(""+i+(0===t?"":t),(function(){var i=function(e,t,r,n,s,i){var o=Ct(e,t,s,r),a=Rt(o)?W:B;return i(o[0],a,n)}(t,e,s||o.maxLookahead,o.dynamicTokensEnabled,n,o.lookAheadBuilderForOptional),a=Ke(o.fullRuleNameToShort[e.name],r,t);o.setLaFuncCache(a,i)}))},e.prototype.lookAheadBuilderForOptional=function(e,t,r){return function(e,t,r){var n=(0,s.Si)(e,(function(e){return 1===e.length})),i=e.length;if(n&&!r){var o=(0,s.Bq)(e);if(1===o.length&&(0,s.Im)(o[0].categoryMatches)){var a=o[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===a}}var l=(0,s.TS)(o,(function(e,t,r){return e[t.tokenTypeIdx]=!0,(0,s.jJ)(t.categoryMatches,(function(t){e[t]=!0})),e}),[]);return function(){var e=this.LA(1);return!0===l[e.tokenTypeIdx]}}return function(){e:for(var r=0;r<i;r++){for(var n=e[r],s=n.length,o=0;o<s;o++){var a=this.LA(o+1);if(!1===t(a,n[o]))continue e}return!0}return!1}}(e,t,r)},e.prototype.lookAheadBuilderForAlternatives=function(e,t,r,n){return function(e,t,r,n){var i=e.length,o=(0,s.Si)(e,(function(e){return(0,s.Si)(e,(function(e){return 1===e.length}))}));if(t)return function(t){for(var n=(0,s.Tj)(t,(function(e){return e.GATE})),o=0;o<i;o++){var a=e[o],l=a.length,h=n[o];if(void 0===h||!1!==h.call(this))e:for(var u=0;u<l;u++){for(var c=a[u],d=c.length,p=0;p<d;p++){var g=this.LA(p+1);if(!1===r(g,c[p]))continue e}return o}}};if(o&&!n){var a=(0,s.Tj)(e,(function(e){return(0,s.Bq)(e)})),l=(0,s.TS)(a,(function(e,t,r){return(0,s.jJ)(t,(function(t){(0,s.zy)(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),(0,s.jJ)(t.categoryMatches,(function(t){(0,s.zy)(e,t)||(e[t]=r)}))})),e}),[]);return function(){var e=this.LA(1);return l[e.tokenTypeIdx]}}return function(){for(var t=0;t<i;t++){var n=e[t],s=n.length;e:for(var o=0;o<s;o++){for(var a=n[o],l=a.length,h=0;h<l;h++){var u=this.LA(h+1);if(!1===r(u,a[h]))continue e}return t}}}}(e,t,r,n)},e.prototype.getKeyForAutomaticLookahead=function(e,t){return Ke(this.getLastExplicitRuleShortName(),e,t)},e.prototype.getLaFuncFromCache=function(e){},e.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},e.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},e.prototype.setLaFuncCache=function(e,t){},e.prototype.setLaFuncCacheUsingMap=function(e,t){this.lookAheadFuncsCache.set(e,t)},e.prototype.setLaFuncUsingObj=function(e,t){this.lookAheadFuncsCache[e]=t},e}();var sr,ir=/^\s*function\s*(\S*)\s*\(/,or="name";function ar(e){var t=e.name;return t||e.toString().match(ir)[1]}function lr(e,t){var r=Object.getOwnPropertyDescriptor(e,or);return!(!(0,s.b0)(r)&&!r.configurable)&&(Object.defineProperty(e,or,{enumerable:!1,configurable:!0,writable:!1,value:t}),!0)}function hr(e,t){for(var r=(0,s.HP)(e),n=r.length,i=0;i<n;i++)for(var o=e[r[i]],a=o.length,l=0;l<a;l++){var h=o[l];void 0===h.tokenTypeIdx&&(void 0!==h.fullName?this[h.fullName](h.children,t):this[h.name](h.children,t))}}function ur(e,t){var r=function(){};lr(r,e+"BaseSemantics");var n={visit:function(e,t){if((0,s.cy)(e)&&(e=e[0]),!(0,s.b0)(e))return void 0!==e.fullName?this[e.fullName](e.children,t):this[e.name](e.children,t)},validateVisitor:function(){var e=function(e,t){var r=function(e,t){var r=(0,s.Tj)(t,(function(t){if(!(0,s.Tn)(e[t]))return{msg:"Missing visitor method: <"+t+"> on "+ar(e.constructor)+" CST Visitor.",type:sr.MISSING_METHOD,methodName:t}}));return(0,s.oE)(r)}(e,t),n=function(e,t){var r=[];for(var n in e)bt.test(n)&&(0,s.Tn)(e[n])&&!(0,s.gR)(cr,n)&&!(0,s.gR)(t,n)&&r.push({msg:"Redundant visitor method: <"+n+"> on "+ar(e.constructor)+" CST Visitor\nThere is no Grammar Rule corresponding to this method's name.\nFor utility methods on visitor classes use methods names that do not match /"+bt.source+"/.",type:sr.REDUNDANT_METHOD,methodName:n});return r}(e,t);return r.concat(n)}(this,t);if(!(0,s.Im)(e)){var r=(0,s.Tj)(e,(function(e){return e.msg}));throw Error("Errors Detected in CST Visitor <"+ar(this.constructor)+">:\n\t"+r.join("\n\n").replace(/\n/g,"\n\t"))}}};return(r.prototype=n).constructor=r,r._RULE_NAMES=t,r}!function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"}(sr||(sr={}));var cr=["constructor","visit","validateVisitor"];var dr=function(){function e(){}return e.prototype.initTreeBuilder=function(e){if(this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.outputCst=(0,s.zy)(e,"outputCst")?e.outputCst:Pr.outputCst,this.nodeLocationTracking=(0,s.zy)(e,"nodeLocationTracking")?e.nodeLocationTracking:Pr.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ze,this.setNodeLocationFromNode=Ze,this.cstPostRule=s.tE,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=s.tE,this.setNodeLocationFromNode=s.tE,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Qe,this.setNodeLocationFromNode=Qe,this.cstPostRule=s.tE,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=s.tE,this.setNodeLocationFromNode=s.tE,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error('Invalid <nodeLocationTracking> config option: "'+e.nodeLocationTracking+'"');this.setNodeLocationFromToken=s.tE,this.setNodeLocationFromNode=s.tE,this.cstPostRule=s.tE,this.setInitialNodeLocation=s.tE}else this.cstInvocationStateUpdate=s.tE,this.cstFinallyStateUpdate=s.tE,this.cstPostTerminal=s.tE,this.cstPostNonTerminal=s.tE,this.cstPostRule=s.tE,this.getLastExplicitRuleShortName=this.getLastExplicitRuleShortNameNoCst,this.getPreviousExplicitRuleShortName=this.getPreviousExplicitRuleShortNameNoCst,this.getLastExplicitRuleOccurrenceIndex=this.getLastExplicitRuleOccurrenceIndexNoCst,this.manyInternal=this.manyInternalNoCst,this.orInternal=this.orInternalNoCst,this.optionInternal=this.optionInternalNoCst,this.atLeastOneInternal=this.atLeastOneInternalNoCst,this.manySepFirstInternal=this.manySepFirstInternalNoCst,this.atLeastOneSepFirstInternal=this.atLeastOneSepFirstInternalNoCst},e.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(e){e.location={startOffset:NaN,endOffset:NaN}},e.prototype.setInitialNodeLocationOnlyOffsetRegular=function(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},e.prototype.setInitialNodeLocationFullRecovery=function(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},e.prototype.setInitialNodeLocationFullRegular=function(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},e.prototype.cstNestedInvocationStateUpdate=function(e,t){var r={name:e,fullName:this.shortRuleNameToFull[this.getLastExplicitRuleShortName()]+e,children:{}};this.setInitialNodeLocation(r),this.CST_STACK.push(r)},e.prototype.cstInvocationStateUpdate=function(e,t){this.LAST_EXPLICIT_RULE_STACK.push(this.RULE_STACK.length-1);var r={name:e,children:{}};this.setInitialNodeLocation(r),this.CST_STACK.push(r)},e.prototype.cstFinallyStateUpdate=function(){this.LAST_EXPLICIT_RULE_STACK.pop(),this.CST_STACK.pop()},e.prototype.cstNestedFinallyStateUpdate=function(){var e=this.CST_STACK.pop();this.cstPostRule(e)},e.prototype.cstPostRuleFull=function(e){var t=this.LA(0),r=e.location;r.startOffset<=t.startOffset==!0?(r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)},e.prototype.cstPostRuleOnlyOffset=function(e){var t=this.LA(0),r=e.location;r.startOffset<=t.startOffset==!0?r.endOffset=t.endOffset:r.startOffset=NaN},e.prototype.cstPostTerminal=function(e,t){var r,n,s,i=this.CST_STACK[this.CST_STACK.length-1];n=t,s=e,void 0===(r=i).children[s]?r.children[s]=[n]:r.children[s].push(n),this.setNodeLocationFromToken(i.location,t)},e.prototype.cstPostNonTerminal=function(e,t){if(!0!==this.isBackTracking()){var r=this.CST_STACK[this.CST_STACK.length-1];Je(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}},e.prototype.getBaseCstVisitorConstructor=function(){if((0,s.b0)(this.baseCstVisitorConstructor)){var e=ur(this.className,this.allRuleNames);return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},e.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if((0,s.b0)(this.baseCstVisitorWithDefaultsConstructor)){var e=function(e,t,r){var n=function(){};lr(n,e+"BaseSemanticsWithDefaults");var i=Object.create(r.prototype);return(0,s.jJ)(t,(function(e){i[e]=hr})),(n.prototype=i).constructor=n,n}(this.className,this.allRuleNames,this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor},e.prototype.nestedRuleBeforeClause=function(e,t){var r;return void 0!==e.NAME?(r=e.NAME,this.nestedRuleInvocationStateUpdate(r,t),r):void 0},e.prototype.nestedAltBeforeClause=function(e,t,r,n){var s,i=Xe(this.getLastExplicitRuleShortName(),r,t,n);return void 0!==e.NAME?(s=e.NAME,this.nestedRuleInvocationStateUpdate(s,i),{shortName:i,nestedName:s}):void 0},e.prototype.nestedRuleFinallyClause=function(e,t){var r=this.CST_STACK,n=r[r.length-1];this.nestedRuleFinallyStateUpdate();var s=r[r.length-1];Je(s,t,n),this.setNodeLocationFromNode(s.location,n.location)},e.prototype.getLastExplicitRuleShortName=function(){var e=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-1];return this.RULE_STACK[e]},e.prototype.getLastExplicitRuleShortNameNoCst=function(){var e=this.RULE_STACK;return e[e.length-1]},e.prototype.getPreviousExplicitRuleShortName=function(){var e=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-2];return this.RULE_STACK[e]},e.prototype.getPreviousExplicitRuleShortNameNoCst=function(){var e=this.RULE_STACK;return e[e.length-2]},e.prototype.getLastExplicitRuleOccurrenceIndex=function(){var e=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-1];return this.RULE_OCCURRENCE_STACK[e]},e.prototype.getLastExplicitRuleOccurrenceIndexNoCst=function(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]},e.prototype.nestedRuleInvocationStateUpdate=function(e,t){this.RULE_OCCURRENCE_STACK.push(1),this.RULE_STACK.push(t),this.cstNestedInvocationStateUpdate(e,t)},e.prototype.nestedRuleFinallyStateUpdate=function(){this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstNestedFinallyStateUpdate()},e}(),pr=function(){function e(){}return e.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(e.prototype,"input",{get:function(){return this.tokVector},set:function(e){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length},enumerable:!0,configurable:!0}),e.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Ir},e.prototype.LA=function(e){var t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Ir:this.tokVector[t]},e.prototype.consumeToken=function(){this.currIdx++},e.prototype.exportLexerState=function(){return this.currIdx},e.prototype.importLexerState=function(e){this.currIdx=e},e.prototype.resetLexerState=function(){this.currIdx=-1},e.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},e.prototype.getLexerPosition=function(){return this.exportLexerState()},e}(),gr=function(){function e(){}return e.prototype.ACTION=function(e){return e.call(this)},e.prototype.consume=function(e,t,r){return this.consumeInternal(t,e,r)},e.prototype.subrule=function(e,t,r){return this.subruleInternal(t,e,r)},e.prototype.option=function(e,t){return this.optionInternal(t,e)},e.prototype.or=function(e,t){return this.orInternal(t,e)},e.prototype.many=function(e,t){return this.manyInternal(e,t)},e.prototype.atLeastOne=function(e,t){return this.atLeastOneInternal(e,t)},e.prototype.CONSUME=function(e,t){return this.consumeInternal(e,0,t)},e.prototype.CONSUME1=function(e,t){return this.consumeInternal(e,1,t)},e.prototype.CONSUME2=function(e,t){return this.consumeInternal(e,2,t)},e.prototype.CONSUME3=function(e,t){return this.consumeInternal(e,3,t)},e.prototype.CONSUME4=function(e,t){return this.consumeInternal(e,4,t)},e.prototype.CONSUME5=function(e,t){return this.consumeInternal(e,5,t)},e.prototype.CONSUME6=function(e,t){return this.consumeInternal(e,6,t)},e.prototype.CONSUME7=function(e,t){return this.consumeInternal(e,7,t)},e.prototype.CONSUME8=function(e,t){return this.consumeInternal(e,8,t)},e.prototype.CONSUME9=function(e,t){return this.consumeInternal(e,9,t)},e.prototype.SUBRULE=function(e,t){return this.subruleInternal(e,0,t)},e.prototype.SUBRULE1=function(e,t){return this.subruleInternal(e,1,t)},e.prototype.SUBRULE2=function(e,t){return this.subruleInternal(e,2,t)},e.prototype.SUBRULE3=function(e,t){return this.subruleInternal(e,3,t)},e.prototype.SUBRULE4=function(e,t){return this.subruleInternal(e,4,t)},e.prototype.SUBRULE5=function(e,t){return this.subruleInternal(e,5,t)},e.prototype.SUBRULE6=function(e,t){return this.subruleInternal(e,6,t)},e.prototype.SUBRULE7=function(e,t){return this.subruleInternal(e,7,t)},e.prototype.SUBRULE8=function(e,t){return this.subruleInternal(e,8,t)},e.prototype.SUBRULE9=function(e,t){return this.subruleInternal(e,9,t)},e.prototype.OPTION=function(e){return this.optionInternal(e,0)},e.prototype.OPTION1=function(e){return this.optionInternal(e,1)},e.prototype.OPTION2=function(e){return this.optionInternal(e,2)},e.prototype.OPTION3=function(e){return this.optionInternal(e,3)},e.prototype.OPTION4=function(e){return this.optionInternal(e,4)},e.prototype.OPTION5=function(e){return this.optionInternal(e,5)},e.prototype.OPTION6=function(e){return this.optionInternal(e,6)},e.prototype.OPTION7=function(e){return this.optionInternal(e,7)},e.prototype.OPTION8=function(e){return this.optionInternal(e,8)},e.prototype.OPTION9=function(e){return this.optionInternal(e,9)},e.prototype.OR=function(e){return this.orInternal(e,0)},e.prototype.OR1=function(e){return this.orInternal(e,1)},e.prototype.OR2=function(e){return this.orInternal(e,2)},e.prototype.OR3=function(e){return this.orInternal(e,3)},e.prototype.OR4=function(e){return this.orInternal(e,4)},e.prototype.OR5=function(e){return this.orInternal(e,5)},e.prototype.OR6=function(e){return this.orInternal(e,6)},e.prototype.OR7=function(e){return this.orInternal(e,7)},e.prototype.OR8=function(e){return this.orInternal(e,8)},e.prototype.OR9=function(e){return this.orInternal(e,9)},e.prototype.MANY=function(e){this.manyInternal(0,e)},e.prototype.MANY1=function(e){this.manyInternal(1,e)},e.prototype.MANY2=function(e){this.manyInternal(2,e)},e.prototype.MANY3=function(e){this.manyInternal(3,e)},e.prototype.MANY4=function(e){this.manyInternal(4,e)},e.prototype.MANY5=function(e){this.manyInternal(5,e)},e.prototype.MANY6=function(e){this.manyInternal(6,e)},e.prototype.MANY7=function(e){this.manyInternal(7,e)},e.prototype.MANY8=function(e){this.manyInternal(8,e)},e.prototype.MANY9=function(e){this.manyInternal(9,e)},e.prototype.MANY_SEP=function(e){this.manySepFirstInternal(0,e)},e.prototype.MANY_SEP1=function(e){this.manySepFirstInternal(1,e)},e.prototype.MANY_SEP2=function(e){this.manySepFirstInternal(2,e)},e.prototype.MANY_SEP3=function(e){this.manySepFirstInternal(3,e)},e.prototype.MANY_SEP4=function(e){this.manySepFirstInternal(4,e)},e.prototype.MANY_SEP5=function(e){this.manySepFirstInternal(5,e)},e.prototype.MANY_SEP6=function(e){this.manySepFirstInternal(6,e)},e.prototype.MANY_SEP7=function(e){this.manySepFirstInternal(7,e)},e.prototype.MANY_SEP8=function(e){this.manySepFirstInternal(8,e)},e.prototype.MANY_SEP9=function(e){this.manySepFirstInternal(9,e)},e.prototype.AT_LEAST_ONE=function(e){this.atLeastOneInternal(0,e)},e.prototype.AT_LEAST_ONE1=function(e){return this.atLeastOneInternal(1,e)},e.prototype.AT_LEAST_ONE2=function(e){this.atLeastOneInternal(2,e)},e.prototype.AT_LEAST_ONE3=function(e){this.atLeastOneInternal(3,e)},e.prototype.AT_LEAST_ONE4=function(e){this.atLeastOneInternal(4,e)},e.prototype.AT_LEAST_ONE5=function(e){this.atLeastOneInternal(5,e)},e.prototype.AT_LEAST_ONE6=function(e){this.atLeastOneInternal(6,e)},e.prototype.AT_LEAST_ONE7=function(e){this.atLeastOneInternal(7,e)},e.prototype.AT_LEAST_ONE8=function(e){this.atLeastOneInternal(8,e)},e.prototype.AT_LEAST_ONE9=function(e){this.atLeastOneInternal(9,e)},e.prototype.AT_LEAST_ONE_SEP=function(e){this.atLeastOneSepFirstInternal(0,e)},e.prototype.AT_LEAST_ONE_SEP1=function(e){this.atLeastOneSepFirstInternal(1,e)},e.prototype.AT_LEAST_ONE_SEP2=function(e){this.atLeastOneSepFirstInternal(2,e)},e.prototype.AT_LEAST_ONE_SEP3=function(e){this.atLeastOneSepFirstInternal(3,e)},e.prototype.AT_LEAST_ONE_SEP4=function(e){this.atLeastOneSepFirstInternal(4,e)},e.prototype.AT_LEAST_ONE_SEP5=function(e){this.atLeastOneSepFirstInternal(5,e)},e.prototype.AT_LEAST_ONE_SEP6=function(e){this.atLeastOneSepFirstInternal(6,e)},e.prototype.AT_LEAST_ONE_SEP7=function(e){this.atLeastOneSepFirstInternal(7,e)},e.prototype.AT_LEAST_ONE_SEP8=function(e){this.atLeastOneSepFirstInternal(8,e)},e.prototype.AT_LEAST_ONE_SEP9=function(e){this.atLeastOneSepFirstInternal(9,e)},e.prototype.RULE=function(e,t,r){if(void 0===r&&(r=Lr),(0,s.gR)(this.definedRulesNames,e)){var n={message:kt.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:xr.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(n)}this.definedRulesNames.push(e);var i=this.defineRule(e,t,r);return this[e]=i,i},e.prototype.OVERRIDE_RULE=function(e,t,r){void 0===r&&(r=Lr);var n,i,o,a,l,h=[];h=h.concat((n=e,i=this.definedRulesNames,o=this.className,l=[],s.gR(i,n)||(a="Invalid rule override, rule: ->"+n+"<- cannot be overridden in the grammar: ->"+o+"<-as it is not defined in any of the super grammars ",l.push({message:a,type:xr.INVALID_RULE_OVERRIDE,ruleName:n})),l)),this.definitionErrors.push.apply(this.definitionErrors,h);var u=this.defineRule(e,t,r);return this[e]=u,u},e.prototype.BACKTRACK=function(e,t){return function(){this.isBackTrackingStack.push(1);var r=this.saveRecogState();try{return e.apply(this,t),!0}catch(e){if($t(e))return!1;throw e}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}},e.prototype.getGAstProductions=function(){return this.gastProductionsCache},e.prototype.getSerializedGastProductions=function(){return be((0,s.zu)(this.gastProductionsCache))},e}(),fr=function(){function e(){}return e.prototype.initRecognizerEngine=function(e,t){if(this.className=ar(this.constructor),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=W,this.definedRulesNames=[],this.tokensMap={},this.allRuleNames=[],this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,s.zy)(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if((0,s.cy)(e)){if((0,s.Im)(e))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof e[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if((0,s.cy)(e))this.tokensMap=(0,s.TS)(e,(function(e,t){return e[t.name]=t,e}),{});else if((0,s.zy)(e,"modes")&&(0,s.Si)((0,s.Bq)((0,s.zu)(e.modes)),X)){var r=(0,s.Bq)((0,s.zu)(e.modes)),n=(0,s.sb)(r);this.tokensMap=(0,s.TS)(n,(function(e,t){return e[t.name]=t,e}),{})}else{if(!(0,s.Gv)(e))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=(0,s.lR)(e)}this.tokensMap.EOF=pe;var i=(0,s.Si)((0,s.zu)(e),(function(e){return(0,s.Im)(e.categoryMatches)}));this.tokenMatcher=i?W:B,j((0,s.zu)(this.tokensMap))},e.prototype.defineRule=function(e,t,r){if(this.selfAnalysisDone)throw Error("Grammar rule <"+e+"> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.");var n,i=(0,s.zy)(r,"resyncEnabled")?r.resyncEnabled:Lr.resyncEnabled,o=(0,s.zy)(r,"recoveryValueFunc")?r.recoveryValueFunc:Lr.recoveryValueFunc,a=this.ruleShortNameIdx<<12;function l(e){try{if(!0===this.outputCst){t.apply(this,e);var r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}return t.apply(this,e)}catch(e){return this.invokeRuleCatch(e,i,o)}finally{this.ruleFinallyStateUpdate()}}this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=e,this.fullRuleNameToShort[e]=a;return(n=function(t,r){return void 0===t&&(t=0),this.ruleInvocationStateUpdate(a,e,t),l.call(this,r)}).ruleName=e,n.originalGrammarAction=t,n},e.prototype.invokeRuleCatch=function(e,t,r){var n=1===this.RULE_STACK.length,s=t&&!this.isBackTracking()&&this.recoveryEnabled;if($t(e)){var i=e;if(s){var o,a=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(a))return i.resyncedTokens=this.reSyncTo(a),this.outputCst?((o=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,o):r();throw this.outputCst&&((o=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,i.partialCstResult=o),i}if(n)return this.moveToTerminatedState(),r();throw i}throw e},e.prototype.optionInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(Ye,t),n=this.nestedRuleBeforeClause(e,r);try{return this.optionInternalLogic(e,t,r)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},e.prototype.optionInternalNoCst=function(e,t){var r=this.getKeyForAutomaticLookahead(Ye,t);return this.optionInternalLogic(e,t,r)},e.prototype.optionInternalLogic=function(e,t,r){var n,s,i=this,o=this.getLaFuncFromCache(r);if(void 0!==e.DEF){if(n=e.DEF,void 0!==(s=e.GATE)){var a=o;o=function(){return s.call(i)&&a.call(i)}}}else n=e;if(!0===o.call(this))return n.call(this)},e.prototype.atLeastOneInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(je,e),n=this.nestedRuleBeforeClause(t,r);try{return this.atLeastOneInternalLogic(e,t,r)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},e.prototype.atLeastOneInternalNoCst=function(e,t){var r=this.getKeyForAutomaticLookahead(je,e);this.atLeastOneInternalLogic(e,t,r)},e.prototype.atLeastOneInternalLogic=function(e,t,r){var n,s,i=this,o=this.getLaFuncFromCache(r);if(void 0!==t.DEF){if(n=t.DEF,void 0!==(s=t.GATE)){var a=o;o=function(){return s.call(i)&&a.call(i)}}}else n=t;if(!0!==o.call(this))throw this.raiseEarlyExitException(e,ct.REPETITION_MANDATORY,t.ERR_MSG);for(var l=this.doSingleRepetition(n);!0===o.call(this)&&!0===l;)l=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],o,je,e,ot)},e.prototype.atLeastOneSepFirstInternal=function(e,t){var r=this.getKeyForAutomaticLookahead($e,e),n=this.nestedRuleBeforeClause(t,r);try{this.atLeastOneSepFirstInternalLogic(e,t,r)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},e.prototype.atLeastOneSepFirstInternalNoCst=function(e,t){var r=this.getKeyForAutomaticLookahead($e,e);this.atLeastOneSepFirstInternalLogic(e,t,r)},e.prototype.atLeastOneSepFirstInternalLogic=function(e,t,r){var n=this,s=t.DEF,i=t.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(e,ct.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);s.call(this);for(var o=function(){return n.tokenMatcher(n.LA(1),i)};!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),s.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,o,s,at],o,$e,e,at)},e.prototype.manyInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(Ge,e),n=this.nestedRuleBeforeClause(t,r);try{return this.manyInternalLogic(e,t,r)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},e.prototype.manyInternalNoCst=function(e,t){var r=this.getKeyForAutomaticLookahead(Ge,e);return this.manyInternalLogic(e,t,r)},e.prototype.manyInternalLogic=function(e,t,r){var n,s,i=this,o=this.getLaFuncFromCache(r);if(void 0!==t.DEF){if(n=t.DEF,void 0!==(s=t.GATE)){var a=o;o=function(){return s.call(i)&&a.call(i)}}}else n=t;for(var l=!0;!0===o.call(this)&&!0===l;)l=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],o,Ge,e,st,l)},e.prototype.manySepFirstInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(ze,e),n=this.nestedRuleBeforeClause(t,r);try{this.manySepFirstInternalLogic(e,t,r)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},e.prototype.manySepFirstInternalNoCst=function(e,t){var r=this.getKeyForAutomaticLookahead(ze,e);this.manySepFirstInternalLogic(e,t,r)},e.prototype.manySepFirstInternalLogic=function(e,t,r){var n=this,s=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){s.call(this);for(var o=function(){return n.tokenMatcher(n.LA(1),i)};!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),s.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,o,s,it],o,ze,e,it)}},e.prototype.repetitionSepSecondInternal=function(e,t,r,n,s){for(;r();)this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,s],r,$e,e,s)},e.prototype.doSingleRepetition=function(e){var t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t},e.prototype.orInternalNoCst=function(e,t){var r=(0,s.cy)(e)?e:e.DEF,n=this.getKeyForAutomaticLookahead(We,t),i=this.getLaFuncFromCache(n).call(this,r);if(void 0!==i)return r[i].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)},e.prototype.orInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(We,t),n=this.nestedRuleBeforeClause(e,r);try{var i=(0,s.cy)(e)?e:e.DEF,o=this.getLaFuncFromCache(r).call(this,i);if(void 0!==o){var a=i[o],l=this.nestedAltBeforeClause(a,t,We,o);try{return a.ALT.call(this)}finally{void 0!==l&&this.nestedRuleFinallyClause(l.shortName,l.nestedName)}}this.raiseNoAltException(t,e.ERR_MSG)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},e.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){var e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new qt(t,e))}},e.prototype.subruleInternal=function(e,t,r){var n;try{var s=void 0!==r?r.ARGS:void 0;return n=e.call(this,t,s),this.cstPostNonTerminal(n,void 0!==r&&void 0!==r.LABEL?r.LABEL:e.ruleName),n}catch(t){this.subruleInternalError(t,r,e.ruleName)}},e.prototype.subruleInternalError=function(e,t,r){throw $t(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:r),delete e.partialCstResult),e},e.prototype.consumeInternal=function(e,t,r){var n;try{var s=this.LA(1);!0===this.tokenMatcher(s,e)?(this.consumeToken(),n=s):this.consumeInternalError(e,s,r)}catch(r){n=this.consumeInternalRecovery(e,t,r)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:e.name,n),n},e.prototype.consumeInternalError=function(e,t,r){var n,s=this.LA(0);throw n=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Kt(n,t,s))},e.prototype.consumeInternalRecovery=function(e,t,r){if(!this.recoveryEnabled||"MismatchedTokenException"!==r.name||this.isBackTracking())throw r;var n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(e){throw e.name===Jt?r:e}},e.prototype.saveRecogState=function(){var e=this.errors,t=(0,s.T9)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK,LAST_EXPLICIT_RULE_STACK:this.LAST_EXPLICIT_RULE_STACK}},e.prototype.reloadRecogState=function(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK},e.prototype.ruleInvocationStateUpdate=function(e,t,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t,e)},e.prototype.isBackTracking=function(){return 0!==this.isBackTrackingStack.length},e.prototype.getCurrRuleFullName=function(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]},e.prototype.shortRuleNameToFullName=function(e){return this.shortRuleNameToFull[e]},e.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),pe)},e.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},e}(),mr=function(){function e(){}return e.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=(0,s.NT)(e.errorMessageProvider,Pr.errorMessageProvider)},e.prototype.SAVE_ERROR=function(e){if($t(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,s.T9)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(e.prototype,"errors",{get:function(){return(0,s.T9)(this._errors)},set:function(e){this._errors=e},enumerable:!0,configurable:!0}),e.prototype.raiseEarlyExitException=function(e,t,r){for(var n=this.getCurrRuleFullName(),s=Ct(e,this.getGAstProductions()[n],t,this.maxLookahead)[0],i=[],o=1;o<=this.maxLookahead;o++)i.push(this.LA(o));var a=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:s,actual:i,previous:this.LA(0),customUserDescription:r,ruleName:n});throw this.SAVE_ERROR(new Qt(a,this.LA(1),this.LA(0)))},e.prototype.raiseNoAltException=function(e,t){for(var r=this.getCurrRuleFullName(),n=wt(e,this.getGAstProductions()[r],this.maxLookahead),s=[],i=1;i<=this.maxLookahead;i++)s.push(this.LA(i));var o=this.LA(0),a=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:n,actual:s,previous:o,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Xt(a,this.LA(1),o))},e}(),yr=function(){function e(){}return e.prototype.initContentAssist=function(){},e.prototype.computeContentAssist=function(e,t){var r=this.gastProductionsCache[e];if((0,s.b0)(r))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return ht([r],t,this.tokenMatcher,this.maxLookahead)},e.prototype.getNextPossibleTokenTypes=function(e){var t=(0,s.$1)(e.ruleStack),r=this.getGAstProductions()[t];return new rt(r,e).startWalking()},e}(),Er={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Er);var wr=!0,Cr=Math.pow(2,8)-1,vr=de({name:"RECORDING_PHASE_TOKEN",pattern:J.NA});j([vr]);var Rr=ge(vr,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(Rr);var Sr={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",children:{}},Tr=function(){function e(){}return e.prototype.initGastRecorder=function(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1},e.prototype.enableRecording=function(){var e=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",(function(){for(var t=function(t){var r=t>0?t:"";e["CONSUME"+r]=function(e,r){return this.consumeInternalRecord(e,t,r)},e["SUBRULE"+r]=function(e,r){return this.subruleInternalRecord(e,t,r)},e["OPTION"+r]=function(e){return this.optionInternalRecord(e,t)},e["OR"+r]=function(e){return this.orInternalRecord(e,t)},e["MANY"+r]=function(e){this.manyInternalRecord(t,e)},e["MANY_SEP"+r]=function(e){this.manySepFirstInternalRecord(t,e)},e["AT_LEAST_ONE"+r]=function(e){this.atLeastOneInternalRecord(t,e)},e["AT_LEAST_ONE_SEP"+r]=function(e){this.atLeastOneSepFirstInternalRecord(t,e)}},r=0;r<10;r++)t(r);e.consume=function(e,t,r){return this.consumeInternalRecord(t,e,r)},e.subrule=function(e,t,r){return this.subruleInternalRecord(t,e,r)},e.option=function(e,t){return this.optionInternalRecord(t,e)},e.or=function(e,t){return this.orInternalRecord(t,e)},e.many=function(e,t){this.manyInternalRecord(e,t)},e.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},e.ACTION=e.ACTION_RECORD,e.BACKTRACK=e.BACKTRACK_RECORD,e.LA=e.LA_RECORD}))},e.prototype.disableRecording=function(){var e=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",(function(){for(var t=0;t<10;t++){var r=t>0?t:"";delete e["CONSUME"+r],delete e["SUBRULE"+r],delete e["OPTION"+r],delete e["OR"+r],delete e["MANY"+r],delete e["MANY_SEP"+r],delete e["AT_LEAST_ONE"+r],delete e["AT_LEAST_ONE_SEP"+r]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA}))},e.prototype.ACTION_RECORD=function(e){},e.prototype.BACKTRACK_RECORD=function(e,t){return function(){return!0}},e.prototype.LA_RECORD=function(e){return Ir},e.prototype.topLevelRuleRecord=function(e,t){try{var r=new we({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(e){if(!0!==e.KNOWN_RECORDER_ERROR)try{e.message=e.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording'}catch(t){throw e}throw e}},e.prototype.optionInternalRecord=function(e,t){return Nr.call(this,ve,e,t)},e.prototype.atLeastOneInternalRecord=function(e,t){Nr.call(this,Re,t,e)},e.prototype.atLeastOneSepFirstInternalRecord=function(e,t){Nr.call(this,Se,t,e,wr)},e.prototype.manyInternalRecord=function(e,t){Nr.call(this,Te,t,e)},e.prototype.manySepFirstInternalRecord=function(e,t){Nr.call(this,Ne,t,e,wr)},e.prototype.orInternalRecord=function(e,t){return Mr.call(this,e,t)},e.prototype.subruleInternalRecord=function(e,t,r){if(br(t),!e||!1===(0,s.zy)(e,"ruleName")){var n=new Error("<SUBRULE"+_r(t)+"> argument is invalid expecting a Parser method reference but got: <"+JSON.stringify(e)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw n.KNOWN_RECORDER_ERROR=!0,n}var i=(0,s.se)(this.recordingProdStack),o=e.ruleName,a=new Ee({idx:t,nonTerminalName:o,referencedRule:void 0});return i.definition.push(a),this.outputCst?Sr:Er},e.prototype.consumeInternalRecord=function(e,t,r){if(br(t),!$(e)){var n=new Error("<CONSUME"+_r(t)+"> argument is invalid expecting a TokenType reference but got: <"+JSON.stringify(e)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw n.KNOWN_RECORDER_ERROR=!0,n}var i=(0,s.se)(this.recordingProdStack),o=new _e({idx:t,terminalType:e});return i.definition.push(o),Rr},e}();function Nr(e,t,r,n){void 0===n&&(n=!1),br(r);var i=(0,s.se)(this.recordingProdStack),o=(0,s.Tn)(t)?t:t.DEF,a=new e({definition:[],idx:r});return(0,s.zy)(t,"NAME")&&(a.name=t.NAME),n&&(a.separator=t.SEP),(0,s.zy)(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(a),o.call(this),i.definition.push(a),this.recordingProdStack.pop(),Er}function Mr(e,t){var r=this;br(t);var n=(0,s.se)(this.recordingProdStack),i=!1===(0,s.cy)(e),o=!1===i?e:e.DEF,a=new Me({definition:[],idx:t,ignoreAmbiguities:i&&!0===e.IGNORE_AMBIGUITIES});(0,s.zy)(e,"NAME")&&(a.name=e.NAME),(0,s.zy)(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD);var l=(0,s.zN)(o,(function(e){return(0,s.Tn)(e.GATE)}));return a.hasPredicates=l,n.definition.push(a),(0,s.jJ)(o,(function(e){var t=new Ce({definition:[]});a.definition.push(t),(0,s.zy)(e,"NAME")&&(t.name=e.NAME),(0,s.zy)(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:(0,s.zy)(e,"GATE")&&(t.ignoreAmbiguities=!0),r.recordingProdStack.push(t),e.ALT.call(r),r.recordingProdStack.pop()})),Er}function _r(e){return 0===e?"":""+e}function br(e){if(e<0||e>Cr){var t=new Error("Invalid DSL Method idx value: <"+e+">\n\tIdx value must be a none negative value smaller than "+(Cr+1));throw t.KNOWN_RECORDER_ERROR=!0,t}}var Ar=function(){function e(){}return e.prototype.initPerformanceTracer=function(e){if((0,s.zy)(e,"traceInitPerf")){var t=e.traceInitPerf,r="number"==typeof t;this.traceInitMaxIdent=r?t:1/0,this.traceInitPerf=r?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Pr.traceInitPerf;this.traceInitIndent=-1},e.prototype.TRACE_INIT=function(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;var r=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+"--\x3e <"+e+">");var n=(0,s.O1)(t),i=n.time,o=n.value,a=i>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(r+"<-- <"+e+"> time: "+i+"ms"),this.traceInitIndent--,o}return t()},e}(),Or=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ir=ge(pe,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Ir);var xr,Pr=Object.freeze({recoveryEnabled:!1,maxLookahead:4,ignoredIssues:{},dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Lt,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Lr=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});function Dr(e){return void 0===e&&(e=void 0),function(){return e}}!function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.INVALID_NESTED_RULE_NAME=10]="INVALID_NESTED_RULE_NAME",e[e.DUPLICATE_NESTED_NAME=11]="DUPLICATE_NESTED_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=12]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=13]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=14]="TOO_MANY_ALTS"}(xr||(xr={}));var kr=function(){function e(e,t){void 0===t&&(t=Pr),this.ignoredIssues=Pr.ignoredIssues,this.definitionErrors=[],this.selfAnalysisDone=!1;var r=this;r.initErrorHandler(t),r.initLexerAdapter(),r.initLooksAhead(t),r.initRecognizerEngine(e,t),r.initRecoverable(t),r.initTreeBuilder(t),r.initContentAssist(),r.initGastRecorder(t),r.initPerformanceTracer(t),(0,s.zy)(t,"ignoredIssues")&&t.ignoredIssues!==Pr.ignoredIssues&&(0,s.x5)("The <ignoredIssues> IParserConfig property is soft-deprecated and will be removed in future versions.\n\tPlease use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead."),this.ignoredIssues=(0,s.zy)(t,"ignoredIssues")?t.ignoredIssues:Pr.ignoredIssues,this.skipValidations=(0,s.zy)(t,"skipValidations")?t.skipValidations:Pr.skipValidations}return e.performSelfAnalysis=function(e){e.performSelfAnalysis()},e.prototype.performSelfAnalysis=function(){var t=this;this.TRACE_INIT("performSelfAnalysis",(function(){var r;t.selfAnalysisDone=!0;var n=t.className;t.TRACE_INIT("toFastProps",(function(){(0,s.Bl)(t)})),t.TRACE_INIT("Grammar Recording",(function(){try{t.enableRecording(),(0,s.jJ)(t.definedRulesNames,(function(e){var r=t[e].originalGrammarAction,n=void 0;t.TRACE_INIT(e+" Rule",(function(){n=t.topLevelRuleRecord(e,r)})),t.gastProductionsCache[e]=n}))}finally{t.disableRecording()}}));var i=[];if(t.TRACE_INIT("Grammar Resolving",(function(){i=Ut({rules:(0,s.zu)(t.gastProductionsCache)}),t.definitionErrors.push.apply(t.definitionErrors,i)})),t.TRACE_INIT("Grammar Validations",(function(){if((0,s.Im)(i)&&!1===t.skipValidations){var e=Vt({rules:(0,s.zu)(t.gastProductionsCache),maxLookahead:t.maxLookahead,tokenTypes:(0,s.zu)(t.tokensMap),ignoredIssues:t.ignoredIssues,errMsgProvider:kt,grammarName:n});t.definitionErrors.push.apply(t.definitionErrors,e)}})),(0,s.Im)(t.definitionErrors)&&(t.recoveryEnabled&&t.TRACE_INIT("computeAllProdsFollows",(function(){var e,r,n=(e=(0,s.zu)(t.gastProductionsCache),r={},(0,s.jJ)(e,(function(e){var t=new Be(e).startWalking();(0,s.kp)(r,t)})),r);t.resyncFollows=n})),t.TRACE_INIT("ComputeLookaheadFunctions",(function(){t.preComputeLookaheadFunctions((0,s.zu)(t.gastProductionsCache))}))),t.TRACE_INIT("expandAllNestedRuleNames",(function(){var e,r,n,i=(e=(0,s.zu)(t.gastProductionsCache),r=t.fullRuleNameToShort,n={allRuleNames:[]},(0,s.jJ)(e,(function(e){var t=r[e.name];n.allRuleNames.push(e.name);var i=new et(t);e.accept(i),(0,s.jJ)(i.result,(function(t){t.def,t.key;var r=t.name;n.allRuleNames.push(e.name+r)}))})),n);t.allRuleNames=i.allRuleNames})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,s.Im)(t.definitionErrors))throw r=(0,s.Tj)(t.definitionErrors,(function(e){return e.message})),new Error("Parser Definition Errors detected:\n "+r.join("\n-------------------------------\n"))}))},e.DEFER_DEFINITION_ERRORS_HANDLING=!1,e}();(0,s.XJ)(kr,[tr,nr,dr,pr,fr,gr,mr,yr,Tr,Ar]);var Hr=function(e){function t(t,r){void 0===r&&(r=Pr);var n=(0,s.lR)(r);return n.outputCst=!0,e.call(this,t,n)||this}return Or(t,e),t}(kr),Fr=function(e){function t(t,r){void 0===r&&(r=Pr);var n=(0,s.lR)(r);return n.outputCst=!1,e.call(this,t,n)||this}return Or(t,e),t}(kr);function Ur(e,t){var r=void 0===t?{}:t,s=r.resourceBase,i=void 0===s?"https://unpkg.com/chevrotain@"+n+"/diagrams/":s,o=r.css;return'\n\x3c!-- This is a generated file --\x3e\n<!DOCTYPE html>\n<meta charset="utf-8">\n<style>\n body {\n background-color: hsl(30, 20%, 95%)\n }\n</style>\n\n'+("\n<link rel='stylesheet' href='"+(void 0===o?"https://unpkg.com/chevrotain@"+n+"/diagrams/diagrams.css":o)+"'>\n")+("\n<script src='"+i+"vendor/railroad-diagrams.js'><\/script>\n<script src='"+i+"src/diagrams_builder.js'><\/script>\n<script src='"+i+"src/diagrams_behavior.js'><\/script>\n<script src='"+i+"src/main.js'><\/script>\n")+'\n<div id="diagrams" align="center"></div> \n'+("\n<script>\n window.serializedGrammar = "+JSON.stringify(e,null," ")+";\n<\/script>\n")+'\n<script>\n var diagramsDiv = document.getElementById("diagrams");\n main.drawDiagramsFromSerializedGrammar(serializedGrammar, diagramsDiv);\n<\/script>\n'}var Vr="\n";function Br(e){var t;return"\nfunction "+e.name+"(tokenVocabulary, config) {\n // invoke super constructor\n // No support for embedded actions currently, so we can 'hardcode'\n // The use of CstParser.\n chevrotain.CstParser.call(this, tokenVocabulary, config)\n\n const $ = this\n\n "+(t=e.rules,(0,s.Tj)(t,(function(e){return function(e,t){var r=$r(t,'$.RULE("'+e.name+'", function() {')+Vr;return r+=zr(e.definition,t+1),r+=$r(t+1,"})")+Vr}(e,1)})).join("\n")+"\n\n // very important to call this after all the rules have been defined.\n // otherwise the parser may not work correctly as it will lack information\n // derived during the self analysis phase.\n this.performSelfAnalysis(this)\n}\n\n// inheritance as implemented in javascript in the previous decade... :(\n")+e.name+".prototype = Object.create(chevrotain.CstParser.prototype)\n"+e.name+".prototype.constructor = "+e.name+" \n "}function Wr(e,t){var r=$r(t,"$.OR"+e.idx+"([")+Vr,n=(0,s.Tj)(e.definition,(function(e){return function(e,t){var r=$r(t,"{")+Vr;e.name&&(r+=$r(t+1,'NAME: "'+e.name+'",')+Vr);return r+=$r(t+1,"ALT: function() {")+Vr,r+=zr(e.definition,t+1),r+=$r(t+1,"}")+Vr,r+=$r(t,"}"),r}(e,t+1)}));return r+=n.join(","+Vr),r+=Vr+$r(t,"])"+Vr)}function Yr(e,t){if(e instanceof Ee)return function(e,t){return $r(t,"$.SUBRULE"+e.idx+"($."+e.nonTerminalName+")"+Vr)}(e,t);if(e instanceof ve)return Gr("OPTION",e,t);if(e instanceof Re)return Gr("AT_LEAST_ONE",e,t);if(e instanceof Se)return Gr("AT_LEAST_ONE_SEP",e,t);if(e instanceof Ne)return Gr("MANY_SEP",e,t);if(e instanceof Te)return Gr("MANY",e,t);if(e instanceof Me)return Wr(e,t);if(e instanceof _e)return function(e,t){var r=e.terminalType.name;return $r(t,"$.CONSUME"+e.idx+"(this.tokensMap."+r+")"+Vr)}(e,t);if(e instanceof Ce)return zr(e.definition,t);throw Error("non exhaustive match")}function Gr(e,t,r){var n=$r(r,"$."+(e+t.idx)+"(");return t.name||t.separator?(n+="{"+Vr,t.name&&(n+=$r(r+1,'NAME: "'+t.name+'"')+","+Vr),t.separator&&(n+=$r(r+1,"SEP: this.tokensMap."+t.separator.name)+","+Vr),n+="DEF: "+jr(t.definition,r+2)+Vr,n+=$r(r,"}")+Vr):n+=jr(t.definition,r+1),n+=$r(r,")")+Vr}function jr(e,t){var r="function() {"+Vr;return r+=zr(e,t),r+=$r(t,"}")+Vr}function zr(e,t){var r="";return(0,s.jJ)(e,(function(e){r+=Yr(e,t+1)})),r}function $r(e,t){return Array(4*e+1).join(" ")+t}function Kr(e){var t=function(e){return" \n"+Br(e)+"\nreturn new "+e.name+"(tokenVocabulary, config) \n"}({name:e.name,rules:e.rules}),n=new Function("tokenVocabulary","config","chevrotain",t);return function(t){return n(e.tokenVocabulary,t,r(83012))}}function Xr(e){return function(e){return"\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['chevrotain'], factory);\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory(require('chevrotain'));\n } else {\n // Browser globals (root is window)\n root.returnExports = factory(root.b);\n }\n}(typeof self !== 'undefined' ? self : this, function (chevrotain) {\n\n"+Br(e)+"\n \nreturn {\n "+e.name+": "+e.name+" \n}\n}));\n"}({name:e.name,rules:e.rules})}function qr(){console.warn("The clearCache function was 'soft' removed from the Chevrotain API.\n\t It performs no action other than printing this message.\n\t Please avoid using it as it will be completely removed in the future")}},86596:(e,t,r)=>{"use strict";function n(e){return e&&0===e.length}function s(e){return null==e?[]:Object.keys(e)}function i(e){for(var t=[],r=Object.keys(e),n=0;n<r.length;n++)t.push(e[r[n]]);return t}function o(e,t){for(var r=[],n=s(e),i=0;i<n.length;i++){var o=n[i];r.push(t.call(null,e[o],o))}return r}function a(e,t){for(var r=[],n=0;n<e.length;n++)r.push(t.call(null,e[n],n));return r}function l(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];Array.isArray(n)?t=t.concat(l(n)):t.push(n)}return t}function h(e){return n(e)?void 0:e[0]}function u(e){var t=e&&e.length;return t?e[t-1]:void 0}function c(e,t){if(Array.isArray(e))for(var r=0;r<e.length;r++)t.call(null,e[r],r);else{if(!x(e))throw Error("non exhaustive match");var n=s(e);for(r=0;r<n.length;r++){var i=n[r],o=e[i];t.call(null,o,i)}}}function d(e){return"string"==typeof e}function p(e){return void 0===e}function g(e){return e instanceof Function}function f(e,t){return void 0===t&&(t=1),e.slice(t,e.length)}function m(e,t){return void 0===t&&(t=1),e.slice(0,e.length-t)}function y(e,t){var r=[];if(Array.isArray(e))for(var n=0;n<e.length;n++){var s=e[n];t.call(null,s)&&r.push(s)}return r}function E(e,t){return y(e,(function(e){return!t(e)}))}function w(e,t){for(var r=Object.keys(e),n={},s=0;s<r.length;s++){var i=r[s],o=e[i];t(o)&&(n[i]=o)}return n}function C(e,t){return!!x(e)&&e.hasOwnProperty(t)}function v(e,t){return void 0!==T(e,(function(e){return e===t}))}function R(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r]);return t}function S(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}function T(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(t.call(null,n))return n}}function N(e,t){for(var r=[],n=0;n<e.length;n++){var s=e[n];t.call(null,s)&&r.push(s)}return r}function M(e,t,r){for(var n=Array.isArray(e),o=n?e:i(e),a=n?[]:s(e),l=r,h=0;h<o.length;h++)l=t.call(null,l,o[h],n?h:a[h]);return l}function _(e){return E(e,(function(e){return null==e}))}function b(e,t){void 0===t&&(t=function(e){return e});var r=[];return M(e,(function(e,n){var s=t(n);return v(r,s)?e:(r.push(s),e.concat(n))}),[])}function A(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=[null].concat(t);return Function.bind.apply(e,n)}function O(e){return Array.isArray(e)}function I(e){return e instanceof RegExp}function x(e){return e instanceof Object}function P(e,t){for(var r=0;r<e.length;r++)if(!t(e[r],r))return!1;return!0}function L(e,t){return E(e,(function(e){return v(t,e)}))}function D(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return!0;return!1}function k(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return r;return-1}function H(e,t){var r=R(e);return r.sort((function(e,r){return t(e)-t(r)})),r}function F(e,t){if(e.length!==t.length)throw Error("can't zipObject with different number of keys and values!");for(var r={},n=0;n<e.length;n++)r[e[n]]=t[n];return r}function U(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++)for(var i=t[n],o=s(i),a=0;a<o.length;a++){var l=o[a];e[l]=i[l]}return e}function V(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++){var i=t[n];if(!p(i))for(var o=s(i),a=0;a<o.length;a++){var l=o[a];C(e,l)||(e[l]=i[l])}}return e}function B(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return V.apply(null,[{}].concat(e))}function W(e,t){var r={};return c(e,(function(e){var n=t(e),s=r[n];s?s.push(e):r[n]=[e]})),r}function Y(e,t){for(var r=S(e),n=s(t),i=0;i<n.length;i++){var o=n[i],a=t[o];r[o]=a}return r}function G(){}function j(e){return e}function z(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(void 0!==n?n:void 0)}return t}function $(e){console&&console.error&&console.error("Error: "+e)}function K(e){console&&console.warn&&console.warn("Warning: "+e)}function X(){return"function"==typeof Map}function q(e,t){t.forEach((function(t){var r=t.prototype;Object.getOwnPropertyNames(r).forEach((function(n){if("constructor"!==n){var s=Object.getOwnPropertyDescriptor(r,n);s&&(s.get||s.set)?Object.defineProperty(e.prototype,n,s):e.prototype[n]=t.prototype[n]}}))}))}function Q(e){function t(){}t.prototype=e;var r=new t;function n(){return typeof r.bar}return n(),n(),e}function Z(e){return e[e.length-1]}function J(e){var t=(new Date).getTime(),r=e();return{time:(new Date).getTime()-t,value:r}}r.d(t,{$1:()=>h,$z:()=>W,Bl:()=>Q,Bq:()=>l,Gv:()=>x,HP:()=>s,HV:()=>u,I6:()=>T,Im:()=>n,JW:()=>N,Kg:()=>d,LG:()=>o,NT:()=>B,O1:()=>J,Si:()=>P,T9:()=>R,TS:()=>M,Tj:()=>a,Tn:()=>g,Up:()=>w,VS:()=>z,XJ:()=>q,Zi:()=>$,b0:()=>p,cy:()=>O,gR:()=>v,gc:()=>m,gd:()=>I,gv:()=>f,h1:()=>Y,iv:()=>L,jJ:()=>c,kp:()=>U,ku:()=>E,lR:()=>S,oE:()=>_,pb:()=>y,qh:()=>k,rF:()=>X,sb:()=>b,se:()=>Z,tE:()=>G,x5:()=>K,zK:()=>j,zN:()=>D,zu:()=>i,zy:()=>C})},49879:function(e,t){var r,n,s;"undefined"!=typeof self&&self,n=[],void 0===(s="function"==typeof(r=function(){function e(){}e.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},e.prototype.restoreState=function(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx},e.prototype.pattern=function(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");var t=this.disjunction();this.consumeChar("/");for(var r={type:"Flags",global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":a(r,"global");break;case"i":a(r,"ignoreCase");break;case"m":a(r,"multiLine");break;case"u":a(r,"unicode");break;case"y":a(r,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:t}},e.prototype.disjunction=function(){var e=[];for(e.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e}},e.prototype.alternative=function(){for(var e=[];this.isTerm();)e.push(this.term());return{type:"Alternative",value:e}},e.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},e.prototype.assertion=function(){switch(this.popChar()){case"^":return{type:"StartAnchor"};case"$":return{type:"EndAnchor"};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary"};case"B":return{type:"NonWordBoundary"}}throw Error("Invalid Assertion Escape");case"(":var e;switch(this.consumeChar("?"),this.popChar()){case"=":e="Lookahead";break;case"!":e="NegativeLookahead"}l(e);var t=this.disjunction();return this.consumeChar(")"),{type:e,value:t}}h()},e.prototype.quantifier=function(e){var t;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":var r=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:r,atMost:r};break;case",":t=this.isDigit()?{atLeast:r,atMost:this.integerIncludingZero()}:{atLeast:r,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;l(t)}if(!0!==e||void 0!==t)return l(t),"?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t},e.prototype.atom=function(){var e;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group()}return void 0===e&&this.isPatternCharacter()&&(e=this.patternCharacter()),l(e),this.isQuantifier()&&(e.quantifier=this.quantifier()),e},e.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[i("\n"),i("\r"),i("\u2028"),i("\u2029")]}},e.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},e.prototype.decimalEscapeAtom=function(){return{type:"GroupBackReference",value:this.positiveInteger()}},e.prototype.characterClassEscape=function(){var e,t=!1;switch(this.popChar()){case"d":e=u;break;case"D":e=u,t=!0;break;case"s":e=d;break;case"S":e=d,t=!0;break;case"w":e=c;break;case"W":e=c,t=!0}return l(e),{type:"Set",value:e,complement:t}},e.prototype.controlEscapeAtom=function(){var e;switch(this.popChar()){case"f":e=i("\f");break;case"n":e=i("\n");break;case"r":e=i("\r");break;case"t":e=i("\t");break;case"v":e=i("\v")}return l(e),{type:"Character",value:e}},e.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}},e.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:i("\0")}},e.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},e.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},e.prototype.identityEscapeAtom=function(){return{type:"Character",value:i(this.popChar())}},e.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:i(this.popChar())}}},e.prototype.characterClass=function(){var e=[],t=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);this.isClassAtom();){var r=this.classAtom();if("Character"===r.type&&this.isRangeDash()){this.consumeChar("-");var n=this.classAtom();if("Character"===n.type){if(n.value<r.value)throw Error("Range out of order in character class");e.push({from:r.value,to:n.value})}else o(r.value,e),e.push(i("-")),o(n.value,e)}else o(r.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}},e.prototype.classAtom=function(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}},e.prototype.classEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:i("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},e.prototype.group=function(){var e=!0;this.consumeChar("("),"?"===this.peekChar(0)?(this.consumeChar("?"),this.consumeChar(":"),e=!1):this.groupIdx++;var t=this.disjunction();this.consumeChar(")");var r={type:"Group",capturing:e,value:t};return e&&(r.idx=this.groupIdx),r},e.prototype.positiveInteger=function(){var e=this.popChar();if(!1===s.test(e))throw Error("Expecting a positive integer");for(;n.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)},e.prototype.integerIncludingZero=function(){var e=this.popChar();if(!1===n.test(e))throw Error("Expecting an integer");for(;n.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)},e.prototype.patternCharacter=function(){var e=this.popChar();switch(e){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:i(e)}}},e.prototype.isRegExpFlag=function(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}},e.prototype.isRangeDash=function(){return"-"===this.peekChar()&&this.isClassAtom(1)},e.prototype.isDigit=function(){return n.test(this.peekChar(0))},e.prototype.isClassAtom=function(e){switch(void 0===e&&(e=0),this.peekChar(e)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},e.prototype.isTerm=function(){return this.isAtom()||this.isAssertion()},e.prototype.isAtom=function(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}},e.prototype.isAssertion=function(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2));default:return!1}},e.prototype.isQuantifier=function(){var e=this.saveState();try{return void 0!==this.quantifier(!0)}catch(e){return!1}finally{this.restoreState(e)}},e.prototype.isPatternCharacter=function(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},e.prototype.parseHexDigits=function(e){for(var t="",n=0;n<e;n++){var s=this.popChar();if(!1===r.test(s))throw Error("Expecting a HexDecimal digits");t+=s}return{type:"Character",value:parseInt(t,16)}},e.prototype.peekChar=function(e){return void 0===e&&(e=0),this.input[this.idx+e]},e.prototype.popChar=function(){var e=this.peekChar(0);return this.consumeChar(),e},e.prototype.consumeChar=function(e){if(void 0!==e&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++};var t,r=/[0-9a-fA-F]/,n=/[0-9]/,s=/[1-9]/;function i(e){return e.charCodeAt(0)}function o(e,t){void 0!==e.length?e.forEach((function(e){t.push(e)})):t.push(e)}function a(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t]=!0}function l(e){if(void 0===e)throw Error("Internal Error - Should never get here!")}function h(){throw Error("Internal Error - Should never get here!")}var u=[];for(t=i("0");t<=i("9");t++)u.push(t);var c=[i("_")].concat(u);for(t=i("a");t<=i("z");t++)c.push(t);for(t=i("A");t<=i("Z");t++)c.push(t);var d=[i(" "),i("\f"),i("\n"),i("\r"),i("\t"),i("\v"),i("\t"),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i("\u2028"),i("\u2029"),i(" "),i(" "),i(" "),i("\ufeff")];function p(){}return p.prototype.visitChildren=function(e){for(var t in e){var r=e[t];e.hasOwnProperty(t)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach((function(e){this.visit(e)}),this))}},p.prototype.visit=function(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)},p.prototype.visitPattern=function(e){},p.prototype.visitFlags=function(e){},p.prototype.visitDisjunction=function(e){},p.prototype.visitAlternative=function(e){},p.prototype.visitStartAnchor=function(e){},p.prototype.visitEndAnchor=function(e){},p.prototype.visitWordBoundary=function(e){},p.prototype.visitNonWordBoundary=function(e){},p.prototype.visitLookahead=function(e){},p.prototype.visitNegativeLookahead=function(e){},p.prototype.visitCharacter=function(e){},p.prototype.visitSet=function(e){},p.prototype.visitGroup=function(e){},p.prototype.visitGroupBackReference=function(e){},p.prototype.visitQuantifier=function(e){},{RegExpParser:e,BaseRegExpVisitor:p,VERSION:"0.4.0"}})?r.apply(t,n):r)||(e.exports=s)},23420:e=>{function t(){}t.prototype={on:function(e,t,r){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:r}),this},once:function(e,t,r){var n=this;function s(){n.off(e,s),t.apply(r,arguments)}return s._=t,this.on(e,s,r)},emit:function(e){for(var t=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),n=0,s=r.length;n<s;n++)r[n].fn.apply(r[n].ctx,t);return this},off:function(e,t){var r=this.e||(this.e={}),n=r[e],s=[];if(n&&t)for(var i=0,o=n.length;i<o;i++)n[i].fn!==t&&n[i].fn._!==t&&s.push(n[i]);return s.length?r[e]=s:delete r[e],this}},e.exports=t,e.exports.TinyEmitter=t},85707:(e,t,r)=>{var n=r(45498);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},96784:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},11327:(e,t,r)=>{var n=r(10564).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=n(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},45498:(e,t,r)=>{var n=r(10564).default,s=r(11327);e.exports=function(e){var t=s(e,"string");return"symbol"==n(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},10564:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},44499:e=>{"use strict";
1173
+ that does not exist. Before activation, register the context using the "addContext" method.`);c=e},isCtrlPressed:()=>!g&&(m.isPressed("control")||m.isPressed("meta")),releasePressedKeys:()=>m.releasePressedKeys(),destroy:()=>m.unmount()}}},1584:(e,t,r)=>{"use strict";t.__esModule=!0,t.useRecorder=function(e,t,r,n,d){const p=e=>l.includes(e),g=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=[];return e.altKey&&r.push("alt"),t&&(e.ctrlKey||e.metaKey)?r.push("control/meta"):(e.ctrlKey&&r.push("control"),e.metaKey&&r.push("meta")),e.shiftKey&&r.push("shift"),r},f=e=>{if(!1===t(e))return;if(!1===r(e)||229===e.keyCode||"string"!=typeof e.key||(0,i.isImmediatePropagationStopped)(e))return;const o=(0,s.normalizeEventKey)(e);let l=[];p(o)||(l=g(e));const h=[o].concat(l);!d(e,h)&&((0,a.isMacOS)()&&l.includes("meta")||!(0,a.isMacOS)()&&l.includes("control"))&&d(e,[o].concat(g(e,!0))),n(e)},m=e=>{if("string"==typeof e.key){const t=(0,s.normalizeEventKey)(e);p(t)&&h.press(t)}},y=e=>{if("string"==typeof e.key){const t=(0,s.normalizeEventKey)(e);p(t)&&h.release(t)}},E=()=>{h.releaseAll()};return{mount:()=>{let t=e;for(c+=1;t;)1===c&&(t.document.documentElement.addEventListener("keydown",m),u.push({event:"keydown",listener:m}),t.document.documentElement.addEventListener("keyup",y),u.push({event:"keyup",listener:y})),t.document.documentElement.addEventListener("keydown",f),t.document.documentElement.addEventListener("blur",E),t=(0,o.getParentWindow)(t)},unmount:()=>{let t=e;for(c-=1;t;){if(0===c){for(let e=0;e<u.length;e++){const{event:r,listener:n}=u[e];t.document.documentElement.removeEventListener(r,n)}u.length=0}t.document.documentElement.removeEventListener("keydown",f),t.document.documentElement.removeEventListener("blur",E),t=(0,o.getParentWindow)(t)}},isPressed:e=>h.isPressed(e),releasePressedKeys:()=>h.releaseAll()}},r(15724);var n=r(86353),s=r(17577),i=r(77661),o=r(62577),a=r(25046);const l=["meta","alt","shift","control"],h=(0,n.createKeysObserver)(),u=[];let c=0},17577:(e,t,r)=>{"use strict";t.__esModule=!0,r(94364);const n=new Map([[" ","space"],["spacebar","space"],["scroll","scrolllock"],["del","delete"],["esc","escape"],["medianexttrack","mediatracknext"],["mediaprevioustrack","mediatrackprevious"],["volumeup","audiovolumeup"],["volumedown","audiovolumedown"],["volumemute","audiovolumemute"],["multiply","*"],["add","+"],["divide","/"],["subtract","-"],["left","arrowleft"],["right","arrowright"],["up","arrowup"],["down","arrowdown"]]);t.normalizeKeys=e=>e.map((e=>{const t=e.toLowerCase();return n.has(t)?n.get(t):t})).sort().join("+");t.getKeysList=e=>e.split("+");const s=new Map([[96,"numpad0"],[97,"numpad1"],[98,"numpad2"],[99,"numpad3"],[100,"numpad4"],[101,"numpad5"],[102,"numpad6"],[103,"numpad7"],[104,"numpad8"],[105,"numpad9"],[106,"multiply"],[107,"add"],[108,"decimal"],[109,"subtract"],[110,"decimal"],[111,"divide"],[112,"f1"],[113,"f2"],[114,"f3"],[115,"f4"],[116,"f5"],[117,"f6"],[118,"f7"],[119,"f8"],[120,"f9"],[121,"f10"],[122,"f11"],[123,"f12"],[186,"semicolon"],[187,"equal"],[188,"comma"],[189,"minus"],[190,"period"],[191,"slash"],[192,"backquote"],[219,"bracketleft"],[220,"backslash"],[221,"bracketright"],[222,"quote"]]);t.normalizeEventKey=e=>{let{which:t,key:r}=e;if(s.has(t))return s.get(t);const n=String.fromCharCode(t).toLowerCase();return/^[a-z0-9]$/.test(n)?n:r.toLowerCase()}},33925:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834),r(15724);var s=n(r(85707)),i=r(62577),o=n(r(3849)),a=r(77661),l=n(r(50206)),h=r(87642),u=r(45435),c=r(71120);function d(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){return e.get(m(e,t))}function f(e,t,r){return e.set(m(e,t),r),r}function m(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var y=new WeakMap,E=new WeakMap,w=new WeakMap,C=new WeakMap,v=new WeakMap,R=new WeakMap,S=new WeakMap,T=new WeakSet;function N(){return parseInt(this.hot.rootElement.getAttribute((0,c.A11Y_COLCOUNT)()[0]),10)}function M(e){const t=m(T,this,N).call(this)+e;(0,i.setAttribute)(this.hot.rootElement,...(0,c.A11Y_COLCOUNT)(t))}function _(){const e=this.hot.rootElement;this.hasVerticalScroll()?(0,i.addClass)(e,"htHasScrollY"):(0,i.removeClass)(e,"htHasScrollY"),this.hasHorizontalScroll()?(0,i.addClass)(e,"htHasScrollX"):(0,i.removeClass)(e,"htHasScrollX")}t.default=class{constructor(e){var t,r;p(t=this,r=T),r.add(t),(0,s.default)(this,"hot",void 0),(0,s.default)(this,"eventManager",void 0),(0,s.default)(this,"settings",void 0),(0,s.default)(this,"THEAD",void 0),(0,s.default)(this,"TBODY",void 0),(0,s.default)(this,"_wt",void 0),(0,s.default)(this,"activeWt",void 0),d(this,y,0),d(this,E,0),(0,s.default)(this,"postponedAdjustElementsSize",!1),d(this,w,!1),d(this,C,void 0),d(this,v,void 0),d(this,R,0),d(this,S,0),this.hot=e,this.eventManager=new o.default(this.hot),this.settings=this.hot.getSettings(),this.createElements(),this.registerEvents(),this.initializeWalkontable()}render(){this.hot.isRenderSuspended()||(this.hot.runHooks("beforeRender",this.hot.forceFullRender),this.postponedAdjustElementsSize&&(this.postponedAdjustElementsSize=!1,this.adjustElementsSize()),this._wt.draw(!this.hot.forceFullRender),m(T,this,_).call(this),this.hot.runHooks("afterRender",this.hot.forceFullRender),this.hot.forceFullRender=!1,this.hot.renderCall=!1)}adjustElementsSize(){this.hot.isRenderSuspended()?this.postponedAdjustElementsSize=!0:this._wt.wtOverlays.adjustElementsSize()}getCellAtCoords(e,t){const r=this._wt.getCell(e,t);return r<0?null:r}scrollViewport(e,t,r){return this._wt.scrollViewport(e,t,r)}scrollViewportHorizontally(e,t){return this._wt.scrollViewportHorizontally(e,t)}scrollViewportVertically(e,t){return this._wt.scrollViewportVertically(e,t)}createElements(){const{rootElement:e,rootDocument:t}=this.hot,r=e.getAttribute("style");r&&e.setAttribute("data-originalstyle",r),(0,i.addClass)(e,"handsontable"),f(v,this,t.createElement("TABLE")),(0,i.addClass)(g(v,this),"htCore"),this.hot.getSettings().tableClassName&&(0,i.addClass)(g(v,this),this.hot.getSettings().tableClassName),this.settings.ariaTags&&((0,i.setAttribute)(g(v,this),[(0,c.A11Y_PRESENTATION)()]),(0,i.setAttribute)(e,[(0,c.A11Y_TREEGRID)(),(0,c.A11Y_ROWCOUNT)(-1),(0,c.A11Y_COLCOUNT)(this.hot.countCols()),(0,c.A11Y_MULTISELECTABLE)()])),this.THEAD=t.createElement("THEAD"),g(v,this).appendChild(this.THEAD),this.TBODY=t.createElement("TBODY"),g(v,this).appendChild(this.TBODY),this.hot.table=g(v,this),this.hot.container.insertBefore(g(v,this),this.hot.container.firstChild)}registerEvents(){const{rootElement:e,rootDocument:t,selection:r,rootWindow:n}=this.hot,s=t.documentElement;this.eventManager.addEventListener(e,"mousedown",(e=>{f(w,this,!0),this.isTextSelectionAllowed(e.target)||((0,i.clearTextSelection)(n),e.preventDefault(),n.focus())})),this.eventManager.addEventListener(e,"mouseup",(()=>{f(w,this,!1)})),this.eventManager.addEventListener(e,"mousemove",(e=>{g(w,this)&&!this.isTextSelectionAllowed(e.target)&&(this.settings.fragmentSelection&&(0,i.clearTextSelection)(n),e.preventDefault())})),this.eventManager.addEventListener(s,"keyup",(e=>{r.isInProgress()&&!e.shiftKey&&r.finish()})),this.eventManager.addEventListener(s,"mouseup",(n=>{r.isInProgress()&&(0,a.isLeftClick)(n)&&r.finish(),f(C,this,!1);const s=(0,i.isOutsideInput)(t.activeElement);(0,i.isInput)(t.activeElement)&&!s||!s&&(r.isSelected()||r.isSelectedByAnyHeader()||e.contains(n.target)||(0,a.isRightClick)(n))||this.hot.unlisten()})),this.eventManager.addEventListener(s,"contextmenu",(e=>{r.isInProgress()&&(0,a.isRightClick)(e)&&(r.finish(),f(C,this,!1))})),this.eventManager.addEventListener(s,"touchend",(()=>{r.isInProgress()&&r.finish(),f(C,this,!1)})),this.eventManager.addEventListener(s,"mousedown",(r=>{const n=r.target,o=r.x||r.clientX,a=r.y||r.clientY;let l=r.target;if(g(C,this)||!e||!this.hot.view)return;const{holder:h}=this._wt.wtTable;if(l===h){const e=(0,i.getScrollbarWidth)(t);if(t.elementFromPoint(o+e,a)!==h||t.elementFromPoint(o,a+e)!==h)return}else for(;l!==s;){if(null===l){if(r.isTargetWebComponent)break;return}if(l===e)return;l=l.parentNode}("function"==typeof this.settings.outsideClickDeselects?this.settings.outsideClickDeselects(n):this.settings.outsideClickDeselects)?this.hot.deselectCell():this.hot.destroyEditor(!1,!1)}));let o=(0,i.getParentWindow)(n);for(;null!==o;)this.eventManager.addEventListener(o.document.documentElement,"click",(()=>{this.hot.unlisten()})),o=(0,i.getParentWindow)(o);this.eventManager.addEventListener(g(v,this),"selectstart",(e=>{this.settings.fragmentSelection||(0,i.isInput)(e.target)||e.preventDefault()}))}translateFromRenderableToVisualCoords(e){let{row:t,col:r}=e;return this.hot._createCellCoords(...this.translateFromRenderableToVisualIndex(t,r))}translateFromRenderableToVisualIndex(e,t){let r=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e,n=t>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(t):t;return null===r&&(r=e),null===n&&(n=t),[r,n]}countRenderableIndexes(e,t){const r=Math.min(e.getNotTrimmedIndexesLength(),t),n=e.getNearestNotHiddenIndex(r-1,-1);return null===n?0:e.getRenderableFromVisualIndex(n)+1}countRenderableColumns(){return this.countRenderableIndexes(this.hot.columnIndexMapper,this.settings.maxCols)}countRenderableRows(){return this.countRenderableIndexes(this.hot.rowIndexMapper,this.settings.maxRows)}countNotHiddenRowIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.rowIndexMapper,this.countRenderableRows())}countNotHiddenColumnIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.columnIndexMapper,this.countRenderableColumns())}countNotHiddenIndexes(e,t,r,n){if(isNaN(e)||e<0)return 0;const s=r.getNearestNotHiddenIndex(e,t),i=r.getRenderableFromVisualIndex(s);if(!Number.isInteger(i))return 0;let o=0;return t<0?o=i+1:t>0&&(o=n-i),o}countNotHiddenFixedColumnsStart(){const e=this.hot.countCols(),t=Math.min(parseInt(this.settings.fixedColumnsStart,10),e)-1;return this.countNotHiddenColumnIndexes(t,-1)}countNotHiddenFixedRowsTop(){const e=this.hot.countRows(),t=Math.min(parseInt(this.settings.fixedRowsTop,10),e)-1;return this.countNotHiddenRowIndexes(t,-1)}countNotHiddenFixedRowsBottom(){const e=this.hot.countRows(),t=Math.max(e-parseInt(this.settings.fixedRowsBottom,10),0);return this.countNotHiddenRowIndexes(t,1)}countRenderableColumnsInRange(e,t){let r=0;for(let n=e;n<=t;n++)null!==this.hot.columnIndexMapper.getRenderableFromVisualIndex(n)&&(r+=1);return r}countRenderableRowsInRange(e,t){let r=0;for(let n=e;n<=t;n++)null!==this.hot.rowIndexMapper.getRenderableFromVisualIndex(n)&&(r+=1);return r}getStylesHandler(){return this._wt.stylesHandler}getDefaultRowHeight(){return this._wt.stylesHandler.getDefaultRowHeight()}addClassNameToLicenseElement(e){var t;const r=null===(t=this.hot.rootElement.parentNode)||void 0===t?void 0:t.querySelector(".hot-display-license-info");r&&(0,i.addClass)(r,e)}removeClassNameFromLicenseElement(e){var t;const r=null===(t=this.hot.rootElement.parentNode)||void 0===t?void 0:t.querySelector(".hot-display-license-info");r&&(0,i.removeClass)(r,e)}isMainTableNotFullyCoveredByOverlays(){const e=this.countNotHiddenFixedRowsTop()+this.countNotHiddenFixedRowsBottom(),t=this.countNotHiddenFixedColumnsStart();return this.hot.countRenderedRows()>e&&this.hot.countRenderedCols()>t}initializeWalkontable(){const e={ariaTags:this.settings.ariaTags,rtlMode:this.hot.isRtl(),externalRowCalculator:this.hot.getPlugin("autoRowSize")&&this.hot.getPlugin("autoRowSize").isEnabled(),table:g(v,this),isDataViewInstance:()=>(0,u.isRootInstance)(this.hot),preventOverflow:()=>this.settings.preventOverflow,preventWheel:()=>this.settings.preventWheel,viewportColumnRenderingThreshold:()=>this.settings.viewportColumnRenderingThreshold,viewportRowRenderingThreshold:()=>this.settings.viewportRowRenderingThreshold,data:(e,t)=>this.hot.getDataAtCell(...this.translateFromRenderableToVisualIndex(e,t)),totalRows:()=>this.countRenderableRows(),totalColumns:()=>this.countRenderableColumns(),fixedColumnsStart:()=>this.countNotHiddenFixedColumnsStart(),fixedRowsTop:()=>this.countNotHiddenFixedRowsTop(),fixedRowsBottom:()=>this.countNotHiddenFixedRowsBottom(),shouldRenderInlineStartOverlay:()=>this.settings.fixedColumnsStart>0||e.rowHeaders().length>0,shouldRenderTopOverlay:()=>this.settings.fixedRowsTop>0||e.columnHeaders().length>0,shouldRenderBottomOverlay:()=>this.settings.fixedRowsBottom>0,minSpareRows:()=>this.settings.minSpareRows,renderAllRows:this.settings.renderAllRows,renderAllColumns:this.settings.renderAllColumns,rowHeaders:()=>{const e=[];return this.hot.hasRowHeaders()&&e.push(((e,t)=>{const r=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e;this.appendRowHeader(r,t)})),this.hot.runHooks("afterGetRowHeaderRenderers",e),f(E,this,e.length),this.hot.getSettings().ariaTags&&m(T,this,N).call(this)===this.hot.countCols()&&m(T,this,M).call(this,g(E,this)),e},columnHeaders:()=>{const e=[];return this.hot.hasColHeaders()&&e.push(((e,t)=>{const r=e>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(e):e;this.appendColHeader(r,t)})),this.hot.runHooks("afterGetColumnHeaderRenderers",e),f(y,this,e.length),e},columnWidth:e=>{const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e);return this.hot.getColWidth(null===t?e:t)},rowHeight:e=>{const t=this.hot.rowIndexMapper.getVisualFromRenderableIndex(e);return this.hot.getRowHeight(null===t?e:t)},rowHeightByOverlayName:(e,t)=>{const r=this.hot.rowIndexMapper.getVisualFromRenderableIndex(e),n=null===r?e:r;return this.hot.runHooks("modifyRowHeightByOverlayName",this.hot.getRowHeight(n),n,t)},cellRenderer:(e,t,r)=>{const[n,s]=this.translateFromRenderableToVisualIndex(e,t),i=this.hot.runHooks("modifyGetCellCoords",n,s,!1,"meta");let o=n,a=s;Array.isArray(i)&&([o,a]=i);const l=this.hot.getCellMeta(o,a),h=this.hot.colToProp(a);let u=this.hot.getDataAtRowProp(o,h);this.hot.hasHook("beforeValueRender")&&(u=this.hot.runHooks("beforeValueRender",u,l)),this.hot.runHooks("beforeRenderer",r,n,s,h,u,l),this.hot.getCellRenderer(l)(this.hot,r,n,s,h,u,l),this.hot.runHooks("afterRenderer",r,n,s,h,u,l)},selections:this.hot.selection.highlight,hideBorderOnMouseDownOver:()=>this.settings.fragmentSelection,onWindowResize:()=>{this.hot&&!this.hot.isDestroyed&&this.hot.refreshDimensions()},onContainerElementResize:()=>{this.hot&&!this.hot.isDestroyed&&(0,i.isVisible)(this.hot.rootElement)&&this.hot.refreshDimensions()},onCellMouseDown:(e,t,r,n)=>{const s=this.translateFromRenderableToVisualCoords(t),i={row:!1,column:!1,cell:!1};this.hot.listen(),this.activeWt=n,f(C,this,!0),this.hot.runHooks("beforeOnCellMouseDown",e,s,r,i),(0,a.isImmediatePropagationStopped)(e)||((0,h.handleMouseEvent)(e,{coords:s,selection:this.hot.selection,controller:i,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseDown",e,s,r),this.activeWt=this._wt)},onCellContextMenu:(e,t,r,n)=>{const s=this.translateFromRenderableToVisualCoords(t);this.activeWt=n,f(C,this,!1),this.hot.selection.isInProgress()&&this.hot.selection.finish(),this.hot.runHooks("beforeOnCellContextMenu",e,s,r),(0,a.isImmediatePropagationStopped)(e)||(this.hot.runHooks("afterOnCellContextMenu",e,s,r),this.activeWt=this._wt)},onCellMouseOut:(e,t,r,n)=>{const s=this.translateFromRenderableToVisualCoords(t);this.activeWt=n,this.hot.runHooks("beforeOnCellMouseOut",e,s,r),(0,a.isImmediatePropagationStopped)(e)||(this.hot.runHooks("afterOnCellMouseOut",e,s,r),this.activeWt=this._wt)},onCellMouseOver:(e,t,r,n)=>{const s=this.translateFromRenderableToVisualCoords(t),i={row:!1,column:!1,cell:!1};this.activeWt=n,this.hot.runHooks("beforeOnCellMouseOver",e,s,r,i),(0,a.isImmediatePropagationStopped)(e)||(g(C,this)&&(0,h.handleMouseEvent)(e,{coords:s,selection:this.hot.selection,controller:i,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseOver",e,s,r),this.activeWt=this._wt)},onCellMouseUp:(e,t,r,n)=>{const s=this.translateFromRenderableToVisualCoords(t);this.activeWt=n,this.hot.runHooks("beforeOnCellMouseUp",e,s,r),(0,a.isImmediatePropagationStopped)(e)||this.hot.isDestroyed||(this.hot.runHooks("afterOnCellMouseUp",e,s,r),this.activeWt=this._wt)},onCellCornerMouseDown:e=>{e.preventDefault(),this.hot.runHooks("afterOnCellCornerMouseDown",e)},onCellCornerDblClick:e=>{e.preventDefault(),this.hot.runHooks("afterOnCellCornerDblClick",e)},beforeDraw:(e,t)=>this.beforeRender(e,t),onDraw:e=>this.afterRender(e),onBeforeViewportScrollVertically:(e,t)=>{const r=this.hot.rowIndexMapper,n=e<0;let s=e;return n||(s=r.getVisualFromRenderableIndex(e),null!==s)?(s=this.hot.runHooks("beforeViewportScrollVertically",s,t),this.hot.runHooks("beforeViewportScroll"),n?s:r.getRenderableFromVisualIndex(s)):e},onBeforeViewportScrollHorizontally:(e,t)=>{const r=this.hot.columnIndexMapper,n=e<0;let s=e;return n||(s=r.getVisualFromRenderableIndex(e),null!==s)?(s=this.hot.runHooks("beforeViewportScrollHorizontally",s,t),this.hot.runHooks("beforeViewportScroll"),n?s:r.getRenderableFromVisualIndex(s)):e},onScrollVertically:()=>{this.hot.runHooks("afterScrollVertically"),this.hot.runHooks("afterScroll")},onScrollHorizontally:()=>{this.hot.runHooks("afterScrollHorizontally"),this.hot.runHooks("afterScroll")},onBeforeRemoveCellClassNames:()=>this.hot.runHooks("beforeRemoveCellClassNames"),onBeforeHighlightingRowHeader:(e,t,r)=>{const n=this.hot.rowIndexMapper,s=e<0;let i=e;s||(i=n.getVisualFromRenderableIndex(e));const o=this.hot.runHooks("beforeHighlightingRowHeader",i,t,r);return s?o:n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(o,1))},onBeforeHighlightingColumnHeader:(e,t,r)=>{const n=this.hot.columnIndexMapper,s=e<0;let i=e;s||(i=n.getVisualFromRenderableIndex(e));const o=this.hot.runHooks("beforeHighlightingColumnHeader",i,t,r);return s?o:n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(o,1))},onAfterDrawSelection:(e,t,r)=>{let n;const[s,i]=this.translateFromRenderableToVisualIndex(e,t),o=this.hot.selection.getSelectedRange();if(o.size()>0){const e=o.peekByIndex(null!=r?r:0);n=[e.from.row,e.from.col,e.to.row,e.to.col]}return this.hot.runHooks("afterDrawSelection",s,i,n,r)},onBeforeDrawBorders:(e,t)=>{const[r,n,s,i]=e,o=[this.hot.rowIndexMapper.getVisualFromRenderableIndex(r),this.hot.columnIndexMapper.getVisualFromRenderableIndex(n),this.hot.rowIndexMapper.getVisualFromRenderableIndex(s),this.hot.columnIndexMapper.getVisualFromRenderableIndex(i)];return this.hot.runHooks("beforeDrawBorders",o,t)},onBeforeTouchScroll:()=>this.hot.runHooks("beforeTouchScroll"),onAfterMomentumScroll:()=>this.hot.runHooks("afterMomentumScroll"),onModifyRowHeaderWidth:e=>this.hot.runHooks("modifyRowHeaderWidth",e),onModifyGetCellCoords:(e,t,r,n)=>{const s=this.hot.rowIndexMapper,i=this.hot.columnIndexMapper,o=t>=0?i.getVisualFromRenderableIndex(t):t,a=e>=0?s.getVisualFromRenderableIndex(e):e,l=this.hot.runHooks("modifyGetCellCoords",a,o,r,n);if(Array.isArray(l)){const[e,t,r,n]=l;return[e>=0?s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(e,1)):e,t>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(t,1)):t,r>=0?s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(r,-1)):r,n>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(n,-1)):n]}},onModifyGetCoordsElement:(e,t)=>{const r=this.hot.rowIndexMapper,n=this.hot.columnIndexMapper,s=t>=0?n.getVisualFromRenderableIndex(t):t,i=e>=0?r.getVisualFromRenderableIndex(e):e,o=this.hot.runHooks("modifyGetCoordsElement",i,s);if(Array.isArray(o)){const[e,t]=o;return[e>=0?r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(e,1)):e,t>=0?n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(t,1)):t]}},viewportRowCalculatorOverride:e=>{let t=this.settings.viewportRowRenderingOffset;if("auto"===t&&this.settings.fixedRowsTop&&(t=10),t>0||"auto"===t){const r=this.countRenderableRows(),n=e.startRow,s=e.endRow;if("number"==typeof t)e.startRow=Math.max(n-t,0),e.endRow=Math.min(s+t,r-1);else if("auto"===t){const t=Math.max(1,Math.ceil(s/r*12));e.startRow=Math.max(n-t,0),e.endRow=Math.min(s+t,r-1)}}this.hot.runHooks("afterViewportRowCalculatorOverride",e)},viewportColumnCalculatorOverride:e=>{let t=this.settings.viewportColumnRenderingOffset;if("auto"===t&&this.settings.fixedColumnsStart&&(t=10),t>0||"auto"===t){const r=this.countRenderableColumns(),n=e.startColumn,s=e.endColumn;if("number"==typeof t&&(e.startColumn=Math.max(n-t,0),e.endColumn=Math.min(s+t,r-1)),"auto"===t){const t=Math.max(1,Math.ceil(s/r*6));e.startColumn=Math.max(n-t,0),e.endColumn=Math.min(s+t,r-1)}}this.hot.runHooks("afterViewportColumnCalculatorOverride",e)},rowHeaderWidth:()=>this.settings.rowHeaderWidth,columnHeaderHeight:()=>{const e=this.hot.runHooks("modifyColumnHeaderHeight");return this.settings.columnHeaderHeight||e}};this.hot.runHooks("beforeInitWalkontable",e),this._wt=new l.default(e),this.activeWt=this._wt;const t=this._wt.wtTable.spreader,{width:r,height:n}=this.hot.rootElement.getBoundingClientRect();this.setLastSize(r,n),this.eventManager.addEventListener(t,"mousedown",(e=>{e.target===t&&3===e.which&&e.stopPropagation()})),this.eventManager.addEventListener(t,"contextmenu",(e=>{e.target===t&&3===e.which&&e.stopPropagation()})),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"click",(()=>{this.settings.observeDOMVisibility&&this._wt.drawInterrupted&&(this.hot.forceFullRender=!0,this.render())}))}isTextSelectionAllowed(e){if((0,i.isInput)(e))return!0;const t=(0,i.isChildOf)(e,this._wt.wtTable.spreader);return!(!0!==this.settings.fragmentSelection||!t)||(!("cell"!==this.settings.fragmentSelection||!this.isSelectedOnlyCell()||!t)||!(this.settings.fragmentSelection||!this.isCellEdited()||!this.isSelectedOnlyCell()))}isMouseDown(){return g(C,this)}isSelectedOnlyCell(){var e,t;return null!==(e=null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingleCell())&&void 0!==e&&e}isCellEdited(){const e=this.hot.getActiveEditor();return e&&e.isOpened()}beforeRender(e,t){e&&this.hot.runHooks("beforeViewRender",this.hot.forceFullRender,t)}afterRender(e){e&&this.hot.runHooks("afterViewRender",this.hot.forceFullRender)}appendRowHeader(e,t){if(t.firstChild){const r=t.firstChild;if(!(0,i.hasClass)(r,"relative"))return(0,i.empty)(t),void this.appendRowHeader(e,t);this.updateCellHeader(r.querySelector(".rowHeader"),e,this.hot.getRowHeader)}else{const{rootDocument:r,getRowHeader:n}=this.hot,s=r.createElement("div"),i=r.createElement("span");s.className="relative",i.className="rowHeader",this.updateCellHeader(i,e,n),s.appendChild(i),t.appendChild(s)}this.hot.runHooks("afterGetRowHeader",e,t)}appendColHeader(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hot.getColHeader,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const s=()=>{const t=e>=0?this.hot.getColumnMeta(e).headerClassName:null;return t?t.split(" "):[]};if(t.firstChild){const o=t.firstChild;(0,i.hasClass)(o,"relative")?(this.updateCellHeader(o.querySelector(".colHeader"),e,r,n),o.className="",(0,i.addClass)(o,["relative",...s()])):((0,i.empty)(t),this.appendColHeader(e,t,r,n))}else{const{rootDocument:o}=this.hot,a=o.createElement("div"),l=o.createElement("span"),h=s();a.classList.add("relative",...h),l.className="colHeader",this.settings.ariaTags&&((0,i.setAttribute)(a,...(0,c.A11Y_PRESENTATION)()),(0,i.setAttribute)(l,...(0,c.A11Y_PRESENTATION)())),this.updateCellHeader(l,e,r,n),a.appendChild(l),t.appendChild(a)}this.hot.runHooks("afterGetColHeader",e,t,n)}updateCellHeader(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=t;const o=this._wt.wtOverlays.getParentOverlay(e)||this._wt;e.parentNode&&((0,i.hasClass)(e,"colHeader")?s=o.wtTable.columnFilter.sourceToRendered(t):(0,i.hasClass)(e,"rowHeader")&&(s=o.wtTable.rowFilter.sourceToRendered(t))),s>-1?(0,i.fastInnerHTML)(e,r(t,n)):((0,i.fastInnerText)(e,String.fromCharCode(160)),(0,i.addClass)(e,"cornerHeader"))}maximumVisibleElementWidth(e){const t=this._wt.wtViewport.getWorkspaceWidth()-e;return t>0?t:0}maximumVisibleElementHeight(e){const t=this._wt.wtViewport.getWorkspaceHeight()-e;return t>0?t:0}setLastSize(e,t){f(R,this,e),f(S,this,t)}getLastSize(){return{width:g(R,this),height:g(S,this)}}getFirstRenderedVisibleRow(){if(!this._wt.wtViewport.rowsRenderCalculator)return null;const e=this.hot.rowIndexMapper,t=e.getVisualFromRenderableIndex(this._wt.wtTable.getFirstRenderedRow());return e.getNearestNotHiddenIndex(null!=t?t:0,1)}getLastRenderedVisibleRow(){if(!this._wt.wtViewport.rowsRenderCalculator)return null;const e=this.hot.rowIndexMapper,t=e.getVisualFromRenderableIndex(this._wt.wtTable.getLastRenderedRow());return e.getNearestNotHiddenIndex(null!=t?t:this.hot.countRows()-1,-1)}getFirstRenderedVisibleColumn(){if(!this._wt.wtViewport.columnsRenderCalculator)return null;const e=this.hot.columnIndexMapper,t=e.getVisualFromRenderableIndex(this._wt.wtTable.getFirstRenderedColumn());return e.getNearestNotHiddenIndex(null!=t?t:0,1)}getLastRenderedVisibleColumn(){if(!this._wt.wtViewport.columnsRenderCalculator)return null;const e=this.hot.columnIndexMapper,t=e.getVisualFromRenderableIndex(this._wt.wtTable.getLastRenderedColumn());return e.getNearestNotHiddenIndex(null!=t?t:this.hot.countCols()-1,-1)}getFirstFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstVisibleRow())}getLastFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastVisibleRow())}getFirstFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstVisibleColumn())}getLastFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastVisibleColumn())}getFirstPartiallyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstPartiallyVisibleRow())}getLastPartiallyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastPartiallyVisibleRow())}getFirstPartiallyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstPartiallyVisibleColumn())}getLastPartiallyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastPartiallyVisibleColumn())}getColumnHeadersCount(){return g(y,this)}getRowHeadersCount(){return g(E,this)}getViewportWidth(){return this._wt.wtViewport.getViewportWidth()}getWorkspaceWidth(){return this._wt.wtViewport.getWorkspaceWidth()}getViewportHeight(){return this._wt.wtViewport.getViewportHeight()}getWorkspaceHeight(){return this._wt.wtViewport.getWorkspaceHeight()}getElementOverlayName(e){var t;return(null!==(t=this._wt.wtOverlays.getParentOverlay(e))&&void 0!==t?t:this._wt).wtTable.name}getOverlayByName(e){return this._wt.getOverlayByName(e)}getActiveOverlayName(){return this._wt.activeOverlayName}isVisible(){return this._wt.wtTable.isVisible()}hasVerticalScroll(){return this._wt.wtViewport.hasVerticalScroll()}hasHorizontalScroll(){return this._wt.wtViewport.hasHorizontalScroll()}getTableWidth(){return this._wt.wtTable.getWidth()}getTableHeight(){return this._wt.wtTable.getHeight()}getRowHeaderWidth(){return this._wt.wtViewport.getRowHeaderWidth()}getColumnHeaderHeight(){return this._wt.wtViewport.getColumnHeaderHeight()}isVerticallyScrollableByWindow(){return this._wt.wtViewport.isVerticallyScrollableByWindow()}isHorizontallyScrollableByWindow(){return this._wt.wtViewport.isHorizontallyScrollableByWindow()}destroy(){this._wt.destroy(),this.eventManager.destroy()}}},73001:(e,t,r)=>{"use strict";t.__esModule=!0,r(67834),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620),r(14846),r(69655);var n=r(68838),s=r(89027);function i(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)}function o(e,t){return e.get(l(e,t))}function a(e,t,r){return e.set(l(e,t),r),r}function l(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var h=new WeakMap,u=new WeakMap,c=new WeakMap,d=new WeakMap,p=new WeakMap;t.ChangesObservable=class{constructor(){let{initialIndexValue:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,h,new Set),i(this,u,[]),i(this,c,[]),i(this,d,!1),i(this,p,!1),a(p,this,null!=e&&e)}createObserver(){const e=new n.ChangesObserver;return o(h,this).add(e),e.addLocalHook("unsubscribe",(()=>{o(h,this).delete(e)})),e._writeInitialChanges((0,s.arrayDiff)(o(u,this),o(c,this))),e}emit(e){let t=o(c,this);o(d,this)&&o(u,this).length===e.length||(0===e.length?e=new Array(t.length).fill(o(p,this)):a(u,this,new Array(e.length).fill(o(p,this))),o(d,this)||(a(d,this,!0),t=o(u,this)));const r=(0,s.arrayDiff)(t,e);o(h,this).forEach((e=>e._write(r))),a(c,this,e)}}},68838:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834);var s=r(25499),i=n(r(16050));function o(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)}function a(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var l=new WeakMap;class h{constructor(){o(this,l,[])}subscribe(e){var t,r;return this.addLocalHook("change",e),this._write((r=this,(t=l).get(a(t,r)))),this}unsubscribe(){return this.runLocalHooks("unsubscribe"),this.clearLocalHooks(),this}_write(e){return e.length>0&&this.runLocalHooks("change",e),this}_writeInitialChanges(e){var t,r,n;r=this,n=e,(t=l).set(a(t,r),n)}}t.ChangesObserver=h,(0,s.mixin)(h,i.default)},89027:(e,t,r)=>{"use strict";t.__esModule=!0,t.arrayDiff=function(e,t){const r=[];let n=0,s=0;for(;n<e.length&&s<t.length;n++,s++)e[n]!==t[s]&&r.push({op:"replace",index:s,oldValue:e[n],newValue:t[s]});for(;n<t.length;n++)r.push({op:"insert",index:n,oldValue:void 0,newValue:t[n]});for(;s<e.length;s++)r.push({op:"remove",index:s,oldValue:e[s],newValue:void 0});return r},r(15724)},61149:(e,t,r)=>{"use strict";r(14846),r(69655),t.__esModule=!0;var n={IndexMapper:!0,getRegisteredMapsCounter:!0,getIncreasedIndexes:!0,getDecreasedIndexes:!0,alterUtilsFactory:!0},s=r(81667);t.IndexMapper=s.IndexMapper;var i=r(47675);t.getRegisteredMapsCounter=i.getRegisteredMapsCounter;var o=r(88795);t.getIncreasedIndexes=o.getIncreasedIndexes,t.getDecreasedIndexes=o.getDecreasedIndexes,t.alterUtilsFactory=o.alterUtilsFactory;var a=r(74761);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===a[e]||(t[e]=a[e]))}))},81667:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707));r(67834),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620),r(14846),r(27458),r(94364),r(75568);var i=r(10587),o=r(74761),a=r(98045),l=n(r(16050)),h=r(25499),u=r(70505),c=r(73001);new Set;class d{constructor(){(0,s.default)(this,"indexesSequence",new o.IndexesSequence),(0,s.default)(this,"trimmingMapsCollection",new a.AggregatedCollection((e=>e.some((e=>!0===e))),!1)),(0,s.default)(this,"hidingMapsCollection",new a.AggregatedCollection((e=>e.some((e=>!0===e))),!1)),(0,s.default)(this,"variousMapsCollection",new a.MapCollection),(0,s.default)(this,"hidingChangesObservable",new c.ChangesObservable({initialIndexValue:!1})),(0,s.default)(this,"notTrimmedIndexesCache",[]),(0,s.default)(this,"notHiddenIndexesCache",[]),(0,s.default)(this,"isBatched",!1),(0,s.default)(this,"indexesSequenceChanged",!1),(0,s.default)(this,"indexesChangeSource",void 0),(0,s.default)(this,"trimmedIndexesChanged",!1),(0,s.default)(this,"hiddenIndexesChanged",!1),(0,s.default)(this,"renderablePhysicalIndexesCache",[]),(0,s.default)(this,"fromPhysicalToVisualIndexesCache",new Map),(0,s.default)(this,"fromVisualToRenderableIndexesCache",new Map),this.indexesSequence.addLocalHook("change",(()=>{this.indexesSequenceChanged=!0,this.updateCache(),this.runLocalHooks("indexesSequenceChange",this.indexesChangeSource),this.runLocalHooks("change",this.indexesSequence,null)})),this.trimmingMapsCollection.addLocalHook("change",(e=>{this.trimmedIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.trimmingMapsCollection)})),this.hidingMapsCollection.addLocalHook("change",(e=>{this.hiddenIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.hidingMapsCollection)})),this.variousMapsCollection.addLocalHook("change",(e=>{this.runLocalHooks("change",e,this.variousMapsCollection)}))}suspendOperations(){this.isBatched=!0}resumeOperations(){this.isBatched=!1,this.updateCache()}createChangesObserver(e){if("hiding"!==e)throw new Error(`Unsupported index map type "${e}".`);return this.hidingChangesObservable.createObserver()}createAndRegisterIndexMap(e,t,r){return this.registerMap(e,(0,o.createIndexMap)(t,r))}registerMap(e,t){if(this.trimmingMapsCollection.get(e)||this.hidingMapsCollection.get(e)||this.variousMapsCollection.get(e))throw Error(`Map with name "${e}" has been already registered.`);t instanceof o.TrimmingMap?this.trimmingMapsCollection.register(e,t):t instanceof o.HidingMap?this.hidingMapsCollection.register(e,t):this.variousMapsCollection.register(e,t);const r=this.getNumberOfIndexes();return r>0&&t.init(r),t}unregisterMap(e){this.trimmingMapsCollection.unregister(e),this.hidingMapsCollection.unregister(e),this.variousMapsCollection.unregister(e)}unregisterAll(){this.trimmingMapsCollection.unregisterAll(),this.hidingMapsCollection.unregisterAll(),this.variousMapsCollection.unregisterAll()}getPhysicalFromVisualIndex(e){const t=this.notTrimmedIndexesCache[e];return(0,u.isDefined)(t)?t:null}getPhysicalFromRenderableIndex(e){const t=this.renderablePhysicalIndexesCache[e];return(0,u.isDefined)(t)?t:null}getVisualFromPhysicalIndex(e){const t=this.fromPhysicalToVisualIndexesCache.get(e);return(0,u.isDefined)(t)?t:null}getVisualFromRenderableIndex(e){return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(e))}getRenderableFromVisualIndex(e){const t=this.fromVisualToRenderableIndexesCache.get(e);return(0,u.isDefined)(t)?t:null}getNearestNotHiddenIndex(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null===this.getPhysicalFromVisualIndex(e))return null;if(this.fromVisualToRenderableIndexesCache.has(e))return e;const n=Array.from(this.fromVisualToRenderableIndexesCache.keys());let s=-1;return s=t>0?n.findIndex((t=>t>e)):n.reverse().findIndex((t=>t<e)),-1===s?r?this.getNearestNotHiddenIndex(e,-t,!1):null:n[s]}initToLength(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getNumberOfIndexes();this.notTrimmedIndexesCache=[...new Array(e).keys()],this.notHiddenIndexesCache=[...new Array(e).keys()],this.suspendOperations(),this.indexesChangeSource="init",this.indexesSequence.init(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.initEvery(e),this.resumeOperations(),this.suspendOperations(),this.hidingMapsCollection.initEvery(e),this.variousMapsCollection.initEvery(e),this.resumeOperations(),this.runLocalHooks("init")}fitToLength(e){const t=this.getNumberOfIndexes();if(e<t){const t=[...Array(this.getNumberOfIndexes()-e).keys()].map((t=>t+e));this.removeIndexes(t)}else this.insertIndexes(t,e-t)}getIndexesSequence(){return this.indexesSequence.getValues()}setIndexesSequence(e){void 0===this.indexesChangeSource&&(this.indexesChangeSource="update"),this.indexesSequence.setValues(e),"update"===this.indexesChangeSource&&(this.indexesChangeSource=void 0)}getNotTrimmedIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.notTrimmedIndexesCache;return this.getIndexesSequence().filter((e=>!1===this.isTrimmed(e)))}getNotTrimmedIndexesLength(){return this.getNotTrimmedIndexes().length}getNotHiddenIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.notHiddenIndexesCache;return this.getIndexesSequence().filter((e=>!1===this.isHidden(e)))}getNotHiddenIndexesLength(){return this.getNotHiddenIndexes().length}getRenderableIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.renderablePhysicalIndexesCache;return this.getNotTrimmedIndexes().filter((e=>!1===this.isHidden(e)))}getRenderableIndexesLength(){return this.getRenderableIndexes().length}getNumberOfIndexes(){return this.getIndexesSequence().length}moveIndexes(e,t){"number"==typeof e&&(e=[e]);const r=(0,i.arrayMap)(e,(e=>this.getPhysicalFromVisualIndex(e))),n=this.getNotTrimmedIndexesLength(),s=e.length,a=(0,o.getListWithRemovedItems)(this.getIndexesSequence(),r),l=a.filter((e=>!1===this.isTrimmed(e)));let h=a.indexOf(l[l.length-1])+1;if(t+s<n){const e=l[t];h=a.indexOf(e)}this.indexesChangeSource="move",this.setIndexesSequence((0,o.getListWithInsertedItems)(a,h,r)),this.indexesChangeSource=void 0}isTrimmed(e){return this.trimmingMapsCollection.getMergedValueAtIndex(e)}isHidden(e){return this.hidingMapsCollection.getMergedValueAtIndex(e)}insertIndexes(e,t){const r=this.getNotTrimmedIndexes()[e],n=(0,u.isDefined)(r)?r:this.getNumberOfIndexes(),s=this.getIndexesSequence().includes(r)?this.getIndexesSequence().indexOf(r):this.getNumberOfIndexes(),o=(0,i.arrayMap)(new Array(t).fill(n),((e,t)=>e+t));this.suspendOperations(),this.indexesChangeSource="insert",this.indexesSequence.insert(s,o),this.indexesChangeSource=void 0,this.trimmingMapsCollection.insertToEvery(s,o),this.hidingMapsCollection.insertToEvery(s,o),this.variousMapsCollection.insertToEvery(s,o),this.resumeOperations()}removeIndexes(e){this.suspendOperations(),this.indexesChangeSource="remove",this.indexesSequence.remove(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.removeFromEvery(e),this.hidingMapsCollection.removeFromEvery(e),this.variousMapsCollection.removeFromEvery(e),this.resumeOperations()}updateCache(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.indexesSequenceChanged||this.trimmedIndexesChanged||this.hiddenIndexesChanged;(!0===e||!1===this.isBatched&&!0===t)&&(this.trimmingMapsCollection.updateCache(),this.hidingMapsCollection.updateCache(),this.notTrimmedIndexesCache=this.getNotTrimmedIndexes(!1),this.notHiddenIndexesCache=this.getNotHiddenIndexes(!1),this.renderablePhysicalIndexesCache=this.getRenderableIndexes(!1),this.cacheFromPhysicalToVisualIndexes(),this.cacheFromVisualToRenderableIndexes(),this.hiddenIndexesChanged&&this.hidingChangesObservable.emit(this.hidingMapsCollection.getMergedValues()),this.runLocalHooks("cacheUpdated",{indexesSequenceChanged:this.indexesSequenceChanged,trimmedIndexesChanged:this.trimmedIndexesChanged,hiddenIndexesChanged:this.hiddenIndexesChanged}),this.indexesSequenceChanged=!1,this.trimmedIndexesChanged=!1,this.hiddenIndexesChanged=!1)}cacheFromPhysicalToVisualIndexes(){const e=this.getNotTrimmedIndexesLength();this.fromPhysicalToVisualIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromVisualIndex(t);this.fromPhysicalToVisualIndexesCache.set(e,t)}}cacheFromVisualToRenderableIndexes(){const e=this.getRenderableIndexesLength();this.fromVisualToRenderableIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromRenderableIndex(t),r=this.getVisualFromPhysicalIndex(e);this.fromVisualToRenderableIndexesCache.set(r,t)}}}t.IndexMapper=d,(0,h.mixin)(d,l.default)},21928:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(15724);var s=n(r(85707)),i=r(47675),o=r(10587),a=r(70505);class l extends i.MapCollection{constructor(e,t){super(),(0,s.default)(this,"mergedValuesCache",[]),(0,s.default)(this,"aggregationFunction",void 0),(0,s.default)(this,"fallbackValue",void 0),this.aggregationFunction=e,this.fallbackValue=t}getMergedValues(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.mergedValuesCache;if(0===this.getLength())return[];const e=(0,o.arrayMap)(this.get(),(e=>e.getValues())),t=[],r=(0,a.isDefined)(e[0])&&e[0].length||0;for(let n=0;n<r;n+=1){const r=[];for(let t=0;t<this.getLength();t+=1)r.push(e[t][n]);t.push(r)}return(0,o.arrayMap)(t,this.aggregationFunction)}getMergedValueAtIndex(e,t){const r=this.getMergedValues(t)[e];return(0,a.isDefined)(r)?r:this.fallbackValue}updateCache(){this.mergedValuesCache=this.getMergedValues(!1)}}t.AggregatedCollection=l},98045:(e,t,r)=>{"use strict";r(14846),r(69655),t.__esModule=!0;var n=r(21928);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}));var s=r(47675);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}))},47675:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t.getRegisteredMapsCounter=function(){return l},r(14846),r(69655);var s=n(r(85707)),i=r(70505),o=r(25499),a=n(r(16050));let l=0;class h{constructor(){(0,s.default)(this,"collection",new Map)}register(e,t){!1===this.collection.has(e)&&(this.collection.set(e,t),t.addLocalHook("change",(()=>this.runLocalHooks("change",t))),l+=1)}unregister(e){const t=this.collection.get(e);(0,i.isDefined)(t)&&(t.destroy(),this.collection.delete(e),this.runLocalHooks("change",t),l-=1)}unregisterAll(){this.collection.forEach(((e,t)=>this.unregister(t))),this.collection.clear()}get(e){return(0,i.isUndefined)(e)?Array.from(this.collection.values()):this.collection.get(e)}getLength(){return this.collection.size}removeFromEvery(e){this.collection.forEach((t=>{t.remove(e)}))}insertToEvery(e,t){this.collection.forEach((r=>{r.insert(e,t)}))}initEvery(e){this.collection.forEach((t=>{t.init(e)}))}}t.MapCollection=h,(0,o.mixin)(h,a.default)},72810:(e,t,r)=>{"use strict";t.__esModule=!0,r(15724);var n=r(15898),s=r(10587);class i extends n.PhysicalIndexToValueMap{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getHiddenIndexes(){return(0,s.arrayReduce)(this.getValues(),((e,t,r)=>(t&&e.push(r),e)),[])}}t.HidingMap=i},74761:(e,t,r)=>{"use strict";r(14846),r(69655),t.__esModule=!0;var n={createIndexMap:!0,HidingMap:!0,IndexMap:!0,LinkedPhysicalIndexToValueMap:!0,PhysicalIndexToValueMap:!0,TrimmingMap:!0};t.createIndexMap=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!c.has(e))throw new Error(`The provided map type ("${e}") does not exist.`);return new(c.get(e))(t)},r(67834);var s=r(72810);t.HidingMap=s.HidingMap;var i=r(17783);t.IndexMap=i.IndexMap;var o=r(38189);t.LinkedPhysicalIndexToValueMap=o.LinkedPhysicalIndexToValueMap;var a=r(15898);t.PhysicalIndexToValueMap=a.PhysicalIndexToValueMap;var l=r(90008);t.TrimmingMap=l.TrimmingMap;var h=r(70836);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===h[e]||(t[e]=h[e]))}));var u=r(18046);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===u[e]||(t[e]=u[e]))}));const c=new Map([["hiding",s.HidingMap],["index",i.IndexMap],["linkedPhysicalIndexToValue",o.LinkedPhysicalIndexToValueMap],["physicalIndexToValue",a.PhysicalIndexToValueMap],["trimming",l.TrimmingMap]])},17783:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(15724);var s=n(r(85707)),i=r(22137),o=r(25499),a=r(89804),l=n(r(16050));class h{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,s.default)(this,"indexedValues",[]),(0,s.default)(this,"initValueOrFn",void 0),this.initValueOrFn=e}getValues(){return this.indexedValues}getValueAtIndex(e){const t=this.indexedValues;if(e<t.length)return t[e]}setValues(e){this.indexedValues=e.slice(),this.runLocalHooks("change")}setValueAtIndex(e,t){return e<this.indexedValues.length&&(this.indexedValues[e]=t,this.runLocalHooks("change"),!0)}clear(){this.setDefaultValues()}getLength(){return this.getValues().length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.indexedValues.length=0,(0,a.isFunction)(this.initValueOrFn)?(0,i.rangeEach)(e-1,(e=>this.indexedValues.push(this.initValueOrFn(e)))):(0,i.rangeEach)(e-1,(()=>this.indexedValues.push(this.initValueOrFn))),this.runLocalHooks("change")}init(e){return this.setDefaultValues(e),this.runLocalHooks("init"),this}insert(){this.runLocalHooks("change")}remove(){this.runLocalHooks("change")}destroy(){this.clearLocalHooks(),this.indexedValues=null,this.initValueOrFn=null}}t.IndexMap=h,(0,o.mixin)(h,l.default)},70836:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(17783),s=r(18046),i=r(88795);class o extends n.IndexMap{constructor(){super((e=>e))}insert(e,t){const r=(0,i.getIncreasedIndexes)(this.indexedValues,t);this.indexedValues=(0,s.getListWithInsertedItems)(r,e,t),super.insert(e,t)}remove(e){const t=(0,s.getListWithRemovedItems)(this.indexedValues,e);this.indexedValues=(0,i.getDecreasedIndexes)(t,e),super.remove(e)}}t.IndexesSequence=o},38189:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(94364);var s=n(r(85707)),i=r(17783),o=r(4440),a=r(18046),l=r(15501),h=r(89804);class u extends i.IndexMap{constructor(){super(...arguments),(0,s.default)(this,"orderOfIndexes",[])}getValues(){return this.orderOfIndexes.map((e=>this.indexedValues[e]))}setValues(e){this.orderOfIndexes=[...Array(e.length).keys()],super.setValues(e)}setValueAtIndex(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.orderOfIndexes.length;return e<this.indexedValues.length&&(this.indexedValues[e]=t,!1===this.orderOfIndexes.includes(e)&&this.orderOfIndexes.splice(r,0,e),this.runLocalHooks("change"),!0)}clearValue(e){this.orderOfIndexes=(0,a.getListWithRemovedItems)(this.orderOfIndexes,[e]),(0,h.isFunction)(this.initValueOrFn)?super.setValueAtIndex(e,this.initValueOrFn(e)):super.setValueAtIndex(e,this.initValueOrFn)}getLength(){return this.orderOfIndexes.length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.orderOfIndexes.length=0,super.setDefaultValues(e)}insert(e,t){this.indexedValues=(0,o.getListWithInsertedItems)(this.indexedValues,e,t,this.initValueOrFn),this.orderOfIndexes=(0,l.getIncreasedIndexes)(this.orderOfIndexes,t),super.insert(e,t)}remove(e){this.indexedValues=(0,o.getListWithRemovedItems)(this.indexedValues,e),this.orderOfIndexes=(0,a.getListWithRemovedItems)(this.orderOfIndexes,e),this.orderOfIndexes=(0,l.getDecreasedIndexes)(this.orderOfIndexes,e),super.remove(e)}getEntries(){return this.orderOfIndexes.map((e=>[e,this.getValueAtIndex(e)]))}}t.LinkedPhysicalIndexToValueMap=u},15898:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(17783),s=r(4440);class i extends n.IndexMap{insert(e,t){this.indexedValues=(0,s.getListWithInsertedItems)(this.indexedValues,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){this.indexedValues=(0,s.getListWithRemovedItems)(this.indexedValues,e),super.remove(e)}}t.PhysicalIndexToValueMap=i},90008:(e,t,r)=>{"use strict";t.__esModule=!0,r(15724);var n=r(15898),s=r(10587);class i extends n.PhysicalIndexToValueMap{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getTrimmedIndexes(){return(0,s.arrayReduce)(this.getValues(),((e,t,r)=>(t&&e.push(r),e)),[])}}t.TrimmingMap=i},15501:(e,t,r)=>{"use strict";t.__esModule=!0,t.getDecreasedIndexes=function(e,t){return(0,n.arrayMap)(e,(e=>e-t.filter((t=>t<e)).length))},t.getIncreasedIndexes=function(e,t){const r=t[0],s=t.length;return(0,n.arrayMap)(e,(e=>e>=r?e+s:e))},r(14846),r(27458);var n=r(10587)},88795:(e,t,r)=>{"use strict";t.__esModule=!0,r(67834);var n=r(15501);t.getDecreasedIndexes=n.getDecreasedIndexes,t.getIncreasedIndexes=n.getIncreasedIndexes;var s=r(18046),i=r(4440);const o=new Map([["indexesSequence",{getListWithInsertedItems:s.getListWithInsertedItems,getListWithRemovedItems:s.getListWithRemovedItems}],["physicallyIndexed",{getListWithInsertedItems:i.getListWithInsertedItems,getListWithRemovedItems:i.getListWithRemovedItems}]]);t.alterUtilsFactory=e=>{if(!1===o.has(e))throw new Error(`Alter strategy with ID '${e}' does not exist.`);return o.get(e)}},18046:(e,t,r)=>{"use strict";t.__esModule=!0,t.getListWithInsertedItems=function(e,t,r){return[...e.slice(0,t),...r,...e.slice(t)]},t.getListWithRemovedItems=function(e,t){return(0,n.arrayFilter)(e,(e=>!1===t.includes(e)))};var n=r(10587)},4440:(e,t,r)=>{"use strict";t.__esModule=!0,t.getListWithInsertedItems=function(e,t,r,s){const i=r.length?r[0]:void 0;return[...e.slice(0,i),...r.map(((e,t)=>(0,n.isFunction)(s)?s(e,t):s)),...void 0===i?[]:e.slice(i)]},t.getListWithRemovedItems=function(e,t){return(0,s.arrayFilter)(e,((e,r)=>!1===t.includes(r)))},r(94364);var n=r(89804),s=r(10587)},17207:(e,t)=>{"use strict";function r(e,t,r){e.addEventListener(t,r,!1)}function n(e,t,r){e.removeEventListener(t,r,!1)}function s(e){return e.ownerDocument.defaultView.getComputedStyle(e)}t.__esModule=!0,t.createInputElementResizer=function(e){const t={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300,textContent:e=>e.value,...arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}},i=e.body,o=e.createTextNode(""),a=e.createElement("span");let l;function h(){var e,r;o.textContent=t.textContent(l),a.style.position="absolute",a.style.fontSize=s(l).fontSize,a.style.fontFamily=s(l).fontFamily,a.style.whiteSpace="pre",i.appendChild(a);const n=parseInt((null===(e=s(l))||void 0===e?void 0:e.paddingInlineStart)||0,10),h=parseInt((null===(r=s(l))||void 0===r?void 0:r.paddingInlineEnd)||0,10),u=a.clientWidth+2+n+h;i.removeChild(a);const c=l.style;c.height=`${t.minHeight}px`,t.minWidth>u?c.width=`${t.minWidth}px`:u>t.maxWidth?c.width=`${t.maxWidth}px`:c.width=`${u}px`;const d=l.scrollHeight?l.scrollHeight-1:0;t.minHeight>d?c.height=`${t.minHeight}px`:t.maxHeight<d?(c.height=`${t.maxHeight}px`,c.overflowY="visible"):c.height=`${d}px`}function u(){e.defaultView.setTimeout(h,0)}return{init:function(e,n){let s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];l=e,function(e){if(e&&e.minHeight)if("inherit"===e.minHeight)t.minHeight=l.clientHeight;else{const r=parseInt(e.minHeight,10);isNaN(r)||(t.minHeight=r)}if(e&&e.maxHeight)if("inherit"===e.maxHeight)t.maxHeight=l.clientHeight;else{const r=parseInt(e.maxHeight,10);isNaN(r)||(t.maxHeight=r)}if(e&&e.minWidth)if("inherit"===e.minWidth)t.minWidth=l.clientWidth;else{const r=parseInt(e.minWidth,10);isNaN(r)||(t.minWidth=r)}if(e&&e.maxWidth)if("inherit"===e.maxWidth)t.maxWidth=l.clientWidth;else{const r=parseInt(e.maxWidth,10);isNaN(r)||(t.maxWidth=r)}a.firstChild||(a.className="autoResize",a.style.display="inline-block",a.appendChild(o))}(n),"TEXTAREA"===l.nodeName&&(l.style.resize="none",l.style.height=`${t.minHeight}px`,l.style.minWidth=`${t.minWidth}px`,l.style.maxWidth=`${t.maxWidth}px`,l.style.overflowY="hidden"),s&&(r(l,"input",h),r(l,"keydown",u)),h()},resize:h,unObserve(){n(l,"input",h),n(l,"keydown",u)}}}},30480:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0;var s=n(r(85707));class i{constructor(e){(0,s.default)(this,"data",void 0),(0,s.default)(this,"next",null),(0,s.default)(this,"prev",null),this.data=e}}t.NodeStructure=i;t.default=class{constructor(){(0,s.default)(this,"first",null),(0,s.default)(this,"last",null)}push(e){const t=new i(e);if(null===this.first)this.first=t,this.last=t;else{const e=this.last;this.last=t,t.prev=e,e.next=t}return t}unshift(e){const t=new i(e);if(null===this.first)this.first=t,this.last=t;else{const e=this.first;this.first=t,t.next=e,e.prev=t}}inorder(e){let t=this.first;for(;t;){const r=e(t);if(t===this.last||!0===r)break;t=t.next}}remove(e){if(null===this.first)return!1;let t,r,n=this.first;for(;n;){if(n.data===e)return t=n.next,r=n.prev,t&&(t.prev=r),r&&(r.next=t),n===this.first&&(this.first=t),n===this.last&&(this.last=r),!0;n=n.next}return!1}hasCycle(){let e=this.first,t=this.first;for(;;){if(null===e)return!1;if(e=e.next,null===e)return!1;if(e=e.next,t=t.next,e===t)return!0}}pop(){if(null===this.last)return null;const e=this.last;return this.last=this.last.prev,e}shift(){if(null===this.first)return null;const e=this.first;return this.first=this.first.next,e}recursiveReverse(){if(!this.first)return;!function e(t,r){r&&(e(r,r.next),r.next=t)}(this.first,this.first.next),this.first.next=null;const e=this.first;this.first=this.last,this.last=e}reverse(){if(!this.first||!this.first.next)return;let e,t=this.first.next,r=this.first;for(;t;)e=t.next,t.next=r,r.prev=t,r=t,t=e;this.first.next=null,this.last.prev=null,e=this.first,this.first=r,this.last=e}}},38439:(e,t,r)=>{"use strict";t.__esModule=!0,t.createPriorityMap=function(){let{errorPriorityExists:e,errorPriorityNaN:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=new Map;return e=(0,s.isFunction)(e)?e:l,t=(0,s.isFunction)(t)?t:h,{addItem:function(s,i){if(!(0,n.isNumeric)(s))throw new Error(t(s));if(r.has(s))throw new Error(e(s));r.set(s,i)},getItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;const[t,n]=a.get(e)||a.get(i);return[...r].sort(((e,r)=>e[0]<r[0]?t:n)).map((e=>e[1]))}}},r(67834),r(94364);var n=r(22137),s=r(89804);const i=t.ASC="asc",o=t.DESC="desc",a=new Map([[i,[-1,1]],[o,[1,-1]]]),l=e=>`The priority '${e}' is already declared in a map.`,h=e=>`The priority '${e}' is not a number.`},51097:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t.depthFirstPreOrder=o;var s=n(r(85707));r(67834),r(15724);const i=t.TRAVERSAL_DF_PRE="DF-pre-order";function o(e,t){let r=e.call(t,this);for(let n=0;n<this.childs.length;n++){if(!1===r)return!1;r=o.call(this.childs[n],e,t)}return r}const a=t.TRAVERSAL_DF_POST="DF-post-order";const l=t.TRAVERSAL_BF="BF";const h=l,u=new Map([[i,o],[a,function e(t,r){for(let n=0;n<this.childs.length;n++){if(!1===e.call(this.childs[n],t,r))return!1}return t.call(r,this)}],[l,function(e,t){const r=[this];!function n(){if(0===r.length)return;const s=r.shift();r.push(...s.childs),!1!==e.call(t,s)&&n()}()}]]);class c{constructor(e){(0,s.default)(this,"data",{}),(0,s.default)(this,"parent",null),(0,s.default)(this,"childs",[]),this.data=e}addChild(e){e.parent=this,this.childs.push(e)}cloneTree(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;const t=new c({...e.data});for(let r=0;r<e.childs.length;r++)t.addChild(this.cloneTree(e.childs[r]));return t}replaceTreeWith(e){this.data={...e.data},this.childs=[];for(let t=0;t<e.childs.length;t++)this.addChild(e.childs[t])}walkDown(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h;if(!u.has(t))throw new Error(`Traversal strategy "${t}" does not exist`);u.get(t).call(this,e,this)}walkUp(e){const t=this,r=n=>{!1!==e.call(t,n)&&null!==n.parent&&r(n.parent)};r(this)}}t.default=c},54394:(e,t,r)=>{"use strict";t.__esModule=!0,t.createUniqueMap=function(){let{errorIdExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Map;function r(){return[...t]}function i(e){return t.has(e)}return e=(0,n.isFunction)(e)?e:s,{addItem:function(r,n){if(i(r))throw new Error(e(r));t.set(r,n)},clear:function(){t.clear()},getId:function(e){const[t]=r().find((t=>{let[r,n]=t;return e===n&&r}))||[null];return t},getItem:function(e){return t.get(e)},getItems:r,hasItem:i,removeItem:function(e){return t.delete(e)}}},r(67834),r(14846),r(6211);var n=r(89804);const s=e=>`The id '${e}' is already declared in a map.`},74784:(e,t,r)=>{"use strict";t.__esModule=!0,t.createUniqueSet=function(){let{errorItemExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Set;return e=(0,n.isFunction)(e)?e:s,{addItem:function(r){if(t.has(r))throw new Error(e(r));t.add(r)},clear:function(){t.clear()},getItems:function(){return[...t]}}},r(67834),r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620);var n=r(89804);const s=e=>`'${e}' value is already declared in a unique set.`},4965:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834),r(15724),r(14846),r(69655);var s=n(r(85707)),i=r(62577),o=r(10587);t.default=class{constructor(e){(0,s.default)(this,"hot",null),(0,s.default)(this,"container",null),(0,s.default)(this,"injected",!1),(0,s.default)(this,"rows",[]),(0,s.default)(this,"columns",[]),(0,s.default)(this,"samples",null),(0,s.default)(this,"settings",{useHeaders:!0}),this.hot=e}addRow(e,t){if(this.columns.length)throw new Error("Doesn't support multi-dimensional table");this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));const r={row:e};this.rows.push(r),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol(e)),this.table.tr.appendChild(this.createRow(e)),this.container.container.appendChild(this.table.fragment),r.table=this.table.table}addColumnHeadersRow(e){const t=this.hot.getColHeader(0);if(null!=t){const t={row:-1};this.rows.push(t),this.container=this.createContainer(this.hot.rootElement.className),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.appendColumnHeadersRow(),this.container.container.appendChild(this.table.fragment),t.table=this.table.table}}addColumn(e,t){if(this.rows.length)throw new Error("Doesn't support multi-dimensional table");this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));const r={col:e};this.columns.push(r),this.samples=t,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&null!==this.hot.getColHeader(e)&&this.hot.view.appendColHeader(e,this.table.th,void 0,-1),this.table.tBody.appendChild(this.createCol(e)),this.container.container.appendChild(this.table.fragment),r.table=this.table.table}getHeights(e){this.injected||this.injectTable(),(0,o.arrayEach)(this.rows,(t=>{const{height:r}=t.table.getBoundingClientRect();e(t.row,Math.ceil(r))}))}getWidths(e){this.injected||this.injectTable(),(0,o.arrayEach)(this.columns,(t=>{const{width:r}=t.table.getBoundingClientRect();e(t.col,Math.ceil(r))}))}setSettings(e){this.settings=e}setSetting(e,t){this.settings||(this.settings={}),this.settings[e]=t}getSettings(){return this.settings}getSetting(e){return this.settings?this.settings[e]:null}createColGroupsCol(e){const t=this.hot.rootDocument.createDocumentFragment();return this.hot.hasRowHeaders()&&t.appendChild(this.createColElement(-1,-1)),this.samples.forEach((r=>{(0,o.arrayEach)(r.strings,(r=>{t.appendChild(this.createColElement(r.col,e))}))})),t}createRow(e){const{rootDocument:t}=this.hot,r=t.createDocumentFragment(),n=t.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,n),r.appendChild(n)),this.samples.forEach((n=>{(0,o.arrayEach)(n.strings,(n=>{const s=n.col,i=this.hot.getCellMeta(e,s),o=this.hot.getCellRenderer(i),a=t.createElement("td");a.setAttribute("ghost-table",1),o(this.hot,a,e,s,this.hot.colToProp(s),n.value,i),r.appendChild(a)}))})),r}appendColumnHeadersRow(){const{rootDocument:e}=this.hot,t=e.createDocumentFragment(),r=[];if(this.hot.hasRowHeaders()){const n=e.createElement("th");r.push([-1,n]),t.appendChild(n)}this.samples.forEach((n=>{(0,o.arrayEach)(n.strings,(n=>{const s=n.col,i=e.createElement("th");r.push([s,i]),t.appendChild(i)}))})),this.table.tHead.appendChild(t),(0,o.arrayEach)(r,(e=>{const[t,r]=e;this.hot.view.appendColHeader(t,r)}))}createCol(e){const{rootDocument:t}=this.hot,r=t.createDocumentFragment();return this.samples.forEach((n=>{(0,o.arrayEach)(n.strings,(n=>{const s=n.row,i=this.hot.getCellMeta(s,e),o=this.hot.getCellRenderer(i),a=t.createElement("td"),l=t.createElement("tr");a.setAttribute("ghost-table",1),o(this.hot,a,s,e,this.hot.colToProp(e),n.value,i),l.appendChild(a),r.appendChild(l)}))})),r}clean(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()}injectTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.injected||((e||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}removeTable(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}createColElement(e,t){const r=this.hot.rootDocument.createElement("col");let n=0;t>=0&&e>=0&&(n=this.hot.getCellMeta(t,e).colspan);let s=this.hot.getColWidth(e);if(n>1)for(let t=e+1;t<e+n;t++)s+=this.hot.getColWidth(t);return r.style.width=`${s}px`,r}createTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,r=t.createDocumentFragment(),n=t.createElement("table"),s=t.createElement("thead"),o=t.createElement("tbody"),a=t.createElement("colgroup"),l=t.createElement("tr"),h=t.createElement("th");return this.isVertical()&&n.appendChild(a),this.isHorizontal()&&(l.appendChild(h),s.appendChild(l),n.style.tableLayout="auto",n.style.width="auto"),n.appendChild(s),this.isVertical()&&o.appendChild(l),n.appendChild(o),(0,i.addClass)(n,e),r.appendChild(n),{fragment:r,table:n,tHead:s,tBody:o,colGroup:a,tr:l,th:h}}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,r=t.createDocumentFragment(),n=t.createElement("div"),s=`htGhostTable htAutoSize ${e.trim()}`;return(0,i.addClass)(n,s),r.appendChild(n),{fragment:r,container:n}}isVertical(){return!(!this.rows.length||this.columns.length)}isHorizontal(){return!(!this.columns.length||this.rows.length)}}},27453:(e,t,r)=>{"use strict";t.__esModule=!0,t.createPaginator=function(e){let{initialPage:t=-1,size:r=()=>0,onItemSelect:s=()=>{},onClear:i=()=>{}}=e;const o=new Set;let a=(0,n.clamp)(t,-1,h()-1);function l(e,t){const r=h()-1;if(e<0&&(e=r),e>r&&(e=0),o.has(e))return-1;o.add(e);return!1===s(e,!1)&&(e=l(1===t?++e:--e,t)),e}function h(){return Math.max(r(),0)}return{setCurrentPage:function(e){e>-1&&e<h()&&!1!==s(e,!0)&&(a=e)},getCurrentPage:function(){return a},toFirstItem:function(){h()>0&&(o.clear(),a=l(0,1))},toLastItem:function(){h()>0&&(o.clear(),a=l(h()-1,-1))},toNextItem:function(){h()>0&&(o.clear(),a=l(++a,1))},toPreviousItem:function(){h()>0&&(o.clear(),a=l(--a,-1))},getSize:h,clear:function(){o.clear(),a=t,i()}}},r(71336),r(41558),r(17663),r(68630),r(79645),r(89858),r(8620);var n=r(22137)},96173:(e,t,r)=>{"use strict";t.__esModule=!0,t._dataToHTML=function(e){const t=e.length,r=["<table>"];for(let s=0;s<t;s+=1){const i=e[s],o=i.length,a=[];0===s&&r.push("<tbody>");for(let e=0;e<o;e+=1){const t=i[e],r=(0,n.isEmpty)(t)?"":t.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20{2,}/gi,(e=>`<span style="mso-spacerun: yes">${"&nbsp;".repeat(e.length-1)} </span>`)).replace(/\t/gi,"&#9;");a.push(`<td>${r}</td>`)}r.push("<tr>",...a,"</tr>"),s+1===t&&r.push("</tbody>")}return r.push("</table>"),r.join("")},t.htmlToGridSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;const r={},n=t.createDocumentFragment(),o=t.createElement("div");n.appendChild(o);let a=e;if("string"==typeof a){const e=a.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g,(e=>{const t=e.match(/<td\b[^>]*?>/g)[0];return`${t}${e.substring(t.length,e.lastIndexOf("<")).trim().replaceAll(/\n\s+/g," ").replaceAll(/<p.*?>/g,"\n").replace("\n","").replaceAll(/<\/(.*)>\s+$/gm,"</$1>").replace(/(<(?!br)([^>]+)>)/gi,"").replaceAll(/^&nbsp;$/gm,"")}</td>`}));o.insertAdjacentHTML("afterbegin",`${e}`),a=o.querySelector("table")}if(!a||!function(e){return"TABLE"===(e&&e.nodeName||"")}(a))return;const l=o.querySelector('meta[name$="enerator"]'),h=null!==a.querySelector("tbody th"),u=a.querySelector("tr"),c=u?Array.from(u.cells).reduce(((e,t)=>e+t.colSpan),0)-(h?1:0):0,d=a.tFoot&&Array.from(a.tFoot.rows)||[],p=[];let g=!1,f=0,m=0;if(a.tHead){const e=Array.from(a.tHead.rows).filter((e=>{const t=null!==e.querySelector("td");return t&&p.push(e),!t}));f=e.length,g=f>0,f>1?r.nestedHeaders=Array.from(e).reduce(((e,t)=>{const r=Array.from(t.cells).reduce(((e,t,r)=>{if(h&&0===r)return e;const{colSpan:n,innerHTML:s}=t,i=n>1?{label:s,colspan:n}:s;return e.push(i),e}),[]);return e.push(r),e}),[]):g&&(r.colHeaders=Array.from(e[0].children).reduce(((e,t,r)=>(h&&0===r||e.push(t.innerHTML),e)),[]))}p.length&&(r.fixedRowsTop=p.length);d.length&&(r.fixedRowsBottom=d.length);const y=[...p,...Array.from(a.tBodies).reduce(((e,t)=>(e.push(...Array.from(t.rows)),e)),[]),...d];m=y.length;const E=new Array(m);for(let e=0;e<m;e++)E[e]=new Array(c);const w=[],C=[];for(let e=0;e<m;e++){const t=y[e],r=Array.from(t.cells),n=r.length;for(let t=0;t<n;t++){const n=r[t],{nodeName:o,innerHTML:a,rowSpan:h,colSpan:u}=n,c=E[e].findIndex((e=>void 0===e));if("TD"===o){if(h>1||u>1){for(let t=e;t<e+h;t++)if(t<m)for(let e=c;e<c+u;e++)E[t][e]=null;const t=n.getAttribute("style");t&&t.includes("mso-ignore:colspan")||w.push({col:c,row:e,rowspan:h,colspan:u})}let t="";t=l&&/excel/gi.test(l.content)?a.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,"\r\n"):a.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n"),E[e][c]=t.replace(i,(e=>s[e]))}else C.push(a)}}w.length&&(r.mergeCells=w);C.length&&(r.rowHeaders=C);E.length&&(r.data=E);return r},t.instanceToHTML=function(e){const t=e.hasColHeaders(),r=e.hasRowHeaders(),s=[t?-1:0,r?-1:0,e.countRows()-1,e.countCols()-1],i=e.getData(...s),o=i.length,a=o>0?i[0].length:0,l=["<table>","</table>"],h=t?["<thead>","</thead>"]:[],u=["<tbody>","</tbody>"],c=r?1:0,d=t?1:0;for(let s=0;s<o;s+=1){const o=t&&0===s,l=[];for(let t=0;t<a;t+=1){const a=!o&&r&&0===t;let h="";if(o)h=`<th>${e.getColHeader(t-c)}</th>`;else if(a)h=`<th>${e.getRowHeader(s-d)}</th>`;else{const r=i[s][t],{hidden:o,rowspan:a,colspan:l}=e.getCellMeta(s-d,t-c);if(!o){const e=[];if(a&&e.push(`rowspan="${a}"`),l&&e.push(`colspan="${l}"`),(0,n.isEmpty)(r))h=`<td ${e.join(" ")}></td>`;else{const t=r.toString().replace("<","&lt;").replace(">","&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");h=`<td ${e.join(" ")}>${t}</td>`}}}l.push(h)}const p=["<tr>",...l,"</tr>"].join("");o?h.splice(1,0,p):u.splice(-1,0,p)}return l.splice(1,0,h.join(""),u.join("")),l.join("")},r(15724),r(64552),r(14846),r(27458),r(94364),r(90458);var n=r(70505);const s={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">"},i=new RegExp(Object.keys(s).map((e=>`(${e})`)).join("|"),"gi")},45435:(e,t)=>{"use strict";t.__esModule=!0,t.hasValidParameter=function(e){return e===n},t.isRootInstance=function(e){return r.has(e)},t.registerAsRootInstance=function(e){r.set(e,!0)};const r=t.holder=new WeakMap,n=t.rootInstanceSymbol=Symbol("rootInstance")},93968:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,r(67834),r(15724);var s=n(r(85707)),i=r(25499),o=r(22137),a=r(70505);class l{static get SAMPLE_COUNT(){return 3}constructor(e){(0,s.default)(this,"samples",null),(0,s.default)(this,"dataFactory",null),(0,s.default)(this,"customSampleCount",null),(0,s.default)(this,"allowDuplicates",!1),this.dataFactory=e}getSampleCount(){return this.customSampleCount?this.customSampleCount:l.SAMPLE_COUNT}setSampleCount(e){this.customSampleCount=e}setAllowDuplicates(e){this.allowDuplicates=e}generateRowSamples(e,t){return this.generateSamples("row",t,e)}generateColumnSamples(e,t){return this.generateSamples("col",t,e)}generateSamples(e,t,r){const n=new Map,{from:s,to:i}="number"==typeof r?{from:r,to:r}:r;return(0,o.rangeEach)(s,i,(r=>{const s=this.generateSample(e,t,r);n.set(r,s)})),n}generateSample(e,t,r){if("row"!==e&&"col"!==e)throw new Error("Unsupported sample type");const n=new Map,s="row"===e?"col":"row",l=[];return(0,o.rangeEach)(t.from,t.to,(t=>{const o="row"===e?this.dataFactory(r,t):this.dataFactory(t,r);if(!1===o)return;const{value:h,bundleSeed:u}=o,c="string"==typeof u&&u.length>0;let d;d=c?u:(0,i.isObject)(h)?`${Object.keys(h).length}`:Array.isArray(h)?`${h.length}`:`${(0,a.stringify)(h).length}`,n.has(d)||n.set(d,{needed:this.getSampleCount(),strings:[]});const p=n.get(d);if(p.needed){(!(l.indexOf(h)>-1)||this.allowDuplicates||c)&&(p.strings.push({value:h,[s]:t}),l.push(h),p.needed-=1)}})),n}}t.default=l},28651:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";r.has(e)||r.set(e,new Map);const t=r.get(e);return{register:function(e,r){t.set(e,r)},getItem:function(e){return t.get(e)},hasItem:function(e){return t.has(e)},getNames:function(){return[...t.keys()]},getValues:function(){return[...t.values()]}}};const r=t.collection=new Map},39385:(e,t)=>{"use strict";t.__esModule=!0,t.autocompleteValidator=n;const r=t.VALIDATOR_TYPE="autocomplete";function n(e,t){let r=e;null==r&&(r=""),this.allowEmpty&&""===r?t(!0):this.strict&&this.source?"function"==typeof this.source?this.source(r,s(r,t)):s(r,t)(this.source):t(!0)}function s(e,t){const r=e;return function(e){let n=!1;for(let t=0,s=e.length;t<s;t++)if(r===e[t]){n=!0;break}t(n)}}n.VALIDATOR_TYPE=r},25799:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(39385);t.VALIDATOR_TYPE=n.VALIDATOR_TYPE,t.autocompleteValidator=n.autocompleteValidator},88993:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t.correctFormat=u,t.dateValidator=h;var s=n(r(6671)),i=r(8266),o=r(16339),a=r(95976);const l=t.VALIDATOR_TYPE="date";function h(e,t){const r=(0,i.getEditorInstance)(o.EDITOR_TYPE,this.instance);let n=e,a=!0;null==n&&(n="");let l=(0,s.default)(n,this.dateFormat||r.defaultDateFormat,!0).isValid(),h=(0,s.default)(new Date(n)).isValid()||l;if(this.allowEmpty&&""===n&&(h=!0,l=!0),h||(a=!1),!h&&l&&(a=!0),h&&!l)if(!0===this.correctFormat){const e=u(n,this.dateFormat);this.instance.setDataAtCell(this.visualRow,this.visualCol,e,"dateValidator"),a=!0}else a=!1;t(a)}function u(e,t){const r=(0,s.default)((0,a.getNormalizedDate)(e)),n=(0,s.default)(e,t),i=e.search(/[A-z]/g)>-1;let o;return o=r.isValid()&&r.format("x")===n.format("x")||!n.isValid()||i?r:n,o.format(t)}h.VALIDATOR_TYPE=l},5535:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(88993);t.VALIDATOR_TYPE=n.VALIDATOR_TYPE,t.correctFormat=n.correctFormat,t.dateValidator=n.dateValidator},5105:(e,t,r)=>{"use strict";t.__esModule=!0,t.dropdownValidator=i;var n=r(39385);const s=t.VALIDATOR_TYPE="dropdown";function i(e,t){n.autocompleteValidator.apply(this,[e,t])}i.VALIDATOR_TYPE=s},96:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(5105);t.VALIDATOR_TYPE=n.VALIDATOR_TYPE,t.dropdownValidator=n.dropdownValidator},41602:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllValidators=function(){(0,l.registerValidator)(n.autocompleteValidator),(0,l.registerValidator)(i.dropdownValidator),(0,l.registerValidator)(s.dateValidator),(0,l.registerValidator)(o.numericValidator),(0,l.registerValidator)(a.timeValidator)};var n=r(25799);t.autocompleteValidator=n.autocompleteValidator,t.AUTOCOMPLETE_VALIDATOR=n.VALIDATOR_TYPE;var s=r(5535);t.dateValidator=s.dateValidator,t.DATE_VALIDATOR=s.VALIDATOR_TYPE;var i=r(96);t.dropdownValidator=i.dropdownValidator,t.DROPDOWN_VALIDATOR=i.VALIDATOR_TYPE;var o=r(48636);t.numericValidator=o.numericValidator,t.NUMERIC_VALIDATOR=o.VALIDATOR_TYPE;var a=r(68864);t.timeValidator=a.timeValidator,t.TIME_VALIDATOR=a.VALIDATOR_TYPE;var l=r(17027);t.registerValidator=l.registerValidator,t.getRegisteredValidatorNames=l.getRegisteredValidatorNames,t.getRegisteredValidators=l.getRegisteredValidators,t.getValidator=l.getValidator,t.hasValidator=l.hasValidator},48636:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(62365);t.VALIDATOR_TYPE=n.VALIDATOR_TYPE,t.numericValidator=n.numericValidator},62365:(e,t,r)=>{"use strict";t.__esModule=!0,t.numericValidator=i;var n=r(22137);const s=t.VALIDATOR_TYPE="numeric";function i(e,t){let r=e;null==r&&(r=""),this.allowEmpty&&""===r?t(!0):t(""!==r&&(0,n.isNumeric)(e))}i.VALIDATOR_TYPE=s},17027:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t.getValidator=function(e){if("function"==typeof e)return e;if(!a(e))throw Error(`No registered validator found under "${e}" name`);return o(e)},t.registerValidator=function(e,t){"string"!=typeof e&&(e=(t=e).VALIDATOR_TYPE);i(e,t)},r(67834);var s=n(r(28651));const{register:i,getItem:o,hasItem:a,getNames:l,getValues:h}=(0,s.default)("validators");t.getRegisteredValidators=h,t.getRegisteredValidatorNames=l,t.hasValidator=a},68864:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(94845);t.VALIDATOR_TYPE=n.VALIDATOR_TYPE,t.timeValidator=n.timeValidator},94845:(e,t,r)=>{"use strict";var n=r(96784);t.__esModule=!0,t.timeValidator=a;var s=n(r(6671));const i=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"],o=t.VALIDATOR_TYPE="time";function a(e,t){const r=this.timeFormat||"h:mm:ss a";let n=!0,o=e;null===o&&(o=""),o=/^\d{3,}$/.test(o)?parseInt(o,10):o;const a=/^\d{1,2}$/.test(o);a&&(o+=":00");const l=(0,s.default)(o,i,!0).isValid()?(0,s.default)(o):(0,s.default)(o,r);let h=l.isValid(),u=(0,s.default)(o,r,!0).isValid()&&!a;if(this.allowEmpty&&""===o&&(h=!0,u=!0),h||(n=!1),!h&&u&&(n=!0),h&&!u)if(!0===this.correctFormat){const e=l.format(r);this.instance.setDataAtCell(this.visualRow,this.visualCol,e,"timeValidator"),n=!0}else n=!1;t(n)}a.VALIDATOR_TYPE=o},83012:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Alternation:()=>Me,CstParser:()=>Hr,EMPTY_ALT:()=>Dr,EOF:()=>pe,EarlyExitException:()=>Qt,EmbeddedActionsParser:()=>Fr,Flat:()=>Ce,GAstVisitor:()=>xe,Lexer:()=>J,LexerDefinitionErrorType:()=>q,MismatchedTokenException:()=>Kt,NoViableAltException:()=>Xt,NonTerminal:()=>Ee,NotAllInputParsedException:()=>qt,Option:()=>ve,Parser:()=>kr,ParserDefinitionErrorType:()=>xr,Repetition:()=>Te,RepetitionMandatory:()=>Re,RepetitionMandatoryWithSeparator:()=>Se,RepetitionWithSeparator:()=>Ne,Rule:()=>we,Terminal:()=>_e,VERSION:()=>n,assignOccurrenceIndices:()=>Bt,clearCache:()=>qr,createSyntaxDiagramsCode:()=>Ur,createToken:()=>de,createTokenInstance:()=>ge,defaultGrammarResolverErrorProvider:()=>Dt,defaultGrammarValidatorErrorProvider:()=>kt,defaultLexerErrorProvider:()=>Q,defaultParserErrorProvider:()=>Lt,generateParserFactory:()=>Kr,generateParserModule:()=>Xr,isRecognitionException:()=>$t,resolveGrammar:()=>Ut,serializeGrammar:()=>be,serializeProduction:()=>Ae,tokenLabel:()=>ee,tokenMatcher:()=>fe,tokenName:()=>te,validateGrammar:()=>Vt});var n="6.5.0",s=r(86596),i=r(49879),o={},a=new i.RegExpParser;function l(e){var t=e.toString();if(o.hasOwnProperty(t))return o[t];var r=a.pattern(t);return o[t]=r,r}var h,u=(h=function(e,t){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},h(e,t)},function(e,t){function r(){this.constructor=e}h(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),c="Complement Sets are not supported for first char optimization",d='Unable to use "first char" lexer optimizations:\n';function p(e,t){void 0===t&&(t=!1);try{var r=l(e);return g(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===c)t&&(0,s.x5)(d+"\tUnable to optimize: < "+e.toString()+" >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.");else{var n="";t&&(n="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),(0,s.Zi)(d+"\n\tFailed parsing: < "+e.toString()+" >\n\tUsing the regexp-to-ast library version: "+i.VERSION+"\n\tPlease open an issue at: https://github.com/bd82/regexp-to-ast/issues"+n)}}return[]}function g(e,t,r){switch(e.type){case"Disjunction":for(var n=0;n<e.value.length;n++)g(e.value[n],t,r);break;case"Alternative":var i=e.value;for(n=0;n<i.length;n++){var o=i[n];switch(o.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}var a=o;switch(a.type){case"Character":f(a.value,t,r);break;case"Set":if(!0===a.complement)throw Error(c);(0,s.jJ)(a.value,(function(e){if("number"==typeof e)f(e,t,r);else{var n=e;if(!0===r)for(var s=n.from;s<=n.to;s++)f(s,t,r);else{for(s=n.from;s<=n.to&&s<F;s++)f(s,t,r);if(n.to>=F)for(var i=n.from>=F?n.from:F,o=n.to,a=U(i),l=U(o),h=a;h<=l;h++)t[h]=h}}}));break;case"Group":g(a.value,t,r);break;default:throw Error("Non Exhaustive Match")}var l=void 0!==a.quantifier&&0===a.quantifier.atLeast;if("Group"===a.type&&!1===y(a)||"Group"!==a.type&&!1===l)break}break;default:throw Error("non exhaustive match!")}return(0,s.zu)(t)}function f(e,t,r){var n=U(e);t[n]=n,!0===r&&function(e,t){var r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){t[s=U(n.charCodeAt(0))]=s}else{var s,i=r.toLowerCase();if(i!==r)t[s=U(i.charCodeAt(0))]=s}}(e,t)}function m(e,t){return(0,s.I6)(e.value,(function(e){if("number"==typeof e)return(0,s.gR)(t,e);var r=e;return void 0!==(0,s.I6)(t,(function(e){return r.from<=e&&e<=r.to}))}))}function y(e){return!(!e.quantifier||0!==e.quantifier.atLeast)||!!e.value&&((0,s.cy)(e.value)?(0,s.Si)(e.value,y):y(e.value))}var E=function(e){function t(t){var r=e.call(this)||this;return r.targetCharCodes=t,r.found=!1,r}return u(t,e),t.prototype.visitChildren=function(t){if(!0!==this.found){switch(t.type){case"Lookahead":return void this.visitLookahead(t);case"NegativeLookahead":return void this.visitNegativeLookahead(t)}e.prototype.visitChildren.call(this,t)}},t.prototype.visitCharacter=function(e){(0,s.gR)(this.targetCharCodes,e.value)&&(this.found=!0)},t.prototype.visitSet=function(e){e.complement?void 0===m(e,this.targetCharCodes)&&(this.found=!0):void 0!==m(e,this.targetCharCodes)&&(this.found=!0)},t}(i.BaseRegExpVisitor);function w(e,t){if(t instanceof RegExp){var r=l(t),n=new E(e);return n.visit(r),n.found}return void 0!==(0,s.I6)(t,(function(t){return(0,s.gR)(e,t.charCodeAt(0))}))}var C=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),v="PATTERN",R="defaultMode",S="modes",T="boolean"==typeof new RegExp("(?:)").sticky;function N(e,t){var r,n=(t=(0,s.NT)(t,{useSticky:T,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:function(e,t){return t()}})).tracer;n("initCharCodeToOptimizedIndexMap",(function(){!function(){if((0,s.Im)(V)){V=new Array(65536);for(var e=0;e<65536;e++)V[e]=e>255?255+~~(e/255):e}}()})),n("Reject Lexer.NA",(function(){r=(0,s.ku)(e,(function(e){return e[v]===J.NA}))}));var i,o,a,l,h,u,c,g,f,m,y,E=!1;n("Transform Patterns",(function(){E=!1,i=(0,s.Tj)(r,(function(e){var r=e[v];if((0,s.gd)(r)){var n=r.source;return 1===n.length&&"^"!==n&&"$"!==n&&"."!==n?n:2!==n.length||"\\"!==n[0]||(0,s.gR)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],n[1])?t.useSticky?O(r):A(r):n[1]}if((0,s.Tn)(r))return E=!0,{exec:r};if((0,s.zy)(r,"exec"))return E=!0,r;if("string"==typeof r){if(1===r.length)return r;var i=r.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),o=new RegExp(i);return t.useSticky?O(o):A(o)}throw Error("non exhaustive match")}))})),n("misc mapping",(function(){o=(0,s.Tj)(r,(function(e){return e.tokenTypeIdx})),a=(0,s.Tj)(r,(function(e){var t=e.GROUP;if(t!==J.SKIPPED){if((0,s.Kg)(t))return t;if((0,s.b0)(t))return!1;throw Error("non exhaustive match")}})),l=(0,s.Tj)(r,(function(e){var t=e.LONGER_ALT;if(t)return(0,s.qh)(r,t)})),h=(0,s.Tj)(r,(function(e){return e.PUSH_MODE})),u=(0,s.Tj)(r,(function(e){return(0,s.zy)(e,"POP_MODE")}))})),n("Line Terminator Handling",(function(){var e=k(t.lineTerminatorCharacters);c=(0,s.Tj)(r,(function(e){return!1})),"onlyOffset"!==t.positionTracking&&(c=(0,s.Tj)(r,(function(t){return(0,s.zy)(t,"LINE_BREAKS")?t.LINE_BREAKS:!1===D(t,e)?w(e,t.PATTERN):void 0})))})),n("Misc Mapping #2",(function(){g=(0,s.Tj)(r,x),f=(0,s.Tj)(i,P),m=(0,s.TS)(r,(function(e,t){var r=t.GROUP;return(0,s.Kg)(r)&&r!==J.SKIPPED&&(e[r]=[]),e}),{}),y=(0,s.Tj)(i,(function(e,t){return{pattern:i[t],longerAlt:l[t],canLineTerminator:c[t],isCustom:g[t],short:f[t],group:a[t],push:h[t],pop:u[t],tokenTypeIdx:o[t],tokenType:r[t]}}))}));var C=!0,R=[];return t.safeMode||n("First Char Optimization",(function(){R=(0,s.TS)(r,(function(e,r,n){if("string"==typeof r.PATTERN){var i=U(r.PATTERN.charCodeAt(0));H(e,i,y[n])}else if((0,s.cy)(r.START_CHARS_HINT)){var o;(0,s.jJ)(r.START_CHARS_HINT,(function(t){var r=U("string"==typeof t?t.charCodeAt(0):t);o!==r&&(o=r,H(e,r,y[n]))}))}else if((0,s.gd)(r.PATTERN))if(r.PATTERN.unicode)C=!1,t.ensureOptimizations&&(0,s.Zi)(d+"\tUnable to analyze < "+r.PATTERN.toString()+" > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE");else{var a=p(r.PATTERN,t.ensureOptimizations);(0,s.Im)(a)&&(C=!1),(0,s.jJ)(a,(function(t){H(e,t,y[n])}))}else t.ensureOptimizations&&(0,s.Zi)(d+"\tTokenType: <"+r.name+"> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE"),C=!1;return e}),[])})),n("ArrayPacking",(function(){R=(0,s.VS)(R)})),{emptyGroups:m,patternIdxToConfig:y,charCodeToPatternIdxToConfig:R,hasCustom:E,canBeOptimized:C}}function M(e,t){var r=[],n=function(e){var t=(0,s.pb)(e,(function(e){return!(0,s.zy)(e,v)})),r=(0,s.Tj)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:q.MISSING_PATTERN,tokenTypes:[e]}})),n=(0,s.iv)(e,t);return{errors:r,valid:n}}(e);r=r.concat(n.errors);var o=function(e){var t=(0,s.pb)(e,(function(e){var t=e[v];return!((0,s.gd)(t)||(0,s.Tn)(t)||(0,s.zy)(t,"exec")||(0,s.Kg)(t))})),r=(0,s.Tj)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:q.INVALID_PATTERN,tokenTypes:[e]}})),n=(0,s.iv)(e,t);return{errors:r,valid:n}}(n.valid),a=o.valid;return r=(r=r.concat(o.errors)).concat(function(e){var t=[],r=(0,s.pb)(e,(function(e){return(0,s.gd)(e[v])}));return t=t.concat(function(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return C(t,e),t.prototype.visitEndAnchor=function(e){this.found=!0},t}(i.BaseRegExpVisitor),r=(0,s.pb)(e,(function(e){var r=e[v];try{var n=l(r),s=new t;return s.visit(n),s.found}catch(e){return _.test(r.source)}})),n=(0,s.Tj)(r,(function(e){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:q.EOI_ANCHOR_FOUND,tokenTypes:[e]}}));return n}(r)),t=t.concat(function(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return C(t,e),t.prototype.visitStartAnchor=function(e){this.found=!0},t}(i.BaseRegExpVisitor),r=(0,s.pb)(e,(function(e){var r=e[v];try{var n=l(r),s=new t;return s.visit(n),s.found}catch(e){return b.test(r.source)}})),n=(0,s.Tj)(r,(function(e){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:q.SOI_ANCHOR_FOUND,tokenTypes:[e]}}));return n}(r)),t=t.concat(function(e){var t=(0,s.pb)(e,(function(e){var t=e[v];return t instanceof RegExp&&(t.multiline||t.global)})),r=(0,s.Tj)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:q.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}}));return r}(r)),t=t.concat(function(e){var t=[],r=(0,s.Tj)(e,(function(r){return(0,s.TS)(e,(function(e,n){return r.PATTERN.source!==n.PATTERN.source||(0,s.gR)(t,n)||n.PATTERN===J.NA||(t.push(n),e.push(n)),e}),[])}));r=(0,s.oE)(r);var n=(0,s.pb)(r,(function(e){return e.length>1})),i=(0,s.Tj)(n,(function(e){var t=(0,s.Tj)(e,(function(e){return e.name}));return{message:"The same RegExp pattern ->"+(0,s.$1)(e).PATTERN+"<-has been used in all of the following Token Types: "+t.join(", ")+" <-",type:q.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}}));return i}(r)),t=t.concat(function(e){var t=(0,s.pb)(e,(function(e){return e[v].test("")})),r=(0,s.Tj)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:q.EMPTY_MATCH_PATTERN,tokenTypes:[e]}}));return r}(r)),t}(a)),r=r.concat(function(e){var t=(0,s.pb)(e,(function(e){if(!(0,s.zy)(e,"GROUP"))return!1;var t=e.GROUP;return t!==J.SKIPPED&&t!==J.NA&&!(0,s.Kg)(t)})),r=(0,s.Tj)(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:q.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}}));return r}(a)),r=r.concat(function(e,t){var r=(0,s.pb)(e,(function(e){return void 0!==e.PUSH_MODE&&!(0,s.gR)(t,e.PUSH_MODE)})),n=(0,s.Tj)(r,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+e.PUSH_MODE+"<-which does not exist",type:q.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}}));return n}(a,t)),r=r.concat(function(e){var t=[],r=(0,s.TS)(e,(function(e,t,r){var n,i,o=t.PATTERN;return o===J.NA||((0,s.Kg)(o)?e.push({str:o,idx:r,tokenType:t}):(0,s.gd)(o)&&(n=o,i=[".","\\","[","]","|","^","$","(",")","?","*","+","{"],void 0===(0,s.I6)(i,(function(e){return-1!==n.source.indexOf(e)})))&&e.push({str:o.source,idx:r,tokenType:t})),e}),[]);return(0,s.jJ)(e,(function(e,n){(0,s.jJ)(r,(function(r){var i=r.str,o=r.idx,a=r.tokenType;if(n<o&&function(e,t){if((0,s.gd)(t)){var r=t.exec(e);return null!==r&&0===r.index}if((0,s.Tn)(t))return t(e,0,[],{});if((0,s.zy)(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}(i,e.PATTERN)){var l="Token: ->"+a.name+"<- can never be matched.\nBecause it appears AFTER the Token Type ->"+e.name+"<-in the lexer's definition.\nSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNREACHABLE";t.push({message:l,type:q.UNREACHABLE_PATTERN,tokenTypes:[e,a]})}}))})),t}(a)),r}var _=/[^\\][\$]/;var b=/[^\\[][\^]|^\^/;function A(e){var t=e.ignoreCase?"i":"";return new RegExp("^(?:"+e.source+")",t)}function O(e){var t=e.ignoreCase?"iy":"y";return new RegExp(""+e.source,t)}function I(e,t,r){var n=[],i=!1,o=(0,s.oE)((0,s.Bq)((0,s.LG)(e.modes,(function(e){return e})))),a=(0,s.ku)(o,(function(e){return e[v]===J.NA})),l=k(r);return t&&(0,s.jJ)(a,(function(e){var t=D(e,l);if(!1!==t){var r=function(e,t){if(t.issue===q.IDENTIFY_TERMINATOR)return"Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <"+e.name+"> Token Type\n\t Root cause: "+t.errMsg+".\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(t.issue===q.CUSTOM_LINE_BREAK)return"Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <"+e.name+"> Token Type\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}(e,t),o={message:r,type:t.issue,tokenType:e};n.push(o)}else(0,s.zy)(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(i=!0):w(l,e.PATTERN)&&(i=!0)})),t&&!i&&n.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:q.NO_LINE_BREAKS_FLAGS}),n}function x(e){var t=e.PATTERN;if((0,s.gd)(t))return!1;if((0,s.Tn)(t))return!0;if((0,s.zy)(t,"exec"))return!0;if((0,s.Kg)(t))return!1;throw Error("non exhaustive match")}function P(e){return!(!(0,s.Kg)(e)||1!==e.length)&&e.charCodeAt(0)}var L={test:function(e){for(var t=e.length,r=this.lastIndex;r<t;r++){var n=e.charCodeAt(r);if(10===n)return this.lastIndex=r+1,!0;if(13===n)return 10===e.charCodeAt(r+1)?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},lastIndex:0};function D(e,t){if((0,s.zy)(e,"LINE_BREAKS"))return!1;if((0,s.gd)(e.PATTERN)){try{w(t,e.PATTERN)}catch(e){return{issue:q.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if((0,s.Kg)(e.PATTERN))return!1;if(x(e))return{issue:q.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function k(e){return(0,s.Tj)(e,(function(e){return(0,s.Kg)(e)&&e.length>0?e.charCodeAt(0):e}))}function H(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}var F=256;function U(e){return e<F?e:V[e]}var V=[];function B(e,t){var r=e.tokenTypeIdx;return r===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[r]}function W(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var Y=1,G={};function j(e){var t=function(e){var t=(0,s.T9)(e),r=e,n=!0;for(;n;){r=(0,s.oE)((0,s.Bq)((0,s.Tj)(r,(function(e){return e.CATEGORIES}))));var i=(0,s.iv)(r,t);t=t.concat(i),(0,s.Im)(i)?n=!1:r=i}return t}(e);!function(e){(0,s.jJ)(e,(function(e){var t;$(e)||(G[Y]=e,e.tokenTypeIdx=Y++),K(e)&&!(0,s.cy)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),K(e)||(e.CATEGORIES=[]),t=e,(0,s.zy)(t,"categoryMatches")||(e.categoryMatches=[]),function(e){return(0,s.zy)(e,"categoryMatchesMap")}(e)||(e.categoryMatchesMap={})}))}(t),function(e){(0,s.jJ)(e,(function(e){z([],e)}))}(t),function(e){(0,s.jJ)(e,(function(e){e.categoryMatches=[],(0,s.jJ)(e.categoryMatchesMap,(function(t,r){e.categoryMatches.push(G[r].tokenTypeIdx)}))}))}(t),(0,s.jJ)(t,(function(e){e.isParent=e.categoryMatches.length>0}))}function z(e,t){(0,s.jJ)(e,(function(e){t.categoryMatchesMap[e.tokenTypeIdx]=!0})),(0,s.jJ)(t.CATEGORIES,(function(r){var n=e.concat(t);(0,s.gR)(n,r)||z(n,r)}))}function $(e){return(0,s.zy)(e,"tokenTypeIdx")}function K(e){return(0,s.zy)(e,"CATEGORIES")}function X(e){return(0,s.zy)(e,"tokenTypeIdx")}var q,Q={buildUnableToPopLexerModeMessage:function(e){return"Unable to pop Lexer Mode after encountering Token ->"+e.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(e,t,r,n,s){return"unexpected character: ->"+e.charAt(t)+"<- at offset: "+t+", skipped "+r+" characters."}};!function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"}(q||(q={}));var Z={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Q,traceInitPerf:!1,skipValidations:!1};Object.freeze(Z);var J=function(){function e(e,t){var r=this;if(void 0===t&&(t=Z),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},"boolean"==typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=(0,s.h1)(Z,t);var n=this.config.traceInitPerf;!0===n?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof n&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",(function(){var n,i=!0;r.TRACE_INIT("Lexer Config handling",(function(){if(r.config.lineTerminatorsPattern===Z.lineTerminatorsPattern)r.config.lineTerminatorsPattern=L;else if(r.config.lineTerminatorCharacters===Z.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');r.trackStartLines=/full|onlyStart/i.test(r.config.positionTracking),r.trackEndLines=/full/i.test(r.config.positionTracking),(0,s.cy)(e)?((n={modes:{}}).modes[R]=(0,s.T9)(e),n[R]=R):(i=!1,n=(0,s.lR)(e))})),!1===r.config.skipValidations&&(r.TRACE_INIT("performRuntimeChecks",(function(){r.lexerDefinitionErrors=r.lexerDefinitionErrors.concat(function(e){var t=[];return(0,s.zy)(e,R)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+R+"> property in its definition\n",type:q.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,s.zy)(e,S)||t.push({message:"A MultiMode Lexer cannot be initialized without a <modes> property in its definition\n",type:q.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,s.zy)(e,S)&&(0,s.zy)(e,R)&&!(0,s.zy)(e.modes,e.defaultMode)&&t.push({message:"A MultiMode Lexer cannot be initialized with a "+R+": <"+e.defaultMode+">which does not exist\n",type:q.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,s.zy)(e,S)&&(0,s.jJ)(e.modes,(function(e,r){(0,s.jJ)(e,(function(e,n){(0,s.b0)(e)&&t.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:<"+r+"> at index: <"+n+">\n",type:q.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})}))})),t}(n,r.trackStartLines,r.config.lineTerminatorCharacters))})),r.TRACE_INIT("performWarningRuntimeChecks",(function(){r.lexerDefinitionWarning=r.lexerDefinitionWarning.concat(I(n,r.trackStartLines,r.config.lineTerminatorCharacters))}))),n.modes=n.modes?n.modes:{},(0,s.jJ)(n.modes,(function(e,t){n.modes[t]=(0,s.ku)(e,(function(e){return(0,s.b0)(e)}))}));var a=(0,s.HP)(n.modes);if((0,s.jJ)(n.modes,(function(e,n){r.TRACE_INIT("Mode: <"+n+"> processing",(function(){var i;(r.modes.push(n),!1===r.config.skipValidations&&r.TRACE_INIT("validatePatterns",(function(){r.lexerDefinitionErrors=r.lexerDefinitionErrors.concat(M(e,a))})),(0,s.Im)(r.lexerDefinitionErrors))&&(j(e),r.TRACE_INIT("analyzeTokenTypes",(function(){i=N(e,{lineTerminatorCharacters:r.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:r.TRACE_INIT.bind(r)})})),r.patternIdxToConfig[n]=i.patternIdxToConfig,r.charCodeToPatternIdxToConfig[n]=i.charCodeToPatternIdxToConfig,r.emptyGroups=(0,s.h1)(r.emptyGroups,i.emptyGroups),r.hasCustom=i.hasCustom||r.hasCustom,r.canModeBeOptimized[n]=i.canBeOptimized)}))})),r.defaultMode=n.defaultMode,!(0,s.Im)(r.lexerDefinitionErrors)&&!r.config.deferDefinitionErrorsHandling){var l=(0,s.Tj)(r.lexerDefinitionErrors,(function(e){return e.message})).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+l)}(0,s.jJ)(r.lexerDefinitionWarning,(function(e){(0,s.x5)(e.message)})),r.TRACE_INIT("Choosing sub-methods implementations",(function(){if(T?(r.chopInput=s.zK,r.match=r.matchWithTest):(r.updateLastIndex=s.tE,r.match=r.matchWithExec),i&&(r.handleModes=s.tE),!1===r.trackStartLines&&(r.computeNewColumn=s.zK),!1===r.trackEndLines&&(r.updateTokenEndLineColumnLocation=s.tE),/full/i.test(r.config.positionTracking))r.createTokenInstance=r.createFullToken;else if(/onlyStart/i.test(r.config.positionTracking))r.createTokenInstance=r.createStartOnlyToken;else{if(!/onlyOffset/i.test(r.config.positionTracking))throw Error('Invalid <positionTracking> config option: "'+r.config.positionTracking+'"');r.createTokenInstance=r.createOffsetOnlyToken}r.hasCustom?(r.addToken=r.addTokenUsingPush,r.handlePayload=r.handlePayloadWithCustom):(r.addToken=r.addTokenUsingMemberAccess,r.handlePayload=r.handlePayloadNoCustom)})),r.TRACE_INIT("Failed Optimization Warnings",(function(){var e=(0,s.TS)(r.canModeBeOptimized,(function(e,t,r){return!1===t&&e.push(r),e}),[]);if(t.ensureOptimizations&&!(0,s.Im)(e))throw Error("Lexer Modes: < "+e.join(", ")+' > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.')})),r.TRACE_INIT("clearRegExpParserCache",(function(){o={}})),r.TRACE_INIT("toFastProperties",(function(){(0,s.Bl)(r)}))}))}return e.prototype.tokenize=function(e,t){if(void 0===t&&(t=this.defaultMode),!(0,s.Im)(this.lexerDefinitionErrors)){var r=(0,s.Tj)(this.lexerDefinitionErrors,(function(e){return e.message})).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+r)}return this.tokenizeInternal(e,t)},e.prototype.tokenizeInternal=function(e,t){var r,n,i,o,a,l,h,u,c,d,p,g,f,m,y,E,w,C=this,v=e,R=v.length,S=0,T=0,N=this.hasCustom?0:Math.floor(e.length/10),M=new Array(N),_=[],b=this.trackStartLines?1:void 0,A=this.trackStartLines?1:void 0,O=(y=this.emptyGroups,E={},w=(0,s.HP)(y),(0,s.jJ)(w,(function(e){var t=y[e];if(!(0,s.cy)(t))throw Error("non exhaustive match");E[e]=[]})),E),I=this.trackStartLines,x=this.config.lineTerminatorsPattern,P=0,L=[],D=[],k=[],H=[];Object.freeze(H);var F=void 0;function V(){return L}function B(e){var t=U(e),r=D[t];return void 0===r?H:r}var W,Y=function(e){if(1===k.length&&void 0===e.tokenType.PUSH_MODE){var t=C.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);_.push({offset:e.startOffset,line:void 0!==e.startLine?e.startLine:void 0,column:void 0!==e.startColumn?e.startColumn:void 0,length:e.image.length,message:t})}else{k.pop();var r=(0,s.HV)(k);L=C.patternIdxToConfig[r],D=C.charCodeToPatternIdxToConfig[r],P=L.length;var n=C.canModeBeOptimized[r]&&!1===C.config.safeMode;F=D&&n?B:V}};function G(e){k.push(e),D=this.charCodeToPatternIdxToConfig[e],L=this.patternIdxToConfig[e],P=L.length,P=L.length;var t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;F=D&&t?B:V}for(G.call(this,t);S<R;){a=null;var j=v.charCodeAt(S),z=F(j),$=z.length;for(r=0;r<$;r++){var K=(W=z[r]).pattern;if(l=null,!1!==(se=W.short)?j===se&&(a=K):!0===W.isCustom?null!==(m=K.exec(v,S,M,O))?(a=m[0],void 0!==m.payload&&(l=m.payload)):a=null:(this.updateLastIndex(K,S),a=this.match(K,e,S)),null!==a){if(void 0!==(o=W.longerAlt)){var X=L[o],q=X.pattern;h=null,!0===X.isCustom?null!==(m=q.exec(v,S,M,O))?(i=m[0],void 0!==m.payload&&(h=m.payload)):i=null:(this.updateLastIndex(q,S),i=this.match(q,e,S)),i&&i.length>a.length&&(a=i,l=h,W=X)}break}}if(null!==a){if(u=a.length,void 0!==(c=W.group)&&(d=W.tokenTypeIdx,p=this.createTokenInstance(a,S,d,W.tokenType,b,A,u),this.handlePayload(p,l),!1===c?T=this.addToken(M,T,p):O[c].push(p)),e=this.chopInput(e,u),S+=u,A=this.computeNewColumn(A,u),!0===I&&!0===W.canLineTerminator){var Q=0,Z=void 0,J=void 0;x.lastIndex=0;do{!0===(Z=x.test(a))&&(J=x.lastIndex-1,Q++)}while(!0===Z);0!==Q&&(b+=Q,A=u-J,this.updateTokenEndLineColumnLocation(p,c,J,Q,b,A,u))}this.handleModes(W,Y,G,p)}else{for(var ee=S,te=b,re=A,ne=!1;!ne&&S<R;)for(v.charCodeAt(S),e=this.chopInput(e,1),S++,n=0;n<P;n++){var se,ie=L[n];K=ie.pattern;if(!1!==(se=ie.short)?v.charCodeAt(S)===se&&(ne=!0):!0===ie.isCustom?ne=null!==K.exec(v,S,M,O):(this.updateLastIndex(K,S),ne=null!==K.exec(e)),!0===ne)break}g=S-ee,f=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(v,ee,g,te,re),_.push({offset:ee,line:te,column:re,length:g,message:f})}}return this.hasCustom||(M.length=T),{tokens:M,groups:O,errors:_}},e.prototype.handleModes=function(e,t,r,n){if(!0===e.pop){var s=e.push;t(n),void 0!==s&&r.call(this,s)}else void 0!==e.push&&r.call(this,e.push)},e.prototype.chopInput=function(e,t){return e.substring(t)},e.prototype.updateLastIndex=function(e,t){e.lastIndex=t},e.prototype.updateTokenEndLineColumnLocation=function(e,t,r,n,s,i,o){var a,l;void 0!==t&&(l=(a=r===o-1)?-1:0,1===n&&!0===a||(e.endLine=s+l,e.endColumn=i-1-l))},e.prototype.computeNewColumn=function(e,t){return e+t},e.prototype.createTokenInstance=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return null},e.prototype.createOffsetOnlyToken=function(e,t,r,n){return{image:e,startOffset:t,tokenTypeIdx:r,tokenType:n}},e.prototype.createStartOnlyToken=function(e,t,r,n,s,i){return{image:e,startOffset:t,startLine:s,startColumn:i,tokenTypeIdx:r,tokenType:n}},e.prototype.createFullToken=function(e,t,r,n,s,i,o){return{image:e,startOffset:t,endOffset:t+o-1,startLine:s,endLine:s,startColumn:i,endColumn:i+o-1,tokenTypeIdx:r,tokenType:n}},e.prototype.addToken=function(e,t,r){return 666},e.prototype.addTokenUsingPush=function(e,t,r){return e.push(r),t},e.prototype.addTokenUsingMemberAccess=function(e,t,r){return e[t]=r,++t},e.prototype.handlePayload=function(e,t){},e.prototype.handlePayloadNoCustom=function(e,t){},e.prototype.handlePayloadWithCustom=function(e,t){null!==t&&(e.payload=t)},e.prototype.match=function(e,t,r){return null},e.prototype.matchWithTest=function(e,t,r){return!0===e.test(t)?t.substring(r,e.lastIndex):null},e.prototype.matchWithExec=function(e,t){var r=e.exec(t);return null!==r?r[0]:r},e.prototype.TRACE_INIT=function(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;var r=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+"--\x3e <"+e+">");var n=(0,s.O1)(t),i=n.time,o=n.value,a=i>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(r+"<-- <"+e+"> time: "+i+"ms"),this.traceInitIndent--,o}return t()},e.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",e.NA=/NOT_APPLICABLE/,e}();function ee(e){return re(e)?e.LABEL:e.name}function te(e){return e.name}function re(e){return(0,s.Kg)(e.LABEL)&&""!==e.LABEL}var ne="parent",se="categories",ie="label",oe="group",ae="push_mode",le="pop_mode",he="longer_alt",ue="line_breaks",ce="start_chars_hint";function de(e){return function(e){var t=e.pattern,r={};r.name=e.name,(0,s.b0)(t)||(r.PATTERN=t);if((0,s.zy)(e,ne))throw"The parent property is no longer supported.\nSee: https://github.com/SAP/chevrotain/issues/564#issuecomment-349062346 for details.";(0,s.zy)(e,se)&&(r.CATEGORIES=e[se]);j([r]),(0,s.zy)(e,ie)&&(r.LABEL=e[ie]);(0,s.zy)(e,oe)&&(r.GROUP=e[oe]);(0,s.zy)(e,le)&&(r.POP_MODE=e[le]);(0,s.zy)(e,ae)&&(r.PUSH_MODE=e[ae]);(0,s.zy)(e,he)&&(r.LONGER_ALT=e[he]);(0,s.zy)(e,ue)&&(r.LINE_BREAKS=e[ue]);(0,s.zy)(e,ce)&&(r.START_CHARS_HINT=e[ce]);return r}(e)}var pe=de({name:"EOF",pattern:J.NA});function ge(e,t,r,n,s,i,o,a){return{image:t,startOffset:r,endOffset:n,startLine:s,endLine:i,startColumn:o,endColumn:a,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function fe(e,t){return B(e,t)}j([pe]);var me=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),ye=function(){function e(e){this.definition=e}return e.prototype.accept=function(e){e.visit(this),(0,s.jJ)(this.definition,(function(t){t.accept(e)}))},e}(),Ee=function(e){function t(t){var r=e.call(this,[])||this;return r.idx=1,(0,s.kp)(r,(0,s.Up)(t,(function(e){return void 0!==e}))),r}return me(t,e),Object.defineProperty(t.prototype,"definition",{get:function(){return void 0!==this.referencedRule?this.referencedRule.definition:[]},set:function(e){},enumerable:!0,configurable:!0}),t.prototype.accept=function(e){e.visit(this)},t}(ye),we=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.orgText="",(0,s.kp)(r,(0,s.Up)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(ye),Ce=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.ignoreAmbiguities=!1,(0,s.kp)(r,(0,s.Up)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(ye),ve=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,s.kp)(r,(0,s.Up)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(ye),Re=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,s.kp)(r,(0,s.Up)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(ye),Se=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,s.kp)(r,(0,s.Up)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(ye),Te=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,s.kp)(r,(0,s.Up)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(ye),Ne=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,(0,s.kp)(r,(0,s.Up)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(ye),Me=function(e){function t(t){var r=e.call(this,t.definition)||this;return r.idx=1,r.ignoreAmbiguities=!1,r.hasPredicates=!1,(0,s.kp)(r,(0,s.Up)(t,(function(e){return void 0!==e}))),r}return me(t,e),t}(ye),_e=function(){function e(e){this.idx=1,(0,s.kp)(this,(0,s.Up)(e,(function(e){return void 0!==e})))}return e.prototype.accept=function(e){e.visit(this)},e}();function be(e){return(0,s.Tj)(e,Ae)}function Ae(e){function t(e){return(0,s.Tj)(e,Ae)}if(e instanceof Ee)return{type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};if(e instanceof Ce)return{type:"Flat",definition:t(e.definition)};if(e instanceof ve)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Re)return{type:"RepetitionMandatory",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof Se)return{type:"RepetitionMandatoryWithSeparator",name:e.name,idx:e.idx,separator:Ae(new _e({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Ne)return{type:"RepetitionWithSeparator",name:e.name,idx:e.idx,separator:Ae(new _e({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Te)return{type:"Repetition",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof Me)return{type:"Alternation",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof _e){var r={type:"Terminal",name:e.terminalType.name,label:ee(e.terminalType),idx:e.idx},n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=(0,s.gd)(n)?n.source:n),r}if(e instanceof we)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}var Oe=function(){function e(){}return e.prototype.walk=function(e,t){var r=this;void 0===t&&(t=[]),(0,s.jJ)(e.definition,(function(n,i){var o=(0,s.gv)(e.definition,i+1);if(n instanceof Ee)r.walkProdRef(n,o,t);else if(n instanceof _e)r.walkTerminal(n,o,t);else if(n instanceof Ce)r.walkFlat(n,o,t);else if(n instanceof ve)r.walkOption(n,o,t);else if(n instanceof Re)r.walkAtLeastOne(n,o,t);else if(n instanceof Se)r.walkAtLeastOneSep(n,o,t);else if(n instanceof Ne)r.walkManySep(n,o,t);else if(n instanceof Te)r.walkMany(n,o,t);else{if(!(n instanceof Me))throw Error("non exhaustive match");r.walkOr(n,o,t)}}))},e.prototype.walkTerminal=function(e,t,r){},e.prototype.walkProdRef=function(e,t,r){},e.prototype.walkFlat=function(e,t,r){var n=t.concat(r);this.walk(e,n)},e.prototype.walkOption=function(e,t,r){var n=t.concat(r);this.walk(e,n)},e.prototype.walkAtLeastOne=function(e,t,r){var n=[new ve({definition:e.definition})].concat(t,r);this.walk(e,n)},e.prototype.walkAtLeastOneSep=function(e,t,r){var n=Ie(e,t,r);this.walk(e,n)},e.prototype.walkMany=function(e,t,r){var n=[new ve({definition:e.definition})].concat(t,r);this.walk(e,n)},e.prototype.walkManySep=function(e,t,r){var n=Ie(e,t,r);this.walk(e,n)},e.prototype.walkOr=function(e,t,r){var n=this,i=t.concat(r);(0,s.jJ)(e.definition,(function(e){var t=new Ce({definition:[e]});n.walk(t,i)}))},e}();function Ie(e,t,r){return[new ve({definition:[new _e({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}var xe=function(){function e(){}return e.prototype.visit=function(e){var t=e;switch(t.constructor){case Ee:return this.visitNonTerminal(t);case Ce:return this.visitFlat(t);case ve:return this.visitOption(t);case Re:return this.visitRepetitionMandatory(t);case Se:return this.visitRepetitionMandatoryWithSeparator(t);case Ne:return this.visitRepetitionWithSeparator(t);case Te:return this.visitRepetition(t);case Me:return this.visitAlternation(t);case _e:return this.visitTerminal(t);case we:return this.visitRule(t);default:throw Error("non exhaustive match")}},e.prototype.visitNonTerminal=function(e){},e.prototype.visitFlat=function(e){},e.prototype.visitOption=function(e){},e.prototype.visitRepetition=function(e){},e.prototype.visitRepetitionMandatory=function(e){},e.prototype.visitRepetitionMandatoryWithSeparator=function(e){},e.prototype.visitRepetitionWithSeparator=function(e){},e.prototype.visitAlternation=function(e){},e.prototype.visitTerminal=function(e){},e.prototype.visitRule=function(e){},e}(),Pe=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Le(e,t){return void 0===t&&(t=[]),!!(e instanceof ve||e instanceof Te||e instanceof Ne)||(e instanceof Me?(0,s.zN)(e.definition,(function(e){return Le(e,t)})):!(e instanceof Ee&&(0,s.gR)(t,e))&&(e instanceof ye&&(e instanceof Ee&&t.push(e),(0,s.Si)(e.definition,(function(e){return Le(e,t)})))))}function De(e){if(e instanceof Ee)return"SUBRULE";if(e instanceof ve)return"OPTION";if(e instanceof Me)return"OR";if(e instanceof Re)return"AT_LEAST_ONE";if(e instanceof Se)return"AT_LEAST_ONE_SEP";if(e instanceof Ne)return"MANY_SEP";if(e instanceof Te)return"MANY";if(e instanceof _e)return"CONSUME";throw Error("non exhaustive match")}var ke=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.separator="-",t.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},t}return Pe(t,e),t.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},t.prototype.visitTerminal=function(e){var t=e.terminalType.name+this.separator+"Terminal";(0,s.zy)(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},t.prototype.visitNonTerminal=function(e){var t=e.nonTerminalName+this.separator+"Terminal";(0,s.zy)(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},t.prototype.visitOption=function(e){this.dslMethods.option.push(e)},t.prototype.visitRepetitionWithSeparator=function(e){this.dslMethods.repetitionWithSeparator.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.dslMethods.repetitionMandatory.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)},t.prototype.visitRepetition=function(e){this.dslMethods.repetition.push(e)},t.prototype.visitAlternation=function(e){this.dslMethods.alternation.push(e)},t}(xe),He=new ke;function Fe(e){if(e instanceof Ee)return Fe(e.referencedRule);if(e instanceof _e)return[e.terminalType];if(function(e){return e instanceof Ce||e instanceof ve||e instanceof Te||e instanceof Re||e instanceof Se||e instanceof Ne||e instanceof _e||e instanceof we}(e))return function(e){var t,r=[],n=e.definition,i=0,o=n.length>i,a=!0;for(;o&&a;)a=Le(t=n[i]),r=r.concat(Fe(t)),i+=1,o=n.length>i;return(0,s.sb)(r)}(e);if(function(e){return e instanceof Me}(e))return function(e){var t=(0,s.Tj)(e.definition,(function(e){return Fe(e)}));return(0,s.sb)((0,s.Bq)(t))}(e);throw Error("non exhaustive match")}var Ue="_~IN~_",Ve=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Be=function(e){function t(t){var r=e.call(this)||this;return r.topProd=t,r.follows={},r}return Ve(t,e),t.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},t.prototype.walkTerminal=function(e,t,r){},t.prototype.walkProdRef=function(e,t,r){var n,s,i=(n=e.referencedRule,s=e.idx,n.name+s+Ue+this.topProd.name),o=t.concat(r),a=Fe(new Ce({definition:o}));this.follows[i]=a},t}(Oe);var We=256,Ye=512,Ge=768,je=1024,ze=1280,$e=1536;function Ke(e,t,r){return r|t|e}function Xe(e,t,r,n){var s=n+1<<24;return Ke(e,t,r)|s}var qe=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Qe(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset)}function Ze(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function Je(e,t,r){void 0===e.children[t]?e.children[t]=[r]:e.children[t].push(r)}var et=function(e){function t(t){var r=e.call(this)||this;return r.result=[],r.ruleIdx=t,r}return qe(t,e),t.prototype.collectNamedDSLMethod=function(e,t,r){if(!(0,s.b0)(e.name)){var n=void 0;if(e instanceof ve||e instanceof Te||e instanceof Re||e instanceof Me)n=new t({definition:e.definition,idx:e.idx});else{if(!(e instanceof Se||e instanceof Ne))throw Error("non exhaustive match");n=new t({definition:e.definition,idx:e.idx,separator:e.separator})}var i=[n],o=Ke(this.ruleIdx,r,e.idx);this.result.push({def:i,key:o,name:e.name,orgProd:e})}},t.prototype.visitOption=function(e){this.collectNamedDSLMethod(e,ve,Ye)},t.prototype.visitRepetition=function(e){this.collectNamedDSLMethod(e,Te,Ge)},t.prototype.visitRepetitionMandatory=function(e){this.collectNamedDSLMethod(e,Re,je)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.collectNamedDSLMethod(e,Se,$e)},t.prototype.visitRepetitionWithSeparator=function(e){this.collectNamedDSLMethod(e,Ne,ze)},t.prototype.visitAlternation=function(e){var t=this;this.collectNamedDSLMethod(e,Me,We);var r=e.definition.length>1;(0,s.jJ)(e.definition,(function(n,i){if(!(0,s.b0)(n.name)){var o=n.definition;o=r?[new ve({definition:n.definition})]:n.definition;var a=Xe(t.ruleIdx,We,e.idx,i);t.result.push({def:o,key:a,name:n.name,orgProd:n})}}))},t}(xe);var tt=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),rt=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.path=r,n.nextTerminalName="",n.nextTerminalOccurrence=0,n.nextTerminalName=n.path.lastTok.name,n.nextTerminalOccurrence=n.path.lastTokOccurrence,n}return tt(t,e),t.prototype.walkTerminal=function(e,t,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){var n=t.concat(r),s=new Ce({definition:n});this.possibleTokTypes=Fe(s),this.found=!0}},t}(function(e){function t(t,r){var n=e.call(this)||this;return n.topProd=t,n.path=r,n.possibleTokTypes=[],n.nextProductionName="",n.nextProductionOccurrence=0,n.found=!1,n.isAtEndOfPath=!1,n}return tt(t,e),t.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=(0,s.T9)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,s.T9)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},t.prototype.walk=function(t,r){void 0===r&&(r=[]),this.found||e.prototype.walk.call(this,t,r)},t.prototype.walkProdRef=function(e,t,r){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){var n=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,n)}},t.prototype.updateExpectedNext=function(){(0,s.Im)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},t}(Oe)),nt=function(e){function t(t,r){var n=e.call(this)||this;return n.topRule=t,n.occurrence=r,n.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},n}return tt(t,e),t.prototype.startWalking=function(){return this.walk(this.topRule),this.result},t}(Oe),st=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tt(t,e),t.prototype.walkMany=function(t,r,n){if(t.idx===this.occurrence){var i=(0,s.$1)(r.concat(n));this.result.isEndOfRule=void 0===i,i instanceof _e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else e.prototype.walkMany.call(this,t,r,n)},t}(nt),it=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tt(t,e),t.prototype.walkManySep=function(t,r,n){if(t.idx===this.occurrence){var i=(0,s.$1)(r.concat(n));this.result.isEndOfRule=void 0===i,i instanceof _e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else e.prototype.walkManySep.call(this,t,r,n)},t}(nt),ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tt(t,e),t.prototype.walkAtLeastOne=function(t,r,n){if(t.idx===this.occurrence){var i=(0,s.$1)(r.concat(n));this.result.isEndOfRule=void 0===i,i instanceof _e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else e.prototype.walkAtLeastOne.call(this,t,r,n)},t}(nt),at=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tt(t,e),t.prototype.walkAtLeastOneSep=function(t,r,n){if(t.idx===this.occurrence){var i=(0,s.$1)(r.concat(n));this.result.isEndOfRule=void 0===i,i instanceof _e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else e.prototype.walkAtLeastOneSep.call(this,t,r,n)},t}(nt);function lt(e,t,r){void 0===r&&(r=[]),r=(0,s.T9)(r);var n=[],i=0;function o(o){var a=lt(o.concat((0,s.gv)(e,i+1)),t,r);return n.concat(a)}for(;r.length<t&&i<e.length;){var a=e[i];if(a instanceof Ce)return o(a.definition);if(a instanceof Ee)return o(a.definition);if(a instanceof ve)n=o(a.definition);else{if(a instanceof Re)return o(l=a.definition.concat([new Te({definition:a.definition})]));if(a instanceof Se)return o(l=[new Ce({definition:a.definition}),new Te({definition:[new _e({terminalType:a.separator})].concat(a.definition)})]);if(a instanceof Ne){var l=a.definition.concat([new Te({definition:[new _e({terminalType:a.separator})].concat(a.definition)})]);n=o(l)}else if(a instanceof Te){l=a.definition.concat([new Te({definition:a.definition})]);n=o(l)}else{if(a instanceof Me)return(0,s.jJ)(a.definition,(function(e){n=o(e.definition)})),n;if(!(a instanceof _e))throw Error("non exhaustive match");r.push(a.terminalType)}}i++}return n.push({partialPath:r,suffixDef:(0,s.gv)(e,i)}),n}function ht(e,t,r,n){var i="EXIT_NONE_TERMINAL",o=[i],a="EXIT_ALTERNATIVE",l=!1,h=t.length,u=h-n-1,c=[],d=[];for(d.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!(0,s.Im)(d);){var p=d.pop();if(p!==a){var g=p.def,f=p.idx,m=p.ruleStack,y=p.occurrenceStack;if(!(0,s.Im)(g)){var E=g[0];if(E===i){var w={idx:f,def:(0,s.gv)(g),ruleStack:(0,s.gc)(m),occurrenceStack:(0,s.gc)(y)};d.push(w)}else if(E instanceof _e)if(f<h-1){var C=f+1;if(r(t[C],E.terminalType)){w={idx:C,def:(0,s.gv)(g),ruleStack:m,occurrenceStack:y};d.push(w)}}else{if(f!==h-1)throw Error("non exhaustive match");c.push({nextTokenType:E.terminalType,nextTokenOccurrence:E.idx,ruleStack:m,occurrenceStack:y}),l=!0}else if(E instanceof Ee){var v=(0,s.T9)(m);v.push(E.nonTerminalName);var R=(0,s.T9)(y);R.push(E.idx);w={idx:f,def:E.definition.concat(o,(0,s.gv)(g)),ruleStack:v,occurrenceStack:R};d.push(w)}else if(E instanceof ve){var S={idx:f,def:(0,s.gv)(g),ruleStack:m,occurrenceStack:y};d.push(S),d.push(a);var T={idx:f,def:E.definition.concat((0,s.gv)(g)),ruleStack:m,occurrenceStack:y};d.push(T)}else if(E instanceof Re){var N=new Te({definition:E.definition,idx:E.idx});w={idx:f,def:E.definition.concat([N],(0,s.gv)(g)),ruleStack:m,occurrenceStack:y};d.push(w)}else if(E instanceof Se){var M=new _e({terminalType:E.separator});N=new Te({definition:[M].concat(E.definition),idx:E.idx}),w={idx:f,def:E.definition.concat([N],(0,s.gv)(g)),ruleStack:m,occurrenceStack:y};d.push(w)}else if(E instanceof Ne){S={idx:f,def:(0,s.gv)(g),ruleStack:m,occurrenceStack:y};d.push(S),d.push(a);M=new _e({terminalType:E.separator});var _=new Te({definition:[M].concat(E.definition),idx:E.idx});T={idx:f,def:E.definition.concat([_],(0,s.gv)(g)),ruleStack:m,occurrenceStack:y};d.push(T)}else if(E instanceof Te){S={idx:f,def:(0,s.gv)(g),ruleStack:m,occurrenceStack:y};d.push(S),d.push(a);_=new Te({definition:E.definition,idx:E.idx}),T={idx:f,def:E.definition.concat([_],(0,s.gv)(g)),ruleStack:m,occurrenceStack:y};d.push(T)}else if(E instanceof Me)for(var b=E.definition.length-1;b>=0;b--){var A={idx:f,def:E.definition[b].definition.concat((0,s.gv)(g)),ruleStack:m,occurrenceStack:y};d.push(A),d.push(a)}else if(E instanceof Ce)d.push({idx:f,def:E.definition.concat((0,s.gv)(g)),ruleStack:m,occurrenceStack:y});else{if(!(E instanceof we))throw Error("non exhaustive match");d.push(ut(E,f,m,y))}}}else l&&(0,s.HV)(d).idx<=u&&d.pop()}return c}function ut(e,t,r,n){var i=(0,s.T9)(r);i.push(e.name);var o=(0,s.T9)(n);return o.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:o}}var ct,dt=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();!function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"}(ct||(ct={}));var pt=function(e){function t(t,r,n){var s=e.call(this)||this;return s.topProd=t,s.targetOccurrence=r,s.targetProdType=n,s}return dt(t,e),t.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},t.prototype.checkIsTarget=function(e,t,r,n){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=r.concat(n),!0)},t.prototype.walkOption=function(t,r,n){this.checkIsTarget(t,ct.OPTION,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkAtLeastOne=function(t,r,n){this.checkIsTarget(t,ct.REPETITION_MANDATORY,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkAtLeastOneSep=function(t,r,n){this.checkIsTarget(t,ct.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkMany=function(t,r,n){this.checkIsTarget(t,ct.REPETITION,r,n)||e.prototype.walkOption.call(this,t,r,n)},t.prototype.walkManySep=function(t,r,n){this.checkIsTarget(t,ct.REPETITION_WITH_SEPARATOR,r,n)||e.prototype.walkOption.call(this,t,r,n)},t}(Oe),gt=function(e){function t(t,r,n){var s=e.call(this)||this;return s.targetOccurrence=t,s.targetProdType=r,s.targetRef=n,s.result=[],s}return dt(t,e),t.prototype.checkIsTarget=function(e,t){e.idx!==this.targetOccurrence||this.targetProdType!==t||void 0!==this.targetRef&&e!==this.targetRef||(this.result=e.definition)},t.prototype.visitOption=function(e){this.checkIsTarget(e,ct.OPTION)},t.prototype.visitRepetition=function(e){this.checkIsTarget(e,ct.REPETITION)},t.prototype.visitRepetitionMandatory=function(e){this.checkIsTarget(e,ct.REPETITION_MANDATORY)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.checkIsTarget(e,ct.REPETITION_MANDATORY_WITH_SEPARATOR)},t.prototype.visitRepetitionWithSeparator=function(e){this.checkIsTarget(e,ct.REPETITION_WITH_SEPARATOR)},t.prototype.visitAlternation=function(e){this.checkIsTarget(e,ct.ALTERNATION)},t}(xe);function ft(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=[];return t}function mt(e){for(var t=[""],r=0;r<e.length;r++){for(var n=e[r],s=[],i=0;i<t.length;i++){var o=t[i];s.push(o+"_"+n.tokenTypeIdx);for(var a=0;a<n.categoryMatches.length;a++){var l="_"+n.categoryMatches[a];s.push(o+l)}}t=s}return t}function yt(e,t,r){for(var n=0;n<e.length;n++)if(n!==r)for(var s=e[n],i=0;i<t.length;i++){if(!0===s[t[i]])return!1}return!0}function Et(e,t){for(var r=(0,s.Tj)(e,(function(e){return lt([e],1)})),n=ft(r.length),i=(0,s.Tj)(r,(function(e){var t={};return(0,s.jJ)(e,(function(e){var r=mt(e.partialPath);(0,s.jJ)(r,(function(e){t[e]=!0}))})),t})),o=r,a=1;a<=t;a++){var l=o;o=ft(l.length);for(var h=function(e){for(var r=l[e],h=0;h<r.length;h++){var u=r[h].partialPath,c=r[h].suffixDef,d=mt(u);if(yt(i,d,e)||(0,s.Im)(c)||u.length===t){var p=n[e];if(!1===vt(p,u)){p.push(u);for(var g=0;g<d.length;g++){var f=d[g];i[e][f]=!0}}}else{var m=lt(c,a+1,u);o[e]=o[e].concat(m),(0,s.jJ)(m,(function(t){var r=mt(t.partialPath);(0,s.jJ)(r,(function(t){i[e][t]=!0}))}))}}},u=0;u<l.length;u++)h(u)}return n}function wt(e,t,r,n){var s=new gt(e,ct.ALTERNATION,n);return t.accept(s),Et(s.result,r)}function Ct(e,t,r,n){var s=new gt(e,r);t.accept(s);var i=s.result,o=new pt(t,e,r).startWalking();return Et([new Ce({definition:i}),new Ce({definition:o})],n)}function vt(e,t){e:for(var r=0;r<e.length;r++){var n=e[r];if(n.length===t.length){for(var s=0;s<n.length;s++){var i=t[s],o=n[s];if(!1===(i===o||void 0!==o.categoryMatchesMap[i.tokenTypeIdx]))continue e}return!0}}return!1}function Rt(e){return(0,s.Si)(e,(function(e){return(0,s.Si)(e,(function(e){return(0,s.Si)(e,(function(e){return(0,s.Im)(e.categoryMatches)}))}))}))}var St=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();function Tt(e,t,r,n,i,o){var a=s.Tj(e,(function(e){return function(e,t){var r=new _t;e.accept(r);var n=r.allProductions,i=s.$z(n,Nt),o=s.Up(i,(function(e){return e.length>1})),a=s.Tj(s.zu(o),(function(r){var n=s.$1(r),i=t.buildDuplicateFoundError(e,r),o=De(n),a={message:i,type:xr.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:o,occurrence:n.idx},l=Mt(n);return l&&(a.parameter=l),a}));return a}(e,i)})),l=s.Tj(e,(function(e){return Ot(e,e,i)})),h=[],u=[],c=[];(0,s.Si)(l,s.Im)&&(h=(0,s.Tj)(e,(function(e){return function(e,t){var r=new xt;e.accept(r);var n=r.alternations,i=s.TS(n,(function(r,n){var i=s.gc(n.definition),o=s.Tj(i,(function(r,i){var o=ht([r],[],null,1);return s.Im(o)?{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:i}),type:xr.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:i+1}:null}));return r.concat(s.oE(o))}),[]);return i}(e,i)})),u=(0,s.Tj)(e,(function(e){return function(e,t,r,n){var i=new xt;e.accept(i);var o=i.alternations,a=r[e.name];a&&(o=(0,s.ku)(o,(function(e){return a[De(e)+(0===e.idx?"":e.idx)]})));o=(0,s.ku)(o,(function(e){return!0===e.ignoreAmbiguities}));var l=s.TS(o,(function(r,i){var o=i.idx,a=i.maxLookahead||t,l=wt(o,e,a,i),h=function(e,t,r,n){var i=[],o=(0,s.TS)(e,(function(r,n,o){return!0===t.definition[o].ignoreAmbiguities||(0,s.jJ)(n,(function(n){var a=[o];(0,s.jJ)(e,(function(e,r){o!==r&&vt(e,n)&&!0!==t.definition[r].ignoreAmbiguities&&a.push(r)})),a.length>1&&!vt(i,n)&&(i.push(n),r.push({alts:a,path:n}))})),r}),[]),a=s.Tj(o,(function(e){var i=(0,s.Tj)(e.alts,(function(e){return e+1}));return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:xr.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:[e.alts]}}));return a}(l,i,e,n),u=function(e,t,r,n){var i=[],o=(0,s.TS)(e,(function(e,t,r){var n=(0,s.Tj)(t,(function(e){return{idx:r,path:e}}));return e.concat(n)}),[]);return(0,s.jJ)(o,(function(e){if(!0!==t.definition[e.idx].ignoreAmbiguities){var a=e.idx,l=e.path,h=(0,s.JW)(o,(function(e){return!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx<a&&(r=e.path,n=l,r.length<n.length&&(0,s.Si)(r,(function(e,t){var r=n[t];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]})));var r,n})),u=(0,s.Tj)(h,(function(e){var s=[e.idx+1,a+1],i=0===t.idx?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:s,prefixPath:e.path}),type:xr.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:i,alternatives:s}}));i=i.concat(u)}})),i}(l,i,e,n);return r.concat(h,u)}),[]);return l}(e,t,n,i)})),c=function(e,t,r){var n=[];return(0,s.jJ)(e,(function(e){var i=new Pt;e.accept(i);var o=i.allProductions;(0,s.jJ)(o,(function(i){var o=function(e){if(e instanceof ve)return ct.OPTION;if(e instanceof Te)return ct.REPETITION;if(e instanceof Re)return ct.REPETITION_MANDATORY;if(e instanceof Se)return ct.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof Ne)return ct.REPETITION_WITH_SEPARATOR;if(e instanceof Me)return ct.ALTERNATION;throw Error("non exhaustive match")}(i),a=i.maxLookahead||t,l=Ct(i.idx,e,o,a)[0];if((0,s.Im)((0,s.Bq)(l))){var h=r.buildEmptyRepetitionError({topLevelRule:e,repetition:i});n.push({message:h,type:xr.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}}))})),n}(e,t,i));var d=function(e,t,r){var n=[],i=(0,s.Tj)(t,(function(e){return e.name}));return(0,s.jJ)(e,(function(e){var t=e.name;if((0,s.gR)(i,t)){var o=r.buildNamespaceConflictError(e);n.push({message:o,type:xr.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}})),n}(e,r,i),p=s.Tj(r,(function(e){return function(e,t){var r=[];e.name.match(bt)||r.push({message:t.buildTokenNameError({tokenType:e,expectedPattern:bt}),type:xr.INVALID_TOKEN_NAME});return r}(e,i)})),g=function(e,t){var r=[];return(0,s.jJ)(e,(function(e){var n=new et("");e.accept(n);var i=(0,s.Tj)(n.result,(function(e){return e.orgProd}));r.push((0,s.Tj)(i,(function(r){return function(e,t,r){var n,s=[];t.name.match(At)||(n=r.buildInvalidNestedRuleNameError(e,t),s.push({message:n,type:xr.INVALID_NESTED_RULE_NAME,ruleName:e.name}));return s}(e,r,t)})))})),(0,s.Bq)(r)}(e,i),f=function(e,t){var r=[];return(0,s.jJ)(e,(function(e){var n=new et("");e.accept(n);var i=(0,s.$z)(n.result,(function(e){return e.name})),o=(0,s.Up)(i,(function(e){return e.length>1}));(0,s.jJ)((0,s.zu)(o),(function(n){var i=(0,s.Tj)(n,(function(e){return e.orgProd})),o=t.buildDuplicateNestedRuleNameError(e,i);r.push({message:o,type:xr.DUPLICATE_NESTED_NAME,ruleName:e.name})}))})),r}(e,i),m=(0,s.Tj)(e,(function(e){return function(e,t){var r=new xt;e.accept(r);var n=r.alternations,i=s.TS(n,(function(r,n){return n.definition.length>255&&r.push({message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:xr.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}),r}),[]);return i}(e,i)})),y=(0,s.Tj)(e,(function(e){return function(e,t){var r=[],n=e.name;n.match(bt)||r.push({message:t.buildInvalidRuleNameError({topLevelRule:e,expectedPattern:bt}),type:xr.INVALID_RULE_NAME,ruleName:n});return r}(e,i)})),E=(0,s.Tj)(e,(function(t){return function(e,t,r,n){var i=[],o=(0,s.TS)(t,(function(t,r){return r.name===e.name?t+1:t}),0);if(o>1){var a=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});i.push({message:a,type:xr.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}(t,e,o,i)}));return s.Bq(a.concat(p,g,f,c,l,h,u,d,m,y,E))}function Nt(e){return De(e)+"_#_"+e.idx+"_#_"+Mt(e)}function Mt(e){return e instanceof _e?e.terminalType.name:e instanceof Ee?e.nonTerminalName:""}var _t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return St(t,e),t.prototype.visitNonTerminal=function(e){this.allProductions.push(e)},t.prototype.visitOption=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetition=function(e){this.allProductions.push(e)},t.prototype.visitAlternation=function(e){this.allProductions.push(e)},t.prototype.visitTerminal=function(e){this.allProductions.push(e)},t}(xe),bt=/^[a-zA-Z_]\w*$/,At=new RegExp(bt.source.replace("^","^\\$"));function Ot(e,t,r,n){void 0===n&&(n=[]);var i=[],o=It(t.definition);if(s.Im(o))return[];var a=e.name;s.gR(o,e)&&i.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:xr.LEFT_RECURSION,ruleName:a});var l=s.iv(o,n.concat([e])),h=s.Tj(l,(function(t){var i=s.T9(n);return i.push(t),Ot(e,t,r,i)}));return i.concat(s.Bq(h))}function It(e){var t=[];if(s.Im(e))return t;var r=s.$1(e);if(r instanceof Ee)t.push(r.referencedRule);else if(r instanceof Ce||r instanceof ve||r instanceof Re||r instanceof Se||r instanceof Ne||r instanceof Te)t=t.concat(It(r.definition));else if(r instanceof Me)t=s.Bq(s.Tj(r.definition,(function(e){return It(e.definition)})));else if(!(r instanceof _e))throw Error("non exhaustive match");var n=Le(r),i=e.length>1;if(n&&i){var o=s.gv(e);return t.concat(It(o))}return t}var xt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.alternations=[],t}return St(t,e),t.prototype.visitAlternation=function(e){this.alternations.push(e)},t}(xe);var Pt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return St(t,e),t.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetition=function(e){this.allProductions.push(e)},t}(xe);var Lt={buildMismatchTokenMessage:function(e){var t=e.expected,r=e.actual;e.previous,e.ruleName;return"Expecting "+(re(t)?"--\x3e "+ee(t)+" <--":"token of type --\x3e "+t.name+" <--")+" but found --\x3e '"+r.image+"' <--"},buildNotAllInputParsedMessage:function(e){var t=e.firstRedundant;e.ruleName;return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage:function(e){var t=e.expectedPathsPerAlt,r=e.actual,n=(e.previous,e.customUserDescription),i=(e.ruleName,"Expecting: "),o="\nbut found: '"+(0,s.$1)(r).image+"'";if(n)return i+n+o;var a=(0,s.TS)(t,(function(e,t){return e.concat(t)}),[]),l=(0,s.Tj)(a,(function(e){return"["+(0,s.Tj)(e,(function(e){return ee(e)})).join(", ")+"]"}));return i+("one of these possible Token sequences:\n"+(0,s.Tj)(l,(function(e,t){return" "+(t+1)+". "+e})).join("\n"))+o},buildEarlyExitMessage:function(e){var t=e.expectedIterationPaths,r=e.actual,n=e.customUserDescription,i=(e.ruleName,"Expecting: "),o="\nbut found: '"+(0,s.$1)(r).image+"'";return n?i+n+o:i+("expecting at least one iteration which starts with one of these possible Token sequences::\n <"+(0,s.Tj)(t,(function(e){return"["+(0,s.Tj)(e,(function(e){return ee(e)})).join(",")+"]"})).join(" ,")+">")+o}};Object.freeze(Lt);var Dt={buildRuleNotFoundError:function(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"}},kt={buildDuplicateFoundError:function(e,t){var r,n=e.name,i=(0,s.$1)(t),o=i.idx,a=De(i),l=(r=i)instanceof _e?r.terminalType.name:r instanceof Ee?r.nonTerminalName:"",h="->"+a+(o>0?o:"")+"<- "+(l?"with argument: ->"+l+"<-":"")+"\n appears more than once ("+t.length+" times) in the top level rule: ->"+n+"<-. \n For further details see: https://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES \n ";return h=(h=h.replace(/[ \t]+/g," ")).replace(/\s\s+/g,"\n")},buildInvalidNestedRuleNameError:function(e,t){return"Invalid nested rule name: ->"+t.name+"<- inside rule: ->"+e.name+"<-\nit must match the pattern: ->"+At.toString()+"<-.\nNote that this means a nested rule name must start with the '$'(dollar) sign."},buildDuplicateNestedRuleNameError:function(e,t){return"Duplicate nested rule name: ->"+(0,s.$1)(t).name+"<- inside rule: ->"+e.name+"<-\nA nested name must be unique in the scope of a top level grammar rule."},buildNamespaceConflictError:function(e){return"Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+e.name+">.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter."},buildAlternationPrefixAmbiguityError:function(e){var t=(0,s.Tj)(e.prefixPath,(function(e){return ee(e)})).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;return"Ambiguous alternatives: <"+e.ambiguityIndices.join(" ,")+"> due to common lookahead prefix\nin <OR"+r+"> inside <"+e.topLevelRule.name+"> Rule,\n<"+t+"> may appears as a prefix path in all these alternatives.\nSee: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details."},buildAlternationAmbiguityError:function(e){var t=(0,s.Tj)(e.prefixPath,(function(e){return ee(e)})).join(", "),r=0===e.alternation.idx?"":e.alternation.idx,n="Ambiguous Alternatives Detected: <"+e.ambiguityIndices.join(" ,")+"> in <OR"+r+"> inside <"+e.topLevelRule.name+"> Rule,\n<"+t+"> may appears as a prefix path in all these alternatives.\n";return n+="See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details."},buildEmptyRepetitionError:function(e){var t=De(e.repetition);return 0!==e.repetition.idx&&(t+=e.repetition.idx),"The repetition <"+t+"> within Rule <"+e.topLevelRule.name+"> can never consume any tokens.\nThis could lead to an infinite loop."},buildTokenNameError:function(e){return"Invalid Grammar Token name: ->"+e.tokenType.name+"<- it must match the pattern: ->"+e.expectedPattern.toString()+"<-"},buildEmptyAlternationError:function(e){return"Ambiguous empty alternative: <"+(e.emptyChoiceIdx+1)+"> in <OR"+e.alternation.idx+"> inside <"+e.topLevelRule.name+"> Rule.\nOnly the last alternative may be an empty alternative."},buildTooManyAlternativesError:function(e){return"An Alternation cannot have more than 256 alternatives:\n<OR"+e.alternation.idx+"> inside <"+e.topLevelRule.name+"> Rule.\n has "+(e.alternation.definition.length+1)+" alternatives."},buildLeftRecursionError:function(e){var t=e.topLevelRule.name;return"Left Recursion found in grammar.\nrule: <"+t+"> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n "+(t+" --\x3e "+s.Tj(e.leftRecursionPath,(function(e){return e.name})).concat([t]).join(" --\x3e "))+"\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring."},buildInvalidRuleNameError:function(e){return"Invalid grammar rule name: ->"+e.topLevelRule.name+"<- it must match the pattern: ->"+e.expectedPattern.toString()+"<-"},buildDuplicateRuleNameError:function(e){return"Duplicate definition, rule: ->"+(e.topLevelRule instanceof we?e.topLevelRule.name:e.topLevelRule)+"<- is already defined in the grammar: ->"+e.grammarName+"<-"}},Ht=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();var Ft=function(e){function t(t,r){var n=e.call(this)||this;return n.nameToTopRule=t,n.errMsgProvider=r,n.errors=[],n}return Ht(t,e),t.prototype.resolveRefs=function(){var e=this;(0,s.jJ)((0,s.zu)(this.nameToTopRule),(function(t){e.currTopLevel=t,t.accept(e)}))},t.prototype.visitNonTerminal=function(e){var t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{var r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:xr.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}},t}(xe);function Ut(e){e=(0,s.NT)(e,{errMsgProvider:Dt});var t,r,n,i={};return(0,s.jJ)(e.rules,(function(e){i[e.name]=e})),t=i,r=e.errMsgProvider,(n=new Ft(t,r)).resolveRefs(),n.errors}function Vt(e){return Tt((e=(0,s.NT)(e,{errMsgProvider:kt,ignoredIssues:{}})).rules,e.maxLookahead,e.tokenTypes,e.ignoredIssues,e.errMsgProvider,e.grammarName)}function Bt(e){(0,s.jJ)(e.rules,(function(e){var t=new ke;e.accept(t),(0,s.jJ)(t.dslMethods,(function(e){(0,s.jJ)(e,(function(e,t){e.idx=t+1}))}))}))}var Wt="MismatchedTokenException",Yt="NoViableAltException",Gt="EarlyExitException",jt="NotAllInputParsedException",zt=[Wt,Yt,Gt,jt];function $t(e){return(0,s.gR)(zt,e.name)}function Kt(e,t,r){this.name=Wt,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}function Xt(e,t,r){this.name=Yt,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}function qt(e,t){this.name=jt,this.message=e,this.token=t,this.resyncedTokens=[]}function Qt(e,t,r){this.name=Gt,this.message=e,this.token=t,this.previousToken=r,this.resyncedTokens=[]}Object.freeze(zt),Kt.prototype=Error.prototype,Xt.prototype=Error.prototype,qt.prototype=Error.prototype,Qt.prototype=Error.prototype;var Zt={},Jt="InRuleRecoveryException";function er(e){this.name=Jt,this.message=e}er.prototype=Error.prototype;var tr=function(){function e(){}return e.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,s.zy)(e,"recoveryEnabled")?e.recoveryEnabled:Pr.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=rr)},e.prototype.getTokenToInsert=function(e){var t=ge(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t},e.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},e.prototype.tryInRepetitionRecovery=function(e,t,r,n){for(var i=this,o=this.findReSyncTokenType(),a=this.exportLexerState(),l=[],h=!1,u=this.LA(1),c=this.LA(1),d=function(){var e=i.LA(0),t=new Kt(i.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:u,previous:e,ruleName:i.getCurrRuleFullName()}),u,i.LA(0));t.resyncedTokens=(0,s.gc)(l),i.SAVE_ERROR(t)};!h;){if(this.tokenMatcher(c,n))return void d();if(r.call(this))return d(),void e.apply(this,t);this.tokenMatcher(c,o)?h=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,l))}this.importLexerState(a)},e.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,r){return!1!==r&&(void 0!==e&&void 0!==t&&(!this.tokenMatcher(this.LA(1),e)&&(!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))))},e.prototype.getFollowsForInRuleRecovery=function(e,t){var r=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(r)},e.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){var r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new er("sad sad panda")},e.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},e.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var r=this;if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if((0,s.Im)(t))return!1;var n=this.LA(1);return void 0!==(0,s.I6)(t,(function(e){return r.tokenMatcher(n,e)}))},e.prototype.canRecoverWithSingleTokenDeletion=function(e){return this.tokenMatcher(this.LA(2),e)},e.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return(0,s.gR)(r,e)},e.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),r=2;;){var n=t.tokenType;if((0,s.gR)(e,n))return n;t=this.LA(r),r++}},e.prototype.getCurrFollowKey=function(){if(1===this.RULE_STACK.length)return Zt;var e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)}},e.prototype.buildFullFollowKeyStack=function(){var e=this,t=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return(0,s.Im)(this.LAST_EXPLICIT_RULE_STACK)||(t=(0,s.Tj)(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.RULE_STACK[t]})),r=(0,s.Tj)(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.RULE_OCCURRENCE_STACK[t]}))),(0,s.Tj)(t,(function(n,s){return 0===s?Zt:{ruleName:e.shortRuleNameToFullName(n),idxInCallingRule:r[s],inRule:e.shortRuleNameToFullName(t[s-1])}}))},e.prototype.flattenFollowSet=function(){var e=this,t=(0,s.Tj)(this.buildFullFollowKeyStack(),(function(t){return e.getFollowSetFromFollowKey(t)}));return(0,s.Bq)(t)},e.prototype.getFollowSetFromFollowKey=function(e){if(e===Zt)return[pe];var t=e.ruleName+e.idxInCallingRule+Ue+e.inRule;return this.resyncFollows[t]},e.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,pe)||t.push(e),t},e.prototype.reSyncTo=function(e){for(var t=[],r=this.LA(1);!1===this.tokenMatcher(r,e);)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return(0,s.gc)(t)},e.prototype.attemptInRepetitionRecovery=function(e,t,r,n,s,i,o){},e.prototype.getCurrentGrammarPath=function(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:(0,s.T9)(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}},e.prototype.getHumanReadableRuleStack=function(){var e=this;return(0,s.Im)(this.LAST_EXPLICIT_RULE_STACK)?(0,s.Tj)(this.RULE_STACK,(function(t){return e.shortRuleNameToFullName(t)})):(0,s.Tj)(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.shortRuleNameToFullName(e.RULE_STACK[t])}))},e}();function rr(e,t,r,n,s,i,o){var a=this.getKeyForAutomaticLookahead(n,s),l=this.firstAfterRepMap[a];if(void 0===l){var h=this.getCurrRuleFullName();l=new i(this.getGAstProductions()[h],s).startWalking(),this.firstAfterRepMap[a]=l}var u=l.token,c=l.occurrence,d=l.isEndOfRule;1===this.RULE_STACK.length&&d&&void 0===u&&(u=pe,c=1),this.shouldInRepetitionRecoveryBeTried(u,c,o)&&this.tryInRepetitionRecovery(e,t,r,u)}var nr=function(){function e(){}return e.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=(0,s.zy)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Pr.dynamicTokensEnabled,this.maxLookahead=(0,s.zy)(e,"maxLookahead")?e.maxLookahead:Pr.maxLookahead,this.lookAheadFuncsCache=(0,s.rF)()?new Map:[],(0,s.rF)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},e.prototype.preComputeLookaheadFunctions=function(e){var t=this;(0,s.jJ)(e,(function(e){t.TRACE_INIT(e.name+" Rule Lookahead",(function(){var r=function(e){He.reset(),e.accept(He);var t=He.dslMethods;return He.reset(),t}(e),n=r.alternation,i=r.repetition,o=r.option,a=r.repetitionMandatory,l=r.repetitionMandatoryWithSeparator,h=r.repetitionWithSeparator;(0,s.jJ)(n,(function(r){var n=0===r.idx?"":r.idx;t.TRACE_INIT(""+De(r)+n,(function(){var n,s,i,o,a,l,h,u=(n=r.idx,s=e,i=r.maxLookahead||t.maxLookahead,o=r.hasPredicates,a=t.dynamicTokensEnabled,l=t.lookAheadBuilderForAlternatives,h=wt(n,s,i),l(h,o,Rt(h)?W:B,a)),c=Ke(t.fullRuleNameToShort[e.name],We,r.idx);t.setLaFuncCache(c,u)}))})),(0,s.jJ)(i,(function(r){t.computeLookaheadFunc(e,r.idx,Ge,ct.REPETITION,r.maxLookahead,De(r))})),(0,s.jJ)(o,(function(r){t.computeLookaheadFunc(e,r.idx,Ye,ct.OPTION,r.maxLookahead,De(r))})),(0,s.jJ)(a,(function(r){t.computeLookaheadFunc(e,r.idx,je,ct.REPETITION_MANDATORY,r.maxLookahead,De(r))})),(0,s.jJ)(l,(function(r){t.computeLookaheadFunc(e,r.idx,$e,ct.REPETITION_MANDATORY_WITH_SEPARATOR,r.maxLookahead,De(r))})),(0,s.jJ)(h,(function(r){t.computeLookaheadFunc(e,r.idx,ze,ct.REPETITION_WITH_SEPARATOR,r.maxLookahead,De(r))}))}))}))},e.prototype.computeLookaheadFunc=function(e,t,r,n,s,i){var o=this;this.TRACE_INIT(""+i+(0===t?"":t),(function(){var i=function(e,t,r,n,s,i){var o=Ct(e,t,s,r),a=Rt(o)?W:B;return i(o[0],a,n)}(t,e,s||o.maxLookahead,o.dynamicTokensEnabled,n,o.lookAheadBuilderForOptional),a=Ke(o.fullRuleNameToShort[e.name],r,t);o.setLaFuncCache(a,i)}))},e.prototype.lookAheadBuilderForOptional=function(e,t,r){return function(e,t,r){var n=(0,s.Si)(e,(function(e){return 1===e.length})),i=e.length;if(n&&!r){var o=(0,s.Bq)(e);if(1===o.length&&(0,s.Im)(o[0].categoryMatches)){var a=o[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===a}}var l=(0,s.TS)(o,(function(e,t,r){return e[t.tokenTypeIdx]=!0,(0,s.jJ)(t.categoryMatches,(function(t){e[t]=!0})),e}),[]);return function(){var e=this.LA(1);return!0===l[e.tokenTypeIdx]}}return function(){e:for(var r=0;r<i;r++){for(var n=e[r],s=n.length,o=0;o<s;o++){var a=this.LA(o+1);if(!1===t(a,n[o]))continue e}return!0}return!1}}(e,t,r)},e.prototype.lookAheadBuilderForAlternatives=function(e,t,r,n){return function(e,t,r,n){var i=e.length,o=(0,s.Si)(e,(function(e){return(0,s.Si)(e,(function(e){return 1===e.length}))}));if(t)return function(t){for(var n=(0,s.Tj)(t,(function(e){return e.GATE})),o=0;o<i;o++){var a=e[o],l=a.length,h=n[o];if(void 0===h||!1!==h.call(this))e:for(var u=0;u<l;u++){for(var c=a[u],d=c.length,p=0;p<d;p++){var g=this.LA(p+1);if(!1===r(g,c[p]))continue e}return o}}};if(o&&!n){var a=(0,s.Tj)(e,(function(e){return(0,s.Bq)(e)})),l=(0,s.TS)(a,(function(e,t,r){return(0,s.jJ)(t,(function(t){(0,s.zy)(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),(0,s.jJ)(t.categoryMatches,(function(t){(0,s.zy)(e,t)||(e[t]=r)}))})),e}),[]);return function(){var e=this.LA(1);return l[e.tokenTypeIdx]}}return function(){for(var t=0;t<i;t++){var n=e[t],s=n.length;e:for(var o=0;o<s;o++){for(var a=n[o],l=a.length,h=0;h<l;h++){var u=this.LA(h+1);if(!1===r(u,a[h]))continue e}return t}}}}(e,t,r,n)},e.prototype.getKeyForAutomaticLookahead=function(e,t){return Ke(this.getLastExplicitRuleShortName(),e,t)},e.prototype.getLaFuncFromCache=function(e){},e.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},e.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},e.prototype.setLaFuncCache=function(e,t){},e.prototype.setLaFuncCacheUsingMap=function(e,t){this.lookAheadFuncsCache.set(e,t)},e.prototype.setLaFuncUsingObj=function(e,t){this.lookAheadFuncsCache[e]=t},e}();var sr,ir=/^\s*function\s*(\S*)\s*\(/,or="name";function ar(e){var t=e.name;return t||e.toString().match(ir)[1]}function lr(e,t){var r=Object.getOwnPropertyDescriptor(e,or);return!(!(0,s.b0)(r)&&!r.configurable)&&(Object.defineProperty(e,or,{enumerable:!1,configurable:!0,writable:!1,value:t}),!0)}function hr(e,t){for(var r=(0,s.HP)(e),n=r.length,i=0;i<n;i++)for(var o=e[r[i]],a=o.length,l=0;l<a;l++){var h=o[l];void 0===h.tokenTypeIdx&&(void 0!==h.fullName?this[h.fullName](h.children,t):this[h.name](h.children,t))}}function ur(e,t){var r=function(){};lr(r,e+"BaseSemantics");var n={visit:function(e,t){if((0,s.cy)(e)&&(e=e[0]),!(0,s.b0)(e))return void 0!==e.fullName?this[e.fullName](e.children,t):this[e.name](e.children,t)},validateVisitor:function(){var e=function(e,t){var r=function(e,t){var r=(0,s.Tj)(t,(function(t){if(!(0,s.Tn)(e[t]))return{msg:"Missing visitor method: <"+t+"> on "+ar(e.constructor)+" CST Visitor.",type:sr.MISSING_METHOD,methodName:t}}));return(0,s.oE)(r)}(e,t),n=function(e,t){var r=[];for(var n in e)bt.test(n)&&(0,s.Tn)(e[n])&&!(0,s.gR)(cr,n)&&!(0,s.gR)(t,n)&&r.push({msg:"Redundant visitor method: <"+n+"> on "+ar(e.constructor)+" CST Visitor\nThere is no Grammar Rule corresponding to this method's name.\nFor utility methods on visitor classes use methods names that do not match /"+bt.source+"/.",type:sr.REDUNDANT_METHOD,methodName:n});return r}(e,t);return r.concat(n)}(this,t);if(!(0,s.Im)(e)){var r=(0,s.Tj)(e,(function(e){return e.msg}));throw Error("Errors Detected in CST Visitor <"+ar(this.constructor)+">:\n\t"+r.join("\n\n").replace(/\n/g,"\n\t"))}}};return(r.prototype=n).constructor=r,r._RULE_NAMES=t,r}!function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"}(sr||(sr={}));var cr=["constructor","visit","validateVisitor"];var dr=function(){function e(){}return e.prototype.initTreeBuilder=function(e){if(this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.outputCst=(0,s.zy)(e,"outputCst")?e.outputCst:Pr.outputCst,this.nodeLocationTracking=(0,s.zy)(e,"nodeLocationTracking")?e.nodeLocationTracking:Pr.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ze,this.setNodeLocationFromNode=Ze,this.cstPostRule=s.tE,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=s.tE,this.setNodeLocationFromNode=s.tE,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Qe,this.setNodeLocationFromNode=Qe,this.cstPostRule=s.tE,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=s.tE,this.setNodeLocationFromNode=s.tE,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error('Invalid <nodeLocationTracking> config option: "'+e.nodeLocationTracking+'"');this.setNodeLocationFromToken=s.tE,this.setNodeLocationFromNode=s.tE,this.cstPostRule=s.tE,this.setInitialNodeLocation=s.tE}else this.cstInvocationStateUpdate=s.tE,this.cstFinallyStateUpdate=s.tE,this.cstPostTerminal=s.tE,this.cstPostNonTerminal=s.tE,this.cstPostRule=s.tE,this.getLastExplicitRuleShortName=this.getLastExplicitRuleShortNameNoCst,this.getPreviousExplicitRuleShortName=this.getPreviousExplicitRuleShortNameNoCst,this.getLastExplicitRuleOccurrenceIndex=this.getLastExplicitRuleOccurrenceIndexNoCst,this.manyInternal=this.manyInternalNoCst,this.orInternal=this.orInternalNoCst,this.optionInternal=this.optionInternalNoCst,this.atLeastOneInternal=this.atLeastOneInternalNoCst,this.manySepFirstInternal=this.manySepFirstInternalNoCst,this.atLeastOneSepFirstInternal=this.atLeastOneSepFirstInternalNoCst},e.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(e){e.location={startOffset:NaN,endOffset:NaN}},e.prototype.setInitialNodeLocationOnlyOffsetRegular=function(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},e.prototype.setInitialNodeLocationFullRecovery=function(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},e.prototype.setInitialNodeLocationFullRegular=function(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},e.prototype.cstNestedInvocationStateUpdate=function(e,t){var r={name:e,fullName:this.shortRuleNameToFull[this.getLastExplicitRuleShortName()]+e,children:{}};this.setInitialNodeLocation(r),this.CST_STACK.push(r)},e.prototype.cstInvocationStateUpdate=function(e,t){this.LAST_EXPLICIT_RULE_STACK.push(this.RULE_STACK.length-1);var r={name:e,children:{}};this.setInitialNodeLocation(r),this.CST_STACK.push(r)},e.prototype.cstFinallyStateUpdate=function(){this.LAST_EXPLICIT_RULE_STACK.pop(),this.CST_STACK.pop()},e.prototype.cstNestedFinallyStateUpdate=function(){var e=this.CST_STACK.pop();this.cstPostRule(e)},e.prototype.cstPostRuleFull=function(e){var t=this.LA(0),r=e.location;r.startOffset<=t.startOffset==!0?(r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)},e.prototype.cstPostRuleOnlyOffset=function(e){var t=this.LA(0),r=e.location;r.startOffset<=t.startOffset==!0?r.endOffset=t.endOffset:r.startOffset=NaN},e.prototype.cstPostTerminal=function(e,t){var r,n,s,i=this.CST_STACK[this.CST_STACK.length-1];n=t,s=e,void 0===(r=i).children[s]?r.children[s]=[n]:r.children[s].push(n),this.setNodeLocationFromToken(i.location,t)},e.prototype.cstPostNonTerminal=function(e,t){if(!0!==this.isBackTracking()){var r=this.CST_STACK[this.CST_STACK.length-1];Je(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}},e.prototype.getBaseCstVisitorConstructor=function(){if((0,s.b0)(this.baseCstVisitorConstructor)){var e=ur(this.className,this.allRuleNames);return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},e.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if((0,s.b0)(this.baseCstVisitorWithDefaultsConstructor)){var e=function(e,t,r){var n=function(){};lr(n,e+"BaseSemanticsWithDefaults");var i=Object.create(r.prototype);return(0,s.jJ)(t,(function(e){i[e]=hr})),(n.prototype=i).constructor=n,n}(this.className,this.allRuleNames,this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor},e.prototype.nestedRuleBeforeClause=function(e,t){var r;return void 0!==e.NAME?(r=e.NAME,this.nestedRuleInvocationStateUpdate(r,t),r):void 0},e.prototype.nestedAltBeforeClause=function(e,t,r,n){var s,i=Xe(this.getLastExplicitRuleShortName(),r,t,n);return void 0!==e.NAME?(s=e.NAME,this.nestedRuleInvocationStateUpdate(s,i),{shortName:i,nestedName:s}):void 0},e.prototype.nestedRuleFinallyClause=function(e,t){var r=this.CST_STACK,n=r[r.length-1];this.nestedRuleFinallyStateUpdate();var s=r[r.length-1];Je(s,t,n),this.setNodeLocationFromNode(s.location,n.location)},e.prototype.getLastExplicitRuleShortName=function(){var e=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-1];return this.RULE_STACK[e]},e.prototype.getLastExplicitRuleShortNameNoCst=function(){var e=this.RULE_STACK;return e[e.length-1]},e.prototype.getPreviousExplicitRuleShortName=function(){var e=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-2];return this.RULE_STACK[e]},e.prototype.getPreviousExplicitRuleShortNameNoCst=function(){var e=this.RULE_STACK;return e[e.length-2]},e.prototype.getLastExplicitRuleOccurrenceIndex=function(){var e=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-1];return this.RULE_OCCURRENCE_STACK[e]},e.prototype.getLastExplicitRuleOccurrenceIndexNoCst=function(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]},e.prototype.nestedRuleInvocationStateUpdate=function(e,t){this.RULE_OCCURRENCE_STACK.push(1),this.RULE_STACK.push(t),this.cstNestedInvocationStateUpdate(e,t)},e.prototype.nestedRuleFinallyStateUpdate=function(){this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstNestedFinallyStateUpdate()},e}(),pr=function(){function e(){}return e.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(e.prototype,"input",{get:function(){return this.tokVector},set:function(e){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length},enumerable:!0,configurable:!0}),e.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Ir},e.prototype.LA=function(e){var t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Ir:this.tokVector[t]},e.prototype.consumeToken=function(){this.currIdx++},e.prototype.exportLexerState=function(){return this.currIdx},e.prototype.importLexerState=function(e){this.currIdx=e},e.prototype.resetLexerState=function(){this.currIdx=-1},e.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},e.prototype.getLexerPosition=function(){return this.exportLexerState()},e}(),gr=function(){function e(){}return e.prototype.ACTION=function(e){return e.call(this)},e.prototype.consume=function(e,t,r){return this.consumeInternal(t,e,r)},e.prototype.subrule=function(e,t,r){return this.subruleInternal(t,e,r)},e.prototype.option=function(e,t){return this.optionInternal(t,e)},e.prototype.or=function(e,t){return this.orInternal(t,e)},e.prototype.many=function(e,t){return this.manyInternal(e,t)},e.prototype.atLeastOne=function(e,t){return this.atLeastOneInternal(e,t)},e.prototype.CONSUME=function(e,t){return this.consumeInternal(e,0,t)},e.prototype.CONSUME1=function(e,t){return this.consumeInternal(e,1,t)},e.prototype.CONSUME2=function(e,t){return this.consumeInternal(e,2,t)},e.prototype.CONSUME3=function(e,t){return this.consumeInternal(e,3,t)},e.prototype.CONSUME4=function(e,t){return this.consumeInternal(e,4,t)},e.prototype.CONSUME5=function(e,t){return this.consumeInternal(e,5,t)},e.prototype.CONSUME6=function(e,t){return this.consumeInternal(e,6,t)},e.prototype.CONSUME7=function(e,t){return this.consumeInternal(e,7,t)},e.prototype.CONSUME8=function(e,t){return this.consumeInternal(e,8,t)},e.prototype.CONSUME9=function(e,t){return this.consumeInternal(e,9,t)},e.prototype.SUBRULE=function(e,t){return this.subruleInternal(e,0,t)},e.prototype.SUBRULE1=function(e,t){return this.subruleInternal(e,1,t)},e.prototype.SUBRULE2=function(e,t){return this.subruleInternal(e,2,t)},e.prototype.SUBRULE3=function(e,t){return this.subruleInternal(e,3,t)},e.prototype.SUBRULE4=function(e,t){return this.subruleInternal(e,4,t)},e.prototype.SUBRULE5=function(e,t){return this.subruleInternal(e,5,t)},e.prototype.SUBRULE6=function(e,t){return this.subruleInternal(e,6,t)},e.prototype.SUBRULE7=function(e,t){return this.subruleInternal(e,7,t)},e.prototype.SUBRULE8=function(e,t){return this.subruleInternal(e,8,t)},e.prototype.SUBRULE9=function(e,t){return this.subruleInternal(e,9,t)},e.prototype.OPTION=function(e){return this.optionInternal(e,0)},e.prototype.OPTION1=function(e){return this.optionInternal(e,1)},e.prototype.OPTION2=function(e){return this.optionInternal(e,2)},e.prototype.OPTION3=function(e){return this.optionInternal(e,3)},e.prototype.OPTION4=function(e){return this.optionInternal(e,4)},e.prototype.OPTION5=function(e){return this.optionInternal(e,5)},e.prototype.OPTION6=function(e){return this.optionInternal(e,6)},e.prototype.OPTION7=function(e){return this.optionInternal(e,7)},e.prototype.OPTION8=function(e){return this.optionInternal(e,8)},e.prototype.OPTION9=function(e){return this.optionInternal(e,9)},e.prototype.OR=function(e){return this.orInternal(e,0)},e.prototype.OR1=function(e){return this.orInternal(e,1)},e.prototype.OR2=function(e){return this.orInternal(e,2)},e.prototype.OR3=function(e){return this.orInternal(e,3)},e.prototype.OR4=function(e){return this.orInternal(e,4)},e.prototype.OR5=function(e){return this.orInternal(e,5)},e.prototype.OR6=function(e){return this.orInternal(e,6)},e.prototype.OR7=function(e){return this.orInternal(e,7)},e.prototype.OR8=function(e){return this.orInternal(e,8)},e.prototype.OR9=function(e){return this.orInternal(e,9)},e.prototype.MANY=function(e){this.manyInternal(0,e)},e.prototype.MANY1=function(e){this.manyInternal(1,e)},e.prototype.MANY2=function(e){this.manyInternal(2,e)},e.prototype.MANY3=function(e){this.manyInternal(3,e)},e.prototype.MANY4=function(e){this.manyInternal(4,e)},e.prototype.MANY5=function(e){this.manyInternal(5,e)},e.prototype.MANY6=function(e){this.manyInternal(6,e)},e.prototype.MANY7=function(e){this.manyInternal(7,e)},e.prototype.MANY8=function(e){this.manyInternal(8,e)},e.prototype.MANY9=function(e){this.manyInternal(9,e)},e.prototype.MANY_SEP=function(e){this.manySepFirstInternal(0,e)},e.prototype.MANY_SEP1=function(e){this.manySepFirstInternal(1,e)},e.prototype.MANY_SEP2=function(e){this.manySepFirstInternal(2,e)},e.prototype.MANY_SEP3=function(e){this.manySepFirstInternal(3,e)},e.prototype.MANY_SEP4=function(e){this.manySepFirstInternal(4,e)},e.prototype.MANY_SEP5=function(e){this.manySepFirstInternal(5,e)},e.prototype.MANY_SEP6=function(e){this.manySepFirstInternal(6,e)},e.prototype.MANY_SEP7=function(e){this.manySepFirstInternal(7,e)},e.prototype.MANY_SEP8=function(e){this.manySepFirstInternal(8,e)},e.prototype.MANY_SEP9=function(e){this.manySepFirstInternal(9,e)},e.prototype.AT_LEAST_ONE=function(e){this.atLeastOneInternal(0,e)},e.prototype.AT_LEAST_ONE1=function(e){return this.atLeastOneInternal(1,e)},e.prototype.AT_LEAST_ONE2=function(e){this.atLeastOneInternal(2,e)},e.prototype.AT_LEAST_ONE3=function(e){this.atLeastOneInternal(3,e)},e.prototype.AT_LEAST_ONE4=function(e){this.atLeastOneInternal(4,e)},e.prototype.AT_LEAST_ONE5=function(e){this.atLeastOneInternal(5,e)},e.prototype.AT_LEAST_ONE6=function(e){this.atLeastOneInternal(6,e)},e.prototype.AT_LEAST_ONE7=function(e){this.atLeastOneInternal(7,e)},e.prototype.AT_LEAST_ONE8=function(e){this.atLeastOneInternal(8,e)},e.prototype.AT_LEAST_ONE9=function(e){this.atLeastOneInternal(9,e)},e.prototype.AT_LEAST_ONE_SEP=function(e){this.atLeastOneSepFirstInternal(0,e)},e.prototype.AT_LEAST_ONE_SEP1=function(e){this.atLeastOneSepFirstInternal(1,e)},e.prototype.AT_LEAST_ONE_SEP2=function(e){this.atLeastOneSepFirstInternal(2,e)},e.prototype.AT_LEAST_ONE_SEP3=function(e){this.atLeastOneSepFirstInternal(3,e)},e.prototype.AT_LEAST_ONE_SEP4=function(e){this.atLeastOneSepFirstInternal(4,e)},e.prototype.AT_LEAST_ONE_SEP5=function(e){this.atLeastOneSepFirstInternal(5,e)},e.prototype.AT_LEAST_ONE_SEP6=function(e){this.atLeastOneSepFirstInternal(6,e)},e.prototype.AT_LEAST_ONE_SEP7=function(e){this.atLeastOneSepFirstInternal(7,e)},e.prototype.AT_LEAST_ONE_SEP8=function(e){this.atLeastOneSepFirstInternal(8,e)},e.prototype.AT_LEAST_ONE_SEP9=function(e){this.atLeastOneSepFirstInternal(9,e)},e.prototype.RULE=function(e,t,r){if(void 0===r&&(r=Lr),(0,s.gR)(this.definedRulesNames,e)){var n={message:kt.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:xr.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(n)}this.definedRulesNames.push(e);var i=this.defineRule(e,t,r);return this[e]=i,i},e.prototype.OVERRIDE_RULE=function(e,t,r){void 0===r&&(r=Lr);var n,i,o,a,l,h=[];h=h.concat((n=e,i=this.definedRulesNames,o=this.className,l=[],s.gR(i,n)||(a="Invalid rule override, rule: ->"+n+"<- cannot be overridden in the grammar: ->"+o+"<-as it is not defined in any of the super grammars ",l.push({message:a,type:xr.INVALID_RULE_OVERRIDE,ruleName:n})),l)),this.definitionErrors.push.apply(this.definitionErrors,h);var u=this.defineRule(e,t,r);return this[e]=u,u},e.prototype.BACKTRACK=function(e,t){return function(){this.isBackTrackingStack.push(1);var r=this.saveRecogState();try{return e.apply(this,t),!0}catch(e){if($t(e))return!1;throw e}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}},e.prototype.getGAstProductions=function(){return this.gastProductionsCache},e.prototype.getSerializedGastProductions=function(){return be((0,s.zu)(this.gastProductionsCache))},e}(),fr=function(){function e(){}return e.prototype.initRecognizerEngine=function(e,t){if(this.className=ar(this.constructor),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=W,this.definedRulesNames=[],this.tokensMap={},this.allRuleNames=[],this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,s.zy)(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if((0,s.cy)(e)){if((0,s.Im)(e))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof e[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if((0,s.cy)(e))this.tokensMap=(0,s.TS)(e,(function(e,t){return e[t.name]=t,e}),{});else if((0,s.zy)(e,"modes")&&(0,s.Si)((0,s.Bq)((0,s.zu)(e.modes)),X)){var r=(0,s.Bq)((0,s.zu)(e.modes)),n=(0,s.sb)(r);this.tokensMap=(0,s.TS)(n,(function(e,t){return e[t.name]=t,e}),{})}else{if(!(0,s.Gv)(e))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=(0,s.lR)(e)}this.tokensMap.EOF=pe;var i=(0,s.Si)((0,s.zu)(e),(function(e){return(0,s.Im)(e.categoryMatches)}));this.tokenMatcher=i?W:B,j((0,s.zu)(this.tokensMap))},e.prototype.defineRule=function(e,t,r){if(this.selfAnalysisDone)throw Error("Grammar rule <"+e+"> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.");var n,i=(0,s.zy)(r,"resyncEnabled")?r.resyncEnabled:Lr.resyncEnabled,o=(0,s.zy)(r,"recoveryValueFunc")?r.recoveryValueFunc:Lr.recoveryValueFunc,a=this.ruleShortNameIdx<<12;function l(e){try{if(!0===this.outputCst){t.apply(this,e);var r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}return t.apply(this,e)}catch(e){return this.invokeRuleCatch(e,i,o)}finally{this.ruleFinallyStateUpdate()}}this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=e,this.fullRuleNameToShort[e]=a;return(n=function(t,r){return void 0===t&&(t=0),this.ruleInvocationStateUpdate(a,e,t),l.call(this,r)}).ruleName=e,n.originalGrammarAction=t,n},e.prototype.invokeRuleCatch=function(e,t,r){var n=1===this.RULE_STACK.length,s=t&&!this.isBackTracking()&&this.recoveryEnabled;if($t(e)){var i=e;if(s){var o,a=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(a))return i.resyncedTokens=this.reSyncTo(a),this.outputCst?((o=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,o):r();throw this.outputCst&&((o=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,i.partialCstResult=o),i}if(n)return this.moveToTerminatedState(),r();throw i}throw e},e.prototype.optionInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(Ye,t),n=this.nestedRuleBeforeClause(e,r);try{return this.optionInternalLogic(e,t,r)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},e.prototype.optionInternalNoCst=function(e,t){var r=this.getKeyForAutomaticLookahead(Ye,t);return this.optionInternalLogic(e,t,r)},e.prototype.optionInternalLogic=function(e,t,r){var n,s,i=this,o=this.getLaFuncFromCache(r);if(void 0!==e.DEF){if(n=e.DEF,void 0!==(s=e.GATE)){var a=o;o=function(){return s.call(i)&&a.call(i)}}}else n=e;if(!0===o.call(this))return n.call(this)},e.prototype.atLeastOneInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(je,e),n=this.nestedRuleBeforeClause(t,r);try{return this.atLeastOneInternalLogic(e,t,r)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},e.prototype.atLeastOneInternalNoCst=function(e,t){var r=this.getKeyForAutomaticLookahead(je,e);this.atLeastOneInternalLogic(e,t,r)},e.prototype.atLeastOneInternalLogic=function(e,t,r){var n,s,i=this,o=this.getLaFuncFromCache(r);if(void 0!==t.DEF){if(n=t.DEF,void 0!==(s=t.GATE)){var a=o;o=function(){return s.call(i)&&a.call(i)}}}else n=t;if(!0!==o.call(this))throw this.raiseEarlyExitException(e,ct.REPETITION_MANDATORY,t.ERR_MSG);for(var l=this.doSingleRepetition(n);!0===o.call(this)&&!0===l;)l=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],o,je,e,ot)},e.prototype.atLeastOneSepFirstInternal=function(e,t){var r=this.getKeyForAutomaticLookahead($e,e),n=this.nestedRuleBeforeClause(t,r);try{this.atLeastOneSepFirstInternalLogic(e,t,r)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},e.prototype.atLeastOneSepFirstInternalNoCst=function(e,t){var r=this.getKeyForAutomaticLookahead($e,e);this.atLeastOneSepFirstInternalLogic(e,t,r)},e.prototype.atLeastOneSepFirstInternalLogic=function(e,t,r){var n=this,s=t.DEF,i=t.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(e,ct.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);s.call(this);for(var o=function(){return n.tokenMatcher(n.LA(1),i)};!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),s.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,o,s,at],o,$e,e,at)},e.prototype.manyInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(Ge,e),n=this.nestedRuleBeforeClause(t,r);try{return this.manyInternalLogic(e,t,r)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},e.prototype.manyInternalNoCst=function(e,t){var r=this.getKeyForAutomaticLookahead(Ge,e);return this.manyInternalLogic(e,t,r)},e.prototype.manyInternalLogic=function(e,t,r){var n,s,i=this,o=this.getLaFuncFromCache(r);if(void 0!==t.DEF){if(n=t.DEF,void 0!==(s=t.GATE)){var a=o;o=function(){return s.call(i)&&a.call(i)}}}else n=t;for(var l=!0;!0===o.call(this)&&!0===l;)l=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],o,Ge,e,st,l)},e.prototype.manySepFirstInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(ze,e),n=this.nestedRuleBeforeClause(t,r);try{this.manySepFirstInternalLogic(e,t,r)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},e.prototype.manySepFirstInternalNoCst=function(e,t){var r=this.getKeyForAutomaticLookahead(ze,e);this.manySepFirstInternalLogic(e,t,r)},e.prototype.manySepFirstInternalLogic=function(e,t,r){var n=this,s=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){s.call(this);for(var o=function(){return n.tokenMatcher(n.LA(1),i)};!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),s.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,o,s,it],o,ze,e,it)}},e.prototype.repetitionSepSecondInternal=function(e,t,r,n,s){for(;r();)this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,s],r,$e,e,s)},e.prototype.doSingleRepetition=function(e){var t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t},e.prototype.orInternalNoCst=function(e,t){var r=(0,s.cy)(e)?e:e.DEF,n=this.getKeyForAutomaticLookahead(We,t),i=this.getLaFuncFromCache(n).call(this,r);if(void 0!==i)return r[i].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)},e.prototype.orInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(We,t),n=this.nestedRuleBeforeClause(e,r);try{var i=(0,s.cy)(e)?e:e.DEF,o=this.getLaFuncFromCache(r).call(this,i);if(void 0!==o){var a=i[o],l=this.nestedAltBeforeClause(a,t,We,o);try{return a.ALT.call(this)}finally{void 0!==l&&this.nestedRuleFinallyClause(l.shortName,l.nestedName)}}this.raiseNoAltException(t,e.ERR_MSG)}finally{void 0!==n&&this.nestedRuleFinallyClause(r,n)}},e.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){var e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new qt(t,e))}},e.prototype.subruleInternal=function(e,t,r){var n;try{var s=void 0!==r?r.ARGS:void 0;return n=e.call(this,t,s),this.cstPostNonTerminal(n,void 0!==r&&void 0!==r.LABEL?r.LABEL:e.ruleName),n}catch(t){this.subruleInternalError(t,r,e.ruleName)}},e.prototype.subruleInternalError=function(e,t,r){throw $t(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:r),delete e.partialCstResult),e},e.prototype.consumeInternal=function(e,t,r){var n;try{var s=this.LA(1);!0===this.tokenMatcher(s,e)?(this.consumeToken(),n=s):this.consumeInternalError(e,s,r)}catch(r){n=this.consumeInternalRecovery(e,t,r)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:e.name,n),n},e.prototype.consumeInternalError=function(e,t,r){var n,s=this.LA(0);throw n=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Kt(n,t,s))},e.prototype.consumeInternalRecovery=function(e,t,r){if(!this.recoveryEnabled||"MismatchedTokenException"!==r.name||this.isBackTracking())throw r;var n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(e){throw e.name===Jt?r:e}},e.prototype.saveRecogState=function(){var e=this.errors,t=(0,s.T9)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK,LAST_EXPLICIT_RULE_STACK:this.LAST_EXPLICIT_RULE_STACK}},e.prototype.reloadRecogState=function(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK},e.prototype.ruleInvocationStateUpdate=function(e,t,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t,e)},e.prototype.isBackTracking=function(){return 0!==this.isBackTrackingStack.length},e.prototype.getCurrRuleFullName=function(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]},e.prototype.shortRuleNameToFullName=function(e){return this.shortRuleNameToFull[e]},e.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),pe)},e.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},e}(),mr=function(){function e(){}return e.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=(0,s.NT)(e.errorMessageProvider,Pr.errorMessageProvider)},e.prototype.SAVE_ERROR=function(e){if($t(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,s.T9)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(e.prototype,"errors",{get:function(){return(0,s.T9)(this._errors)},set:function(e){this._errors=e},enumerable:!0,configurable:!0}),e.prototype.raiseEarlyExitException=function(e,t,r){for(var n=this.getCurrRuleFullName(),s=Ct(e,this.getGAstProductions()[n],t,this.maxLookahead)[0],i=[],o=1;o<=this.maxLookahead;o++)i.push(this.LA(o));var a=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:s,actual:i,previous:this.LA(0),customUserDescription:r,ruleName:n});throw this.SAVE_ERROR(new Qt(a,this.LA(1),this.LA(0)))},e.prototype.raiseNoAltException=function(e,t){for(var r=this.getCurrRuleFullName(),n=wt(e,this.getGAstProductions()[r],this.maxLookahead),s=[],i=1;i<=this.maxLookahead;i++)s.push(this.LA(i));var o=this.LA(0),a=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:n,actual:s,previous:o,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Xt(a,this.LA(1),o))},e}(),yr=function(){function e(){}return e.prototype.initContentAssist=function(){},e.prototype.computeContentAssist=function(e,t){var r=this.gastProductionsCache[e];if((0,s.b0)(r))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return ht([r],t,this.tokenMatcher,this.maxLookahead)},e.prototype.getNextPossibleTokenTypes=function(e){var t=(0,s.$1)(e.ruleStack),r=this.getGAstProductions()[t];return new rt(r,e).startWalking()},e}(),Er={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Er);var wr=!0,Cr=Math.pow(2,8)-1,vr=de({name:"RECORDING_PHASE_TOKEN",pattern:J.NA});j([vr]);var Rr=ge(vr,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(Rr);var Sr={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",children:{}},Tr=function(){function e(){}return e.prototype.initGastRecorder=function(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1},e.prototype.enableRecording=function(){var e=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",(function(){for(var t=function(t){var r=t>0?t:"";e["CONSUME"+r]=function(e,r){return this.consumeInternalRecord(e,t,r)},e["SUBRULE"+r]=function(e,r){return this.subruleInternalRecord(e,t,r)},e["OPTION"+r]=function(e){return this.optionInternalRecord(e,t)},e["OR"+r]=function(e){return this.orInternalRecord(e,t)},e["MANY"+r]=function(e){this.manyInternalRecord(t,e)},e["MANY_SEP"+r]=function(e){this.manySepFirstInternalRecord(t,e)},e["AT_LEAST_ONE"+r]=function(e){this.atLeastOneInternalRecord(t,e)},e["AT_LEAST_ONE_SEP"+r]=function(e){this.atLeastOneSepFirstInternalRecord(t,e)}},r=0;r<10;r++)t(r);e.consume=function(e,t,r){return this.consumeInternalRecord(t,e,r)},e.subrule=function(e,t,r){return this.subruleInternalRecord(t,e,r)},e.option=function(e,t){return this.optionInternalRecord(t,e)},e.or=function(e,t){return this.orInternalRecord(t,e)},e.many=function(e,t){this.manyInternalRecord(e,t)},e.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},e.ACTION=e.ACTION_RECORD,e.BACKTRACK=e.BACKTRACK_RECORD,e.LA=e.LA_RECORD}))},e.prototype.disableRecording=function(){var e=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",(function(){for(var t=0;t<10;t++){var r=t>0?t:"";delete e["CONSUME"+r],delete e["SUBRULE"+r],delete e["OPTION"+r],delete e["OR"+r],delete e["MANY"+r],delete e["MANY_SEP"+r],delete e["AT_LEAST_ONE"+r],delete e["AT_LEAST_ONE_SEP"+r]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA}))},e.prototype.ACTION_RECORD=function(e){},e.prototype.BACKTRACK_RECORD=function(e,t){return function(){return!0}},e.prototype.LA_RECORD=function(e){return Ir},e.prototype.topLevelRuleRecord=function(e,t){try{var r=new we({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(e){if(!0!==e.KNOWN_RECORDER_ERROR)try{e.message=e.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording'}catch(t){throw e}throw e}},e.prototype.optionInternalRecord=function(e,t){return Nr.call(this,ve,e,t)},e.prototype.atLeastOneInternalRecord=function(e,t){Nr.call(this,Re,t,e)},e.prototype.atLeastOneSepFirstInternalRecord=function(e,t){Nr.call(this,Se,t,e,wr)},e.prototype.manyInternalRecord=function(e,t){Nr.call(this,Te,t,e)},e.prototype.manySepFirstInternalRecord=function(e,t){Nr.call(this,Ne,t,e,wr)},e.prototype.orInternalRecord=function(e,t){return Mr.call(this,e,t)},e.prototype.subruleInternalRecord=function(e,t,r){if(br(t),!e||!1===(0,s.zy)(e,"ruleName")){var n=new Error("<SUBRULE"+_r(t)+"> argument is invalid expecting a Parser method reference but got: <"+JSON.stringify(e)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw n.KNOWN_RECORDER_ERROR=!0,n}var i=(0,s.se)(this.recordingProdStack),o=e.ruleName,a=new Ee({idx:t,nonTerminalName:o,referencedRule:void 0});return i.definition.push(a),this.outputCst?Sr:Er},e.prototype.consumeInternalRecord=function(e,t,r){if(br(t),!$(e)){var n=new Error("<CONSUME"+_r(t)+"> argument is invalid expecting a TokenType reference but got: <"+JSON.stringify(e)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw n.KNOWN_RECORDER_ERROR=!0,n}var i=(0,s.se)(this.recordingProdStack),o=new _e({idx:t,terminalType:e});return i.definition.push(o),Rr},e}();function Nr(e,t,r,n){void 0===n&&(n=!1),br(r);var i=(0,s.se)(this.recordingProdStack),o=(0,s.Tn)(t)?t:t.DEF,a=new e({definition:[],idx:r});return(0,s.zy)(t,"NAME")&&(a.name=t.NAME),n&&(a.separator=t.SEP),(0,s.zy)(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(a),o.call(this),i.definition.push(a),this.recordingProdStack.pop(),Er}function Mr(e,t){var r=this;br(t);var n=(0,s.se)(this.recordingProdStack),i=!1===(0,s.cy)(e),o=!1===i?e:e.DEF,a=new Me({definition:[],idx:t,ignoreAmbiguities:i&&!0===e.IGNORE_AMBIGUITIES});(0,s.zy)(e,"NAME")&&(a.name=e.NAME),(0,s.zy)(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD);var l=(0,s.zN)(o,(function(e){return(0,s.Tn)(e.GATE)}));return a.hasPredicates=l,n.definition.push(a),(0,s.jJ)(o,(function(e){var t=new Ce({definition:[]});a.definition.push(t),(0,s.zy)(e,"NAME")&&(t.name=e.NAME),(0,s.zy)(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:(0,s.zy)(e,"GATE")&&(t.ignoreAmbiguities=!0),r.recordingProdStack.push(t),e.ALT.call(r),r.recordingProdStack.pop()})),Er}function _r(e){return 0===e?"":""+e}function br(e){if(e<0||e>Cr){var t=new Error("Invalid DSL Method idx value: <"+e+">\n\tIdx value must be a none negative value smaller than "+(Cr+1));throw t.KNOWN_RECORDER_ERROR=!0,t}}var Ar=function(){function e(){}return e.prototype.initPerformanceTracer=function(e){if((0,s.zy)(e,"traceInitPerf")){var t=e.traceInitPerf,r="number"==typeof t;this.traceInitMaxIdent=r?t:1/0,this.traceInitPerf=r?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Pr.traceInitPerf;this.traceInitIndent=-1},e.prototype.TRACE_INIT=function(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;var r=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+"--\x3e <"+e+">");var n=(0,s.O1)(t),i=n.time,o=n.value,a=i>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(r+"<-- <"+e+"> time: "+i+"ms"),this.traceInitIndent--,o}return t()},e}(),Or=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},e(t,r)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ir=ge(pe,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Ir);var xr,Pr=Object.freeze({recoveryEnabled:!1,maxLookahead:4,ignoredIssues:{},dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Lt,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Lr=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});function Dr(e){return void 0===e&&(e=void 0),function(){return e}}!function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.INVALID_NESTED_RULE_NAME=10]="INVALID_NESTED_RULE_NAME",e[e.DUPLICATE_NESTED_NAME=11]="DUPLICATE_NESTED_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=12]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=13]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=14]="TOO_MANY_ALTS"}(xr||(xr={}));var kr=function(){function e(e,t){void 0===t&&(t=Pr),this.ignoredIssues=Pr.ignoredIssues,this.definitionErrors=[],this.selfAnalysisDone=!1;var r=this;r.initErrorHandler(t),r.initLexerAdapter(),r.initLooksAhead(t),r.initRecognizerEngine(e,t),r.initRecoverable(t),r.initTreeBuilder(t),r.initContentAssist(),r.initGastRecorder(t),r.initPerformanceTracer(t),(0,s.zy)(t,"ignoredIssues")&&t.ignoredIssues!==Pr.ignoredIssues&&(0,s.x5)("The <ignoredIssues> IParserConfig property is soft-deprecated and will be removed in future versions.\n\tPlease use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead."),this.ignoredIssues=(0,s.zy)(t,"ignoredIssues")?t.ignoredIssues:Pr.ignoredIssues,this.skipValidations=(0,s.zy)(t,"skipValidations")?t.skipValidations:Pr.skipValidations}return e.performSelfAnalysis=function(e){e.performSelfAnalysis()},e.prototype.performSelfAnalysis=function(){var t=this;this.TRACE_INIT("performSelfAnalysis",(function(){var r;t.selfAnalysisDone=!0;var n=t.className;t.TRACE_INIT("toFastProps",(function(){(0,s.Bl)(t)})),t.TRACE_INIT("Grammar Recording",(function(){try{t.enableRecording(),(0,s.jJ)(t.definedRulesNames,(function(e){var r=t[e].originalGrammarAction,n=void 0;t.TRACE_INIT(e+" Rule",(function(){n=t.topLevelRuleRecord(e,r)})),t.gastProductionsCache[e]=n}))}finally{t.disableRecording()}}));var i=[];if(t.TRACE_INIT("Grammar Resolving",(function(){i=Ut({rules:(0,s.zu)(t.gastProductionsCache)}),t.definitionErrors.push.apply(t.definitionErrors,i)})),t.TRACE_INIT("Grammar Validations",(function(){if((0,s.Im)(i)&&!1===t.skipValidations){var e=Vt({rules:(0,s.zu)(t.gastProductionsCache),maxLookahead:t.maxLookahead,tokenTypes:(0,s.zu)(t.tokensMap),ignoredIssues:t.ignoredIssues,errMsgProvider:kt,grammarName:n});t.definitionErrors.push.apply(t.definitionErrors,e)}})),(0,s.Im)(t.definitionErrors)&&(t.recoveryEnabled&&t.TRACE_INIT("computeAllProdsFollows",(function(){var e,r,n=(e=(0,s.zu)(t.gastProductionsCache),r={},(0,s.jJ)(e,(function(e){var t=new Be(e).startWalking();(0,s.kp)(r,t)})),r);t.resyncFollows=n})),t.TRACE_INIT("ComputeLookaheadFunctions",(function(){t.preComputeLookaheadFunctions((0,s.zu)(t.gastProductionsCache))}))),t.TRACE_INIT("expandAllNestedRuleNames",(function(){var e,r,n,i=(e=(0,s.zu)(t.gastProductionsCache),r=t.fullRuleNameToShort,n={allRuleNames:[]},(0,s.jJ)(e,(function(e){var t=r[e.name];n.allRuleNames.push(e.name);var i=new et(t);e.accept(i),(0,s.jJ)(i.result,(function(t){t.def,t.key;var r=t.name;n.allRuleNames.push(e.name+r)}))})),n);t.allRuleNames=i.allRuleNames})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,s.Im)(t.definitionErrors))throw r=(0,s.Tj)(t.definitionErrors,(function(e){return e.message})),new Error("Parser Definition Errors detected:\n "+r.join("\n-------------------------------\n"))}))},e.DEFER_DEFINITION_ERRORS_HANDLING=!1,e}();(0,s.XJ)(kr,[tr,nr,dr,pr,fr,gr,mr,yr,Tr,Ar]);var Hr=function(e){function t(t,r){void 0===r&&(r=Pr);var n=(0,s.lR)(r);return n.outputCst=!0,e.call(this,t,n)||this}return Or(t,e),t}(kr),Fr=function(e){function t(t,r){void 0===r&&(r=Pr);var n=(0,s.lR)(r);return n.outputCst=!1,e.call(this,t,n)||this}return Or(t,e),t}(kr);function Ur(e,t){var r=void 0===t?{}:t,s=r.resourceBase,i=void 0===s?"https://unpkg.com/chevrotain@"+n+"/diagrams/":s,o=r.css;return'\n\x3c!-- This is a generated file --\x3e\n<!DOCTYPE html>\n<meta charset="utf-8">\n<style>\n body {\n background-color: hsl(30, 20%, 95%)\n }\n</style>\n\n'+("\n<link rel='stylesheet' href='"+(void 0===o?"https://unpkg.com/chevrotain@"+n+"/diagrams/diagrams.css":o)+"'>\n")+("\n<script src='"+i+"vendor/railroad-diagrams.js'><\/script>\n<script src='"+i+"src/diagrams_builder.js'><\/script>\n<script src='"+i+"src/diagrams_behavior.js'><\/script>\n<script src='"+i+"src/main.js'><\/script>\n")+'\n<div id="diagrams" align="center"></div> \n'+("\n<script>\n window.serializedGrammar = "+JSON.stringify(e,null," ")+";\n<\/script>\n")+'\n<script>\n var diagramsDiv = document.getElementById("diagrams");\n main.drawDiagramsFromSerializedGrammar(serializedGrammar, diagramsDiv);\n<\/script>\n'}var Vr="\n";function Br(e){var t;return"\nfunction "+e.name+"(tokenVocabulary, config) {\n // invoke super constructor\n // No support for embedded actions currently, so we can 'hardcode'\n // The use of CstParser.\n chevrotain.CstParser.call(this, tokenVocabulary, config)\n\n const $ = this\n\n "+(t=e.rules,(0,s.Tj)(t,(function(e){return function(e,t){var r=$r(t,'$.RULE("'+e.name+'", function() {')+Vr;return r+=zr(e.definition,t+1),r+=$r(t+1,"})")+Vr}(e,1)})).join("\n")+"\n\n // very important to call this after all the rules have been defined.\n // otherwise the parser may not work correctly as it will lack information\n // derived during the self analysis phase.\n this.performSelfAnalysis(this)\n}\n\n// inheritance as implemented in javascript in the previous decade... :(\n")+e.name+".prototype = Object.create(chevrotain.CstParser.prototype)\n"+e.name+".prototype.constructor = "+e.name+" \n "}function Wr(e,t){var r=$r(t,"$.OR"+e.idx+"([")+Vr,n=(0,s.Tj)(e.definition,(function(e){return function(e,t){var r=$r(t,"{")+Vr;e.name&&(r+=$r(t+1,'NAME: "'+e.name+'",')+Vr);return r+=$r(t+1,"ALT: function() {")+Vr,r+=zr(e.definition,t+1),r+=$r(t+1,"}")+Vr,r+=$r(t,"}"),r}(e,t+1)}));return r+=n.join(","+Vr),r+=Vr+$r(t,"])"+Vr)}function Yr(e,t){if(e instanceof Ee)return function(e,t){return $r(t,"$.SUBRULE"+e.idx+"($."+e.nonTerminalName+")"+Vr)}(e,t);if(e instanceof ve)return Gr("OPTION",e,t);if(e instanceof Re)return Gr("AT_LEAST_ONE",e,t);if(e instanceof Se)return Gr("AT_LEAST_ONE_SEP",e,t);if(e instanceof Ne)return Gr("MANY_SEP",e,t);if(e instanceof Te)return Gr("MANY",e,t);if(e instanceof Me)return Wr(e,t);if(e instanceof _e)return function(e,t){var r=e.terminalType.name;return $r(t,"$.CONSUME"+e.idx+"(this.tokensMap."+r+")"+Vr)}(e,t);if(e instanceof Ce)return zr(e.definition,t);throw Error("non exhaustive match")}function Gr(e,t,r){var n=$r(r,"$."+(e+t.idx)+"(");return t.name||t.separator?(n+="{"+Vr,t.name&&(n+=$r(r+1,'NAME: "'+t.name+'"')+","+Vr),t.separator&&(n+=$r(r+1,"SEP: this.tokensMap."+t.separator.name)+","+Vr),n+="DEF: "+jr(t.definition,r+2)+Vr,n+=$r(r,"}")+Vr):n+=jr(t.definition,r+1),n+=$r(r,")")+Vr}function jr(e,t){var r="function() {"+Vr;return r+=zr(e,t),r+=$r(t,"}")+Vr}function zr(e,t){var r="";return(0,s.jJ)(e,(function(e){r+=Yr(e,t+1)})),r}function $r(e,t){return Array(4*e+1).join(" ")+t}function Kr(e){var t=function(e){return" \n"+Br(e)+"\nreturn new "+e.name+"(tokenVocabulary, config) \n"}({name:e.name,rules:e.rules}),n=new Function("tokenVocabulary","config","chevrotain",t);return function(t){return n(e.tokenVocabulary,t,r(83012))}}function Xr(e){return function(e){return"\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['chevrotain'], factory);\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory(require('chevrotain'));\n } else {\n // Browser globals (root is window)\n root.returnExports = factory(root.b);\n }\n}(typeof self !== 'undefined' ? self : this, function (chevrotain) {\n\n"+Br(e)+"\n \nreturn {\n "+e.name+": "+e.name+" \n}\n}));\n"}({name:e.name,rules:e.rules})}function qr(){console.warn("The clearCache function was 'soft' removed from the Chevrotain API.\n\t It performs no action other than printing this message.\n\t Please avoid using it as it will be completely removed in the future")}},86596:(e,t,r)=>{"use strict";function n(e){return e&&0===e.length}function s(e){return null==e?[]:Object.keys(e)}function i(e){for(var t=[],r=Object.keys(e),n=0;n<r.length;n++)t.push(e[r[n]]);return t}function o(e,t){for(var r=[],n=s(e),i=0;i<n.length;i++){var o=n[i];r.push(t.call(null,e[o],o))}return r}function a(e,t){for(var r=[],n=0;n<e.length;n++)r.push(t.call(null,e[n],n));return r}function l(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];Array.isArray(n)?t=t.concat(l(n)):t.push(n)}return t}function h(e){return n(e)?void 0:e[0]}function u(e){var t=e&&e.length;return t?e[t-1]:void 0}function c(e,t){if(Array.isArray(e))for(var r=0;r<e.length;r++)t.call(null,e[r],r);else{if(!x(e))throw Error("non exhaustive match");var n=s(e);for(r=0;r<n.length;r++){var i=n[r],o=e[i];t.call(null,o,i)}}}function d(e){return"string"==typeof e}function p(e){return void 0===e}function g(e){return e instanceof Function}function f(e,t){return void 0===t&&(t=1),e.slice(t,e.length)}function m(e,t){return void 0===t&&(t=1),e.slice(0,e.length-t)}function y(e,t){var r=[];if(Array.isArray(e))for(var n=0;n<e.length;n++){var s=e[n];t.call(null,s)&&r.push(s)}return r}function E(e,t){return y(e,(function(e){return!t(e)}))}function w(e,t){for(var r=Object.keys(e),n={},s=0;s<r.length;s++){var i=r[s],o=e[i];t(o)&&(n[i]=o)}return n}function C(e,t){return!!x(e)&&e.hasOwnProperty(t)}function v(e,t){return void 0!==T(e,(function(e){return e===t}))}function R(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r]);return t}function S(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}function T(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(t.call(null,n))return n}}function N(e,t){for(var r=[],n=0;n<e.length;n++){var s=e[n];t.call(null,s)&&r.push(s)}return r}function M(e,t,r){for(var n=Array.isArray(e),o=n?e:i(e),a=n?[]:s(e),l=r,h=0;h<o.length;h++)l=t.call(null,l,o[h],n?h:a[h]);return l}function _(e){return E(e,(function(e){return null==e}))}function b(e,t){void 0===t&&(t=function(e){return e});var r=[];return M(e,(function(e,n){var s=t(n);return v(r,s)?e:(r.push(s),e.concat(n))}),[])}function A(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=[null].concat(t);return Function.bind.apply(e,n)}function O(e){return Array.isArray(e)}function I(e){return e instanceof RegExp}function x(e){return e instanceof Object}function P(e,t){for(var r=0;r<e.length;r++)if(!t(e[r],r))return!1;return!0}function L(e,t){return E(e,(function(e){return v(t,e)}))}function D(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return!0;return!1}function k(e,t){for(var r=0;r<e.length;r++)if(e[r]===t)return r;return-1}function H(e,t){var r=R(e);return r.sort((function(e,r){return t(e)-t(r)})),r}function F(e,t){if(e.length!==t.length)throw Error("can't zipObject with different number of keys and values!");for(var r={},n=0;n<e.length;n++)r[e[n]]=t[n];return r}function U(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++)for(var i=t[n],o=s(i),a=0;a<o.length;a++){var l=o[a];e[l]=i[l]}return e}function V(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++){var i=t[n];if(!p(i))for(var o=s(i),a=0;a<o.length;a++){var l=o[a];C(e,l)||(e[l]=i[l])}}return e}function B(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return V.apply(null,[{}].concat(e))}function W(e,t){var r={};return c(e,(function(e){var n=t(e),s=r[n];s?s.push(e):r[n]=[e]})),r}function Y(e,t){for(var r=S(e),n=s(t),i=0;i<n.length;i++){var o=n[i],a=t[o];r[o]=a}return r}function G(){}function j(e){return e}function z(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(void 0!==n?n:void 0)}return t}function $(e){console&&console.error&&console.error("Error: "+e)}function K(e){console&&console.warn&&console.warn("Warning: "+e)}function X(){return"function"==typeof Map}function q(e,t){t.forEach((function(t){var r=t.prototype;Object.getOwnPropertyNames(r).forEach((function(n){if("constructor"!==n){var s=Object.getOwnPropertyDescriptor(r,n);s&&(s.get||s.set)?Object.defineProperty(e.prototype,n,s):e.prototype[n]=t.prototype[n]}}))}))}function Q(e){function t(){}t.prototype=e;var r=new t;function n(){return typeof r.bar}return n(),n(),e}function Z(e){return e[e.length-1]}function J(e){var t=(new Date).getTime(),r=e();return{time:(new Date).getTime()-t,value:r}}r.d(t,{$1:()=>h,$z:()=>W,Bl:()=>Q,Bq:()=>l,Gv:()=>x,HP:()=>s,HV:()=>u,I6:()=>T,Im:()=>n,JW:()=>N,Kg:()=>d,LG:()=>o,NT:()=>B,O1:()=>J,Si:()=>P,T9:()=>R,TS:()=>M,Tj:()=>a,Tn:()=>g,Up:()=>w,VS:()=>z,XJ:()=>q,Zi:()=>$,b0:()=>p,cy:()=>O,gR:()=>v,gc:()=>m,gd:()=>I,gv:()=>f,h1:()=>Y,iv:()=>L,jJ:()=>c,kp:()=>U,ku:()=>E,lR:()=>S,oE:()=>_,pb:()=>y,qh:()=>k,rF:()=>X,sb:()=>b,se:()=>Z,tE:()=>G,x5:()=>K,zK:()=>j,zN:()=>D,zu:()=>i,zy:()=>C})},49879:function(e,t){var r,n,s;"undefined"!=typeof self&&self,n=[],void 0===(s="function"==typeof(r=function(){function e(){}e.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},e.prototype.restoreState=function(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx},e.prototype.pattern=function(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");var t=this.disjunction();this.consumeChar("/");for(var r={type:"Flags",global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":a(r,"global");break;case"i":a(r,"ignoreCase");break;case"m":a(r,"multiLine");break;case"u":a(r,"unicode");break;case"y":a(r,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:t}},e.prototype.disjunction=function(){var e=[];for(e.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e}},e.prototype.alternative=function(){for(var e=[];this.isTerm();)e.push(this.term());return{type:"Alternative",value:e}},e.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},e.prototype.assertion=function(){switch(this.popChar()){case"^":return{type:"StartAnchor"};case"$":return{type:"EndAnchor"};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary"};case"B":return{type:"NonWordBoundary"}}throw Error("Invalid Assertion Escape");case"(":var e;switch(this.consumeChar("?"),this.popChar()){case"=":e="Lookahead";break;case"!":e="NegativeLookahead"}l(e);var t=this.disjunction();return this.consumeChar(")"),{type:e,value:t}}h()},e.prototype.quantifier=function(e){var t;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":var r=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:r,atMost:r};break;case",":t=this.isDigit()?{atLeast:r,atMost:this.integerIncludingZero()}:{atLeast:r,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;l(t)}if(!0!==e||void 0!==t)return l(t),"?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t},e.prototype.atom=function(){var e;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group()}return void 0===e&&this.isPatternCharacter()&&(e=this.patternCharacter()),l(e),this.isQuantifier()&&(e.quantifier=this.quantifier()),e},e.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[i("\n"),i("\r"),i("\u2028"),i("\u2029")]}},e.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},e.prototype.decimalEscapeAtom=function(){return{type:"GroupBackReference",value:this.positiveInteger()}},e.prototype.characterClassEscape=function(){var e,t=!1;switch(this.popChar()){case"d":e=u;break;case"D":e=u,t=!0;break;case"s":e=d;break;case"S":e=d,t=!0;break;case"w":e=c;break;case"W":e=c,t=!0}return l(e),{type:"Set",value:e,complement:t}},e.prototype.controlEscapeAtom=function(){var e;switch(this.popChar()){case"f":e=i("\f");break;case"n":e=i("\n");break;case"r":e=i("\r");break;case"t":e=i("\t");break;case"v":e=i("\v")}return l(e),{type:"Character",value:e}},e.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}},e.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:i("\0")}},e.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},e.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},e.prototype.identityEscapeAtom=function(){return{type:"Character",value:i(this.popChar())}},e.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:i(this.popChar())}}},e.prototype.characterClass=function(){var e=[],t=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);this.isClassAtom();){var r=this.classAtom();if("Character"===r.type&&this.isRangeDash()){this.consumeChar("-");var n=this.classAtom();if("Character"===n.type){if(n.value<r.value)throw Error("Range out of order in character class");e.push({from:r.value,to:n.value})}else o(r.value,e),e.push(i("-")),o(n.value,e)}else o(r.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}},e.prototype.classAtom=function(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}},e.prototype.classEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:i("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},e.prototype.group=function(){var e=!0;this.consumeChar("("),"?"===this.peekChar(0)?(this.consumeChar("?"),this.consumeChar(":"),e=!1):this.groupIdx++;var t=this.disjunction();this.consumeChar(")");var r={type:"Group",capturing:e,value:t};return e&&(r.idx=this.groupIdx),r},e.prototype.positiveInteger=function(){var e=this.popChar();if(!1===s.test(e))throw Error("Expecting a positive integer");for(;n.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)},e.prototype.integerIncludingZero=function(){var e=this.popChar();if(!1===n.test(e))throw Error("Expecting an integer");for(;n.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)},e.prototype.patternCharacter=function(){var e=this.popChar();switch(e){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:i(e)}}},e.prototype.isRegExpFlag=function(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}},e.prototype.isRangeDash=function(){return"-"===this.peekChar()&&this.isClassAtom(1)},e.prototype.isDigit=function(){return n.test(this.peekChar(0))},e.prototype.isClassAtom=function(e){switch(void 0===e&&(e=0),this.peekChar(e)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},e.prototype.isTerm=function(){return this.isAtom()||this.isAssertion()},e.prototype.isAtom=function(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}},e.prototype.isAssertion=function(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2));default:return!1}},e.prototype.isQuantifier=function(){var e=this.saveState();try{return void 0!==this.quantifier(!0)}catch(e){return!1}finally{this.restoreState(e)}},e.prototype.isPatternCharacter=function(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},e.prototype.parseHexDigits=function(e){for(var t="",n=0;n<e;n++){var s=this.popChar();if(!1===r.test(s))throw Error("Expecting a HexDecimal digits");t+=s}return{type:"Character",value:parseInt(t,16)}},e.prototype.peekChar=function(e){return void 0===e&&(e=0),this.input[this.idx+e]},e.prototype.popChar=function(){var e=this.peekChar(0);return this.consumeChar(),e},e.prototype.consumeChar=function(e){if(void 0!==e&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++};var t,r=/[0-9a-fA-F]/,n=/[0-9]/,s=/[1-9]/;function i(e){return e.charCodeAt(0)}function o(e,t){void 0!==e.length?e.forEach((function(e){t.push(e)})):t.push(e)}function a(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t]=!0}function l(e){if(void 0===e)throw Error("Internal Error - Should never get here!")}function h(){throw Error("Internal Error - Should never get here!")}var u=[];for(t=i("0");t<=i("9");t++)u.push(t);var c=[i("_")].concat(u);for(t=i("a");t<=i("z");t++)c.push(t);for(t=i("A");t<=i("Z");t++)c.push(t);var d=[i(" "),i("\f"),i("\n"),i("\r"),i("\t"),i("\v"),i("\t"),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i("\u2028"),i("\u2029"),i(" "),i(" "),i(" "),i("\ufeff")];function p(){}return p.prototype.visitChildren=function(e){for(var t in e){var r=e[t];e.hasOwnProperty(t)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach((function(e){this.visit(e)}),this))}},p.prototype.visit=function(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)},p.prototype.visitPattern=function(e){},p.prototype.visitFlags=function(e){},p.prototype.visitDisjunction=function(e){},p.prototype.visitAlternative=function(e){},p.prototype.visitStartAnchor=function(e){},p.prototype.visitEndAnchor=function(e){},p.prototype.visitWordBoundary=function(e){},p.prototype.visitNonWordBoundary=function(e){},p.prototype.visitLookahead=function(e){},p.prototype.visitNegativeLookahead=function(e){},p.prototype.visitCharacter=function(e){},p.prototype.visitSet=function(e){},p.prototype.visitGroup=function(e){},p.prototype.visitGroupBackReference=function(e){},p.prototype.visitQuantifier=function(e){},{RegExpParser:e,BaseRegExpVisitor:p,VERSION:"0.4.0"}})?r.apply(t,n):r)||(e.exports=s)},23420:e=>{function t(){}t.prototype={on:function(e,t,r){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:r}),this},once:function(e,t,r){var n=this;function s(){n.off(e,s),t.apply(r,arguments)}return s._=t,this.on(e,s,r)},emit:function(e){for(var t=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),n=0,s=r.length;n<s;n++)r[n].fn.apply(r[n].ctx,t);return this},off:function(e,t){var r=this.e||(this.e={}),n=r[e],s=[];if(n&&t)for(var i=0,o=n.length;i<o;i++)n[i].fn!==t&&n[i].fn._!==t&&s.push(n[i]);return s.length?r[e]=s:delete r[e],this}},e.exports=t,e.exports.TinyEmitter=t},85707:(e,t,r)=>{var n=r(45498);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},96784:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},11327:(e,t,r)=>{var n=r(10564).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=n(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},45498:(e,t,r)=>{var n=r(10564).default,s=r(11327);e.exports=function(e){var t=s(e,"string");return"symbol"==n(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},10564:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},44499:e=>{"use strict";
1174
1174
  /*!
1175
1175
  * Pikaday
1176
1176
  *