forked from handsontable/handsontable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
handsontable.min.js
23 lines (23 loc) · 362 KB
/
handsontable.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*!
* Handsontable 0.16.0
* Handsontable is a JavaScript library for editable tables with basic copy-paste compatibility with Excel and Google Docs
*
* Copyright (c) 2012-2014 Marcin Warpechowski
* Copyright 2015 Handsoncode sp. z o.o. <[email protected]>
* Licensed under the MIT license.
* http://handsontable.com/
*
* Date: Fri Jul 10 2015 09:20:29 GMT+0200 (CEST)
*/
window.Handsontable={version:"0.16.0",buildDate:"Fri Jul 10 2015 09:20:29 GMT+0200 (CEST)"},function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Handsontable=e()}}(function(){var e;return function(e,t,o){return function n(e,t,o){function r(a,l){if(!t[a]){if(!e[a]){var u="function"==typeof require&&require;if(!l&&u)return u(a,!0);if(i)return i(a,!0);if(s[a]&&"undefined"!=typeof window[s[a]])return window[s[a]];var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var d=t[a]={exports:{}};e[a][0].call(d.exports,function(t){var o=e[a][1][t];return r(o?o:t)},d,d.exports,n,e,t,o)}return t[a].exports}for(var i="function"==typeof require&&require,s=JSON.parse('{"zeroclipboard":"ZeroClipboard","moment":"moment","pikaday":"Pikaday"}')||{},a=0;a<o.length;a++)r(o[a]);return r}(e,t,o),function(){return Handsontable}}({1:[function(e,t,o){"use strict";window.jQuery&&!function(e,t,o){t.fn.handsontable=function(e){var t,n,r,i,s,a=this.first(),l=a.data("handsontable");if("string"!=typeof e)return s=e||{},l?l.updateSettings(s):(l=new o.Core(a[0],s),a.data("handsontable",l),l.init()),a;if(r=[],arguments.length>1)for(t=1,n=arguments.length;n>t;t++)r.push(arguments[t]);if(l){if("undefined"==typeof l[e])throw new Error("Handsontable do not provide action: "+e);i=l[e].apply(l,r),"destroy"===e&&a.removeData()}return i}}(window,jQuery,Handsontable)},{}],2:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableBorder:{get:function(){return u}},__esModule:{value:!0}});var n,r,i,s=(n=e("./../../../dom.js"),n&&n.__esModule&&n||{"default":n}),a=(r=e("./../../../eventManager.js"),r&&r.__esModule&&r||{"default":r}).EventManager,l=(i=e("./cell/coords.js"),i&&i.__esModule&&i||{"default":i}).WalkontableCellCoords,u=function(e,t){t&&(this.eventManager=new a(e),this.instance=e,this.wot=e,this.settings=t,this.mouseDown=!1,this.main=null,this.top=null,this.left=null,this.bottom=null,this.right=null,this.topStyle=null,this.leftStyle=null,this.bottomStyle=null,this.rightStyle=null,this.cornerDefaultStyle={width:"5px",height:"5px",borderWidth:"2px",borderStyle:"solid",borderColor:"#FFF"},this.corner=null,this.cornerStyle=null,this.createBorders(t),this.registerListeners())};$traceurRuntime.createClass(u,{registerListeners:function(){var e=this;this.eventManager.addEventListener(document.body,"mousedown",function(){return e.onMouseDown()}),this.eventManager.addEventListener(document.body,"mouseup",function(){return e.onMouseUp()});for(var t=0,o=this.main.childNodes.length;o>t;t++)this.eventManager.addEventListener(this.main.childNodes[t],"mouseenter",function(t){return e.onMouseEnter(t)})},onMouseDown:function(){this.mouseDown=!0},onMouseUp:function(){this.mouseDown=!1},onMouseEnter:function(e){function t(e){return e.clientY<Math.floor(r.top)?!0:e.clientY>Math.ceil(r.top+r.height)?!0:e.clientX<Math.floor(r.left)?!0:e.clientX>Math.ceil(r.left+r.width)?!0:void 0}function o(e){t(e)&&(n.eventManager.removeEventListener(document.body,"mousemove",o),n.style.display="block")}if(this.mouseDown&&this.wot.getSetting("hideBorderOnMouseDownOver")){e.preventDefault(),e.stopImmediatePropagation();var n=this,r=this.getBoundingClientRect();this.style.display="none",this.eventManager.addEventListener(document.body,"mousemove",o)}},createBorders:function(e){this.main=document.createElement("div");var t=["top","left","bottom","right","corner"],o=this.main.style;o.position="absolute",o.top=0,o.left=0;for(var n=0;5>n;n++){var r=t[n],i=document.createElement("div");i.className="wtBorder "+(this.settings.className||""),this.settings[r]&&this.settings[r].hide&&(i.className+=" hidden"),o=i.style,o.backgroundColor=this.settings[r]&&this.settings[r].color?this.settings[r].color:e.border.color,o.height=this.settings[r]&&this.settings[r].width?this.settings[r].width+"px":e.border.width+"px",o.width=this.settings[r]&&this.settings[r].width?this.settings[r].width+"px":e.border.width+"px",this.main.appendChild(i)}this.top=this.main.childNodes[0],this.left=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.right=this.main.childNodes[3],this.topStyle=this.top.style,this.leftStyle=this.left.style,this.bottomStyle=this.bottom.style,this.rightStyle=this.right.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.height=this.cornerDefaultStyle.height,this.cornerStyle.border=[this.cornerDefaultStyle.borderWidth,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),Handsontable.mobileBrowser&&this.createMultipleSelectorHandles(),this.disappear(),this.wot.wtTable.bordersHolder||(this.wot.wtTable.bordersHolder=document.createElement("div"),this.wot.wtTable.bordersHolder.className="htBorders",this.wot.wtTable.spreader.appendChild(this.wot.wtTable.bordersHolder)),this.wot.wtTable.bordersHolder.insertBefore(this.main,this.wot.wtTable.bordersHolder.firstChild)},createMultipleSelectorHandles:function(){this.selectionHandles={topLeft:document.createElement("DIV"),topLeftHitArea:document.createElement("DIV"),bottomRight:document.createElement("DIV"),bottomRightHitArea:document.createElement("DIV")};var e=10,t=40;this.selectionHandles.topLeft.className="topLeftSelectionHandle",this.selectionHandles.topLeftHitArea.className="topLeftSelectionHandle-HitArea",this.selectionHandles.bottomRight.className="bottomRightSelectionHandle",this.selectionHandles.bottomRightHitArea.className="bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={topLeft:this.selectionHandles.topLeft.style,topLeftHitArea:this.selectionHandles.topLeftHitArea.style,bottomRight:this.selectionHandles.bottomRight.style,bottomRightHitArea:this.selectionHandles.bottomRightHitArea.style};var o={position:"absolute",height:t+"px",width:t+"px","border-radius":parseInt(t/1.5,10)+"px"};for(var n in o)o.hasOwnProperty(n)&&(this.selectionHandles.styles.bottomRightHitArea[n]=o[n],this.selectionHandles.styles.topLeftHitArea[n]=o[n]);var r={position:"absolute",height:e+"px",width:e+"px","border-radius":parseInt(e/1.5,10)+"px",background:"#F5F5FF",border:"1px solid #4285c8"};for(var i in r)r.hasOwnProperty(i)&&(this.selectionHandles.styles.bottomRight[i]=r[i],this.selectionHandles.styles.topLeft[i]=r[i]);this.main.appendChild(this.selectionHandles.topLeft),this.main.appendChild(this.selectionHandles.bottomRight),this.main.appendChild(this.selectionHandles.topLeftHitArea),this.main.appendChild(this.selectionHandles.bottomRightHitArea)},isPartRange:function(e,t){return!this.wot.selections.area.cellRange||e==this.wot.selections.area.cellRange.to.row&&t==this.wot.selections.area.cellRange.to.col?!1:!0},updateMultipleSelectionHandlesPosition:function(e,t,o,n,r,i){var s=parseInt(this.selectionHandles.styles.topLeft.width,10),a=parseInt(this.selectionHandles.styles.topLeftHitArea.width,10);this.selectionHandles.styles.topLeft.top=parseInt(o-s,10)+"px",this.selectionHandles.styles.topLeft.left=parseInt(n-s,10)+"px",this.selectionHandles.styles.topLeftHitArea.top=parseInt(o-a/4*3,10)+"px",this.selectionHandles.styles.topLeftHitArea.left=parseInt(n-a/4*3,10)+"px",this.selectionHandles.styles.bottomRight.top=parseInt(o+i,10)+"px",this.selectionHandles.styles.bottomRight.left=parseInt(n+r,10)+"px",this.selectionHandles.styles.bottomRightHitArea.top=parseInt(o+i-a/4,10)+"px",this.selectionHandles.styles.bottomRightHitArea.left=parseInt(n+r-a/4,10)+"px",this.settings.border.multipleSelectionHandlesVisible&&this.settings.border.multipleSelectionHandlesVisible()?(this.selectionHandles.styles.topLeft.display="block",this.selectionHandles.styles.topLeftHitArea.display="block",this.isPartRange(e,t)?(this.selectionHandles.styles.bottomRight.display="none",this.selectionHandles.styles.bottomRightHitArea.display="none"):(this.selectionHandles.styles.bottomRight.display="block",this.selectionHandles.styles.bottomRightHitArea.display="block")):(this.selectionHandles.styles.topLeft.display="none",this.selectionHandles.styles.bottomRight.display="none",this.selectionHandles.styles.topLeftHitArea.display="none",this.selectionHandles.styles.bottomRightHitArea.display="none"),e==this.wot.wtSettings.getSetting("fixedRowsTop")||t==this.wot.wtSettings.getSetting("fixedColumnsLeft")?(this.selectionHandles.styles.topLeft.zIndex="9999",this.selectionHandles.styles.topLeftHitArea.zIndex="9999"):(this.selectionHandles.styles.topLeft.zIndex="",this.selectionHandles.styles.topLeftHitArea.zIndex="")},appear:function(e){if(!this.disabled){var t,o,n,r,i,a,u,c,d,h,f,g,p,m,w,v,C;C=this.wot.cloneOverlay instanceof WalkontableTopOverlay||this.wot.cloneOverlay instanceof WalkontableCornerOverlay?this.wot.getSetting("fixedRowsTop"):this.wot.wtTable.getRenderedRowsCount();for(var b=0;C>b;b++){var y=this.wot.wtTable.rowFilter.renderedToSource(b);if(y>=e[0]&&y<=e[2]){p=y;break}}for(var R=C-1;R>=0;R--){var S=this.wot.wtTable.rowFilter.renderedToSource(R);if(S>=e[0]&&S<=e[2]){w=S;break}}C=this.wot.wtTable.getRenderedColumnsCount();for(var E=0;C>E;E++){var T=this.wot.wtTable.columnFilter.renderedToSource(E);if(T>=e[1]&&T<=e[3]){m=T;break}}for(var H=C-1;H>=0;H--){var k=this.wot.wtTable.columnFilter.renderedToSource(H);if(k>=e[1]&&k<=e[3]){v=k;break}}if(void 0===p||void 0===m)return void this.disappear();t=p!==w||m!==v,o=this.wot.wtTable.getCell(new l(p,m)),n=t?this.wot.wtTable.getCell(new l(w,v)):o,r=s.offset(o),i=t?s.offset(n):r,a=s.offset(this.wot.wtTable.TABLE),c=r.top,f=i.top+s.outerHeight(n)-c,h=r.left,g=i.left+s.outerWidth(n)-h,u=c-a.top-1,d=h-a.left-1;var O=s.getComputedStyle(o);parseInt(O.borderTopWidth,10)>0&&(u+=1,f=f>0?f-1:0),parseInt(O.borderLeftWidth,10)>0&&(d+=1,g=g>0?g-1:0),this.topStyle.top=u+"px",this.topStyle.left=d+"px",this.topStyle.width=g+"px",this.topStyle.display="block",this.leftStyle.top=u+"px",this.leftStyle.left=d+"px",this.leftStyle.height=f+"px",this.leftStyle.display="block";var M=Math.floor(this.settings.border.width/2);if(this.bottomStyle.top=u+f-M+"px",this.bottomStyle.left=d+"px",this.bottomStyle.width=g+"px",this.bottomStyle.display="block",this.rightStyle.top=u+"px",this.rightStyle.left=d+g-M+"px",this.rightStyle.height=f+1+"px",this.rightStyle.display="block",Handsontable.mobileBrowser||!this.hasSetting(this.settings.border.cornerVisible)||this.isPartRange(w,v))this.cornerStyle.display="none";else if(this.cornerStyle.top=u+f-4+"px",this.cornerStyle.left=d+g-4+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="block",v===this.wot.getSetting("totalColumns")-1){var _=s.getTrimmingContainer(this.wot.wtTable.TABLE),A=n.offsetLeft+s.outerWidth(n)>=s.innerWidth(_);A&&(this.cornerStyle.left=Math.floor(d+g-3-parseInt(this.cornerDefaultStyle.width)/2)+"px",this.cornerStyle.borderRightWidth=0)}Handsontable.mobileBrowser&&this.updateMultipleSelectionHandlesPosition(p,m,u,d,g,f)}},disappear:function(){this.topStyle.display="none",this.leftStyle.display="none",this.bottomStyle.display="none",this.rightStyle.display="none",this.cornerStyle.display="none",Handsontable.mobileBrowser&&(this.selectionHandles.styles.topLeft.display="none",this.selectionHandles.styles.bottomRight.display="none")},hasSetting:function(e){return"function"==typeof e?e():!!e}},{}),window.WalkontableBorder=u},{"./../../../dom.js":27,"./../../../eventManager.js":41,"./cell/coords.js":5}],3:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableViewportColumnsCalculator:{get:function(){return r}},__esModule:{value:!0}});var n=new WeakMap,r=function(e,t,o,r,i,s,a){n.set(this,{viewportWidth:e,scrollOffset:t,totalColumns:o,columnWidthFn:r,overrideFn:i,onlyFullyVisible:s}),this.count=0,this.startColumn=null,this.endColumn=null,this.startPosition=null,this.stretchAllRatio=0,this.stretchLastWidth=0,this.stretch=a,this.totalTargetWidth=0,this.needVerifyLastColumnWidth=!0,this.stretchAllColumnsWidth=[],this.calculate()},i=r;$traceurRuntime.createClass(r,{calculate:function(){for(var e,t=0,o=!0,r=[],i=n.get(this),s=i.onlyFullyVisible,a=i.overrideFn,l=i.scrollOffset,u=i.totalColumns,c=i.viewportWidth,d=0;u>d;d++)if(e=this._getColumnWidth(d),l>=t&&!s&&(this.startColumn=d),t>=l&&l+c>=t+e&&(null==this.startColumn&&(this.startColumn=d),this.endColumn=d),r.push(t),t+=e,s||(this.endColumn=d),t>=l+c){o=!1;break}if(this.endColumn===u-1&&o)for(this.startColumn=this.endColumn;this.startColumn>0;){var h=r[this.endColumn]+e-r[this.startColumn-1];if((c>=h||!s)&&this.startColumn--,h>c)break}null!==this.startColumn&&a&&a(this),this.startPosition=r[this.startColumn],void 0==this.startPosition&&(this.startPosition=null),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)},refreshStretching:function(e){if("none"!==this.stretch){for(var t,o,r=0,i=n.get(this),s=i.totalColumns,a=0;s>a;a++)t=this._getColumnWidth(a),r+=t;this.totalTargetWidth=e,o=r-e,"all"===this.stretch&&0>o?(this.stretchAllRatio=e/r,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0):"last"===this.stretch&&e!==1/0&&(this.stretchLastWidth=-o+this._getColumnWidth(s-1))}},getStretchedColumnWidth:function(e,t){var o=null;return"all"===this.stretch&&0!==this.stretchAllRatio?o=this._getStretchedAllColumnWidth(e,t):"last"===this.stretch&&0!==this.stretchLastWidth&&(o=this._getStretchedLastColumnWidth(e)),o},_getStretchedAllColumnWidth:function(e,t){var o=0,r=n.get(this),i=r.totalColumns;if(this.stretchAllColumnsWidth[e]||(this.stretchAllColumnsWidth[e]=Math.round(t*this.stretchAllRatio)),this.stretchAllColumnsWidth.length===i&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(var s=0;s<this.stretchAllColumnsWidth.length;s++)o+=this.stretchAllColumnsWidth[s];o!==this.totalTargetWidth&&(this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length-1]+=this.totalTargetWidth-o)}return this.stretchAllColumnsWidth[e]},_getStretchedLastColumnWidth:function(e){var t=n.get(this),o=t.totalColumns;return e===o-1?this.stretchLastWidth:null},_getColumnWidth:function(e){var t=n.get(this).columnWidthFn(e);return void 0===t&&(t=i.DEFAULT_WIDTH),t}},{get DEFAULT_WIDTH(){return 50}}),window.WalkontableViewportColumnsCalculator=r},{}],4:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableViewportRowsCalculator:{get:function(){return r}},__esModule:{value:!0}});var n=new WeakMap,r=function(e,t,o,r,i,s){n.set(this,{viewportHeight:e,scrollOffset:t,totalRows:o,rowHeightFn:r,overrideFn:i,onlyFullyVisible:s}),this.count=0,this.startRow=null,this.endRow=null,this.startPosition=null,this.calculate()},i=r;$traceurRuntime.createClass(r,{calculate:function(){for(var e=0,t=!0,o=[],r=n.get(this),s=r.onlyFullyVisible,a=r.overrideFn,l=r.rowHeightFn,u=r.scrollOffset,c=r.totalRows,d=r.viewportHeight,h=0;c>h;h++){var f=l(h);if(void 0===f&&(f=i.DEFAULT_HEIGHT),u>=e&&!s&&(this.startRow=h),e>=u&&u+d>=e+f&&(null===this.startRow&&(this.startRow=h),this.endRow=h),o.push(e),e+=f,s||(this.endRow=h),e>=u+d){t=!1;break}}if(this.endRow===c-1&&t)for(this.startRow=this.endRow;this.startRow>0;){var g=o[this.endRow]+f-o[this.startRow-1];if((d>=g||!s)&&this.startRow--,g>=d)break}null!==this.startRow&&a&&a(this),this.startPosition=o[this.startRow],void 0==this.startPosition&&(this.startPosition=null),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}},{get DEFAULT_HEIGHT(){return 23}}),window.WalkontableViewportRowsCalculator=r},{}],5:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableCellCoords:{get:function(){return n}},__esModule:{value:!0}});var n=function(e,t){"undefined"!=typeof e&&"undefined"!=typeof t?(this.row=e,this.col=t):(this.row=null,this.col=null)};$traceurRuntime.createClass(n,{isValid:function(e){return this.row<0||this.col<0?!1:this.row>=e.getSetting("totalRows")||this.col>=e.getSetting("totalColumns")?!1:!0},isEqual:function(e){return e===this?!0:this.row===e.row&&this.col===e.col},isSouthEastOf:function(e){return this.row>=e.row&&this.col>=e.col},isNorthWestOf:function(e){return this.row<=e.row&&this.col<=e.col},isSouthWestOf:function(e){return this.row>=e.row&&this.col<=e.col},isNorthEastOf:function(e){return this.row<=e.row&&this.col>=e.col}},{}),window.WalkontableCellCoords=n},{}],6:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableCellRange:{get:function(){return i}},__esModule:{value:!0}});var n,r=(n=e("./../cell/coords.js"),n&&n.__esModule&&n||{"default":n}).WalkontableCellCoords,i=function(e,t,o){this.highlight=e,this.from=t,this.to=o},s=i;$traceurRuntime.createClass(i,{isValid:function(e){return this.from.isValid(e)&&this.to.isValid(e)},isSingle:function(){return this.from.row===this.to.row&&this.from.col===this.to.col},getHeight:function(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1},getWidth:function(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1},includes:function(e){var t=this.getTopLeftCorner(),o=this.getBottomRightCorner();return e.row<0&&(e.row=0),e.col<0&&(e.col=0),t.row<=e.row&&o.row>=e.row&&t.col<=e.col&&o.col>=e.col},includesRange:function(e){return this.includes(e.getTopLeftCorner())&&this.includes(e.getBottomRightCorner())},isEqual:function(e){return Math.min(this.from.row,this.to.row)==Math.min(e.from.row,e.to.row)&&Math.max(this.from.row,this.to.row)==Math.max(e.from.row,e.to.row)&&Math.min(this.from.col,this.to.col)==Math.min(e.from.col,e.to.col)&&Math.max(this.from.col,this.to.col)==Math.max(e.from.col,e.to.col)},overlaps:function(e){return e.isSouthEastOf(this.getTopLeftCorner())&&e.isNorthWestOf(this.getBottomRightCorner())},isSouthEastOf:function(e){return this.getTopLeftCorner().isSouthEastOf(e)||this.getBottomRightCorner().isSouthEastOf(e)},isNorthWestOf:function(e){return this.getTopLeftCorner().isNorthWestOf(e)||this.getBottomRightCorner().isNorthWestOf(e)},expand:function(e){var t=this.getTopLeftCorner(),o=this.getBottomRightCorner();return e.row<t.row||e.col<t.col||e.row>o.row||e.col>o.col?(this.from=new r(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=new r(Math.max(o.row,e.row),Math.max(o.col,e.col)),!0):!1},expandByRange:function(e){if(this.includesRange(e)||!this.overlaps(e))return!1;var t=this.getTopLeftCorner(),o=this.getBottomRightCorner(),n=(this.getTopRightCorner(),this.getBottomLeftCorner(),e.getTopLeftCorner()),i=e.getBottomRightCorner(),a=Math.min(t.row,n.row),l=Math.min(t.col,n.col),u=Math.max(o.row,i.row),c=Math.max(o.col,i.col),d=new r(a,l),h=new r(u,c),f=new s(d,d,h).isCorner(this.from,e),g=e.isEqual(new s(d,d,h));return f&&!g&&(this.from.col>d.col&&(d.col=c,h.col=l),this.from.row>d.row&&(d.row=u,h.row=a)),this.from=d,this.to=h,!0},getDirection:function(){return this.from.isNorthWestOf(this.to)?"NW-SE":this.from.isNorthEastOf(this.to)?"NE-SW":this.from.isSouthEastOf(this.to)?"SE-NW":this.from.isSouthWestOf(this.to)?"SW-NE":void 0},setDirection:function(e){switch(e){case"NW-SE":this.from=this.getTopLeftCorner(),this.to=this.getBottomRightCorner();break;case"NE-SW":this.from=this.getTopRightCorner(),this.to=this.getBottomLeftCorner();break;case"SE-NW":this.from=this.getBottomRightCorner(),this.to=this.getTopLeftCorner();break;case"SW-NE":this.from=this.getBottomLeftCorner(),this.to=this.getTopRightCorner()}},getTopLeftCorner:function(){return new r(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))},getBottomRightCorner:function(){return new r(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))},getTopRightCorner:function(){return new r(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))},getBottomLeftCorner:function(){return new r(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))},isCorner:function(e,t){return t&&t.includes(e)&&(this.getTopLeftCorner().isEqual(new r(t.from.row,t.from.col))||this.getTopRightCorner().isEqual(new r(t.from.row,t.to.col))||this.getBottomLeftCorner().isEqual(new r(t.to.row,t.from.col))||this.getBottomRightCorner().isEqual(new r(t.to.row,t.to.col)))?!0:e.isEqual(this.getTopLeftCorner())||e.isEqual(this.getTopRightCorner())||e.isEqual(this.getBottomLeftCorner())||e.isEqual(this.getBottomRightCorner())},getOppositeCorner:function(e,t){if(!(e instanceof r))return!1;if(t&&t.includes(e)){if(this.getTopLeftCorner().isEqual(new r(t.from.row,t.from.col)))return this.getBottomRightCorner();if(this.getTopRightCorner().isEqual(new r(t.from.row,t.to.col)))return this.getBottomLeftCorner();if(this.getBottomLeftCorner().isEqual(new r(t.to.row,t.from.col)))return this.getTopRightCorner();if(this.getBottomRightCorner().isEqual(new r(t.to.row,t.to.col)))return this.getTopLeftCorner()}return e.isEqual(this.getBottomRightCorner())?this.getTopLeftCorner():e.isEqual(this.getTopLeftCorner())?this.getBottomRightCorner():e.isEqual(this.getTopRightCorner())?this.getBottomLeftCorner():e.isEqual(this.getBottomLeftCorner())?this.getTopRightCorner():void 0},getBordersSharedWith:function(e){if(!this.includesRange(e))return[];var t={top:Math.min(this.from.row,this.to.row),bottom:Math.max(this.from.row,this.to.row),left:Math.min(this.from.col,this.to.col),right:Math.max(this.from.col,this.to.col)},o={top:Math.min(e.from.row,e.to.row),bottom:Math.max(e.from.row,e.to.row),left:Math.min(e.from.col,e.to.col),right:Math.max(e.from.col,e.to.col)},n=[];return t.top==o.top&&n.push("top"),t.right==o.right&&n.push("right"),t.bottom==o.bottom&&n.push("bottom"),t.left==o.left&&n.push("left"),n},getInner:function(){for(var e=this.getTopLeftCorner(),t=this.getBottomRightCorner(),o=[],n=e.row;n<=t.row;n++)for(var i=e.col;i<=t.col;i++)this.from.row===n&&this.from.col===i||this.to.row===n&&this.to.col===i||o.push(new r(n,i));return o},getAll:function(){for(var e=this.getTopLeftCorner(),t=this.getBottomRightCorner(),o=[],n=e.row;n<=t.row;n++)for(var i=e.col;i<=t.col;i++)e.row===n&&e.col===i?o.push(e):t.row===n&&t.col===i?o.push(t):o.push(new r(n,i));return o},forAll:function(e){for(var t=this.getTopLeftCorner(),o=this.getBottomRightCorner(),n=t.row;n<=o.row;n++)for(var r=t.col;r<=o.col;r++){var i=e(n,r);if(i===!1)return}}},{}),window.WalkontableCellRange=i},{"./../cell/coords.js":5}],7:[function(e,t,o){"use strict";Object.defineProperties(o,{Walkontable:{get:function(){return C}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c,d=(n=e("./../../../dom.js"),n&&n.__esModule&&n||{"default":n}),h=(r=e("./../../../helpers.js"),r&&r.__esModule&&r||{"default":r}).randomString,f=(i=e("./event.js"),i&&i.__esModule&&i||{"default":i}).WalkontableEvent,g=(s=e("./overlays.js"),s&&s.__esModule&&s||{"default":s}).WalkontableOverlays,p=(a=e("./scroll.js"),a&&a.__esModule&&a||{"default":a}).WalkontableScroll,m=(l=e("./settings.js"),l&&l.__esModule&&l||{"default":l}).WalkontableSettings,w=(u=e("./table.js"),u&&u.__esModule&&u||{"default":u}).WalkontableTable,v=(c=e("./viewport.js"),c&&c.__esModule&&c||{"default":c}).WalkontableViewport,C=function(e){var t=[];if(this.guid="wt_"+h(),e.cloneSource?(this.cloneSource=e.cloneSource,this.cloneOverlay=e.cloneOverlay,this.wtSettings=e.cloneSource.wtSettings,this.wtTable=new w(this,e.table,e.wtRootElement),this.wtScroll=new p(this),this.wtViewport=e.cloneSource.wtViewport,this.wtEvent=new f(this),this.selections=this.cloneSource.selections):(this.wtSettings=new m(this,e),this.wtTable=new w(this,e.table),this.wtScroll=new p(this),this.wtViewport=new v(this),this.wtEvent=new f(this),this.selections=this.getSetting("selections"),this.wtOverlays=new g(this)),this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(var o=0,n=this.wtTable.THEAD.childNodes[0].childNodes.length;n>o;o++)t.push(this.wtTable.THEAD.childNodes[0].childNodes[o].innerHTML);this.getSetting("columnHeaders").length||this.update("columnHeaders",[function(e,o){d.fastInnerText(o,t[e])}])}this.drawn=!1,this.drawInterrupted=!1};$traceurRuntime.createClass(C,{draw:function(){var e=void 0!==arguments[0]?arguments[0]:!1;return this.drawInterrupted=!1,e||d.isVisible(this.wtTable.TABLE)?this.wtTable.draw(e):this.drawInterrupted=!0,this},getCell:function(e){var t=void 0!==arguments[1]?arguments[1]:!1;if(!t)return this.wtTable.getCell(e);var o=this.wtSettings.getSetting("fixedRowsTop"),n=this.wtSettings.getSetting("fixedColumnsLeft");return e.row<o&&e.col<n?this.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell(e):e.row<o?this.wtOverlays.topOverlay.clone.wtTable.getCell(e):e.col<n?this.wtOverlays.leftOverlay.clone.wtTable.getCell(e):this.wtTable.getCell(e)},update:function(e,t){return this.wtSettings.update(e,t)},scrollVertical:function(e){return this.wtOverlays.topOverlay.scrollTo(e),this.getSetting("onScrollVertically"),this},scrollHorizontal:function(e){return this.wtOverlays.leftOverlay.scrollTo(e),this.getSetting("onScrollHorizontally"),this},scrollViewport:function(e){return this.wtScroll.scrollViewport(e),this},getViewport:function(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]},getOverlayName:function(){return this.cloneOverlay?this.cloneOverlay.type:"master"},getSetting:function(e,t,o,n,r){return this.wtSettings.getSetting(e,t,o,n,r)},hasSetting:function(e){return this.wtSettings.has(e)},destroy:function(){this.wtOverlays.destroy(),this.wtEvent&&this.wtEvent.destroy()}},{}),window.Walkontable=C},{"./../../../dom.js":27,"./../../../helpers.js":42,"./event.js":8,"./overlays.js":16,"./scroll.js":17,"./settings.js":19,"./table.js":20,"./viewport.js":22}],8:[function(e,t,o){"use strict";function n(e){var t=this,o=a(e);this.instance=e;var n=[null,null];this.dblClickTimeout=[null,null];var r,i,l=function(e){var o=t.parentCell(e.realTarget);s.hasClass(e.realTarget,"corner")?t.instance.getSetting("onCellCornerMouseDown",e,e.realTarget):o.TD&&t.instance.hasSetting("onCellMouseDown")&&t.instance.getSetting("onCellMouseDown",e,o.coords,o.TD,t.instance),2!==e.button&&o.TD&&(n[0]=o.TD,clearTimeout(t.dblClickTimeout[0]),t.dblClickTimeout[0]=setTimeout(function(){n[0]=null},1e3))},u=function(e){t.instance.touchMoving=!0},c=function(e){o.addEventListener(this,"touchmove",u),t.checkIfTouchMove=setTimeout(function(){return t.instance.touchMoving===!0?(t.instance.touchMoving=void 0,void o.removeEventListener("touchmove",u,!1)):void l(e)},30)},d=function(e){var o,n;t.instance.hasSetting("onCellMouseOver")&&(o=t.instance.wtTable.TABLE,n=s.closest(e.realTarget,["TD","TH"],o),n&&n!==i&&s.isChildOf(n,o)&&(i=n,t.instance.getSetting("onCellMouseOver",e,t.instance.wtTable.getCoords(n),n,t.instance)))},h=function(e){if(2!==e.button){var o=t.parentCell(e.realTarget);o.TD===n[0]&&o.TD===n[1]?(s.hasClass(e.realTarget,"corner")?t.instance.getSetting("onCellCornerDblClick",e,o.coords,o.TD,t.instance):t.instance.getSetting("onCellDblClick",e,o.coords,o.TD,t.instance),n[0]=null,n[1]=null):o.TD===n[0]&&(n[1]=o.TD,clearTimeout(t.dblClickTimeout[1]),t.dblClickTimeout[1]=setTimeout(function(){n[1]=null},500))}},f=function(e){clearTimeout(r),e.preventDefault(),h(e)};if(o.addEventListener(this.instance.wtTable.holder,"mousedown",l),o.addEventListener(this.instance.wtTable.TABLE,"mouseover",d),o.addEventListener(this.instance.wtTable.holder,"mouseup",h),this.instance.wtTable.holder.parentNode.parentNode&&Handsontable.mobileBrowser&&!t.instance.wtTable.isWorkingOnClone()){var g="."+this.instance.wtTable.holder.parentNode.className.split(" ").join(".");o.addEventListener(this.instance.wtTable.holder,"touchstart",function(e){t.instance.touchApplied=!0,s.isChildOf(e.target,g)&&c.call(e.target,e)}),o.addEventListener(this.instance.wtTable.holder,"touchend",function(e){t.instance.touchApplied=!1,s.isChildOf(e.target,g)&&f.call(e.target,e)}),t.instance.momentumScrolling||(t.instance.momentumScrolling={}),o.addEventListener(this.instance.wtTable.holder,"scroll",function(e){clearTimeout(t.instance.momentumScrolling._timeout),t.instance.momentumScrolling.ongoing||t.instance.getSetting("onBeforeTouchScroll"),t.instance.momentumScrolling.ongoing=!0,t.instance.momentumScrolling._timeout=setTimeout(function(){t.instance.touchApplied||(t.instance.momentumScrolling.ongoing=!1,t.instance.getSetting("onAfterMomentumScroll"))},200)})}o.addEventListener(window,"resize",function(){"none"!==t.instance.getSetting("stretchH")&&t.instance.draw()}),this.destroy=function(){clearTimeout(this.dblClickTimeout[0]),clearTimeout(this.dblClickTimeout[1]),o.clear()}}Object.defineProperties(o,{WalkontableEvent:{get:function(){return n}},__esModule:{value:!0}});var r,i,s=(r=e("./../../../dom.js"),r&&r.__esModule&&r||{"default":r}),a=(i=e("./../../../eventManager.js"),i&&i.__esModule&&i||{"default":i}).eventManager;n.prototype.parentCell=function(e){var t={},o=this.instance.wtTable.TABLE,n=s.closest(e,["TD","TH"],o);return n&&s.isChildOf(n,o)?(t.coords=this.instance.wtTable.getCoords(n),t.TD=n):s.hasClass(e,"wtBorder")&&s.hasClass(e,"current")?(t.coords=this.instance.selections.current.cellRange.highlight,t.TD=this.instance.wtTable.getCell(t.coords)):s.hasClass(e,"wtBorder")&&s.hasClass(e,"area")&&this.instance.selections.area.cellRange&&(t.coords=this.instance.selections.area.cellRange.to,t.TD=this.instance.wtTable.getCell(t.coords)),t},window.WalkontableEvent=n},{"./../../../dom.js":27,"./../../../eventManager.js":41}],9:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableColumnFilter:{get:function(){return n}},__esModule:{value:!0}});var n=function(e,t,o){this.offset=e,this.total=t,this.countTH=o};$traceurRuntime.createClass(n,{offsetted:function(e){return e+this.offset},unOffsetted:function(e){return e-this.offset},renderedToSource:function(e){return this.offsetted(e)},sourceToRendered:function(e){return this.unOffsetted(e)},offsettedTH:function(e){return e-this.countTH},unOffsettedTH:function(e){return e+this.countTH},visibleRowHeadedColumnToSourceColumn:function(e){return this.renderedToSource(this.offsettedTH(e))},sourceColumnToVisibleRowHeadedColumn:function(e){return this.unOffsettedTH(this.sourceToRendered(e))}},{}),window.WalkontableColumnFilter=n},{}],10:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableRowFilter:{get:function(){return n}},__esModule:{value:!0}});var n=function(e,t,o){this.offset=e,this.total=t,this.countTH=o};$traceurRuntime.createClass(n,{offsetted:function(e){return e+this.offset},unOffsetted:function(e){return e-this.offset},renderedToSource:function(e){return this.offsetted(e)},sourceToRendered:function(e){return this.unOffsetted(e)},offsettedTH:function(e){return e-this.countTH},unOffsettedTH:function(e){return e+this.countTH},visibleColHeadedRowToSourceRow:function(e){return this.renderedToSource(this.offsettedTH(e))},sourceRowToVisibleColHeadedRow:function(e){return this.unOffsettedTH(this.sourceToRendered(e))}},{}),window.WalkontableRowFilter=n},{}],11:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableOverlay:{get:function(){return u}},__esModule:{value:!0}});var n,r,i,s=(n=e("./../../../../dom.js"),n&&n.__esModule&&n||{"default":n}),a=(r=e("./../../../../helpers.js"),r&&r.__esModule&&r||{"default":r}).defineGetter,l=(i=e("./../../../../eventManager.js"),i&&i.__esModule&&i||{"default":i}).eventManager,u=function(e){a(this,"wot",e,{writable:!1}),this.instance=this.wot,this.type="",this.TABLE=this.wot.wtTable.TABLE,this.hider=this.wot.wtTable.hider,this.spreader=this.wot.wtTable.spreader,this.holder=this.wot.wtTable.holder,this.wtRootElement=this.wot.wtTable.wtRootElement,this.trimmingContainer=s.getTrimmingContainer(this.hider.parentNode.parentNode),this.mainTableScrollableElement=s.getScrollableElement(this.wot.wtTable.TABLE),this.needFullRender=this.shouldBeRendered(),this.isElementSizesAdjusted=!1},c=u;$traceurRuntime.createClass(u,{shouldBeRendered:function(){return!0},makeClone:function(e){if(-1===c.CLONE_TYPES.indexOf(e))throw new Error('Clone type "'+e+'" is not supported.');
var t=document.createElement("DIV"),o=document.createElement("TABLE");return t.className="ht_clone_"+e+" handsontable",t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.overflow="hidden",o.className=this.wot.wtTable.TABLE.className,t.appendChild(o),this.type=e,this.wot.wtTable.wtRootElement.parentNode.appendChild(t),new Walkontable({cloneSource:this.wot,cloneOverlay:this,table:o})},refresh:function(){var e=void 0!==arguments[0]?arguments[0]:!1,t=this.shouldBeRendered();this.clone&&(this.needFullRender||t)&&this.clone.draw(e),this.needFullRender=t},destroy:function(){l(this.clone).clear()}},{get CLONE_TOP(){return"top"},get CLONE_LEFT(){return"left"},get CLONE_CORNER(){return"corner"},get CLONE_DEBUG(){return"debug"},get CLONE_TYPES(){return[c.CLONE_TOP,c.CLONE_LEFT,c.CLONE_CORNER,c.CLONE_DEBUG]}}),window.WalkontableOverlay=u},{"./../../../../dom.js":27,"./../../../../eventManager.js":41,"./../../../../helpers.js":42}],12:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableCornerOverlay:{get:function(){return a}},__esModule:{value:!0}});var n,r,i=(n=e("./../../../../dom.js"),n&&n.__esModule&&n||{"default":n}),s=(r=e("./_base.js"),r&&r.__esModule&&r||{"default":r}).WalkontableOverlay,a=function(e){$traceurRuntime.superConstructor(l).call(this,e),this.clone=this.makeClone(s.CLONE_CORNER)},l=a;$traceurRuntime.createClass(a,{shouldBeRendered:function(){return(this.wot.getSetting("fixedRowsTop")||this.wot.getSetting("columnHeaders").length)&&(this.wot.getSetting("fixedColumnsLeft")||this.wot.getSetting("rowHeaders").length)?!0:!1},resetFixedPosition:function(){if(this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=i.outerHeight(this.clone.wtTable.TABLE),o=i.outerWidth(this.clone.wtTable.TABLE);if(this.trimmingContainer===window){var n,r,s=this.wot.wtTable.hider.getBoundingClientRect(),a=Math.ceil(s.top),l=Math.ceil(s.left),u=Math.ceil(s.bottom),c=Math.ceil(s.right);n=0>l&&c-e.offsetWidth>0?-l+"px":"0",r=0>a&&u-e.offsetHeight>0?-a+"px":"0",i.setOverlayPosition(e,n,r)}e.style.height=(0===t?t:t+4)+"px",e.style.width=(0===o?o:o+4)+"px"}}},{},s),window.WalkontableCornerOverlay=a},{"./../../../../dom.js":27,"./_base.js":11}],13:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableDebugOverlay:{get:function(){return a}},__esModule:{value:!0}});var n,r,i=(n=e("./../../../../dom.js"),n&&n.__esModule&&n||{"default":n}),s=(r=e("./_base.js"),r&&r.__esModule&&r||{"default":r}).WalkontableOverlay,a=function(e){$traceurRuntime.superConstructor(l).call(this,e),this.clone=this.makeClone(s.CLONE_DEBUG),this.clone.wtTable.holder.style.opacity=.4,this.clone.wtTable.holder.style.textShadow="0 0 2px #ff0000",i.addClass(this.clone.wtTable.holder.parentNode,"wtDebugVisible")},l=a;$traceurRuntime.createClass(a,{},{},s),window.WalkontableDebugOverlay=a},{"./../../../../dom.js":27,"./_base.js":11}],14:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableLeftOverlay:{get:function(){return a}},__esModule:{value:!0}});var n,r,i=(n=e("./../../../../dom.js"),n&&n.__esModule&&n||{"default":n}),s=(r=e("./_base.js"),r&&r.__esModule&&r||{"default":r}).WalkontableOverlay,a=function(e){$traceurRuntime.superConstructor(l).call(this,e),this.clone=this.makeClone(s.CLONE_LEFT)},l=a;$traceurRuntime.createClass(a,{shouldBeRendered:function(){return this.wot.getSetting("fixedColumnsLeft")||this.wot.getSetting("rowHeaders").length?!0:!1},resetFixedPosition:function(){if(this.needFullRender&&this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=0;if(this.trimmingContainer===window){var o,n,r=this.wot.wtTable.hider.getBoundingClientRect(),s=Math.ceil(r.left),a=Math.ceil(r.right);n=this.wot.wtTable.hider.style.top,n=""===n?0:n,o=0>s&&a-e.offsetWidth>0?-s:0,t=o,o+="px",i.setOverlayPosition(e,o,n)}else t=this.getScrollPosition();this.adjustHeaderBordersPosition(t)}},setScrollPosition:function(e){this.mainTableScrollableElement===window?window.scrollTo(e,i.getWindowScrollTop()):this.mainTableScrollableElement.scrollLeft=e},onScroll:function(){this.wot.getSetting("onScrollHorizontally")},sumCellSizes:function(e,t){for(var o=0,n=this.wot.wtSettings.defaultColumnWidth;t>e;)o+=this.wot.wtTable.getStretchedColumnWidth(e)||n,e++;return o},adjustElementsSize:function(){var e=void 0!==arguments[0]?arguments[0]:!1;(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildsSize(),e||(this.isElementSizesAdjusted=!0))},adjustRootElementSize:function(){var e,t=this.wot.wtTable.holder,o=t.clientHeight!==t.offsetHeight?i.getScrollbarWidth():0,n=this.clone.wtTable.holder.parentNode,r=n.style;this.trimmingContainer!==window&&(r.height=this.wot.wtViewport.getWorkspaceHeight()-o+"px"),this.clone.wtTable.holder.style.height=r.height,e=i.outerWidth(this.clone.wtTable.TABLE),r.width=(0===e?e:e+4)+"px"},adjustRootChildsSize:function(){var e=i.getScrollbarWidth();this.clone.wtTable.hider.style.height=this.hider.style.height,this.clone.wtTable.holder.style.height=this.clone.wtTable.holder.parentNode.style.height,0===e&&(e=30),this.clone.wtTable.holder.style.width=parseInt(this.clone.wtTable.holder.parentNode.style.width,10)+e+"px"},applyToDOM:function(){var e=this.wot.getSetting("totalColumns");if(this.isElementSizesAdjusted||this.adjustElementsSize(),"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition)this.spreader.style.left=this.wot.wtViewport.columnsRenderCalculator.startPosition+"px";else{if(0!==e)throw new Error("Incorrect value of the columnsRenderCalculator");this.spreader.style.left="0"}this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()},syncOverlayOffset:function(){"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.top=this.wot.wtViewport.rowsRenderCalculator.startPosition+"px":this.clone.wtTable.spreader.style.top=""},scrollTo:function(e,t){var o=this.getTableParentOffset(),n=this.wot.cloneSource?this.wot.cloneSource:this.wot,r=n.wtTable.holder,s=0;t&&r.offsetWidth!==r.clientWidth&&(s=i.getScrollbarWidth()),t?(o+=this.sumCellSizes(0,e+1),o-=this.wot.wtViewport.getViewportWidth()):o+=this.sumCellSizes(this.wot.getSetting("fixedColumnsLeft"),e),o+=s,this.setScrollPosition(o)},getTableParentOffset:function(){return this.trimmingContainer===window?this.wot.wtTable.holderOffset.left:0},getScrollPosition:function(){return i.getScrollLeft(this.mainTableScrollableElement)},adjustHeaderBordersPosition:function(e){if(0===this.wot.getSetting("fixedColumnsLeft")&&this.wot.getSetting("rowHeaders").length>0){var t=this.wot.wtTable.holder.parentNode,o=i.hasClass(t,"innerBorderLeft");e?i.addClass(t,"innerBorderLeft"):i.removeClass(t,"innerBorderLeft"),(!o&&e||o&&!e)&&this.wot.wtOverlays.adjustElementsSize()}}},{},s),window.WalkontableLeftOverlay=a},{"./../../../../dom.js":27,"./_base.js":11}],15:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableTopOverlay:{get:function(){return a}},__esModule:{value:!0}});var n,r,i=(n=e("./../../../../dom.js"),n&&n.__esModule&&n||{"default":n}),s=(r=e("./_base.js"),r&&r.__esModule&&r||{"default":r}).WalkontableOverlay,a=function(e){$traceurRuntime.superConstructor(l).call(this,e),this.clone=this.makeClone(s.CLONE_TOP)},l=a;$traceurRuntime.createClass(a,{shouldBeRendered:function(){return this.wot.getSetting("fixedRowsTop")||this.wot.getSetting("columnHeaders").length?!0:!1},resetFixedPosition:function(){if(this.needFullRender&&this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=0;if(this.wot.wtOverlays.leftOverlay.trimmingContainer===window){var o,n,r=this.wot.wtTable.hider.getBoundingClientRect(),s=Math.ceil(r.top),a=Math.ceil(r.bottom);o=this.wot.wtTable.hider.style.left,o=""===o?0:o,n=0>s&&a-e.offsetHeight>0?-s:0,t=n,n+="px",i.setOverlayPosition(e,o,n)}else t=this.getScrollPosition();this.adjustHeaderBordersPosition(t)}},setScrollPosition:function(e){this.mainTableScrollableElement===window?window.scrollTo(i.getWindowScrollLeft(),e):this.mainTableScrollableElement.scrollTop=e},onScroll:function(){this.wot.getSetting("onScrollVertically")},sumCellSizes:function(e,t){for(var o=0,n=this.wot.wtSettings.settings.defaultRowHeight;t>e;)o+=this.wot.wtTable.getRowHeight(e)||n,e++;return o},adjustElementsSize:function(){var e=void 0!==arguments[0]?arguments[0]:!1;(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildsSize(),e||(this.isElementSizesAdjusted=!0))},adjustRootElementSize:function(){var e,t=this.wot.wtTable.holder,o=t.clientWidth!==t.offsetWidth?i.getScrollbarWidth():0,n=this.clone.wtTable.holder.parentNode,r=n.style;this.trimmingContainer!==window&&(r.width=this.wot.wtViewport.getWorkspaceWidth()-o+"px"),this.clone.wtTable.holder.style.width=r.width,e=i.outerHeight(this.clone.wtTable.TABLE),r.height=(0===e?e:e+4)+"px"},adjustRootChildsSize:function(){var e=i.getScrollbarWidth();this.clone.wtTable.hider.style.width=this.hider.style.width,this.clone.wtTable.holder.style.width=this.clone.wtTable.holder.parentNode.style.width,0===e&&(e=30),this.clone.wtTable.holder.style.height=parseInt(this.clone.wtTable.holder.parentNode.style.height,10)+e+"px"},applyToDOM:function(){var e=this.wot.getSetting("totalRows");if(this.isElementSizesAdjusted||this.adjustElementsSize(),"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=this.wot.wtViewport.rowsRenderCalculator.startPosition+"px";else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()},syncOverlayOffset:function(){"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.left=this.wot.wtViewport.columnsRenderCalculator.startPosition+"px":this.clone.wtTable.spreader.style.left=""},scrollTo:function(e,t){var o=this.getTableParentOffset(),n=this.wot.cloneSource?this.wot.cloneSource:this.wot,r=n.wtTable.holder,s=0;t&&r.offsetHeight!==r.clientHeight&&(s=i.getScrollbarWidth()),t?(o+=this.sumCellSizes(0,e+1),o-=this.wot.wtViewport.getViewportHeight(),o+=1):o+=this.sumCellSizes(this.wot.getSetting("fixedRowsTop"),e),o+=s,this.setScrollPosition(o)},getTableParentOffset:function(){return this.mainTableScrollableElement===window?this.wot.wtTable.holderOffset.top:0},getScrollPosition:function(){return i.getScrollTop(this.mainTableScrollableElement)},adjustHeaderBordersPosition:function(e){if(0===this.wot.getSetting("fixedRowsTop")&&this.wot.getSetting("columnHeaders").length>0){var t=this.wot.wtTable.holder.parentNode,o=i.hasClass(t,"innerBorderTop");e?i.addClass(t,"innerBorderTop"):i.removeClass(t,"innerBorderTop"),(!o&&e||o&&!e)&&this.wot.wtOverlays.adjustElementsSize()}if(0===this.wot.getSetting("rowHeaders").length){var n=this.clone.wtTable.THEAD.querySelector("th:nth-of-type(2)");n&&(n.style["border-left-width"]=0)}}},{},s),window.WalkontableTopOverlay=a},{"./../../../../dom.js":27,"./_base.js":11}],16:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableOverlays:{get:function(){return p}},__esModule:{value:!0}});var n,r,i,s,a,l,u=(n=e("./../../../dom.js"),n&&n.__esModule&&n||{"default":n}),c=(r=e("./../../../eventManager.js"),r&&r.__esModule&&r||{"default":r}).EventManager,d=(i=e("./overlay/corner.js"),i&&i.__esModule&&i||{"default":i}).WalkontableCornerOverlay,h=(s=e("./overlay/debug.js"),s&&s.__esModule&&s||{"default":s}).WalkontableDebugOverlay,f=(a=e("./overlay/left.js"),a&&a.__esModule&&a||{"default":a}).WalkontableLeftOverlay,g=(l=e("./overlay/top.js"),l&&l.__esModule&&l||{"default":l}).WalkontableTopOverlay,p=function(e){this.wot=e,this.instance=this.wot,this.eventManager=new c(this.wot),this.wot.update("scrollbarWidth",u.getScrollbarWidth()),this.wot.update("scrollbarHeight",u.getScrollbarWidth()),this.mainTableScrollableElement=u.getScrollableElement(this.wot.wtTable.TABLE),this.topOverlay=new g(this.wot),this.leftOverlay=new f(this.wot),this.topOverlay.needFullRender&&this.leftOverlay.needFullRender&&(this.topLeftCornerOverlay=new d(this.wot)),this.wot.getSetting("debug")&&(this.debug=new h(this.wot)),this.destroyed=!1,this.keyPressed=!1,this.spreaderLastSize={width:null,height:null},this.overlayScrollPositions={master:{top:0,left:0},top:{top:null,left:0},left:{top:0,left:null}},this.registerListeners()};$traceurRuntime.createClass(p,{refreshAll:function(){if(this.wot.drawn){if(!this.wot.wtTable.holder.parentNode)return void this.destroy();this.wot.draw(!0),this.topOverlay.onScroll(),this.leftOverlay.onScroll()}},registerListeners:function(){var e=this;this.eventManager.addEventListener(document.documentElement,"keydown",function(){return e.onKeyDown()}),this.eventManager.addEventListener(document.documentElement,"keyup",function(){return e.onKeyUp()}),this.eventManager.addEventListener(this.mainTableScrollableElement,"scroll",function(t){return e.onTableScroll(t)}),this.topOverlay.needFullRender&&(this.eventManager.addEventListener(this.topOverlay.clone.wtTable.holder,"scroll",function(t){return e.onTableScroll(t)}),this.eventManager.addEventListener(this.topOverlay.clone.wtTable.holder,"wheel",function(t){return e.onTableScroll(t)})),this.leftOverlay.needFullRender&&(this.eventManager.addEventListener(this.leftOverlay.clone.wtTable.holder,"scroll",function(t){return e.onTableScroll(t)}),this.eventManager.addEventListener(this.leftOverlay.clone.wtTable.holder,"wheel",function(t){return e.onTableScroll(t)})),this.topOverlay.trimmingContainer!==window&&this.leftOverlay.trimmingContainer!==window&&this.eventManager.addEventListener(window,"wheel",function(t){var o,n=t.wheelDeltaY||t.deltaY,r=t.wheelDeltaX||t.deltaX;e.topOverlay.clone.wtTable.holder.contains(t.realTarget)?o="top":e.leftOverlay.clone.wtTable.holder.contains(t.realTarget)&&(o="left"),"top"==o&&0!==n?t.preventDefault():"left"==o&&0!==r&&t.preventDefault()})},onTableScroll:function(e){Handsontable.mobileBrowser||(!this.keyPressed||this.mainTableScrollableElement===window||e.target.contains(this.mainTableScrollableElement))&&("scroll"===e.type?this.syncScrollPositions(e):this.translateMouseWheelToScroll(e))},onKeyDown:function(){this.keyPressed=!0},onKeyUp:function(){this.keyPressed=!1},translateMouseWheelToScroll:function(e){for(var t,o=this.topOverlay.clone.wtTable.holder,n=this.leftOverlay.clone.wtTable.holder,r={type:"wheel"},i=e.target,s=e.wheelDeltaY||-1*e.deltaY,a=e.wheelDeltaX||-1*e.deltaX;i!=document&&null!=i;){if(i.className.indexOf("wtHolder")>-1){t=i;break}i=i.parentNode}return r.target=t,t==o?this.syncScrollPositions(r,-.2*s):t==n&&this.syncScrollPositions(r,-.2*a),!1},syncScrollPositions:function(e){var t=void 0!==arguments[1]?arguments[1]:null;if(!this.destroyed){if(0===arguments.length)return void this.syncScrollWithMaster();var o,n,r=this.mainTableScrollableElement,i=e.target,s=0,a=!1;this.topOverlay.needFullRender&&(o=this.topOverlay.clone.wtTable.holder),this.leftOverlay.needFullRender&&(n=this.leftOverlay.clone.wtTable.holder),i===document&&(i=window),i===r?(s=u.getScrollLeft(i),this.overlayScrollPositions.master.left!==s&&(this.overlayScrollPositions.master.left=s,a=!0,o&&(o.scrollLeft=s)),s=u.getScrollTop(i),this.overlayScrollPositions.master.top!==s&&(this.overlayScrollPositions.master.top=s,a=!0,n&&(n.scrollTop=s))):i===o?(s=u.getScrollLeft(i),this.overlayScrollPositions.top.left!==s&&(this.overlayScrollPositions.top.left=s,a=!0,r.scrollLeft=s),null!==t&&(a=!0,r.scrollTop+=t)):i===n&&(s=u.getScrollTop(i),this.overlayScrollPositions.left.top!==s&&(this.overlayScrollPositions.left.top=s,a=!0,r.scrollTop=s),null!==t&&(a=!0,r.scrollLeft+=t)),!this.keyPressed&&a&&"scroll"===e.type&&this.refreshAll()}},syncScrollWithMaster:function(){var e=this.topOverlay.mainTableScrollableElement;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=e.scrollLeft),this.leftOverlay.needFullRender&&(this.leftOverlay.clone.wtTable.holder.scrollTop=e.scrollTop)},destroy:function(){this.eventManager.clear(),this.topOverlay.destroy(),this.leftOverlay.destroy(),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.destroy(),this.debug&&this.debug.destroy(),this.destroyed=!0},refresh:function(){var e=void 0!==arguments[0]?arguments[0]:!1;if(this.topOverlay.isElementSizesAdjusted&&this.leftOverlay.isElementSizesAdjusted){var t=this.wot.wtTable.wtRootElement.parentNode||this.wot.wtTable.wtRootElement,o=t.clientWidth,n=t.clientHeight;(o!==this.spreaderLastSize.width||n!==this.spreaderLastSize.height)&&(this.spreaderLastSize.width=o,this.spreaderLastSize.height=n,this.adjustElementsSize())}this.leftOverlay.refresh(e),this.topOverlay.refresh(e),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.refresh(e),this.debug&&this.debug.refresh(e)},adjustElementsSize:function(){var e=void 0!==arguments[0]?arguments[0]:!1,t=this.wot.getSetting("totalColumns"),o=this.wot.getSetting("totalRows"),n=this.wot.wtViewport.getRowHeaderWidth(),r=this.wot.wtViewport.getColumnHeaderHeight(),i=this.wot.wtTable.hider.style;i.width=n+this.leftOverlay.sumCellSizes(0,t)+"px",i.height=r+this.topOverlay.sumCellSizes(0,o)+1+"px",this.topOverlay.adjustElementsSize(e),this.leftOverlay.adjustElementsSize(e)},applyToDOM:function(){this.topOverlay.isElementSizesAdjusted&&this.leftOverlay.isElementSizesAdjusted||this.adjustElementsSize(),this.topOverlay.applyToDOM(),this.leftOverlay.applyToDOM()}},{}),window.WalkontableOverlays=p},{"./../../../dom.js":27,"./../../../eventManager.js":41,"./overlay/corner.js":12,"./overlay/debug.js":13,"./overlay/left.js":14,"./overlay/top.js":15}],17:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableScroll:{get:function(){return n}},__esModule:{value:!0}});var n=function(e){this.wot=e,this.instance=e};$traceurRuntime.createClass(n,{scrollViewport:function(e){if(this.wot.drawn){var t=this.wot.getSetting("totalRows"),o=this.wot.getSetting("totalColumns");if(e.row<0||e.row>t-1)throw new Error("row "+e.row+" does not exist");if(e.col<0||e.col>o-1)throw new Error("column "+e.col+" does not exist");e.row>this.instance.wtTable.getLastVisibleRow()?this.wot.wtOverlays.topOverlay.scrollTo(e.row,!0):e.row>=this.instance.getSetting("fixedRowsTop")&&e.row<this.instance.wtTable.getFirstVisibleRow()&&this.wot.wtOverlays.topOverlay.scrollTo(e.row),e.col>this.instance.wtTable.getLastVisibleColumn()?this.wot.wtOverlays.leftOverlay.scrollTo(e.col,!0):e.col>=this.instance.getSetting("fixedColumnsLeft")&&e.col<this.instance.wtTable.getFirstVisibleColumn()&&this.wot.wtOverlays.leftOverlay.scrollTo(e.col)}}},{}),window.WalkontableScroll=n},{}],18:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableSelection:{get:function(){return d}},__esModule:{value:!0}});var n,r,i,s,a=(n=e("./../../../dom.js"),n&&n.__esModule&&n||{"default":n}),l=(r=e("./border.js"),r&&r.__esModule&&r||{"default":r}).WalkontableBorder,u=(i=e("./cell/coords.js"),i&&i.__esModule&&i||{"default":i}).WalkontableCellCoords,c=(s=e("./cell/range.js"),s&&s.__esModule&&s||{"default":s}).WalkontableCellRange,d=function(e,t){this.settings=e,this.cellRange=t||null,this.instanceBorders={}};$traceurRuntime.createClass(d,{getBorder:function(e){return this.instanceBorders[e.guid]?this.instanceBorders[e.guid]:void(this.instanceBorders[e.guid]=new l(e,this.settings))},isEmpty:function(){return null===this.cellRange},add:function(e){this.isEmpty()?this.cellRange=new c(e,e,e):this.cellRange.expand(e)},replace:function(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:function(){this.cellRange=null},getCorners:function(){var e=this.cellRange.getTopLeftCorner(),t=this.cellRange.getBottomRightCorner();return[e.row,e.col,t.row,t.col]},addClassAtCoords:function(e,t,o,n){var r=e.wtTable.getCell(new u(t,o));"object"==typeof r&&a.addClass(r,n)},draw:function(e){if(this.isEmpty()){if(this.settings.border){var t=this.getBorder(e);t&&t.disappear()}}else{for(var o,n,r,i=e.wtTable.getRenderedRowsCount(),s=e.wtTable.getRenderedColumnsCount(),l=this.getCorners(),u=0;s>u;u++)n=e.wtTable.columnFilter.renderedToSource(u),n>=l[1]&&n<=l[3]&&(r=e.wtTable.getColumnHeader(n),r&&this.settings.highlightColumnClassName&&a.addClass(r,this.settings.highlightColumnClassName));for(var c=0;i>c;c++){o=e.wtTable.rowFilter.renderedToSource(c),o>=l[0]&&o<=l[2]&&(r=e.wtTable.getRowHeader(o),r&&this.settings.highlightRowClassName&&a.addClass(r,this.settings.highlightRowClassName));for(var d=0;s>d;d++)n=e.wtTable.columnFilter.renderedToSource(d),o>=l[0]&&o<=l[2]&&n>=l[1]&&n<=l[3]?this.settings.className&&this.addClassAtCoords(e,o,n,this.settings.className):o>=l[0]&&o<=l[2]?this.settings.highlightRowClassName&&this.addClassAtCoords(e,o,n,this.settings.highlightRowClassName):n>=l[1]&&n<=l[3]&&this.settings.highlightColumnClassName&&this.addClassAtCoords(e,o,n,this.settings.highlightColumnClassName)}if(e.getSetting("onBeforeDrawBorders",l,this.settings.className),this.settings.border){var h=this.getBorder(e);h&&h.appear(l)}}}},{}),window.WalkontableSelection=d},{"./../../../dom.js":27,"./border.js":2,"./cell/coords.js":5,"./cell/range.js":6}],19:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableSettings:{get:function(){return i}},__esModule:{value:!0}});var n,r=(n=e("./../../../dom.js"),n&&n.__esModule&&n||{"default":n}),i=function(e,t){var o=this;this.wot=e,this.instance=e,this.defaults={table:void 0,debug:!1,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,data:void 0,fixedColumnsLeft:0,fixedRowsTop:0,rowHeaders:function(){return[]},columnHeaders:function(){return[]},totalRows:void 0,totalColumns:void 0,cellRenderer:function(e,t,n){var i=o.getSetting("data",e,t);r.fastInnerText(n,void 0===i||null===i?"":i)},columnWidth:function(e){},rowHeight:function(e){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown:null,onCellMouseOver:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeDrawBorders:null,onScrollVertically:null,onScrollHorizontally:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,scrollbarWidth:10,scrollbarHeight:10,renderAllRows:!1,groups:!1},this.settings={};for(var n in this.defaults)if(this.defaults.hasOwnProperty(n))if(void 0!==t[n])this.settings[n]=t[n];else{if(void 0===this.defaults[n])throw new Error('A required setting "'+n+'" was not provided');this.settings[n]=this.defaults[n]}};$traceurRuntime.createClass(i,{update:function(e,t){if(void 0===t)for(var o in e)e.hasOwnProperty(o)&&(this.settings[o]=e[o]);else this.settings[e]=t;return this.wot},getSetting:function(e,t,o,n,r){return"function"==typeof this.settings[e]?this.settings[e](t,o,n,r):void 0!==t&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]},has:function(e){return!!this.settings[e]}},{}),window.WalkontableSettings=i},{"./../../../dom.js":27}],20:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableTable:{get:function(){return R}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c,d,h,f=(n=e("./../../../dom.js"),n&&n.__esModule&&n||{"default":n}),g=(r=e("./cell/coords.js"),r&&r.__esModule&&r||{"default":r}).WalkontableCellCoords,p=((i=e("./cell/range.js"),i&&i.__esModule&&i||{"default":i}).WalkontableCellRange,(s=e("./filter/column.js"),s&&s.__esModule&&s||{"default":s}).WalkontableColumnFilter),m=(a=e("./overlay/corner.js"),a&&a.__esModule&&a||{"default":a}).WalkontableCornerOverlay,w=(l=e("./overlay/debug.js"),l&&l.__esModule&&l||{"default":l}).WalkontableDebugOverlay,v=(u=e("./overlay/left.js"),u&&u.__esModule&&u||{"default":u}).WalkontableLeftOverlay,C=(c=e("./filter/row.js"),c&&c.__esModule&&c||{"default":c}).WalkontableRowFilter,b=(d=e("./tableRenderer.js"),d&&d.__esModule&&d||{"default":d}).WalkontableTableRenderer,y=(h=e("./overlay/top.js"),h&&h.__esModule&&h||{"default":h}).WalkontableTopOverlay,R=function(e,t){this.wot=e,this.instance=this.wot,this.TABLE=t,this.TBODY=null,this.THEAD=null,this.COLGROUP=null,this.tableOffset=0,this.holderOffset=0,f.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.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.colgroupChildrenLength=this.COLGROUP.childNodes.length,this.theadChildrenLength=this.THEAD.firstChild?this.THEAD.firstChild.childNodes.length:0,this.tbodyChildrenLength=this.TBODY.childNodes.length,this.rowFilter=null,this.columnFilter=null};$traceurRuntime.createClass(R,{fixTableDomTree:function(){this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=document.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=document.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=document.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD)),this.wot.getSetting("columnHeaders").length&&!this.THEAD.childNodes.length&&this.THEAD.appendChild(document.createElement("TR"))},createSpreader:function(e){var t,o=e.parentNode;return o&&1===o.nodeType&&f.hasClass(o,"wtHolder")||(t=document.createElement("div"),t.className="wtSpreader",o&&o.insertBefore(t,e),t.appendChild(e)),t.style.position="relative",t},createHider:function(e){var t,o=e.parentNode;return o&&1===o.nodeType&&f.hasClass(o,"wtHolder")||(t=document.createElement("div"),t.className="wtHider",o&&o.insertBefore(t,e),t.appendChild(e)),t},createHolder:function(e){var t,o=e.parentNode;return o&&1===o.nodeType&&f.hasClass(o,"wtHolder")||(t=document.createElement("div"),t.style.position="relative",t.className="wtHolder",o&&o.insertBefore(t,e),this.isWorkingOnClone()||(t.parentNode.className+="ht_master handsontable"),t.appendChild(e)),t},alignOverlaysWithTrimmingContainer:function(){var e=f.getTrimmingContainer(this.wtRootElement);this.isWorkingOnClone()||(this.holder.parentNode.style.position="relative",e!==window?(this.holder.style.width=f.getStyle(e,"width"),this.holder.style.height=f.getStyle(e,"height"),this.holder.style.overflow=""):(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible"))},isWorkingOnClone:function(){return!!this.wot.cloneSource},draw:function(e){if(this.isWorkingOnClone()||(this.holderOffset=f.offset(this.holder),e=this.wot.wtViewport.createRenderCalculators(e)),e)this.isWorkingOnClone()||this.wot.wtViewport.createVisibleCalculators(),this.wot.wtOverlays&&this.wot.wtOverlays.refresh(!0);else{this.isWorkingOnClone()?this.tableOffset=this.wot.cloneSource.wtTable.tableOffset:this.tableOffset=f.offset(this.TABLE);var t;t=this.wot.cloneOverlay instanceof w||this.wot.cloneOverlay instanceof y||this.wot.cloneOverlay instanceof m?0:this.wot.wtViewport.rowsRenderCalculator.startRow;var o;o=this.wot.cloneOverlay instanceof w||this.wot.cloneOverlay instanceof v||this.wot.cloneOverlay instanceof m?0:this.wot.wtViewport.columnsRenderCalculator.startColumn,this.rowFilter=new C(t,this.wot.getSetting("totalRows"),this.wot.getSetting("columnHeaders").length),this.columnFilter=new p(o,this.wot.getSetting("totalColumns"),this.wot.getSetting("rowHeaders").length),this._doDraw(),this.alignOverlaysWithTrimmingContainer()}return this.refreshSelections(e),this.isWorkingOnClone()||(this.wot.wtOverlays.topOverlay.resetFixedPosition(),this.wot.wtOverlays.leftOverlay.resetFixedPosition(),this.wot.wtOverlays.topLeftCornerOverlay&&this.wot.wtOverlays.topLeftCornerOverlay.resetFixedPosition()),this.wot.drawn=!0,this},_doDraw:function(){var e=new b(this);e.render()},removeClassFromCells:function(e){for(var t=this.TABLE.querySelectorAll("."+e),o=0,n=t.length;n>o;o++)f.removeClass(t[o],e)},refreshSelections:function(e){if(this.wot.selections){var t=this.wot.selections.length;if(e)for(var o=0;t>o;o++)this.wot.selections[o].settings.className&&this.removeClassFromCells(this.wot.selections[o].settings.className),this.wot.selections[o].settings.highlightRowClassName&&this.removeClassFromCells(this.wot.selections[o].settings.highlightRowClassName),this.wot.selections[o].settings.highlightColumnClassName&&this.removeClassFromCells(this.wot.selections[o].settings.highlightColumnClassName);for(var n=0;t>n;n++)this.wot.selections[n].draw(this.wot,e)}},getCell:function(e){if(this.isRowBeforeRenderedRows(e.row))return-1;if(this.isRowAfterRenderedRows(e.row))return-2;var t=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e.row)];return t?t.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e.col)]:void 0},getColumnHeader:function(e){var t=void 0!==arguments[1]?arguments[1]:0,o=this.THEAD.childNodes[t];return o?o.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]:void 0},getRowHeader:function(e){if(0===this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0))return null;var t=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)];return t?t.childNodes[0]:void 0},getCoords:function(e){var t=e.parentNode,o=f.index(t);return o=t.parentNode===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(o):this.rowFilter.renderedToSource(o),new g(o,this.columnFilter.visibleRowHeadedColumnToSourceColumn(e.cellIndex))},getTrForRow:function(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]},getFirstRenderedRow:function(){return this.wot.wtViewport.rowsRenderCalculator.startRow},getFirstVisibleRow:function(){return this.wot.wtViewport.rowsVisibleCalculator.startRow},getFirstRenderedColumn:function(){return this.wot.wtViewport.columnsRenderCalculator.startColumn},getFirstVisibleColumn:function(){return this.wot.wtViewport.columnsVisibleCalculator.startColumn},getLastRenderedRow:function(){return this.wot.wtViewport.rowsRenderCalculator.endRow},getLastVisibleRow:function(){return this.wot.wtViewport.rowsVisibleCalculator.endRow},getLastRenderedColumn:function(){return this.wot.wtViewport.columnsRenderCalculator.endColumn},getLastVisibleColumn:function(){return this.wot.wtViewport.columnsVisibleCalculator.endColumn},isRowBeforeRenderedRows:function(e){return this.rowFilter.sourceToRendered(e)<0&&e>=0},isRowAfterViewport:function(e){return e>this.getLastVisibleRow()},isRowAfterRenderedRows:function(e){return e>this.getLastRenderedRow()},isColumnBeforeViewport:function(e){return this.columnFilter.sourceToRendered(e)<0&&e>=0},isColumnAfterViewport:function(e){return e>this.getLastVisibleColumn()},isLastRowFullyVisible:function(){return this.getLastVisibleRow()===this.getLastRenderedRow()},isLastColumnFullyVisible:function(){return this.getLastVisibleColumn()===this.getLastRenderedColumn},getRenderedColumnsCount:function(){return this.wot.cloneOverlay instanceof w?this.wot.getSetting("totalColumns"):this.wot.cloneOverlay instanceof v||this.wot.cloneOverlay instanceof m?this.wot.getSetting("fixedColumnsLeft"):this.wot.wtViewport.columnsRenderCalculator.count},getRenderedRowsCount:function(){return this.wot.cloneOverlay instanceof w?this.wot.getSetting("totalRows"):this.wot.cloneOverlay instanceof y||this.wot.cloneOverlay instanceof m?this.wot.getSetting("fixedRowsTop"):this.wot.wtViewport.rowsRenderCalculator.count},getVisibleRowsCount:function(){return this.wot.wtViewport.rowsVisibleCalculator.count},allRowsInViewport:function(){return this.wot.getSetting("totalRows")==this.getVisibleRowsCount()},getRowHeight:function(e){var t=this.wot.wtSettings.settings.rowHeight(e),o=this.wot.wtViewport.oversizedRows[e];return void 0!==o&&(t=t?Math.max(t,o):o),t},getColumnHeaderHeight:function(e){var t=this.wot.wtSettings.settings.defaultRowHeight,o=this.wot.wtViewport.oversizedColumnHeaders[e];return void 0!==o&&(t=t?Math.max(t,o):o),t},getVisibleColumnsCount:function(){return this.wot.wtViewport.columnsVisibleCalculator.count;
},allColumnsInViewport:function(){return this.wot.getSetting("totalColumns")==this.getVisibleColumnsCount()},getColumnWidth:function(e){var t=this.wot.wtSettings.settings.columnWidth;return"function"==typeof t?t=t(e):"object"==typeof t&&(t=t[e]),t},getStretchedColumnWidth:function(e){var t=this.getColumnWidth(e)||this.wot.wtSettings.settings.defaultColumnWidth,o=this.wot.wtViewport.columnsRenderCalculator;if(o){var n=o.getStretchedColumnWidth(e,t);n&&(t=n)}return t}},{}),window.WalkontableTable=R},{"./../../../dom.js":27,"./cell/coords.js":5,"./cell/range.js":6,"./filter/column.js":9,"./filter/row.js":10,"./overlay/corner.js":12,"./overlay/debug.js":13,"./overlay/left.js":14,"./overlay/top.js":15,"./tableRenderer.js":21}],21:[function(e,t,o){"use strict";function n(e,t){var o=document.createElement("TH");return t.insertBefore(o,e),t.removeChild(e),o}function r(e,t){var o=document.createElement("TD");return t.insertBefore(o,e),t.removeChild(e),o}Object.defineProperties(o,{WalkontableTableRenderer:{get:function(){return l}},__esModule:{value:!0}});var i,s=(i=e("./../../../dom.js"),i&&i.__esModule&&i||{"default":i}),a={},l=function(e){this.wtTable=e,this.wot=e.instance,this.instance=e.instance,this.rowFilter=e.rowFilter,this.columnFilter=e.columnFilter,this.TABLE=e.TABLE,this.THEAD=e.THEAD,this.TBODY=e.TBODY,this.COLGROUP=e.COLGROUP,this.rowHeaders=[],this.rowHeaderCount=0,this.columnHeaders=[],this.columnHeaderCount=0,this.fixedRowsTop=0};$traceurRuntime.createClass(l,{render:function(){this.wtTable.isWorkingOnClone()||this.wot.getSetting("beforeDraw",!0),this.rowHeaders=this.wot.getSetting("rowHeaders"),this.rowHeaderCount=this.rowHeaders.length,this.fixedRowsTop=this.wot.getSetting("fixedRowsTop"),this.columnHeaders=this.wot.getSetting("columnHeaders"),this.columnHeaderCount=this.columnHeaders.length;var e,t=this.wtTable.getRenderedColumnsCount(),o=this.wtTable.getRenderedRowsCount(),n=this.wot.getSetting("totalColumns"),r=this.wot.getSetting("totalRows"),i=!1;if(n>0&&(this.adjustAvailableNodes(),i=!0,this.renderColGroups(),this.renderColumnHeaders(),this.renderRows(r,o,t),this.wtTable.isWorkingOnClone()?this.adjustColumnHeaderHeights():(e=this.wot.wtViewport.getWorkspaceWidth(),this.wot.wtViewport.containerWidth=null),this.adjustColumnWidths(t)),i||this.adjustAvailableNodes(),this.removeRedundantRows(o),!this.wtTable.isWorkingOnClone()){if(this.markOversizedRows(),this.wot.wtViewport.createVisibleCalculators(),this.wot.wtOverlays.refresh(!1),this.wot.wtOverlays.applyToDOM(),e!==this.wot.wtViewport.getWorkspaceWidth()){this.wot.wtViewport.containerWidth=null;for(var s=this.wtTable.getFirstRenderedColumn(),a=this.wtTable.getLastRenderedColumn(),l=s;a>l;l++){var u=this.wtTable.getStretchedColumnWidth(l),c=this.columnFilter.sourceToRendered(l);this.COLGROUP.childNodes[c+this.rowHeaderCount].style.width=u+"px"}}this.wot.getSetting("onDraw",!0)}},removeRedundantRows:function(e){for(;this.wtTable.tbodyChildrenLength>e;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength--},renderRows:function(e,t,o){for(var n,r,i=0,s=this.rowFilter.renderedToSource(i),a=this.wtTable.isWorkingOnClone();e>s&&s>=0;){if(i>1e3)throw new Error("Security brake: Too much TRs. Please define height for your table, which will enforce scrollbars.");if(void 0!==t&&i===t)break;if(r=this.getOrCreateTrForRow(i,r),this.renderRowHeaders(s,r),this.adjustColumns(r,o+this.rowHeaderCount),n=this.renderCells(s,r,o),a||this.resetOversizedRow(s),r.firstChild){var l=this.wot.wtTable.getRowHeight(s);l?(l--,r.firstChild.style.height=l+"px"):r.firstChild.style.height=""}i++,s=this.rowFilter.renderedToSource(i)}},resetOversizedRow:function(e){this.wot.getSetting("externalRowCalculator")||this.wot.wtViewport.oversizedRows&&this.wot.wtViewport.oversizedRows[e]&&(this.wot.wtViewport.oversizedRows[e]=void 0)},markOversizedRows:function(){if(!this.wot.getSetting("externalRowCalculator")){var e,t,o,n,r,i=this.instance.wtTable.TBODY.childNodes.length,a=i*this.instance.wtSettings.settings.defaultRowHeight,l=s.innerHeight(this.instance.wtTable.TBODY)-1;if(a!==l)for(;i;)i--,o=this.instance.wtTable.rowFilter.renderedToSource(i),e=this.instance.wtTable.getRowHeight(o),n=this.instance.wtTable.getTrForRow(o),r=n.querySelector("th"),t=r?s.innerHeight(r):s.innerHeight(n)-1,(!e&&this.instance.wtSettings.settings.defaultRowHeight<t||t>e)&&(this.instance.wtViewport.oversizedRows[o]=++t)}},adjustColumnHeaderHeights:function(){for(var e=this.wot.getSetting("columnHeaders"),t=this.wot.wtTable.THEAD.childNodes,o=this.wot.wtViewport.oversizedColumnHeaders,n=0,r=e.length;r>n;n++)if(o[n]){if(0===t[n].childNodes.length)return;t[n].childNodes[0].style.height=o[n]+"px"}},markIfOversizedColumnHeader:function(e){var t,o,n,r,i=this.wot.getSetting("columnHeaders").length,a=this.wot.wtSettings.settings.defaultRowHeight;for(t=this.wot.wtTable.columnFilter.renderedToSource(e);i;)i--,o=this.wot.wtTable.getColumnHeaderHeight(i),n=this.wot.wtTable.getColumnHeader(t,i),n&&(r=s.innerHeight(n),(!o&&r>a||r>o)&&(this.wot.wtViewport.oversizedColumnHeaders[i]=r))},renderCells:function(e,t,o){for(var n,i,a=0;o>a;a++)i=this.columnFilter.renderedToSource(a),n=0===a?t.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(i)]:n.nextSibling,"TH"==n.nodeName&&(n=r(n,t)),s.hasClass(n,"hide")||(n.className=""),n.removeAttribute("style"),this.wot.wtSettings.settings.cellRenderer(e,i,n);return n},adjustColumnWidths:function(e){var t=0,o=this.wot.cloneSource?this.wot.cloneSource:this.wot,n=o.wtTable.holder;n.offsetHeight<n.scrollHeight&&(t=s.getScrollbarWidth()),this.wot.wtViewport.columnsRenderCalculator.refreshStretching(this.wot.wtViewport.getViewportWidth()-t);for(var r=0;e>r;r++){var i=this.wtTable.getStretchedColumnWidth(this.columnFilter.renderedToSource(r));this.COLGROUP.childNodes[r+this.rowHeaderCount].style.width=i+"px"}},appendToTbody:function(e){this.TBODY.appendChild(e),this.wtTable.tbodyChildrenLength++},getOrCreateTrForRow:function(e,t){var o;return e>=this.wtTable.tbodyChildrenLength?(o=this.createRow(),this.appendToTbody(o)):o=0===e?this.TBODY.firstChild:t.nextSibling,o},createRow:function(){for(var e=document.createElement("TR"),t=0;t<this.rowHeaderCount;t++)e.appendChild(document.createElement("TH"));return e},renderRowHeader:function(e,t,o){o.className="",o.removeAttribute("style"),this.rowHeaders[t](e,o,t)},renderRowHeaders:function(e,t){for(var o=t.firstChild,r=0;r<this.rowHeaderCount;r++)o?"TD"==o.nodeName&&(o=n(o,t)):(o=document.createElement("TH"),t.appendChild(o)),this.renderRowHeader(e,r,o),o=o.nextSibling},adjustAvailableNodes:function(){this.adjustColGroups(),this.adjustThead()},renderColumnHeaders:function(){var e=this.wot.getOverlayName();if(this.columnHeaderCount){for(var t=this.wtTable.getRenderedColumnsCount(),o=0;o<this.columnHeaderCount;o++)for(var n=this.getTrForColumnHeaders(o),r=-1*this.rowHeaderCount;t>r;r++){var i=this.columnFilter.renderedToSource(r);this.renderColumnHeader(o,i,n.childNodes[r+this.rowHeaderCount]),a[e]||this.wtTable.isWorkingOnClone()||this.markIfOversizedColumnHeader(r)}a[e]=!0}},adjustColGroups:function(){for(var e=this.wtTable.getRenderedColumnsCount();this.wtTable.colgroupChildrenLength<e+this.rowHeaderCount;)this.COLGROUP.appendChild(document.createElement("COL")),this.wtTable.colgroupChildrenLength++;for(;this.wtTable.colgroupChildrenLength>e+this.rowHeaderCount;)this.COLGROUP.removeChild(this.COLGROUP.lastChild),this.wtTable.colgroupChildrenLength--},adjustThead:function(){var e=this.wtTable.getRenderedColumnsCount(),t=this.THEAD.firstChild;if(this.columnHeaders.length){for(var o=0,n=this.columnHeaders.length;n>o;o++){for(t=this.THEAD.childNodes[o],t||(t=document.createElement("TR"),this.THEAD.appendChild(t)),this.theadChildrenLength=t.childNodes.length;this.theadChildrenLength<e+this.rowHeaderCount;)t.appendChild(document.createElement("TH")),this.theadChildrenLength++;for(;this.theadChildrenLength>e+this.rowHeaderCount;)t.removeChild(t.lastChild),this.theadChildrenLength--}var r=this.THEAD.childNodes.length;if(r>this.columnHeaders.length)for(var i=this.columnHeaders.length;r>i;i++)this.THEAD.removeChild(this.THEAD.lastChild)}else t&&s.empty(t)},getTrForColumnHeaders:function(e){return this.THEAD.childNodes[e]},renderColumnHeader:function(e,t,o){return o.className="",o.removeAttribute("style"),this.columnHeaders[e](t,o,e)},renderColGroups:function(){for(var e=0;e<this.wtTable.colgroupChildrenLength;e++)e<this.rowHeaderCount?s.addClass(this.COLGROUP.childNodes[e],"rowHeader"):s.removeClass(this.COLGROUP.childNodes[e],"rowHeader")},adjustColumns:function(e,t){for(var o=e.childNodes.length;t>o;){var n=document.createElement("TD");e.appendChild(n),o++}for(;o>t;)e.removeChild(e.lastChild),o--},removeRedundantColumns:function(e){for(;this.wtTable.tbodyChildrenLength>e;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength--}},{}),window.WalkontableTableRenderer=l},{"./../../../dom.js":27}],22:[function(e,t,o){"use strict";Object.defineProperties(o,{WalkontableViewport:{get:function(){return d}},__esModule:{value:!0}});var n,r,i,s,a=(n=e("./../../../dom.js"),n&&n.__esModule&&n||{"default":n}),l=(r=e("./../../../eventManager.js"),r&&r.__esModule&&r||{"default":r}).EventManager,u=(i=e("./calculator/viewportColumns.js"),i&&i.__esModule&&i||{"default":i}).WalkontableViewportColumnsCalculator,c=(s=e("./calculator/viewportRows.js"),s&&s.__esModule&&s||{"default":s}).WalkontableViewportRowsCalculator,d=function(e){var t=this;this.wot=e,this.instance=this.wot,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.eventManager=new l(this.wot),this.eventManager.addEventListener(window,"resize",function(){t.clientHeight=t.getWorkspaceHeight()})};$traceurRuntime.createClass(d,{getWorkspaceHeight:function(){var e,t=this.instance.wtOverlays.topOverlay.trimmingContainer,o=0;return t===window?o=document.documentElement.clientHeight:(e=a.outerHeight(t),o=e>0&&t.clientHeight>0?t.clientHeight:1/0),o},getWorkspaceWidth:function(){var e,t,o=this.instance.getSetting("totalColumns"),n=this.instance.wtOverlays.leftOverlay.trimmingContainer,r=this.instance.getSetting("stretchH"),i=document.documentElement.offsetWidth;return e=Handsontable.freezeOverlays?Math.min(i-this.getWorkspaceOffset().left,i):Math.min(this.getContainerFillWidth(),i-this.getWorkspaceOffset().left,i),n===window&&o>0&&this.sumColumnWidths(0,o-1)>e?document.documentElement.clientWidth:n!==window&&(t=a.getStyle(this.instance.wtOverlays.leftOverlay.trimmingContainer,"overflow"),"scroll"==t||"hidden"==t||"auto"==t)?Math.max(e,n.clientWidth):"none"!==r&&r?e:Math.max(e,a.outerWidth(this.instance.wtTable.TABLE))},hasVerticalScroll:function(){return this.getWorkspaceActualHeight()>this.getWorkspaceHeight()},hasHorizontalScroll:function(){return this.getWorkspaceActualWidth()>this.getWorkspaceWidth()},sumColumnWidths:function(e,t){for(var o=0,n=this.instance.wtSettings.defaultColumnWidth;t>e;)o+=this.wot.wtTable.getColumnWidth(e)||n,e++;return o},getContainerFillWidth:function(){if(this.containerWidth)return this.containerWidth;var e,t,o=this.instance.wtTable.holder;return t=document.createElement("DIV"),t.style.width="100%",t.style.height="1px",o.appendChild(t),e=t.offsetWidth,this.containerWidth=e,o.removeChild(t),e},getWorkspaceOffset:function(){return a.offset(this.wot.wtTable.TABLE)},getWorkspaceActualHeight:function(){return a.outerHeight(this.wot.wtTable.TABLE)},getWorkspaceActualWidth:function(){return a.outerWidth(this.wot.wtTable.TABLE)||a.outerWidth(this.wot.wtTable.TBODY)||a.outerWidth(this.wot.wtTable.THEAD)},getColumnHeaderHeight:function(){return isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=a.outerHeight(this.wot.wtTable.THEAD)),this.columnHeaderHeight},getViewportHeight:function(){var e,t=this.getWorkspaceHeight();return t===1/0?t:(e=this.getColumnHeaderHeight(),e>0&&(t-=e),t)},getRowHeaderWidth:function(){if(this.wot.cloneSource)return this.wot.cloneSource.wtViewport.getRowHeaderWidth();if(isNaN(this.rowHeaderWidth)){var e=this.instance.getSetting("rowHeaders");if(e.length){var t=this.instance.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(var o=0,n=e.length;n>o;o++)t?(this.rowHeaderWidth+=a.outerWidth(t),t=t.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0}return this.rowHeaderWidth},getViewportWidth:function(){var e,t=this.getWorkspaceWidth();return t===1/0?t:(e=this.getRowHeaderWidth(),e>0?t-e:t)},createRowsCalculator:function(){var e,t,o,n=void 0!==arguments[0]?arguments[0]:!1,r=this;if(this.rowHeaderWidth=NaN,e=this.wot.wtSettings.settings.renderAllRows?1/0:this.getViewportHeight(),t=a.getScrollTop(this.wot.wtOverlays.mainTableScrollableElement)-this.wot.wtOverlays.topOverlay.getTableParentOffset(),0>t&&(t=0),o=this.wot.getSetting("fixedRowsTop")){var i=this.wot.wtOverlays.topOverlay.sumCellSizes(0,o);t+=i,e-=i}return new c(e,t,this.wot.getSetting("totalRows"),function(e){return r.wot.wtTable.getRowHeight(e)},n?null:this.wot.wtSettings.settings.viewportRowCalculatorOverride,n)},createColumnsCalculator:function(){var e,t,o=void 0!==arguments[0]?arguments[0]:!1,n=this,r=this.getViewportWidth();if(this.columnHeaderHeight=NaN,e=this.wot.wtOverlays.leftOverlay.getScrollPosition()-this.wot.wtOverlays.topOverlay.getTableParentOffset(),0>e&&(e=0),t=this.wot.getSetting("fixedColumnsLeft")){var i=this.wot.wtOverlays.leftOverlay.sumCellSizes(0,t);e+=i,r-=i}return this.wot.wtTable.holder.clientWidth!==this.wot.wtTable.holder.offsetWidth&&(r-=a.getScrollbarWidth()),new u(r,e,this.wot.getSetting("totalColumns"),function(e){return n.wot.wtTable.getColumnWidth(e)},o?null:this.wot.wtSettings.settings.viewportColumnCalculatorOverride,o,this.wot.getSetting("stretchH"))},createRenderCalculators:function(){var e=void 0!==arguments[0]?arguments[0]:!1;if(e){var t=this.createRowsCalculator(!0),o=this.createColumnsCalculator(!0);this.areAllProposedVisibleRowsAlreadyRendered(t)&&this.areAllProposedVisibleColumnsAlreadyRendered(o)||(e=!1)}return e||(this.rowsRenderCalculator=this.createRowsCalculator(),this.columnsRenderCalculator=this.createColumnsCalculator()),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,e},createVisibleCalculators:function(){this.rowsVisibleCalculator=this.createRowsCalculator(!0),this.columnsVisibleCalculator=this.createColumnsCalculator(!0)},areAllProposedVisibleRowsAlreadyRendered:function(e){return this.rowsVisibleCalculator?e.startRow<this.rowsRenderCalculator.startRow||e.startRow===this.rowsRenderCalculator.startRow&&e.startRow>0?!1:e.endRow>this.rowsRenderCalculator.endRow||e.endRow===this.rowsRenderCalculator.endRow&&e.endRow<this.wot.getSetting("totalRows")-1?!1:!0:!1},areAllProposedVisibleColumnsAlreadyRendered:function(e){return this.columnsVisibleCalculator?e.startColumn<this.columnsRenderCalculator.startColumn||e.startColumn===this.columnsRenderCalculator.startColumn&&e.startColumn>0?!1:e.endColumn>this.columnsRenderCalculator.endColumn||e.endColumn===this.columnsRenderCalculator.endColumn&&e.endColumn<this.wot.getSetting("totalColumns")-1?!1:!0:!1}},{}),window.WalkontableViewport=d},{"./../../../dom.js":27,"./../../../eventManager.js":41,"./calculator/viewportColumns.js":3,"./calculator/viewportRows.js":4}],23:[function(e,t,o){"use strict";var n,r,i,s,a,l,u,c=Handsontable.version,d=Handsontable.buildDate;window.Handsontable=function f(e,t){var o=new f.Core(e,t||{});return o.init(),o},Handsontable.version=c,Handsontable.buildDate=d,n=e("./shims/classes.js"),n&&n.__esModule&&n||{"default":n},r=e("es6collections"),r&&r.__esModule&&r||{"default":r},Handsontable.plugins={};var h=(i=e("./pluginHooks.js"),i&&i.__esModule&&i||{"default":i}).Hooks;Handsontable.hooks||(Handsontable.hooks=new h),s=e("./core.js"),s&&s.__esModule&&s||{"default":s},a=e("./renderers/_cellDecorator.js"),a&&a.__esModule&&a||{"default":a},l=e("./cellTypes.js"),l&&l.__esModule&&l||{"default":l},u=e("./../plugins/jqueryHandsontable.js"),u&&u.__esModule&&u||{"default":u}},{"./../plugins/jqueryHandsontable.js":1,"./cellTypes.js":24,"./core.js":25,"./pluginHooks.js":44,"./renderers/_cellDecorator.js":72,"./shims/classes.js":79,es6collections:"es6collections"}],24:[function(e,t,o){"use strict";var n,r,i,s,a,l,u,c,d,h,f,g,p,m,w,v,C,b,y,R,S,E,T=(n=e("./helpers.js"),n&&n.__esModule&&n||{"default":n}),H=(r=e("./editors.js"),r&&r.__esModule&&r||{"default":r}).getEditorConstructor,k=(i=e("./renderers.js"),i&&i.__esModule&&i||{"default":i}).getRenderer;(s=e("./editors/autocompleteEditor.js"),s&&s.__esModule&&s||{"default":s}).AutocompleteEditor,(a=e("./editors/checkboxEditor.js"),a&&a.__esModule&&a||{"default":a}).CheckboxEditor,(l=e("./editors/dateEditor.js"),l&&l.__esModule&&l||{"default":l}).DateEditor,(u=e("./editors/dropdownEditor.js"),u&&u.__esModule&&u||{"default":u}).DropdownEditor,(c=e("./editors/handsontableEditor.js"),c&&c.__esModule&&c||{"default":c}).HandsontableEditor,(d=e("./editors/mobileTextEditor.js"),d&&d.__esModule&&d||{"default":d}).MobileTextEditor,(h=e("./editors/numericEditor.js"),h&&h.__esModule&&h||{"default":h}).NumericEditor,(f=e("./editors/passwordEditor.js"),f&&f.__esModule&&f||{"default":f}).PasswordEditor,(g=e("./editors/selectEditor.js"),g&&g.__esModule&&g||{"default":g}).SelectEditor,(p=e("./editors/textEditor.js"),p&&p.__esModule&&p||{"default":p}).TextEditor,(m=e("./renderers/autocompleteRenderer.js"),m&&m.__esModule&&m||{"default":m}).AutocompleteRenderer,(w=e("./renderers/checkboxRenderer.js"),w&&w.__esModule&&w||{"default":w}).CheckboxRenderer,(v=e("./renderers/htmlRenderer.js"),v&&v.__esModule&&v||{"default":v}).HtmlRenderer,(C=e("./renderers/numericRenderer.js"),C&&C.__esModule&&C||{"default":C}).NumericRenderer,(b=e("./renderers/passwordRenderer.js"),b&&b.__esModule&&b||{"default":b}).PasswordRenderer,(y=e("./renderers/textRenderer.js"),y&&y.__esModule&&y||{"default":y}).TextRenderer,(R=e("./validators/autocompleteValidator.js"),R&&R.__esModule&&R||{"default":R}).AutocompleteValidator,(S=e("./validators/dateValidator.js"),S&&S.__esModule&&S||{"default":S}).DateValidator,(E=e("./validators/numericValidator.js"),E&&E.__esModule&&E||{"default":E}).NumericValidator;Handsontable.mobileBrowser=T.isMobileBrowser(),Handsontable.AutocompleteCell={editor:H("autocomplete"),renderer:k("autocomplete"),validator:Handsontable.AutocompleteValidator},Handsontable.CheckboxCell={editor:H("checkbox"),renderer:k("checkbox")},Handsontable.TextCell={editor:H(Handsontable.mobileBrowser?"mobile":"text"),renderer:k("text")},Handsontable.NumericCell={editor:H("numeric"),renderer:k("numeric"),validator:Handsontable.NumericValidator,dataType:"number"},Handsontable.DateCell={editor:H("date"),validator:Handsontable.DateValidator,renderer:k("autocomplete")},Handsontable.HandsontableCell={editor:H("handsontable"),renderer:k("autocomplete")},Handsontable.PasswordCell={editor:H("password"),renderer:k("password"),copyable:!1},Handsontable.DropdownCell={editor:H("dropdown"),renderer:k("autocomplete"),validator:Handsontable.AutocompleteValidator},Handsontable.cellTypes={text:Handsontable.TextCell,date:Handsontable.DateCell,numeric:Handsontable.NumericCell,checkbox:Handsontable.CheckboxCell,autocomplete:Handsontable.AutocompleteCell,handsontable:Handsontable.HandsontableCell,password:Handsontable.PasswordCell,dropdown:Handsontable.DropdownCell},Handsontable.cellLookup={validator:{numeric:Handsontable.NumericValidator,autocomplete:Handsontable.AutocompleteValidator}}},{"./editors.js":29,"./editors/autocompleteEditor.js":31,"./editors/checkboxEditor.js":32,"./editors/dateEditor.js":33,"./editors/dropdownEditor.js":34,"./editors/handsontableEditor.js":35,"./editors/mobileTextEditor.js":36,"./editors/numericEditor.js":37,"./editors/passwordEditor.js":38,"./editors/selectEditor.js":39,"./editors/textEditor.js":40,"./helpers.js":42,"./renderers.js":71,"./renderers/autocompleteRenderer.js":73,"./renderers/checkboxRenderer.js":74,"./renderers/htmlRenderer.js":75,"./renderers/numericRenderer.js":76,"./renderers/passwordRenderer.js":77,"./renderers/textRenderer.js":78,"./validators/autocompleteValidator.js":83,"./validators/dateValidator.js":84,"./validators/numericValidator.js":85}],25:[function(e,t,o){"use strict";var n,r,i,s,a,l,u,c,d,h,f,g,p=(n=e("./dom.js"),n&&n.__esModule&&n||{"default":n}),m=(r=e("./helpers.js"),r&&r.__esModule&&r||{"default":r}),w=(i=e("numeral"),i&&i.__esModule&&i||{"default":i})["default"],v=(s=e("./dataMap.js"),s&&s.__esModule&&s||{"default":s}).DataMap,C=(a=e("./editorManager.js"),a&&a.__esModule&&a||{"default":a}).EditorManager,b=(l=e("./eventManager.js"),l&&l.__esModule&&l||{"default":l}).eventManager,y=(u=e("./plugins.js"),u&&u.__esModule&&u||{"default":u}).getPlugin,R=(c=e("./renderers.js"),c&&c.__esModule&&c||{"default":c}).getRenderer,S=(d=e("./tableView.js"),d&&d.__esModule&&d||{"default":d}).TableView,E=(h=e("./3rdparty/walkontable/src/cell/coords.js"),h&&h.__esModule&&h||{"default":h}).WalkontableCellCoords,T=(f=e("./3rdparty/walkontable/src/cell/range.js"),f&&f.__esModule&&f||{"default":f}).WalkontableCellRange;(g=e("./3rdparty/walkontable/src/selection.js"),g&&g.__esModule&&g||{"default":g}).WalkontableSelection;Handsontable.activeGuid=null,Handsontable.Core=function(e,t){function o(){var e=!1;return{validatorsInQueue:0,addValidatorToQueue:function(){this.validatorsInQueue++,e=!1},removeValidatorFormQueue:function(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty:function(){},checkIfQueueIsEmpty:function(){0==this.validatorsInQueue&&0==e&&(e=!0,this.onQueueEmpty())}}}function n(e,t,n){function r(){var o;e.length&&(o=Handsontable.hooks.run(k,"beforeChange",e,t),"function"==typeof o?console.warn("Your beforeChange callback returns a function. It's not supported since Handsontable 0.12.1 (and the returned function will not be executed)."):o===!1&&e.splice(0,e.length)),n()}var i=new o;i.onQueueEmpty=r;for(var s=e.length-1;s>=0;s--)if(null===e[s])e.splice(s,1);else{var a=e[s][0],l=d.propToCol(e[s][1]),u=k.runHooks("modifyCol",l),c=k.getCellMeta(a,u);if("numeric"===c.type&&"string"==typeof e[s][3]&&e[s][3].length>0&&(/^-?[\d\s]*(\.|\,)?\d*$/.test(e[s][3])||c.format)){var h=e[s][3].length;"undefined"==typeof c.language?w.language("en"):e[s][3].indexOf(".")===h-3&&-1===e[s][3].indexOf(",")?w.language("en"):w.language(c.language),w.validate(e[s][3])&&(e[s][3]=w().unformat(e[s][3]))}k.getCellValidator(c)&&(i.addValidatorToQueue(),k.validateCell(e[s][3],c,function(t,o){return function(n){if("boolean"!=typeof n)throw new Error("Validation error: result is not boolean");n===!1&&o.allowInvalid===!1&&(e.splice(t,1),o.valid=!0,--t),i.removeValidatorFormQueue()}}(s,c),t))}i.checkIfQueueIsEmpty()}function r(e,t){var o=e.length-1;if(!(0>o)){for(;o>=0;o--)if(null!==e[o]){if(null!=e[o][2]||null!=e[o][3]){if(c.settings.allowInsertRow)for(;e[o][0]>k.countRows()-1;)d.createRow();if("array"===k.dataType&&c.settings.allowInsertColumn)for(;d.propToCol(e[o][1])>k.countCols()-1;)d.createCol();d.set(e[o][0],e[o][1],e[o][3])}}else e.splice(o,1);k.forceFullRender=!0,h.adjustRowsAndCols(),Handsontable.hooks.run(k,"beforeChangeRender",e,t),f.refreshBorders(null,!0),Handsontable.hooks.run(k,"afterChange",e,t||"edit")}}function i(e,t,o){return"object"==typeof e?e:[[e,t,o]]}function s(e){if(e.hasOwnProperty("type")){var t,o={};if("object"==typeof e.type)t=e.type;else if("string"==typeof e.type&&(t=Handsontable.cellTypes[e.type],void 0===t))throw new Error('You declared cell type "'+e.type+'" as a string that is not mapped to a known object. Cell type must be an object or a string mapped to an object in Handsontable.cellTypes');for(var n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(o[n]=t[n]);return o}}function a(e){return Handsontable.hooks.run(k,"modifyRow",e)}function l(e){return Handsontable.hooks.run(k,"modifyCol",e)}function u(){throw new Error("This method cannot be called because this Handsontable instance has been destroyed")}var c,d,h,f,g,k=this,O=function(){},M=b(k);m.extend(O.prototype,H.prototype),m.extend(O.prototype,t),m.extend(O.prototype,s(t)),this.rootElement=e,this.isHotTableEnv=p.isChildOfWebComponentTable(this.rootElement),Handsontable.eventManager.isHotTableEnv=this.isHotTableEnv,this.container=document.createElement("DIV"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),this.guid="ht_"+m.randomString(),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid),c={cellSettings:[],columnSettings:[],columnsSettingConflicts:["data","width"],settings:new O,selRange:null,isPopulated:null,scrollable:null,firstRun:!0},h={alter:function(e,t,o,n,r){var i;switch(o=o||1,e){case"insert_row":if(k.getSettings().maxRows===k.countRows())return;i=d.createRow(t,o),i&&(f.isSelected()&&c.selRange.from.row>=t?(c.selRange.from.row=c.selRange.from.row+i,f.transformEnd(i,0)):f.refreshBorders());break;case"insert_col":if(i=d.createCol(t,o)){if(Array.isArray(k.getSettings().colHeaders)){var s=[t,0];s.length+=i,Array.prototype.splice.apply(k.getSettings().colHeaders,s)}f.isSelected()&&c.selRange.from.col>=t?(c.selRange.from.col=c.selRange.from.col+i,f.transformEnd(0,i)):f.refreshBorders()}break;case"remove_row":t=k.runHooks("modifyCol",t),d.removeRow(t,o),c.cellSettings.splice(t,o);var a=k.getSettings().fixedRowsTop;a>=t+1&&(k.getSettings().fixedRowsTop-=Math.min(o,a-t)),h.adjustRowsAndCols(),f.refreshBorders();break;case"remove_col":d.removeCol(t,o);for(var l=0,u=d.getAll().length;u>l;l++)l in c.cellSettings&&c.cellSettings[l].splice(t,o);var g=k.getSettings().fixedColumnsLeft;g>=t+1&&(k.getSettings().fixedColumnsLeft-=Math.min(o,g-t)),Array.isArray(k.getSettings().colHeaders)&&("undefined"==typeof t&&(t=-1),k.getSettings().colHeaders.splice(t,o)),h.adjustRowsAndCols(),f.refreshBorders();break;default:throw new Error('There is no such action "'+e+'"')}r||h.adjustRowsAndCols()},adjustRowsAndCols:function(){if(c.settings.minRows){var e=k.countRows();if(e<c.settings.minRows)for(var t=0,o=c.settings.minRows;o-e>t;t++)d.createRow(k.countRows(),1,!0)}if(c.settings.minSpareRows){var n=k.countEmptyRows(!0);if(n<c.settings.minSpareRows)for(;n<c.settings.minSpareRows&&k.countRows()<c.settings.maxRows;n++)d.createRow(k.countRows(),1,!0)}var r;if((c.settings.minCols||c.settings.minSpareCols)&&(r=k.countEmptyCols(!0)),c.settings.minCols&&!c.settings.columns&&k.countCols()<c.settings.minCols)for(;k.countCols()<c.settings.minCols;r++)d.createCol(k.countCols(),1,!0);if(c.settings.minSpareCols&&!c.settings.columns&&"array"===k.dataType&&r<c.settings.minSpareCols)for(;r<c.settings.minSpareCols&&k.countCols()<c.settings.maxCols;r++)d.createCol(k.countCols(),1,!0);var i=k.countRows(),s=k.countCols();if((0===i||0===s)&&f.deselect(),f.isSelected()){var a=!1,l=c.selRange.from.row,u=c.selRange.from.col,h=c.selRange.to.row,g=c.selRange.to.col;l>i-1?(l=i-1,a=!0,h>l&&(h=l)):h>i-1&&(h=i-1,a=!0,l>h&&(l=h)),u>s-1?(u=s-1,a=!0,g>u&&(g=u)):g>s-1&&(g=s-1,a=!0,u>g&&(u=g)),a&&k.selectCell(l,u,h,g)}k.view&&k.view.wt.wtOverlays.adjustElementsSize()},populateFromArray:function(e,t,o,n,r,i,s){var a,l,u,d,h=[],f={};if(l=t.length,0===l)return!1;var g,p,w,v;switch(r){case"shift_down":for(g=o?o.col-e.col+1:0,p=o?o.row-e.row+1:0,t=m.translateRowsToColumns(t),u=0,d=t.length,w=Math.max(d,g);w>u;u++)if(d>u){for(a=0,l=t[u].length;p-l>a;a++)t[u].push(t[u][a%l]);t[u].unshift(e.col+u,e.row,0),k.spliceCol.apply(k,t[u])}else t[u%d][0]=e.col+u,k.spliceCol.apply(k,t[u%d]);break;case"shift_right":for(g=o?o.col-e.col+1:0,p=o?o.row-e.row+1:0,a=0,l=t.length,v=Math.max(l,p);v>a;a++)if(l>a){for(u=0,d=t[a].length;g-d>u;u++)t[a].push(t[a][u%d]);t[a].unshift(e.row+a,e.col,0),k.spliceRow.apply(k,t[a])}else t[a%l][0]=e.row+a,k.spliceRow.apply(k,t[a%l]);break;case"overwrite":default:f.row=e.row,f.col=e.col;var C={row:0,col:0},b={row:o&&e?o.row-e.row+1:1,col:o&&e?o.col-e.col+1:1},y=!0;for(-1!==["up","left"].indexOf(i)?C={row:Math.ceil(b.row/l)||1,col:Math.ceil(b.col/t[0].length)||1}:-1!==["down","right"].indexOf(i)&&(C={row:1,col:1}),a=0;l>a&&!(o&&f.row>o.row||!c.settings.allowInsertRow&&f.row>k.countRows()-1||f.row>=c.settings.maxRows);a++){for(f.col=e.col,d=t[a]?t[a].length:0,u=0;d>u&&!(o&&f.col>o.col||!c.settings.allowInsertColumn&&f.col>k.countCols()-1||f.col>=c.settings.maxCols);u++){if(!k.getCellMeta(f.row,f.col).readOnly){var R,S,E,T=t[a][u],H=k.getDataAtCell(f.row,f.col),O={row:a,col:u};"autofill"===n&&(R=k.runHooks("beforeAutofillInsidePopulate",O,i,t,s,C,b),R&&(C="undefined"!=typeof R.iterators?R.iterators:C,T="undefined"!=typeof R.value?R.value:T)),null!==T&&"object"==typeof T?null===H||"object"!=typeof H?y=!1:(E=Handsontable.helper.duckSchema(H[0]||H),S=Handsontable.helper.duckSchema(T[0]||T),Handsontable.helper.isObjectEquals(E,S)?T=Handsontable.helper.deepClone(T):y=!1):null!==H&&"object"==typeof H&&(y=!1),y&&h.push([f.row,f.col,T]),y=!0}f.col++,o&&u===d-1&&(u=-1,-1!==["down","right"].indexOf(i)?C.col++:-1!==["up","left"].indexOf(i)&&C.col>1&&C.col--)}f.row++,C.col=1,o&&a===l-1&&(a=-1,-1!==["down","right"].indexOf(i)?C.row++:-1!==["up","left"].indexOf(i)&&C.row>1&&C.row--)}k.setDataAtCell(h,null,null,n||"populateFromArray")}}},this.selection=f={inProgress:!1,selectedHeader:{cols:!1,rows:!1},setSelectedHeaders:function(e,t){k.selection.selectedHeader.rows=e,k.selection.selectedHeader.cols=t},begin:function(){k.selection.inProgress=!0},finish:function(){var e=k.getSelected();Handsontable.hooks.run(k,"afterSelectionEnd",e[0],e[1],e[2],e[3]),Handsontable.hooks.run(k,"afterSelectionEndByProp",e[0],k.colToProp(e[1]),e[2],k.colToProp(e[3])),k.selection.inProgress=!1},isInProgress:function(){return k.selection.inProgress},setRangeStart:function(e,t){Handsontable.hooks.run(k,"beforeSetRangeStart",e),c.selRange=new T(e,e,e),f.setRangeEnd(e,null,t)},setRangeEnd:function(e,t,o){if(null!==c.selRange){var n;Handsontable.hooks.run(k,"beforeSetRangeEnd",e),k.selection.begin(),c.selRange.to=new E(e.row,e.col),c.settings.multiSelect||(c.selRange.from=e),k.view.wt.selections.current.clear(),n=k.getCellMeta(c.selRange.highlight.row,c.selRange.highlight.col).disableVisualSelection,"string"==typeof n&&(n=[n]),(n===!1||Array.isArray(n)&&-1===n.indexOf("current"))&&k.view.wt.selections.current.add(c.selRange.highlight),k.view.wt.selections.area.clear(),(n===!1||Array.isArray(n)&&-1===n.indexOf("area"))&&f.isMultiple()&&(k.view.wt.selections.area.add(c.selRange.from),k.view.wt.selections.area.add(c.selRange.to)),(c.settings.currentRowClassName||c.settings.currentColClassName)&&(k.view.wt.selections.highlight.clear(),k.view.wt.selections.highlight.add(c.selRange.from),k.view.wt.selections.highlight.add(c.selRange.to)),Handsontable.hooks.run(k,"afterSelection",c.selRange.from.row,c.selRange.from.col,c.selRange.to.row,c.selRange.to.col),Handsontable.hooks.run(k,"afterSelectionByProp",c.selRange.from.row,d.colToProp(c.selRange.from.col),c.selRange.to.row,d.colToProp(c.selRange.to.col)),t!==!1&&k.view.mainViewIsActive()&&(c.selRange.from&&!f.isMultiple()?k.view.scrollViewport(c.selRange.from):k.view.scrollViewport(e)),f.refreshBorders(null,o)}},refreshBorders:function(e,t){t||g.destroyEditor(e),k.view.render(),f.isSelected()&&!t&&g.prepareEditor()},isMultiple:function(){var e=!(c.selRange.to.col===c.selRange.from.col&&c.selRange.to.row===c.selRange.from.row),t=Handsontable.hooks.run(k,"afterIsMultipleSelection",e);return e?t:void 0},transformStart:function(e,t,o,n){var r,i,s,a=new E(e,t),l=0,u=0;k.runHooks("modifyTransformStart",a),r=k.countRows(),i=k.countCols(),c.selRange.highlight.row+e>r-1?o&&c.settings.minSpareRows>0?(k.alter("insert_row",r),r=k.countRows()):c.settings.autoWrapCol&&(a.row=1-r,a.col=c.selRange.highlight.col+a.col==i-1?1-i:1):c.settings.autoWrapCol&&c.selRange.highlight.row+a.row<0&&c.selRange.highlight.col+a.col>=0&&(a.row=r-1,a.col=c.selRange.highlight.col+a.col==0?i-1:-1),c.selRange.highlight.col+a.col>i-1?o&&c.settings.minSpareCols>0?(k.alter("insert_col",i),
i=k.countCols()):c.settings.autoWrapRow&&(a.row=c.selRange.highlight.row+a.row==r-1?1-r:1,a.col=1-i):c.settings.autoWrapRow&&c.selRange.highlight.col+a.col<0&&c.selRange.highlight.row+a.row>=0&&(a.row=c.selRange.highlight.row+a.row==0?r-1:-1,a.col=i-1),s=new E(c.selRange.highlight.row+a.row,c.selRange.highlight.col+a.col),s.row<0?(l=-1,s.row=0):s.row>0&&s.row>=r&&(l=1,s.row=r-1),s.col<0?(u=-1,s.col=0):s.col>0&&s.col>=i&&(u=1,s.col=i-1),k.runHooks("afterModifyTransformStart",s,l,u),f.setRangeStart(s,n)},transformEnd:function(e,t){var o,n,r,i=new E(e,t),s=0,a=0;k.runHooks("modifyTransformEnd",i),o=k.countRows(),n=k.countCols(),r=new E(c.selRange.to.row+i.row,c.selRange.to.col+i.col),r.row<0?(s=-1,r.row=0):r.row>0&&r.row>=o&&(s=1,r.row=o-1),r.col<0?(a=-1,r.col=0):r.col>0&&r.col>=n&&(a=1,r.col=n-1),k.runHooks("afterModifyTransformEnd",r,s,a),f.setRangeEnd(r,!0)},isSelected:function(){return null!==c.selRange},inInSelection:function(e){return f.isSelected()?c.selRange.includes(e):!1},deselect:function(){f.isSelected()&&(k.selection.inProgress=!1,c.selRange=null,k.view.wt.selections.current.clear(),k.view.wt.selections.area.clear(),(c.settings.currentRowClassName||c.settings.currentColClassName)&&k.view.wt.selections.highlight.clear(),g.destroyEditor(),f.refreshBorders(),Handsontable.hooks.run(k,"afterDeselect"))},selectAll:function(){c.settings.multiSelect&&(f.setRangeStart(new E(0,0)),f.setRangeEnd(new E(k.countRows()-1,k.countCols()-1),!1))},empty:function(){if(f.isSelected()){var e,t,o=c.selRange.getTopLeftCorner(),n=c.selRange.getBottomRightCorner(),r=[];for(e=o.row;e<=n.row;e++)for(t=o.col;t<=n.col;t++)k.getCellMeta(e,t).readOnly||r.push([e,t,""]);k.setDataAtCell(r)}}},this.init=function(){Handsontable.hooks.run(k,"beforeInit"),Handsontable.mobileBrowser&&p.addClass(k.rootElement,"mobile"),this.updateSettings(c.settings,!0),this.view=new S(this),g=new C(k,c,f,d),this.forceFullRender=!0,Handsontable.hooks.run(k,"init"),this.view.render(),"object"==typeof c.firstRun&&(Handsontable.hooks.run(k,"afterChange",c.firstRun[0],c.firstRun[1]),c.firstRun=!1),Handsontable.hooks.run(k,"afterInit")},this.validateCell=function(e,t,o,n){function r(e){var n=t.col,r=t.row,i=k.getCell(r,n,!0);i&&k.view.wt.wtSettings.settings.cellRenderer(r,n,i),o(e)}var i=k.getCellValidator(t);"[object RegExp]"===Object.prototype.toString.call(i)&&(i=function(e){return function(t,o){o(e.test(t))}}(i)),"function"==typeof i?(e=Handsontable.hooks.run(k,"beforeValidate",e,t.row,t.prop,n),k._registerTimeout(setTimeout(function(){i.call(t,e,function(o){o=Handsontable.hooks.run(k,"afterValidate",o,e,t.row,t.prop,n),t.valid=o,r(o),Handsontable.hooks.run(k,"postAfterValidate",o,e,t.row,t.prop,n)})},0))):(t.valid=!0,r(t.valid))},this.setDataAtCell=function(e,t,o,s){var a,l,u,c=i(e,t,o),h=[];for(a=0,l=c.length;l>a;a++){if("object"!=typeof c[a])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof c[a][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`");u=d.colToProp(c[a][1]),h.push([c[a][0],u,d.get(c[a][0],u),c[a][2]])}s||"object"!=typeof e||(s=t),n(h,s,function(){r(h,s)})},this.setDataAtRowProp=function(e,t,o,s){var a,l,u=i(e,t,o),c=[];for(a=0,l=u.length;l>a;a++)c.push([u[a][0],u[a][1],d.get(u[a][0],u[a][1]),u[a][2]]);s||"object"!=typeof e||(s=t),n(c,s,function(){r(c,s)})},this.listen=function(){Handsontable.activeGuid=k.guid,document.activeElement&&document.activeElement!==document.body?document.activeElement.blur():document.activeElement||document.body.focus()},this.unlisten=function(){Handsontable.activeGuid=null},this.isListening=function(){return Handsontable.activeGuid===k.guid},this.destroyEditor=function(e){f.refreshBorders(e)},this.populateFromArray=function(e,t,o,n,r,i,s,a,l){var u;if("object"!=typeof o||"object"!=typeof o[0])throw new Error("populateFromArray parameter `input` must be an array of arrays");return u="number"==typeof n?new E(n,r):null,h.populateFromArray(new E(e,t),o,u,i,s,a,l)},this.spliceCol=function(e,t,o){return d.spliceCol.apply(d,arguments)},this.spliceRow=function(e,t,o){return d.spliceRow.apply(d,arguments)},this.getSelected=function(){return f.isSelected()?[c.selRange.from.row,c.selRange.from.col,c.selRange.to.row,c.selRange.to.col]:void 0},this.getSelectedRange=function(){return f.isSelected()?c.selRange:void 0},this.render=function(){k.view&&(k.renderCall=!0,k.forceFullRender=!0,f.refreshBorders(null,!0))},this.loadData=function(e){function t(){c.cellSettings.length=0}if("object"==typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error("loadData only accepts array of objects or array of arrays ("+typeof e+" given)");e=[];for(var o,n=0,r=c.settings.startRows;r>n;n++){o=[];for(var i=0,s=c.settings.startCols;s>i;i++)o.push(null);e.push(o)}}c.isPopulated=!1,O.prototype.data=e,Array.isArray(c.settings.dataSchema)||Array.isArray(e[0])?k.dataType="array":"function"==typeof c.settings.dataSchema?k.dataType="function":k.dataType="object",d=new v(k,c,O),t(),h.adjustRowsAndCols(),Handsontable.hooks.run(k,"afterLoadData"),c.firstRun?c.firstRun=[null,"loadData"]:(Handsontable.hooks.run(k,"afterChange",null,"loadData"),k.render()),c.isPopulated=!0},this.getData=function(e,t,o,n){return"undefined"==typeof e?d.getAll():d.getRange(new E(e,t),new E(o,n),d.DESTINATION_RENDERER)},this.getCopyableData=function(e,t,o,n){return d.getCopyableText(new E(e,t),new E(o,n))},this.getSchema=function(){return d.getSchema()},this.updateSettings=function(e,t){var o,n;if("undefined"!=typeof e.rows)throw new Error("'rows' setting is no longer supported. do you mean startRows, minRows or maxRows?");if("undefined"!=typeof e.cols)throw new Error("'cols' setting is no longer supported. do you mean startCols, minCols or maxCols?");for(o in e)"data"!==o&&(Handsontable.hooks.getRegistered().indexOf(o)>-1?("function"==typeof e[o]||Array.isArray(e[o]))&&k.addHook(o,e[o]):!t&&e.hasOwnProperty(o)&&(O.prototype[o]=e[o]));if(void 0===e.data&&void 0===c.settings.data?k.loadData(null):void 0!==e.data?k.loadData(e.data):void 0!==e.columns&&d.createMap(),n=k.countCols(),c.cellSettings.length=0,n>0){var r,i;for(o=0;n>o;o++)c.columnSettings[o]=m.columnFactory(O,c.columnsSettingConflicts),r=c.columnSettings[o].prototype,O.prototype.columns&&(i=O.prototype.columns[o],m.extend(r,i),m.extend(r,s(i)))}if("undefined"!=typeof e.cell)for(o in e.cell)if(e.cell.hasOwnProperty(o)){var a=e.cell[o];k.setCellMetaObject(a.row,a.col,a)}if(Handsontable.hooks.run(k,"afterCellMetaReset"),"undefined"!=typeof e.className&&(O.prototype.className&&p.removeClass(k.rootElement,O.prototype.className),e.className&&p.addClass(k.rootElement,e.className)),"undefined"!=typeof e.height){var l=e.height;"function"==typeof l&&(l=l()),k.rootElement.style.height=l+"px"}if("undefined"!=typeof e.width){var u=e.width;"function"==typeof u&&(u=u()),k.rootElement.style.width=u+"px"}l&&(k.rootElement.style.overflow="hidden"),t||Handsontable.hooks.run(k,"afterUpdateSettings"),h.adjustRowsAndCols(),k.view&&!c.firstRun&&(k.forceFullRender=!0,f.refreshBorders(null,!0))},this.getValue=function(){var e=k.getSelected();if(O.prototype.getValue){if("function"==typeof O.prototype.getValue)return O.prototype.getValue.call(k);if(e)return k.getData()[e[0]][O.prototype.getValue]}else if(e)return k.getDataAtCell(e[0],e[1])},this.getSettings=function(){return c.settings},this.clear=function(){f.selectAll(),f.empty()},this.alter=function(e,t,o,n,r){h.alter(e,t,o,n,r)},this.getCell=function(e,t,o){return k.view.getCellAtCoords(new E(e,t),o)},this.getCoords=function(e){return this.view.wt.wtTable.getCoords.call(this.view.wt.wtTable,e)},this.colToProp=function(e){return d.colToProp(e)},this.propToCol=function(e){return d.propToCol(e)},this.getDataAtCell=function(e,t){return d.get(e,d.colToProp(t))},this.getDataAtRowProp=function(e,t){return d.get(e,t)},this.getDataAtCol=function(e){var t=[];return t.concat.apply(t,d.getRange(new E(0,e),new E(c.settings.data.length-1,e),d.DESTINATION_RENDERER))},this.getDataAtProp=function(e){var t,o=[];return t=d.getRange(new E(0,d.propToCol(e)),new E(c.settings.data.length-1,d.propToCol(e)),d.DESTINATION_RENDERER),o.concat.apply(o,t)},this.getSourceDataAtCol=function(e){for(var t=[],o=c.settings.data,n=0;n<o.length;n++)t.push(o[n][e]);return t},this.getSourceDataAtRow=function(e){return c.settings.data[e]},this.getDataAtRow=function(e){var t=d.getRange(new E(e,0),new E(e,this.countCols()-1),d.DESTINATION_RENDERER);return t[0]},this.removeCellMeta=function(e,t,o){var n=k.getCellMeta(e,t);void 0!=n[o]&&delete c.cellSettings[e][t][o]},this.setCellMetaObject=function(e,t,o){if("object"==typeof o)for(var n in o)if(o.hasOwnProperty(n)){var r=o[n];this.setCellMeta(e,t,n,r)}},this.setCellMeta=function(e,t,o,n){c.cellSettings[e]||(c.cellSettings[e]=[]),c.cellSettings[e][t]||(c.cellSettings[e][t]=new c.columnSettings[t]),c.cellSettings[e][t][o]=n,Handsontable.hooks.run(k,"afterSetCellMeta",e,t,o,n)},this.getCellMeta=function(e,t){var o,n=d.colToProp(t);if(e=a(e),t=l(t),c.columnSettings[t]||(c.columnSettings[t]=m.columnFactory(O,c.columnsSettingConflicts)),c.cellSettings[e]||(c.cellSettings[e]=[]),c.cellSettings[e][t]||(c.cellSettings[e][t]=new c.columnSettings[t]),o=c.cellSettings[e][t],o.row=e,o.col=t,o.prop=n,o.instance=k,Handsontable.hooks.run(k,"beforeGetCellMeta",e,t,o),m.extend(o,s(o)),o.cells){var r=o.cells.call(o,e,t,n);r&&(m.extend(o,r),m.extend(o,s(r)))}return Handsontable.hooks.run(k,"afterGetCellMeta",e,t,o),o},this.isColumnModificationAllowed=function(){return!("object"===k.dataType||k.getSettings().columns)};var _=m.cellMethodLookupFactory("renderer");this.getCellRenderer=function(e,t){var o=_.call(this,e,t);return R(o)},this.getCellEditor=m.cellMethodLookupFactory("editor"),this.getCellValidator=m.cellMethodLookupFactory("validator"),this.validateCells=function(e){var t=new o;t.onQueueEmpty=e;for(var n=k.countRows()-1;n>=0;){for(var r=k.countCols()-1;r>=0;)t.addValidatorToQueue(),k.validateCell(k.getDataAtCell(n,r),k.getCellMeta(n,r),function(){t.removeValidatorFormQueue()},"validateCells"),r--;n--}t.checkIfQueueIsEmpty()},this.getRowHeader=function(e){if(void 0===e){for(var t=[],o=0,n=k.countRows();n>o;o++)t.push(k.getRowHeader(o));return t}return Array.isArray(c.settings.rowHeaders)&&void 0!==c.settings.rowHeaders[e]?c.settings.rowHeaders[e]:"function"==typeof c.settings.rowHeaders?c.settings.rowHeaders(e):c.settings.rowHeaders&&"string"!=typeof c.settings.rowHeaders&&"number"!=typeof c.settings.rowHeaders?e+1:c.settings.rowHeaders},this.hasRowHeaders=function(){return!!c.settings.rowHeaders},this.hasColHeaders=function(){if(void 0!==c.settings.colHeaders&&null!==c.settings.colHeaders)return!!c.settings.colHeaders;for(var e=0,t=k.countCols();t>e;e++)if(k.getColHeader(e))return!0;return!1},this.getColHeader=function(e){if(void 0===e){for(var t=[],o=0,n=k.countCols();n>o;o++)t.push(k.getColHeader(o));return t}var r=e;return e=Handsontable.hooks.run(k,"modifyCol",e),c.settings.columns&&c.settings.columns[e]&&c.settings.columns[e].title?c.settings.columns[e].title:Array.isArray(c.settings.colHeaders)&&void 0!==c.settings.colHeaders[e]?c.settings.colHeaders[e]:"function"==typeof c.settings.colHeaders?c.settings.colHeaders(e):c.settings.colHeaders&&"string"!=typeof c.settings.colHeaders&&"number"!=typeof c.settings.colHeaders?m.spreadsheetColumnLabel(r):c.settings.colHeaders},this._getColWidthFromSettings=function(e){var t=k.getCellMeta(0,e),o=t.width;if((void 0===o||o===c.settings.width)&&(o=t.colWidths),void 0!==o&&null!==o){switch(typeof o){case"object":o=o[e];break;case"function":o=o(e)}"string"==typeof o&&(o=parseInt(o,10))}return o},this.getColWidth=function(e){var t=k._getColWidthFromSettings(e);return t||(t=50),t=Handsontable.hooks.run(k,"modifyColWidth",t,e)},this._getRowHeightFromSettings=function(e){var t=c.settings.rowHeights;if(void 0!==t&&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){var t=k._getRowHeightFromSettings(e);return t=Handsontable.hooks.run(k,"modifyRowHeight",t,e)},this.countRows=function(){return c.settings.data.length},this.countCols=function(){return"object"===k.dataType||"function"===k.dataType?c.settings.columns&&c.settings.columns.length?c.settings.columns.length:d.colToPropCache.length:"array"===k.dataType?c.settings.columns&&c.settings.columns.length?c.settings.columns.length:c.settings.data&&c.settings.data[0]&&c.settings.data[0].length?c.settings.data[0].length:0:void 0},this.rowOffset=function(){return k.view.wt.wtTable.getFirstRenderedRow()},this.colOffset=function(){return k.view.wt.wtTable.getFirstRenderedColumn()},this.countRenderedRows=function(){return k.view.wt.drawn?k.view.wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return k.view.wt.drawn?k.view.wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return k.view.wt.drawn?k.view.wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return k.view.wt.drawn?k.view.wt.wtTable.getVisibleColumnsCount():-1},this.countEmptyRows=function(e){for(var t,o=k.countRows()-1,n=0;o>=0;){if(t=Handsontable.hooks.run(this,"modifyRow",o),k.isEmptyRow(t))n++;else if(e)break;o--}return n},this.countEmptyCols=function(e){if(k.countRows()<1)return 0;for(var t=k.countCols()-1,o=0;t>=0;){if(k.isEmptyCol(t))o++;else if(e)break;t--}return o},this.isEmptyRow=function(e){return c.settings.isEmptyRow.call(k,e)},this.isEmptyCol=function(e){return c.settings.isEmptyCol.call(k,e)},this.selectCell=function(e,t,o,n,r,i){var s;if(i="undefined"==typeof i||i===!0,"number"!=typeof e||0>e||e>=k.countRows())return!1;if("number"!=typeof t||0>t||t>=k.countCols())return!1;if("undefined"!=typeof o){if("number"!=typeof o||0>o||o>=k.countRows())return!1;if("number"!=typeof n||0>n||n>=k.countCols())return!1}return s=new E(e,t),c.selRange=new T(s,s,s),document.activeElement&&document.activeElement!==document.documentElement&&document.activeElement!==document.body&&document.activeElement.blur(),i&&k.listen(),"undefined"==typeof o?f.setRangeEnd(c.selRange.from,r):f.setRangeEnd(new E(o,n),r),k.selection.finish(),!0},this.selectCellByProp=function(e,t,o,n,r){return arguments[1]=d.propToCol(arguments[1]),"undefined"!=typeof arguments[3]&&(arguments[3]=d.propToCol(arguments[3])),k.selectCell.apply(k,arguments)},this.deselectCell=function(){f.deselect()},this.destroy=function(){k._clearTimeouts(),k.view&&k.view.destroy(),p.empty(k.rootElement),M.clear(),Handsontable.hooks.run(k,"afterDestroy"),Handsontable.hooks.destroy(k);for(var e in k)k.hasOwnProperty(e)&&("function"==typeof k[e]?"runHooks"!==e&&(k[e]=u):"guid"!==e&&(k[e]=null));c=null,d=null,h=null,f=null,g=null,k=null,O=null},this.getActiveEditor=function(){return g.getActiveEditor()},this.getPlugin=function(e){return y(this,e)},this.getInstance=function(){return k},this.addHook=function(e,t){Handsontable.hooks.add(e,t,k)},this.addHookOnce=function(e,t){Handsontable.hooks.once(e,t,k)},this.removeHook=function(e,t){Handsontable.hooks.remove(e,t,k)},this.runHooks=function(e,t,o,n,r,i,s){return Handsontable.hooks.run(k,e,t,o,n,r,i,s)},this.timeouts=[],this._registerTimeout=function(e){this.timeouts.push(e)},this._clearTimeouts=function(){for(var e=0,t=this.timeouts.length;t>e;e++)clearTimeout(this.timeouts[e])},this.version=Handsontable.version,Handsontable.hooks.run(k,"construct")};var H=function(){};H.prototype={data:void 0,dataSchema:void 0,width:void 0,height:void 0,startRows:5,startCols:5,rowHeaders:null,colHeaders:null,colWidths:void 0,columns:void 0,cells:void 0,cell:[],comments:!1,customBorders:!1,minRows:0,minCols:0,maxRows:1/0,maxCols:1/0,minSpareRows:0,minSpareCols:0,allowInsertRow:!0,allowInsertColumn:!0,allowRemoveRow:!0,allowRemoveColumn:!0,multiSelect:!0,fillHandle:!0,fixedRowsTop:0,fixedColumnsLeft:0,outsideClickDeselects:!0,enterBeginsEditing:!0,enterMoves:{row:1,col:0},tabMoves:{row:0,col:1},autoWrapRow:!1,autoWrapCol:!1,copyRowsLimit:1e3,copyColsLimit:1e3,pasteMode:"overwrite",persistentState:!1,currentRowClassName:void 0,currentColClassName:void 0,stretchH:"none",isEmptyRow:function(e){var t,o,n,r;for(t=0,o=this.countCols();o>t;t++)if(n=this.getDataAtCell(e,t),""!==n&&null!==n&&"undefined"!=typeof n)return"object"==typeof n?(r=this.getCellMeta(e,t),m.isObjectEquals(this.getSchema()[r.prop],n)):!1;return!0},isEmptyCol:function(e){var t,o,n;for(t=0,o=this.countRows();o>t;t++)if(n=this.getDataAtCell(t,e),""!==n&&null!==n&&"undefined"!=typeof n)return!1;return!0},observeDOMVisibility:!0,allowInvalid:!0,invalidCellClassName:"htInvalid",placeholder:!1,placeholderCellClassName:"htPlaceholder",readOnlyCellClassName:"htDimmed",renderer:void 0,commentedCellClassName:"htCommentCell",fragmentSelection:!1,readOnly:!1,search:!1,type:"text",copyable:!0,editor:void 0,autoComplete:void 0,debug:!1,wordWrap:!0,noWordWrapClassName:"htNoWrap",contextMenu:void 0,undo:void 0,columnSorting:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,mergeCells:!1,viewportRowRenderingOffset:"auto",viewportColumnRenderingOffset:"auto",groups:void 0,validator:void 0,disableVisualSelection:!1,sortIndicator:!1,manualColumnFreeze:void 0,trimWhitespace:!0,settings:void 0,source:void 0,title:void 0,checkedTemplate:void 0,uncheckedTemplate:void 0,format:void 0,className:void 0,autoColumnSize:void 0,autoRowSize:void 0},Handsontable.DefaultSettings=H},{"./3rdparty/walkontable/src/cell/coords.js":5,"./3rdparty/walkontable/src/cell/range.js":6,"./3rdparty/walkontable/src/selection.js":18,"./dataMap.js":26,"./dom.js":27,"./editorManager.js":28,"./eventManager.js":41,"./helpers.js":42,"./plugins.js":45,"./renderers.js":71,"./tableView.js":80,numeral:"numeral"}],26:[function(e,t,o){"use strict";function n(e,t,o){this.instance=e,this.priv=t,this.GridSettings=o,this.dataSource=this.instance.getSettings().data,this.dataSource[0]?this.duckSchema=this.recursiveDuckSchema(this.dataSource[0]):this.duckSchema={},this.createMap()}Object.defineProperties(o,{DataMap:{get:function(){return n}},__esModule:{value:!0}});var r,i,s,a=(r=e("./helpers.js"),r&&r.__esModule&&r||{"default":r}),l=(i=e("./multiMap.js"),i&&i.__esModule&&i||{"default":i}).MultiMap,u=(s=e("SheetClip"),s&&s.__esModule&&s||{"default":s})["default"];Handsontable.DataMap=n,n.prototype.DESTINATION_RENDERER=1,n.prototype.DESTINATION_CLIPBOARD_GENERATOR=2,n.prototype.recursiveDuckSchema=function(e){return Handsontable.helper.duckSchema(e)},n.prototype.recursiveDuckColumns=function(e,t,o){var n,r;if("undefined"==typeof t&&(t=0,o=""),"object"==typeof e&&!Array.isArray(e))for(r in e)e.hasOwnProperty(r)&&(null===e[r]?(n=o+r,this.colToPropCache.push(n),this.propToColCache.set(n,t),t++):t=this.recursiveDuckColumns(e[r],t,r+"."));return t},n.prototype.createMap=function(){var e,t,o=this.getSchema();if("undefined"==typeof o)throw new Error("trying to create `columns` definition but you didnt' provide `schema` nor `data`");this.colToPropCache=[],this.propToColCache=new l;var n=this.instance.getSettings().columns;if(n)for(e=0,t=n.length;t>e;e++)"undefined"!=typeof n[e].data&&(this.colToPropCache[e]=n[e].data,this.propToColCache.set(n[e].data,e));else this.recursiveDuckColumns(o)},n.prototype.colToProp=function(e){return e=Handsontable.hooks.run(this.instance,"modifyCol",e),this.colToPropCache&&"undefined"!=typeof this.colToPropCache[e]?this.colToPropCache[e]:e},n.prototype.propToCol=function(e){var t;return t="undefined"!=typeof this.propToColCache.get(e)?this.propToColCache.get(e):e,t=Handsontable.hooks.run(this.instance,"modifyCol",t)},n.prototype.getSchema=function(){var e=this.instance.getSettings().dataSchema;return e?"function"==typeof e?e():e:this.duckSchema},n.prototype.createRow=function(e,t,o){var n,r,i=this.instance.countCols(),s=0;t||(t=1),("number"!=typeof e||e>=this.instance.countRows())&&(e=this.instance.countRows()),r=e;for(var l=this.instance.getSettings().maxRows;t>s&&this.instance.countRows()<l;){if("array"===this.instance.dataType){n=[];for(var u=0;i>u;u++)n.push(null)}else"function"===this.instance.dataType?n=this.instance.getSettings().dataSchema(e):(n={},a.deepExtend(n,this.getSchema()));e===this.instance.countRows()?this.dataSource.push(n):this.dataSource.splice(e,0,n),s++,r++}return Handsontable.hooks.run(this.instance,"afterCreateRow",e,s,o),this.instance.forceFullRender=!0,s},n.prototype.createCol=function(e,t,o){if(!this.instance.isColumnModificationAllowed())throw new Error("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.");var n,r,i=this.instance.countRows(),s=this.dataSource,l=0;t||(t=1),r=e;for(var u=this.instance.getSettings().maxCols;t>l&&this.instance.countCols()<u;){if(n=a.columnFactory(this.GridSettings,this.priv.columnsSettingConflicts),"number"!=typeof e||e>=this.instance.countCols()){for(var c=0;i>c;c++)"undefined"==typeof s[c]&&(s[c]=[]),s[c].push(null);this.priv.columnSettings.push(n)}else{for(var c=0;i>c;c++)s[c].splice(r,0,null);this.priv.columnSettings.splice(r,0,n)}l++,r++}return Handsontable.hooks.run(this.instance,"afterCreateCol",e,l,o),this.instance.forceFullRender=!0,l},n.prototype.removeRow=function(e,t){t||(t=1),"number"!=typeof e&&(e=-t),e=(this.instance.countRows()+e)%this.instance.countRows();var o=this.physicalRowsToLogical(e,t),n=Handsontable.hooks.run(this.instance,"beforeRemoveRow",e,t);if(n!==!1){var r=this.dataSource,i=r.filter(function(e,t){return-1==o.indexOf(t)});r.length=0,Array.prototype.push.apply(r,i),Handsontable.hooks.run(this.instance,"afterRemoveRow",e,t),this.instance.forceFullRender=!0}},n.prototype.removeCol=function(e,t){if("object"===this.instance.dataType||this.instance.getSettings().columns)throw new Error("cannot remove column with object data source or columns option specified");t||(t=1),"number"!=typeof e&&(e=-t),e=(this.instance.countCols()+e)%this.instance.countCols();var o=Handsontable.hooks.run(this.instance,"beforeRemoveCol",e,t);if(o!==!1){for(var n=this.dataSource,r=0,i=this.instance.countRows();i>r;r++)n[r].splice(e,t);this.priv.columnSettings.splice(e,t),Handsontable.hooks.run(this.instance,"afterRemoveCol",e,t),this.instance.forceFullRender=!0}},n.prototype.spliceCol=function(e,t,o){var n=4<=arguments.length?[].slice.call(arguments,3):[],r=this.instance.getDataAtCol(e),i=r.slice(t,t+o),s=r.slice(t+o);a.extendArray(n,s);for(var l=0;o>l;)n.push(null),l++;return a.to2dArray(n),this.instance.populateFromArray(t,e,n,null,null,"spliceCol"),i},n.prototype.spliceRow=function(e,t,o){var n=4<=arguments.length?[].slice.call(arguments,3):[],r=this.instance.getSourceDataAtRow(e),i=r.slice(t,t+o),s=r.slice(t+o);a.extendArray(n,s);for(var l=0;o>l;)n.push(null),l++;return this.instance.populateFromArray(e,t,[n],null,null,"spliceRow"),i},n.prototype.get=function(e,t){if(e=Handsontable.hooks.run(this.instance,"modifyRow",e),"string"==typeof t&&t.indexOf(".")>-1){var o=t.split("."),n=this.dataSource[e];if(!n)return null;for(var r=0,i=o.length;i>r;r++)if(n=n[o[r]],"undefined"==typeof n)return null;return n}return"function"==typeof t?t(this.dataSource.slice(e,e+1)[0]):this.dataSource[e]?this.dataSource[e][t]:null};var c=a.cellMethodLookupFactory("copyable",!1);n.prototype.getCopyable=function(e,t){return c.call(this.instance,e,this.propToCol(t))?this.get(e,t):""},n.prototype.set=function(e,t,o,n){if(e=Handsontable.hooks.run(this.instance,"modifyRow",e,n||"datamapGet"),"string"==typeof t&&t.indexOf(".")>-1){for(var r=t.split("."),i=this.dataSource[e],s=0,a=r.length-1;a>s;s++)"undefined"==typeof i[r[s]]&&(i[r[s]]={}),i=i[r[s]];i[r[s]]=o}else"function"==typeof t?t(this.dataSource.slice(e,e+1)[0],o):this.dataSource[e][t]=o},n.prototype.physicalRowsToLogical=function(e,t){for(var o,n=this.instance.countRows(),r=(n+e)%n,i=[],s=t;n>r&&s;)o=Handsontable.hooks.run(this.instance,"modifyRow",r),i.push(o),s--,r++;return i},n.prototype.clear=function(){for(var e=0;e<this.instance.countRows();e++)for(var t=0;t<this.instance.countCols();t++)this.set(e,this.colToProp(t),"")},n.prototype.getAll=function(){return this.dataSource},n.prototype.getRange=function(e,t,o){var n,r,i,s,a,l=[],u=o===this.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get;for(r=Math.max(e.row,t.row),s=Math.max(e.col,t.col),n=Math.min(e.row,t.row);r>=n;n++){for(a=[],i=Math.min(e.col,t.col);s>=i;i++)a.push(u.call(this,n,this.colToProp(i)));l.push(a)}return l},n.prototype.getText=function(e,t){return u.stringify(this.getRange(e,t,this.DESTINATION_RENDERER))},n.prototype.getCopyableText=function(e,t){return u.stringify(this.getRange(e,t,this.DESTINATION_CLIPBOARD_GENERATOR))}},{"./helpers.js":42,"./multiMap.js":43,SheetClip:"SheetClip"}],27:[function(e,t,o){"use strict";function n(e){null!=e&&null==e.isImmediatePropagationEnabled&&(e.stopImmediatePropagation=function(){this.isImmediatePropagationEnabled=!1,this.cancelBubble=!0},e.isImmediatePropagationEnabled=!0,e.isImmediatePropagationStopped=function(){return!this.isImmediatePropagationEnabled})}function r(e,t,o){for(;null!=e&&e!==o;){if(e.nodeType===Node.ELEMENT_NODE&&(t.indexOf(e.nodeName)>-1||t.indexOf(e)>-1))return e;e=e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.host:e.parentNode}return null}function i(e,t){var o=e.parentNode,n=[];for("string"==typeof t?n=Array.prototype.slice.call(document.querySelectorAll(t),0):n.push(t);null!=o;){if(n.indexOf(o)>-1)return!0;o=o.parentNode}return!1}function s(e){function t(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName===n.toUpperCase()}var o,n="hot-table",r=!1;for(o=a(e);null!=o;){if(t(o)){r=!0;break}if(o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(r=t(o.host))break;o=o.host}o=o.parentNode}return r}function a(e){return"undefined"!=typeof Polymer&&"function"==typeof wrap?wrap(e):e}function l(e){return"undefined"!=typeof Polymer&&"function"==typeof unwrap?unwrap(e):e}function u(){var e=document.createElement("div");return e.createShadowRoot&&e.createShadowRoot.toString().match(/\[native code\]/)?!0:!1}function c(e){var t=0;if(e.previousSibling)for(;e=e.previousSibling;)++t;return t}function d(e){var t=0,o=[];if(!e||!e.length)return o;for(;e[t];)o.push(e[t]),t++;return o}function h(e,t){return X(e,t)}function f(e,t){return Y(e,t)}function g(e,t){return q(e,t)}function p(e,t){if(3===e.nodeType)t.removeChild(e);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(e.nodeName)>-1)for(var o=e.childNodes,n=o.length-1;n>=0;n--)p(o[n],e)}function m(e){for(var t;t=e.lastChild;)e.removeChild(t)}function w(e,t){oe.test(t)?e.innerHTML=t:v(e,t)}function v(e,t){var o=e.firstChild;o&&3===o.nodeType&&null===o.nextSibling?ne?o.textContent=t:o.data=t:(m(e),e.appendChild(document.createTextNode(t)))}function C(e){for(var t=e;l(t)!==document.documentElement;){if(null===t)return!1;if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(t.host){if(t.host.impl)return C(t.host.impl);if(t.host)return C(t.host);throw new Error("Lost in Web Components world")}return!1}if("none"===t.style.display)return!1;t=t.parentNode}return!0}function b(e){var t,o,n,r,i;if(r=document.documentElement,L()&&e.firstChild&&"CAPTION"===e.firstChild.nodeName)return i=e.getBoundingClientRect(),{top:i.top+(window.pageYOffset||r.scrollTop)-(r.clientTop||0),left:i.left+(window.pageXOffset||r.scrollLeft)-(r.clientLeft||0)};for(t=e.offsetLeft,o=e.offsetTop,n=e;(e=e.offsetParent)&&e!==document.body;)t+=e.offsetLeft,o+=e.offsetTop,n=e;return n&&"fixed"===n.style.position&&(t+=window.pageXOffset||r.scrollLeft,o+=window.pageYOffset||r.scrollTop),{left:t,top:o}}function y(){var e=window.scrollY;return void 0==e&&(e=document.documentElement.scrollTop),e}function R(){var e=window.scrollX;return void 0==e&&(e=document.documentElement.scrollLeft),e}function S(e){return e===window?y(e):e.scrollTop}function E(e){return e===window?R(e):e.scrollLeft}function T(e){for(var t,o,n,r=e.parentNode,i=["auto","scroll"],s="",a="",l="",u="";r&&r.style&&document.body!==r;){if(t=r.style.overflow,o=r.style.overflowX,n=r.style.overflowY,"scroll"==t||"scroll"==o||"scroll"==n)return r;if(window.getComputedStyle&&(s=window.getComputedStyle(r),a=s.getPropertyValue("overflow"),l=s.getPropertyValue("overflow-y"),u=s.getPropertyValue("overflow-x"),"scroll"===a||"scroll"===u||"scroll"===l))return r;if(r.clientHeight<=r.scrollHeight&&(-1!==i.indexOf(n)||-1!==i.indexOf(t)||-1!==i.indexOf(a)||-1!==i.indexOf(l)))return r;if(r.clientWidth<=r.scrollWidth&&(-1!==i.indexOf(o)||-1!==i.indexOf(t)||-1!==i.indexOf(a)||-1!==i.indexOf(u)))return r;r=r.parentNode}return window}function H(e){for(var t=e.parentNode;t&&t.style&&document.body!==t;){if("visible"!==t.style.overflow&&""!==t.style.overflow)return t;if(window.getComputedStyle){var o=window.getComputedStyle(t);if("visible"!==o.getPropertyValue("overflow")&&""!==o.getPropertyValue("overflow"))return t}t=t.parentNode}return window}function k(e,t){if(e){if(e!==window){var o,n=e.style[t];return""!==n&&void 0!==n?n:(o=O(e),""!==o[t]&&void 0!==o[t]?o[t]:void 0)}if("width"===t)return window.innerWidth+"px";if("height"===t)return window.innerHeight+"px"}}function O(e){return e.currentStyle||document.defaultView.getComputedStyle(e)}function M(e){return e.offsetWidth}function _(e){return L()&&e.firstChild&&"CAPTION"===e.firstChild.nodeName?e.offsetHeight+e.firstChild.offsetHeight:e.offsetHeight}function A(e){return e.clientHeight||e.innerHeight}function P(e){return e.clientWidth||e.innerWidth}function j(e,t,o){window.addEventListener?e.addEventListener(t,o,!1):e.attachEvent("on"+t,o)}function x(e,t,o){window.removeEventListener?e.removeEventListener(t,o,!1):e.detachEvent("on"+t,o)}function D(){var e=document.createElement("TABLE");e.style.borderSpacing=0,e.style.borderWidth=0,e.style.padding=0;var t=document.createElement("TBODY");e.appendChild(t),t.appendChild(document.createElement("TR")),t.firstChild.appendChild(document.createElement("TD")),t.firstChild.firstChild.innerHTML="<tr><td>t<br>t</td></tr>";var o=document.createElement("CAPTION");o.innerHTML="c<br>c<br>c<br>c",o.style.padding=0,o.style.margin=0,e.insertBefore(o,t),document.body.appendChild(e),ee=e.offsetHeight<2*e.lastChild.offsetHeight,document.body.removeChild(e)}function L(){return void 0===ee&&D(),ee}function N(e){if(e.selectionStart)return e.selectionStart;if(document.selection){e.focus();var t=document.selection.createRange();if(null==t)return 0;var o=e.createTextRange(),n=o.duplicate();return o.moveToBookmark(t.getBookmark()),n.setEndPoint("EndToStart",o),n.text.length}return 0}function W(e){if(e.selectionEnd)return e.selectionEnd;if(document.selection){var t=document.selection.createRange();if(null==t)return 0;var o=e.createTextRange();return o.text.indexOf(t.text)+t.text.length}}function I(e,t,o){if(void 0===o&&(o=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,o)}catch(n){var r=e.parentNode,i=r.style.display;r.style.display="block",e.setSelectionRange(t,o),r.style.display=i}}else if(e.createTextRange){var s=e.createTextRange();s.collapse(!0),s.moveEnd("character",o),s.moveStart("character",t),s.select()}}function B(){var e=document.createElement("p");e.style.width="100%",e.style.height="200px";var t=document.createElement("div");t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(e),(document.body||document.documentElement).appendChild(t);var o=e.offsetWidth;t.style.overflow="scroll";var n=e.offsetWidth;return o==n&&(n=t.clientWidth),(document.body||document.documentElement).removeChild(t),o-n}function V(){return void 0===te&&(te=B()),te}function F(){return F}function G(){return ie}function z(){return se}function U(e,t,o){re||ie?(e.style.top=o,e.style.left=t):se?e.style["-webkit-transform"]="translate3d("+t+","+o+",0)":e.style.transform="translate3d("+t+","+o+",0)";
}function $(e){var t;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:e.style["-webkit-transform"]&&""!==(t=e.style["-webkit-transform"])?["-webkit-transform",t]:-1}function K(e){e.transform&&""!==e.transform?e.transform="":e["-webkit-transform"]&&""!==e["-webkit-transform"]&&(e["-webkit-transform"]="")}Object.defineProperties(o,{enableImmediatePropagation:{get:function(){return n}},closest:{get:function(){return r}},isChildOf:{get:function(){return i}},isChildOfWebComponentTable:{get:function(){return s}},polymerWrap:{get:function(){return a}},polymerUnwrap:{get:function(){return l}},isWebComponentSupportedNatively:{get:function(){return u}},index:{get:function(){return c}},hasClass:{get:function(){return h}},addClass:{get:function(){return f}},removeClass:{get:function(){return g}},removeTextNodes:{get:function(){return p}},empty:{get:function(){return m}},HTML_CHARACTERS:{get:function(){return oe}},fastInnerHTML:{get:function(){return w}},fastInnerText:{get:function(){return v}},isVisible:{get:function(){return C}},offset:{get:function(){return b}},getWindowScrollTop:{get:function(){return y}},getWindowScrollLeft:{get:function(){return R}},getScrollTop:{get:function(){return S}},getScrollLeft:{get:function(){return E}},getScrollableElement:{get:function(){return T}},getTrimmingContainer:{get:function(){return H}},getStyle:{get:function(){return k}},getComputedStyle:{get:function(){return O}},outerWidth:{get:function(){return M}},outerHeight:{get:function(){return _}},innerHeight:{get:function(){return A}},innerWidth:{get:function(){return P}},addEvent:{get:function(){return j}},removeEvent:{get:function(){return x}},hasCaptionProblem:{get:function(){return L}},getCaretPosition:{get:function(){return N}},getSelectionEndPosition:{get:function(){return W}},setCaretPosition:{get:function(){return I}},getScrollbarWidth:{get:function(){return V}},isIE8:{get:function(){return F}},isIE9:{get:function(){return G}},isSafari:{get:function(){return z}},setOverlayPosition:{get:function(){return U}},getCssTransform:{get:function(){return $}},resetCssTransform:{get:function(){return K}},__esModule:{value:!0}});var X,Y,q,Q=document.documentElement.classList?!0:!1;if(Q){var J=function(){var e=document.createElement("div");return e.classList.add("test","test2"),e.classList.contains("test2")}();X=function(e,t){return""===t?!1:e.classList.contains(t)},Y=function(e,t){var o=0;if("string"==typeof t&&(t=t.split(" ")),t=d(t),J)e.classList.add.apply(e.classList,t);else for(;t&&t[o];)e.classList.add(t[o]),o++},q=function(e,t){var o=0;if("string"==typeof t&&(t=t.split(" ")),t=d(t),J)e.classList.remove.apply(e.classList,t);else for(;t&&t[o];)e.classList.remove(t[o]),o++}}else{var Z=function(e){return new RegExp("(\\s|^)"+e+"(\\s|$)")};X=function(e,t){return e.className.match(Z(t))?!0:!1},Y=function(e,t){var o=0,n=e.className;if("string"==typeof t&&(t=t.split(" ")),""===n)n=t.join(" ");else for(;t&&t[o];)Z(t[o]).test(n)||(n+=" "+t[o]),o++;e.className=n},q=function(e,t){var o=0,n=e.className;for("string"==typeof t&&(t=t.split(" "));t&&t[o];)n=n.replace(Z(t[o])," ").trim(),o++;e.className!==n&&(e.className=n)}}var ee,te,oe=/(<(.*)>|&(.*);)/,ne=document.createTextNode("test").textContent?!0:!1,re=!document.createTextNode("test").textContent,ie=!!document.documentMode,se=/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor);window.Handsontable=window.Handsontable||{},Handsontable.Dom={addClass:f,addEvent:j,closest:r,empty:m,enableImmediatePropagation:n,fastInnerHTML:w,fastInnerText:v,getCaretPosition:N,getComputedStyle:O,getCssTransform:$,getScrollableElement:T,getScrollbarWidth:V,getScrollLeft:E,getScrollTop:S,getStyle:k,getSelectionEndPosition:W,getTrimmingContainer:H,getWindowScrollLeft:R,getWindowScrollTop:y,hasCaptionProblem:L,hasClass:h,HTML_CHARACTERS:oe,index:c,innerHeight:A,innerWidth:P,isChildOf:i,isChildOfWebComponentTable:s,isIE8:F,isIE9:G,isSafari:z,isVisible:C,isWebComponentSupportedNatively:u,offset:b,outerHeight:_,outerWidth:M,polymerUnwrap:l,polymerWrap:a,removeClass:g,removeEvent:x,removeTextNodes:p,resetCssTransform:K,setCaretPosition:I,setOverlayPosition:U}},{}],28:[function(e,t,o){"use strict";function n(e,t,o){function n(e){var n="function"==typeof t.settings.enterMoves?t.settings.enterMoves(event):t.settings.enterMoves;e?o.transformStart(-n.row,-n.col):o.transformStart(n.row,n.col,!0)}function r(e){e?o.transformEnd(-1,0):o.transformStart(-1,0)}function i(e){e?o.transformEnd(1,0):o.transformStart(1,0)}function s(e){e?o.transformEnd(0,1):o.transformStart(0,1)}function a(e){e?o.transformEnd(0,-1):o.transformStart(0,-1)}function l(l){var h,f;if(e.isListening()&&(Handsontable.hooks.run(e,"beforeKeyDown",l),!v&&(d.enableImmediatePropagation(l),!l.isImmediatePropagationStopped()&&(t.lastKeyCode=l.keyCode,o.isSelected())))){if(h=(l.ctrlKey||l.metaKey)&&!l.altKey,p&&!p.isWaiting()&&!c.isMetaKey(l.keyCode)&&!h&&!m.isEditorOpened())return void m.openEditor("",l);switch(f=l.shiftKey?o.setRangeEnd:o.setRangeStart,l.keyCode){case w.A:!m.isEditorOpened()&&h&&(o.selectAll(),l.preventDefault(),c.stopPropagation(l));break;case w.ARROW_UP:m.isEditorOpened()&&!p.isWaiting()&&m.closeEditorAndSaveChanges(h),r(l.shiftKey),l.preventDefault(),c.stopPropagation(l);break;case w.ARROW_DOWN:m.isEditorOpened()&&!p.isWaiting()&&m.closeEditorAndSaveChanges(h),i(l.shiftKey),l.preventDefault(),c.stopPropagation(l);break;case w.ARROW_RIGHT:m.isEditorOpened()&&!p.isWaiting()&&m.closeEditorAndSaveChanges(h),s(l.shiftKey),l.preventDefault(),c.stopPropagation(l);break;case w.ARROW_LEFT:m.isEditorOpened()&&!p.isWaiting()&&m.closeEditorAndSaveChanges(h),a(l.shiftKey),l.preventDefault(),c.stopPropagation(l);break;case w.TAB:var g="function"==typeof t.settings.tabMoves?t.settings.tabMoves(l):t.settings.tabMoves;l.shiftKey?o.transformStart(-g.row,-g.col):o.transformStart(g.row,g.col,!0),l.preventDefault(),c.stopPropagation(l);break;case w.BACKSPACE:case w.DELETE:o.empty(l),m.prepareEditor(),l.preventDefault();break;case w.F2:m.openEditor(null,l),l.preventDefault();break;case w.ENTER:m.isEditorOpened()?(p&&p.state!==Handsontable.EditorState.WAITING&&m.closeEditorAndSaveChanges(h),n(l.shiftKey)):e.getSettings().enterBeginsEditing?m.openEditor(null,l):n(l.shiftKey),l.preventDefault(),l.stopImmediatePropagation();break;case w.ESCAPE:m.isEditorOpened()&&m.closeEditorAndRestoreOriginalValue(h),l.preventDefault();break;case w.HOME:f(l.ctrlKey||l.metaKey?new u(0,t.selRange.from.col):new u(t.selRange.from.row,0)),l.preventDefault(),c.stopPropagation(l);break;case w.END:f(l.ctrlKey||l.metaKey?new u(e.countRows()-1,t.selRange.from.col):new u(t.selRange.from.row,e.countCols()-1)),l.preventDefault(),c.stopPropagation(l);break;case w.PAGE_UP:o.transformStart(-e.countVisibleRows(),0),l.preventDefault(),c.stopPropagation(l);break;case w.PAGE_DOWN:o.transformStart(e.countVisibleRows(),0),l.preventDefault(),c.stopPropagation(l)}}}function f(){function t(e,t,o){"TD"==o.nodeName&&m.openEditor()}e.addHook("afterDocumentKeyDown",l),g.addEventListener(document.documentElement,"keydown",function(t){e.runHooks("afterDocumentKeyDown",t)}),e.view.wt.update("onCellDblClick",t),e.addHook("afterDestroy",function(){v=!0})}var g,p,m=this,w=c.keyCode,v=!1;g=h(e),this.destroyEditor=function(e){this.closeEditor(e)},this.getActiveEditor=function(){return p},this.prepareEditor=function(){var o,n,r,i,s,a,l;return p&&p.isWaiting()?void this.closeEditor(!1,!1,function(e){e&&m.prepareEditor()}):(o=t.selRange.highlight.row,n=t.selRange.highlight.col,r=e.colToProp(n),i=e.getCell(o,n),s=e.getDataAtCell(o,n),a=e.getCellMeta(o,n),l=e.getCellEditor(a),void(l?(p=Handsontable.editors.getEditor(l,e),p.prepare(o,n,r,i,s,a)):p=void 0))},this.isEditorOpened=function(){return p&&p.isOpened()},this.openEditor=function(e,t){p&&!p.cellProperties.readOnly?p.beginEditing(e,t):p&&p.cellProperties.readOnly&&t&&t.keyCode===c.keyCode.ENTER&&n()},this.closeEditor=function(e,t,o){p?p.finishEditing(e,t,o):o&&o(!1)},this.closeEditorAndSaveChanges=function(e){return this.closeEditor(!1,e)},this.closeEditorAndRestoreOriginalValue=function(e){return this.closeEditor(!0,e)},f()}Object.defineProperties(o,{EditorManager:{get:function(){return n}},__esModule:{value:!0}});var r,i,s,a,l,u=(r=e("./3rdparty/walkontable/src/cell/coords.js"),r&&r.__esModule&&r||{"default":r}).WalkontableCellCoords,c=(i=e("./helpers.js"),i&&i.__esModule&&i||{"default":i}),d=(s=e("./dom.js"),s&&s.__esModule&&s||{"default":s}),h=((a=e("./editors.js"),a&&a.__esModule&&a||{"default":a}).getEditor,(l=e("./eventManager.js"),l&&l.__esModule&&l||{"default":l}).eventManager);Handsontable.EditorManager=n},{"./3rdparty/walkontable/src/cell/coords.js":5,"./dom.js":27,"./editors.js":29,"./eventManager.js":41,"./helpers.js":42}],29:[function(e,t,o){"use strict";function n(e){var t,o;o={},t=e,this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in o||(o[e.guid]=new t(e)),o[e.guid]}}function r(e,t){var o=new n(t);"string"==typeof e&&(c[e]=o,Handsontable.editors[u.toUpperCaseFirst(e)+"Editor"]=t),d.set(t,o)}function i(e,t){var o;if("function"==typeof e)d.get(e)||r(null,e),o=d.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter ');o=c[e]}if(!o)throw Error('No editor registered under name "'+e+'"');return o.getInstance(t)}function s(e){var t;if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter ');if(t=c[e],!t)throw Error('No editor registered under name "'+e+'"');return t.getConstructor()}function a(e){return c[e]?!0:!1}Object.defineProperties(o,{registerEditor:{get:function(){return r}},getEditor:{get:function(){return i}},hasEditor:{get:function(){return a}},getEditorConstructor:{get:function(){return s}},__esModule:{value:!0}});var l,u=(l=e("./helpers.js"),l&&l.__esModule&&l||{"default":l}),c={},d=new WeakMap;Handsontable.editors=Handsontable.editors||{},Handsontable.editors.registerEditor=r,Handsontable.editors.getEditor=i},{"./helpers.js":42}],30:[function(e,t,o){"use strict";function n(e){this.instance=e,this.state=Handsontable.EditorState.VIRGIN,this._opened=!1,this._closeCallback=null,this.init()}Object.defineProperties(o,{BaseEditor:{get:function(){return n}},__esModule:{value:!0}});var r,i,s=(r=e("./../helpers.js"),r&&r.__esModule&&r||{"default":r}),a=(i=e("./../3rdparty/walkontable/src/cell/coords.js"),i&&i.__esModule&&i||{"default":i}).WalkontableCellCoords;Handsontable.editors=Handsontable.editors||{},Handsontable.editors.BaseEditor=n,Handsontable.EditorState={VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"},n.prototype._fireCallbacks=function(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)},n.prototype.init=function(){},n.prototype.getValue=function(){throw Error("Editor getValue() method unimplemented")},n.prototype.setValue=function(e){throw Error("Editor setValue() method unimplemented")},n.prototype.open=function(){throw Error("Editor open() method unimplemented")},n.prototype.close=function(){throw Error("Editor close() method unimplemented")},n.prototype.prepare=function(e,t,o,n,r,i){this.TD=n,this.row=e,this.col=t,this.prop=o,this.originalValue=r,this.cellProperties=i,this.state=Handsontable.EditorState.VIRGIN},n.prototype.extend=function(){function e(){o.apply(this,arguments)}function t(e,t){function o(){}return o.prototype=t.prototype,e.prototype=new o,e.prototype.constructor=e,e}var o=this.constructor;return t(e,o)},n.prototype.saveValue=function(e,t){var o,n;t?(o=this.instance.getSelected(),o[0]>o[2]&&(n=o[0],o[0]=o[2],o[2]=n),o[1]>o[3]&&(n=o[1],o[1]=o[3],o[3]=n),this.instance.populateFromArray(o[0],o[1],e,o[2],o[3],"edit")):this.instance.populateFromArray(this.row,this.col,e,null,null,"edit")},n.prototype.beginEditing=function(e,t){this.state==Handsontable.EditorState.VIRGIN&&(this.instance.view.scrollViewport(new a(this.row,this.col)),this.instance.view.render(),this.state=Handsontable.EditorState.EDITING,e="string"==typeof e?e:this.originalValue,this.setValue(s.stringify(e)),this.open(t),this._opened=!0,this.focus(),this.instance.view.render())},n.prototype.finishEditing=function(e,t,o){var n,r=this;if(o){var i=this._closeCallback;this._closeCallback=function(e){i&&i(e),o(e)}}if(!this.isWaiting()){if(this.state==Handsontable.EditorState.VIRGIN)return void this.instance._registerTimeout(setTimeout(function(){r._fireCallbacks(!0)},0));if(this.state==Handsontable.EditorState.EDITING){if(e)return this.cancelChanges(),void this.instance.view.render();n=this.instance.getSettings().trimWhitespace?[["string"==typeof this.getValue()?String.prototype.trim.call(this.getValue()||""):this.getValue()]]:[[this.getValue()]],this.state=Handsontable.EditorState.WAITING,this.saveValue(n,t),this.instance.getCellValidator(this.cellProperties)?this.instance.addHookOnce("postAfterValidate",function(e){r.state=Handsontable.EditorState.FINISHED,r.discardEditor(e)}):(this.state=Handsontable.EditorState.FINISHED,this.discardEditor(!0))}}},n.prototype.cancelChanges=function(){this.state=Handsontable.EditorState.FINISHED,this.discardEditor()},n.prototype.discardEditor=function(e){this.state===Handsontable.EditorState.FINISHED&&(e===!1&&this.cellProperties.allowInvalid!==!0?(this.instance.selectCell(this.row,this.col),this.focus(),this.state=Handsontable.EditorState.EDITING,this._fireCallbacks(!1)):(this.close(),this._opened=!1,this.state=Handsontable.EditorState.VIRGIN,this._fireCallbacks(!0)))},n.prototype.isOpened=function(){return this._opened},n.prototype.isWaiting=function(){return this.state===Handsontable.EditorState.WAITING}},{"./../3rdparty/walkontable/src/cell/coords.js":5,"./../helpers.js":42}],31:[function(e,t,o){"use strict";function n(e){g=!1;var t=this.getActiveEditor(),o=l.keyCode;if(l.isPrintableChar(e.keyCode)||e.keyCode===o.BACKSPACE||e.keyCode===o.DELETE||e.keyCode===o.INSERT){var n=0;if(e.keyCode===o.C&&(e.ctrlKey||e.metaKey))return;t.isOpened()||(n+=10),t.instance._registerTimeout(setTimeout(function(){t.queryChoices(t.TEXTAREA.value),g=!0},n))}}Object.defineProperties(o,{AutocompleteEditor:{get:function(){return f}},__esModule:{value:!0}});var r,i,s,a,l=(r=e("./../helpers.js"),r&&r.__esModule&&r||{"default":r}),u=(i=e("./../dom.js"),i&&i.__esModule&&i||{"default":i}),c=(s=e("./../editors.js"),s&&s.__esModule&&s||{"default":s}),d=(c.getEditorConstructor,c.registerEditor),h=(a=e("./handsontableEditor.js"),a&&a.__esModule&&a||{"default":a}).HandsontableEditor,f=h.prototype.extend();f.prototype.init=function(){h.prototype.init.apply(this,arguments),this.query=null,this.choices=[]},f.prototype.createElements=function(){h.prototype.createElements.apply(this,arguments),u.addClass(this.htContainer,"autocompleteEditor"),u.addClass(this.htContainer,-1!==window.navigator.platform.indexOf("Mac")?"htMacScroll":"")};var g=!1;f.prototype.prepare=function(){this.instance.addHook("beforeKeyDown",n),h.prototype.prepare.apply(this,arguments)},f.prototype.open=function(){h.prototype.open.apply(this,arguments);var e=this.htEditor.getInstance(),t=this,o=void 0===this.cellProperties.trimDropdown?!0:this.cellProperties.trimDropdown;this.TEXTAREA.style.visibility="visible",this.focus(),e.updateSettings({colWidths:o?[u.outerWidth(this.TEXTAREA)-2]:void 0,width:o?u.outerWidth(this.TEXTAREA)+u.getScrollbarWidth()+2:void 0,afterRenderer:function(e,o,n,r,i){var s,a,l=this.getCellMeta(o,n).filteringCaseSensitive===!0,i=Handsontable.helper.stringify(i);i&&(s=l?i.indexOf(this.query):i.toLowerCase().indexOf(t.query.toLowerCase()),-1!=s&&(a=i.substr(s,t.query.length),e.innerHTML=i.replace(a,"<strong>"+a+"</strong>")))},modifyColWidth:function(e,t){return o?e:e+15}}),this.htEditor.view.wt.wtTable.holder.parentNode.style["padding-right"]=u.getScrollbarWidth()+2+"px",g&&(g=!1),t.instance._registerTimeout(setTimeout(function(){t.queryChoices(t.TEXTAREA.value)},0))},f.prototype.close=function(){h.prototype.close.apply(this,arguments)},f.prototype.queryChoices=function(e){if(this.query=e,"function"==typeof this.cellProperties.source){var t=this;this.cellProperties.source(e,function(e){t.updateChoicesList(e)})}else if(Array.isArray(this.cellProperties.source)){var o;if(e&&this.cellProperties.filter!==!1){var n=this.cellProperties.filteringCaseSensitive===!0,r=e.toLowerCase();o=this.cellProperties.source.filter(function(t){return n?-1!=t.indexOf(e):-1!=t.toLowerCase().indexOf(r)})}else o=this.cellProperties.source;this.updateChoicesList(o)}else this.updateChoicesList([])},f.prototype.updateChoicesList=function(e){var t,o=u.getCaretPosition(this.TEXTAREA),n=u.getSelectionEndPosition(this.TEXTAREA),r=f.sortByRelevance(this.getValue(),e,this.cellProperties.filteringCaseSensitive);if(0!=this.cellProperties.filter){for(var i=[],s=0,a=r.length;a>s;s++)i.push(e[r[s]]);t=0,e=i}else t=r[0];this.choices=e,this.htEditor.loadData(l.pivot([e])),this.updateDropdownHeight(),this.cellProperties.strict===!0&&this.highlightBestMatchingChoice(t),this.instance.listen(),this.TEXTAREA.focus(),u.setCaretPosition(this.TEXTAREA,o,o!=n?n:void 0)},f.prototype.updateDropdownHeight=function(){var e=this.htEditor.getColWidth(0)+u.getScrollbarWidth()+2,t=void 0===this.cellProperties.trimDropdown?!0:this.cellProperties.trimDropdown;this.htEditor.updateSettings({height:this.getDropdownHeight(),width:t?void 0:e}),this.htEditor.view.wt.wtTable.alignOverlaysWithTrimmingContainer()},f.prototype.finishEditing=function(e){e||this.instance.removeHook("beforeKeyDown",n),h.prototype.finishEditing.apply(this,arguments)},f.prototype.highlightBestMatchingChoice=function(e){"number"==typeof e?this.htEditor.selectCell(e,0):this.htEditor.deselectCell()},f.sortByRelevance=function(e,t,o){var n,r,i,s,a,l=[],u=e.length,c=[];if(0===u){for(s=0,a=t.length;a>s;s++)c.push(s);return c}for(s=0,a=t.length;a>s;s++)n=Handsontable.helper.stringify(t[s]),r=o?n.indexOf(e):n.toLowerCase().indexOf(e.toLowerCase()),-1!=r&&(i=n.length-r-u,l.push({baseIndex:s,index:r,charsLeft:i,value:n}));for(l.sort(function(e,t){return-1===t.index?-1:-1===e.index?1:e.index<t.index?-1:t.index<e.index?1:e.index===t.index?e.charsLeft<t.charsLeft?-1:e.charsLeft>t.charsLeft?1:0:void 0}),s=0,a=l.length;a>s;s++)c.push(l[s].baseIndex);return c},f.prototype.getDropdownHeight=function(){var e=this.htEditor.getInstance().getRowHeight(0)||23;return this.choices.length>=10?10*e:this.choices.length*e+8},d("autocomplete",f)},{"./../dom.js":27,"./../editors.js":29,"./../helpers.js":42,"./handsontableEditor.js":35}],32:[function(e,t,o){"use strict";Object.defineProperties(o,{CheckboxEditor:{get:function(){return u}},__esModule:{value:!0}});var n,r,i,s=(n=e("./../editors.js"),n&&n.__esModule&&n||{"default":n}).registerEditor,a=(r=e("./_baseEditor.js"),r&&r.__esModule&&r||{"default":r}).BaseEditor,l=(i=e("./../dom.js"),i&&i.__esModule&&i||{"default":i}),u=function(){$traceurRuntime.superConstructor(c).apply(this,arguments)},c=u;$traceurRuntime.createClass(u,{beginEditing:function(){var e=this.TD.querySelector('input[type="checkbox"]');l.hasClass(e,"htBadValue")||e.click()},finishEditing:function(){},init:function(){},open:function(){},close:function(){},getValue:function(){},setValue:function(){},focus:function(){}},{},a),s("checkbox",u)},{"./../dom.js":27,"./../editors.js":29,"./_baseEditor.js":30}],33:[function(e,t,o){"use strict";Object.defineProperties(o,{DateEditor:{get:function(){return S}},__esModule:{value:!0}});var n,r,i,s,a,l,u,c=(n=e("./../helpers.js"),n&&n.__esModule&&n||{"default":n}),d=c.deepExtend,h=c.stopPropagation,f=c.isMetaKey,g=(r=e("./../dom.js"),r&&r.__esModule&&r||{"default":r}),p=g.addClass,m=g.outerHeight,w=(i=e("./../editors.js"),i&&i.__esModule&&i||{"default":i}),v=(w.getEditor,w.registerEditor),C=(s=e("./textEditor.js"),s&&s.__esModule&&s||{"default":s}).TextEditor,b=(a=e("./../eventManager.js"),a&&a.__esModule&&a||{"default":a}).eventManager,y=(l=e("moment"),l&&l.__esModule&&l||{"default":l})["default"],R=(u=e("pikaday"),u&&u.__esModule&&u||{"default":u})["default"];Handsontable.editors=Handsontable.editors||{},Handsontable.editors.DateEditor=S;var S=function(e){this.$datePicker=null,this.datePicker=null,this.datePickerStyle=null,this.defaultDateFormat="DD/MM/YYYY",this.isCellEdited=!1,this.parentDestroyed=!1,$traceurRuntime.superGet(this,E.prototype,"constructor").call(this,e)},E=S;$traceurRuntime.createClass(S,{init:function(){var e=this;if("function"!=typeof y)throw new Error("You need to include moment.js to your project.");if("function"!=typeof R)throw new Error("You need to include Pikaday to your project.");$traceurRuntime.superGet(this,E.prototype,"init").call(this),this.instance.addHook("afterDestroy",function(){e.parentDestroyed=!0,e.destroyElements()})},createElements:function(){$traceurRuntime.superGet(this,E.prototype,"createElements").call(this),this.datePicker=document.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,p(this.datePicker,"htDatepickerHolder"),document.body.appendChild(this.datePicker),this.$datePicker=new R(this.getDatePickerConfig());var e=b(this);e.addEventListener(this.datePicker,"mousedown",function(e){return h(e)}),this.hideDatepicker()},destroyElements:function(){this.$datePicker.destroy()},prepare:function(e,t,o,n,r,i){this._opened=!1,$traceurRuntime.superGet(this,E.prototype,"prepare").call(this,e,t,o,n,r,i)},open:function(){var e=void 0!==arguments[0]?arguments[0]:null;$traceurRuntime.superGet(this,E.prototype,"open").call(this),this.showDatepicker(e)},close:function(){var e=this;this._opened=!1,this.instance._registerTimeout(setTimeout(function(){e.instance.selection.refreshBorders()},0)),$traceurRuntime.superGet(this,E.prototype,"close").call(this)},finishEditing:function(){var e=void 0!==arguments[0]?arguments[0]:!1,t=void 0!==arguments[1]?arguments[1]:!1;if(e){var o=this.originalValue;void 0!==o&&this.setValue(o)}this.hideDatepicker(),$traceurRuntime.superGet(this,E.prototype,"finishEditing").call(this,e,t)},showDatepicker:function(e){this.$datePicker.config(this.getDatePickerConfig());var t,o=this.TD.getBoundingClientRect(),n=this.cellProperties.dateFormat||this.defaultDateFormat,r=this.$datePicker.config(),i=this.instance.view.isMouseDown(),s=e?f(e.keyCode):!1;this.datePickerStyle.top=window.pageYOffset+o.top+m(this.TD)+"px",this.datePickerStyle.left=window.pageXOffset+o.left+"px",this.$datePicker._onInputFocus=function(){},r.format=n,this.originalValue?(t=this.originalValue,y(t,n,!0).isValid()&&this.$datePicker.setMoment(y(t,n),!0),s||i||this.setValue("")):this.cellProperties.defaultDate?(t=this.cellProperties.defaultDate,r.defaultDate=t,y(t,n,!0).isValid()&&this.$datePicker.setMoment(y(t,n),!0),s||i||this.setValue("")):this.$datePicker.gotoToday(),this.datePickerStyle.display="block",this.$datePicker.show()},hideDatepicker:function(){this.datePickerStyle.display="none",this.$datePicker.hide()},getDatePickerConfig:function(){var e=this,t=this.TEXTAREA,o={};this.cellProperties&&this.cellProperties.datePickerConfig&&d(o,this.cellProperties.datePickerConfig);var n=o.onSelect,r=o.onClose;return o.field=t,o.trigger=t,o.container=this.datePicker,o.bound=!1,o.format=o.format||this.defaultDateFormat,o.reposition=o.reposition||!1,o.onSelect=function(t){isNaN(t.getTime())||(t=y(t).format(e.cellProperties.dateFormat||e.defaultDateFormat)),e.setValue(t),e.hideDatepicker(),n&&n()},o.onClose=function(){e.parentDestroyed||e.finishEditing(!1),r&&r()},o}},{},C),v("date",S)},{"./../dom.js":27,"./../editors.js":29,"./../eventManager.js":41,"./../helpers.js":42,"./textEditor.js":40,moment:void 0,pikaday:void 0}],34:[function(e,t,o){"use strict";Object.defineProperties(o,{DropdownEditor:{get:function(){return l}},__esModule:{value:!0}});var n,r,i=(n=e("./../editors.js"),n&&n.__esModule&&n||{"default":n}),s=(i.getEditor,i.registerEditor),a=(r=e("./autocompleteEditor.js"),r&&r.__esModule&&r||{"default":r}).AutocompleteEditor,l=function(){$traceurRuntime.superConstructor(u).apply(this,arguments)},u=l;$traceurRuntime.createClass(l,{prepare:function(e,t,o,n,r,i){$traceurRuntime.superGet(this,u.prototype,"prepare").call(this,e,t,o,n,r,i),this.cellProperties.filter=!1,this.cellProperties.strict=!0}},{},a),s("dropdown",l)},{"./../editors.js":29,"./autocompleteEditor.js":31}],35:[function(e,t,o){"use strict";Object.defineProperties(o,{HandsontableEditor:{get:function(){return h}},__esModule:{value:!0}});var n,r,i,s,a=(n=e("./../helpers.js"),n&&n.__esModule&&n||{"default":n}),l=(r=e("./../dom.js"),r&&r.__esModule&&r||{"default":r}),u=(i=e("./../editors.js"),i&&i.__esModule&&i||{"default":i}),c=(u.getEditor,u.registerEditor),d=(s=e("./textEditor.js"),s&&s.__esModule&&s||{"default":s}).TextEditor,h=d.prototype.extend();h.prototype.createElements=function(){d.prototype.createElements.apply(this,arguments);var e=document.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.htEditor=new Handsontable(e,{autoColumnSize:!1,autoRowSize:!1}),this.assignHooks()},h.prototype.prepare=function(e,t,o,n,r,i){d.prototype.prepare.apply(this,arguments);var s=this,l={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,cells:function(){return{readOnly:!0}},fillHandle:!1,afterOnCellMouseDown:function(){var e=this.getValue();void 0!==e&&s.setValue(e),s.instance.destroyEditor()}};this.cellProperties.handsontable&&a.extend(l,i.handsontable),this.htEditor&&this.htEditor.destroy(),this.htEditor=new Handsontable(this.htContainer,l)};var f=function(e){if(null!=e&&null==e.isImmediatePropagationEnabled&&(e.stopImmediatePropagation=function(){this.isImmediatePropagationEnabled=!1,this.cancelBubble=!0},e.isImmediatePropagationEnabled=!0,e.isImmediatePropagationStopped=function(){return!this.isImmediatePropagationEnabled}),!e.isImmediatePropagationStopped()){var t,o=this.getActiveEditor(),n=o.htEditor.getInstance();if(e.keyCode==a.keyCode.ARROW_DOWN)if(n.getSelected()){var r=n.getSelected()[0],i=n.countRows()-1;t=Math.min(i,r+1)}else t=0;else if(e.keyCode==a.keyCode.ARROW_UP&&n.getSelected()){var r=n.getSelected()[0];t=r-1}void 0!==t&&(0>t?n.deselectCell():n.selectCell(t,0),e.preventDefault(),e.stopImmediatePropagation(),o.instance.listen(),o.TEXTAREA.focus())}};h.prototype.open=function(){this.instance.addHook("beforeKeyDown",f),d.prototype.open.apply(this,arguments),this.htEditor.render(),this.cellProperties.strict?(this.htEditor.selectCell(0,0),this.TEXTAREA.style.visibility="hidden"):(this.htEditor.deselectCell(),this.TEXTAREA.style.visibility="visible"),l.setCaretPosition(this.TEXTAREA,0,this.TEXTAREA.value.length)},h.prototype.close=function(){this.instance.removeHook("beforeKeyDown",f),this.instance.listen(),d.prototype.close.apply(this,arguments)},h.prototype.focus=function(){this.instance.listen(),d.prototype.focus.apply(this,arguments)},h.prototype.beginEditing=function(e){var t=this.instance.getSettings().onBeginEditing;t&&t()===!1||d.prototype.beginEditing.apply(this,arguments)},h.prototype.finishEditing=function(e,t){if(this.htEditor.isListening()&&this.instance.listen(),this.htEditor.getSelected()){var o=this.htEditor.getInstance().getValue();void 0!==o&&this.setValue(o)}return d.prototype.finishEditing.apply(this,arguments)},h.prototype.assignHooks=function(){var e=this;this.instance.addHook("afterDestroy",function(){e.htEditor&&e.htEditor.destroy()})},c("handsontable",h)},{"./../dom.js":27,"./../editors.js":29,"./../helpers.js":42,"./textEditor.js":40}],36:[function(e,t,o){"use strict";Object.defineProperties(o,{MobileTextEditor:{get:function(){return g}},__esModule:{value:!0}});var n,r,i,s,a,l=(n=e("./../helpers.js"),n&&n.__esModule&&n||{"default":n}),u=(r=e("./../dom.js"),r&&r.__esModule&&r||{"default":r}),c=(i=e("./../editors.js"),i&&i.__esModule&&i||{"default":i}),d=(c.getEditor,c.registerEditor),h=(s=e("./_baseEditor.js"),s&&s.__esModule&&s||{"default":s}).BaseEditor,f=(a=e("./../eventManager.js"),a&&a.__esModule&&a||{"default":a}).eventManager,g=h.prototype.extend(),p={},m=function(){this.controls={},this.controls.leftButton=document.createElement("DIV"),this.controls.leftButton.className="leftButton",this.controls.rightButton=document.createElement("DIV"),this.controls.rightButton.className="rightButton",this.controls.upButton=document.createElement("DIV"),this.controls.upButton.className="upButton",this.controls.downButton=document.createElement("DIV"),this.controls.downButton.className="downButton";for(var e in this.controls)this.controls.hasOwnProperty(e)&&this.positionControls.appendChild(this.controls[e])};g.prototype.valueChanged=function(){return this.initValue!=this.getValue()},g.prototype.init=function(){var e=this;this.eventManager=f(this.instance),this.createElements(),this.bindEvents(),this.instance.addHook("afterDestroy",function(){e.destroy()})},g.prototype.getValue=function(){return this.TEXTAREA.value},g.prototype.setValue=function(e){this.initValue=e,this.TEXTAREA.value=e},g.prototype.createElements=function(){this.editorContainer=document.createElement("DIV"),this.editorContainer.className="htMobileEditorContainer",this.cellPointer=document.createElement("DIV"),this.cellPointer.className="cellPointer",this.moveHandle=document.createElement("DIV"),this.moveHandle.className="moveHandle",this.inputPane=document.createElement("DIV"),this.inputPane.className="inputs",this.positionControls=document.createElement("DIV"),this.positionControls.className="positionControls",this.TEXTAREA=document.createElement("TEXTAREA"),u.addClass(this.TEXTAREA,"handsontableInput"),this.inputPane.appendChild(this.TEXTAREA),this.editorContainer.appendChild(this.cellPointer),this.editorContainer.appendChild(this.moveHandle),this.editorContainer.appendChild(this.inputPane),this.editorContainer.appendChild(this.positionControls),m.call(this),document.body.appendChild(this.editorContainer)},g.prototype.onBeforeKeyDown=function(e){var t=this,o=t.getActiveEditor();if(u.enableImmediatePropagation(e),e.target===o.TEXTAREA&&!e.isImmediatePropagationStopped()){var n=l.keyCode;switch(e.keyCode){case n.ENTER:o.close(),e.preventDefault();break;case n.BACKSPACE:e.stopImmediatePropagation()}}},g.prototype.open=function(){this.instance.addHook("beforeKeyDown",this.onBeforeKeyDown),u.addClass(this.editorContainer,"active"),u.removeClass(this.cellPointer,"hidden"),this.updateEditorPosition()},g.prototype.focus=function(){this.TEXTAREA.focus(),u.setCaretPosition(this.TEXTAREA,this.TEXTAREA.value.length)},g.prototype.close=function(){this.TEXTAREA.blur(),this.instance.removeHook("beforeKeyDown",this.onBeforeKeyDown),u.removeClass(this.editorContainer,"active")},g.prototype.scrollToView=function(){var e=this.instance.getSelectedRange().highlight;this.instance.view.scrollViewport(e)},g.prototype.hideCellPointer=function(){u.hasClass(this.cellPointer,"hidden")||u.addClass(this.cellPointer,"hidden")},g.prototype.updateEditorPosition=function(e,t){if(e&&t)e=parseInt(e,10),t=parseInt(t,10),this.editorContainer.style.top=t+"px",this.editorContainer.style.left=e+"px";else{var o=this.instance.getSelected(),n=this.instance.getCell(o[0],o[1]);if(p.cellPointer||(p.cellPointer={height:u.outerHeight(this.cellPointer),width:u.outerWidth(this.cellPointer)}),p.editorContainer||(p.editorContainer={width:u.outerWidth(this.editorContainer)}),void 0!==n){var r=this.instance.view.wt.wtOverlays.leftOverlay.trimmingContainer==window?0:u.getScrollLeft(this.instance.view.wt.wtOverlays.leftOverlay.holder),i=this.instance.view.wt.wtOverlays.topOverlay.trimmingContainer==window?0:u.getScrollTop(this.instance.view.wt.wtOverlays.topOverlay.holder),s=u.offset(n),a=u.outerWidth(n),l={x:r,y:i};this.editorContainer.style.top=parseInt(s.top+u.outerHeight(n)-l.y+p.cellPointer.height,10)+"px",this.editorContainer.style.left=parseInt(window.innerWidth/2-p.editorContainer.width/2,10)+"px",s.left+a/2>parseInt(this.editorContainer.style.left,10)+p.editorContainer.width?this.editorContainer.style.left=window.innerWidth-p.editorContainer.width+"px":s.left+a/2<parseInt(this.editorContainer.style.left,10)+20&&(this.editorContainer.style.left="0px"),
this.cellPointer.style.left=parseInt(s.left-p.cellPointer.width/2-u.offset(this.editorContainer).left+a/2-l.x,10)+"px"}}},g.prototype.updateEditorData=function(){var e=this.instance.getSelected(),t=this.instance.getDataAtCell(e[0],e[1]);this.row=e[0],this.col=e[1],this.setValue(t),this.updateEditorPosition()},g.prototype.prepareAndSave=function(){var e;return this.valueChanged()?(e=this.instance.getSettings().trimWhitespace?[[String.prototype.trim.call(this.getValue())]]:[[this.getValue()]],void this.saveValue(e)):!0},g.prototype.bindEvents=function(){var e=this;this.eventManager.addEventListener(this.controls.leftButton,"touchend",function(t){e.prepareAndSave(),e.instance.selection.transformStart(0,-1,null,!0),e.updateEditorData(),t.preventDefault()}),this.eventManager.addEventListener(this.controls.rightButton,"touchend",function(t){e.prepareAndSave(),e.instance.selection.transformStart(0,1,null,!0),e.updateEditorData(),t.preventDefault()}),this.eventManager.addEventListener(this.controls.upButton,"touchend",function(t){e.prepareAndSave(),e.instance.selection.transformStart(-1,0,null,!0),e.updateEditorData(),t.preventDefault()}),this.eventManager.addEventListener(this.controls.downButton,"touchend",function(t){e.prepareAndSave(),e.instance.selection.transformStart(1,0,null,!0),e.updateEditorData(),t.preventDefault()}),this.eventManager.addEventListener(this.moveHandle,"touchstart",function(t){if(1==t.touches.length){var o=t.touches[0],n={x:e.editorContainer.offsetLeft,y:e.editorContainer.offsetTop},r={x:o.pageX-n.x,y:o.pageY-n.y};e.eventManager.addEventListener(this,"touchmove",function(t){var o=t.touches[0];e.updateEditorPosition(o.pageX-r.x,o.pageY-r.y),e.hideCellPointer(),t.preventDefault()})}}),this.eventManager.addEventListener(document.body,"touchend",function(t){u.isChildOf(t.target,e.editorContainer)||u.isChildOf(t.target,e.instance.rootElement)||e.close()}),this.eventManager.addEventListener(this.instance.view.wt.wtOverlays.leftOverlay.holder,"scroll",function(t){e.instance.view.wt.wtOverlays.leftOverlay.trimmingContainer!=window&&e.hideCellPointer()}),this.eventManager.addEventListener(this.instance.view.wt.wtOverlays.topOverlay.holder,"scroll",function(t){e.instance.view.wt.wtOverlays.topOverlay.trimmingContainer!=window&&e.hideCellPointer()})},g.prototype.destroy=function(){this.eventManager.clear(),this.editorContainer.parentNode.removeChild(this.editorContainer)},d("mobile",g)},{"./../dom.js":27,"./../editors.js":29,"./../eventManager.js":41,"./../helpers.js":42,"./_baseEditor.js":30}],37:[function(e,t,o){"use strict";Object.defineProperties(o,{NumericEditor:{get:function(){return c}},__esModule:{value:!0}});var n,r,i,s=(n=e("numeral"),n&&n.__esModule&&n||{"default":n})["default"],a=(r=e("./../editors.js"),r&&r.__esModule&&r||{"default":r}),l=(a.getEditor,a.registerEditor),u=(i=e("./textEditor.js"),i&&i.__esModule&&i||{"default":i}).TextEditor,c=function(){$traceurRuntime.superConstructor(d).apply(this,arguments)},d=c;$traceurRuntime.createClass(c,{beginEditing:function(e){if("undefined"==typeof e&&this.originalValue){"undefined"!=typeof this.cellProperties.language&&s.language(this.cellProperties.language);var t=s.languageData().delimiters.decimal;e=(""+this.originalValue).replace(".",t)}$traceurRuntime.superGet(this,d.prototype,"beginEditing").call(this,e)}},{},u),l("numeric",c)},{"./../editors.js":29,"./textEditor.js":40,numeral:"numeral"}],38:[function(e,t,o){"use strict";Object.defineProperties(o,{PasswordEditor:{get:function(){return c}},__esModule:{value:!0}});var n,r,i,s=(n=e("./../dom.js"),n&&n.__esModule&&n||{"default":n}),a=(r=e("./../editors.js"),r&&r.__esModule&&r||{"default":r}),l=(a.getEditor,a.registerEditor),u=(i=e("./textEditor.js"),i&&i.__esModule&&i||{"default":i}).TextEditor,c=function(){$traceurRuntime.superConstructor(d).apply(this,arguments)},d=c;$traceurRuntime.createClass(c,{createElements:function(){$traceurRuntime.superGet(this,d.prototype,"createElements").call(this),this.TEXTAREA=document.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,s.empty(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}},{},u),l("password",c)},{"./../dom.js":27,"./../editors.js":29,"./textEditor.js":40}],39:[function(e,t,o){"use strict";Object.defineProperties(o,{SelectEditor:{get:function(){return h}},__esModule:{value:!0}});var n,r,i,s,a=(n=e("./../dom.js"),n&&n.__esModule&&n||{"default":n}),l=(r=e("./../helpers.js"),r&&r.__esModule&&r||{"default":r}),u=(i=e("./../editors.js"),i&&i.__esModule&&i||{"default":i}),c=(u.getEditor,u.registerEditor),d=(s=e("./_baseEditor.js"),s&&s.__esModule&&s||{"default":s}).BaseEditor,h=d.prototype.extend();h.prototype.init=function(){this.select=document.createElement("SELECT"),a.addClass(this.select,"htSelectEditor"),this.select.style.display="none",this.instance.rootElement.appendChild(this.select)},h.prototype.prepare=function(){d.prototype.prepare.apply(this,arguments);var e,t=this.cellProperties.selectOptions;e="function"==typeof t?this.prepareOptions(t(this.row,this.col,this.prop)):this.prepareOptions(t),a.empty(this.select);for(var o in e)if(e.hasOwnProperty(o)){var n=document.createElement("OPTION");n.value=o,a.fastInnerHTML(n,e[o]),this.select.appendChild(n)}},h.prototype.prepareOptions=function(e){var t={};if(Array.isArray(e))for(var o=0,n=e.length;n>o;o++)t[e[o]]=e[o];else"object"==typeof e&&(t=e);return t},h.prototype.getValue=function(){return this.select.value},h.prototype.setValue=function(e){this.select.value=e};var f=function(e){var t=this,o=t.getActiveEditor();switch(null!=e&&null==e.isImmediatePropagationEnabled&&(e.stopImmediatePropagation=function(){this.isImmediatePropagationEnabled=!1},e.isImmediatePropagationEnabled=!0,e.isImmediatePropagationStopped=function(){return!this.isImmediatePropagationEnabled}),e.keyCode){case l.keyCode.ARROW_UP:var n=o.select.selectedIndex-1;n>=0&&(o.select[n].selected=!0),e.stopImmediatePropagation(),e.preventDefault();break;case l.keyCode.ARROW_DOWN:var r=o.select.selectedIndex+1;r<=o.select.length-1&&(o.select[r].selected=!0),e.stopImmediatePropagation(),e.preventDefault()}};h.prototype.checkEditorSection=function(){return this.row<this.instance.getSettings().fixedRowsTop?this.col<this.instance.getSettings().fixedColumnsLeft?"corner":"top":this.col<this.instance.getSettings().fixedColumnsLeft?"left":void 0},h.prototype.open=function(){var e,t=a.outerWidth(this.TD),o=a.outerHeight(this.TD),n=a.offset(this.instance.rootElement),r=a.offset(this.TD),i=this.checkEditorSection();switch(i){case"top":e=a.getCssTransform(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);break;case"left":e=a.getCssTransform(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);break;case"corner":e=a.getCssTransform(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode)}var s=this.select.style;e&&-1!=e?s[e[0]]=e[1]:a.resetCssTransform(this.select),s.height=o+"px",s.minWidth=t+"px",s.top=r.top-n.top+"px",s.left=r.left-n.left+"px",s.margin="0px",s.display="",this.instance.addHook("beforeKeyDown",f)},h.prototype.close=function(){this.select.style.display="none",this.instance.removeHook("beforeKeyDown",f)},h.prototype.focus=function(){this.select.focus()},c("select",h)},{"./../dom.js":27,"./../editors.js":29,"./../helpers.js":42,"./_baseEditor.js":30}],40:[function(e,t,o){"use strict";Object.defineProperties(o,{TextEditor:{get:function(){return m}},__esModule:{value:!0}});var n,r,i,s,a,l,u=(n=e("./../dom.js"),n&&n.__esModule&&n||{"default":n}),c=(r=e("./../helpers.js"),r&&r.__esModule&&r||{"default":r}),d=(i=e("autoResize"),i&&i.__esModule&&i||{"default":i})["default"],h=(s=e("./_baseEditor.js"),s&&s.__esModule&&s||{"default":s}).BaseEditor,f=(a=e("./../eventManager.js"),a&&a.__esModule&&a||{"default":a}).eventManager,g=(l=e("./../editors.js"),l&&l.__esModule&&l||{"default":l}),p=(g.getEditor,g.registerEditor),m=h.prototype.extend();m.prototype.init=function(){var e=this;this.createElements(),this.eventManager=f(this),this.bindEvents(),this.autoResize=d(),this.instance.addHook("afterDestroy",function(){e.destroy()})},m.prototype.getValue=function(){return this.TEXTAREA.value},m.prototype.setValue=function(e){this.TEXTAREA.value=e};var w=function(e){var t,o,n=this,r=n.getActiveEditor();if(t=c.keyCode,o=(e.ctrlKey||e.metaKey)&&!e.altKey,u.enableImmediatePropagation(e),e.target===r.TEXTAREA&&!e.isImmediatePropagationStopped()){if(17===e.keyCode||224===e.keyCode||91===e.keyCode||93===e.keyCode)return void e.stopImmediatePropagation();switch(e.keyCode){case t.ARROW_RIGHT:case t.ARROW_LEFT:case t.ARROW_UP:case t.ARROW_DOWN:r.isWaiting()||e.stopImmediatePropagation();break;case t.ENTER:var i=r.instance.getSelected(),s=!(i[0]===i[2]&&i[1]===i[3]);if(o&&!s||e.altKey){if(r.isOpened()){var a=u.getCaretPosition(r.TEXTAREA),l=r.getValue(),d=l.slice(0,a)+"\n"+l.slice(a);r.setValue(d),u.setCaretPosition(r.TEXTAREA,a+1)}else r.beginEditing(r.originalValue+"\n");e.stopImmediatePropagation()}e.preventDefault();break;case t.A:case t.X:case t.C:case t.V:o&&e.stopImmediatePropagation();break;case t.BACKSPACE:case t.DELETE:case t.HOME:case t.END:e.stopImmediatePropagation()}r.autoResize.resize(String.fromCharCode(e.keyCode))}};m.prototype.open=function(){this.refreshDimensions(),this.instance.addHook("beforeKeyDown",w)},m.prototype.close=function(){this.textareaParentStyle.display="none",this.autoResize.unObserve(),document.activeElement===this.TEXTAREA&&this.instance.listen(),this.instance.removeHook("beforeKeyDown",w)},m.prototype.focus=function(){this.TEXTAREA.focus(),u.setCaretPosition(this.TEXTAREA,this.TEXTAREA.value.length)},m.prototype.createElements=function(){this.TEXTAREA=document.createElement("TEXTAREA"),u.addClass(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.TEXTAREA_PARENT=document.createElement("DIV"),u.addClass(this.TEXTAREA_PARENT,"handsontableInputHolder"),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.textareaParentStyle.top=0,this.textareaParentStyle.left=0,this.textareaParentStyle.display="none",this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.instance.rootElement.appendChild(this.TEXTAREA_PARENT);var e=this;this.instance._registerTimeout(setTimeout(function(){e.refreshDimensions()},0))},m.prototype.checkEditorSection=function(){return this.row<this.instance.getSettings().fixedRowsTop?this.col<this.instance.getSettings().fixedColumnsLeft?"corner":"top":this.col<this.instance.getSettings().fixedColumnsLeft?"left":void 0},m.prototype.getEditedCell=function(){var e,t=this.checkEditorSection();switch(t){case"top":e=this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=101;break;case"corner":e=this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=103;break;case"left":e=this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=102;break;default:e=this.instance.getCell(this.row,this.col),this.textareaParentStyle.zIndex=""}return-1!=e&&-2!=e?e:void 0},m.prototype.refreshDimensions=function(){if(this.state===Handsontable.EditorState.EDITING&&(this.TD=this.getEditedCell(),this.TD)){var e,t=u.offset(this.TD),o=u.offset(this.instance.rootElement),n=u.getScrollableElement(this.TD),r=t.top-o.top-1-(n.scrollTop||0),i=t.left-o.left-1-(n.scrollLeft||0),s=this.instance.getSettings(),a=s.rowHeaders?1:0,l=s.colHeaders?1:0,c=this.checkEditorSection(),d=this.TD.style.backgroundColor;switch(c){case"top":e=u.getCssTransform(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);break;case"left":e=u.getCssTransform(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);break;case"corner":e=u.getCssTransform(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode)}0>r&&(r=0),0>i&&(i=0),l&&0===this.instance.getSelected()[0]&&(r+=1),a&&0===this.instance.getSelected()[1]&&(i+=1),e&&-1!=e?this.textareaParentStyle[e[0]]=e[1]:u.resetCssTransform(this.textareaParentStyle),this.textareaParentStyle.top=r+"px",this.textareaParentStyle.left=i+"px";var h=this.TD.offsetTop-this.instance.view.wt.wtOverlays.topOverlay.getScrollPosition(),f=this.TD.offsetLeft-this.instance.view.wt.wtOverlays.leftOverlay.getScrollPosition(),g=u.innerWidth(this.TD)-8,p=this.instance.view.maximumVisibleElementWidth(f)-10,m=this.TD.scrollHeight+1,w=this.instance.view.maximumVisibleElementHeight(h)-2;parseInt(this.TD.style.borderTopWidth,10)>0&&(m-=1),parseInt(this.TD.style.borderLeftWidth,10)>0&&a>0&&(g-=1),this.TEXTAREA.style.fontSize=u.getComputedStyle(this.TD).fontSize,this.TEXTAREA.style.fontFamily=u.getComputedStyle(this.TD).fontFamily,this.TEXTAREA.style.backgroundColor="",this.TEXTAREA.style.backgroundColor=d?d:u.getComputedStyle(this.TEXTAREA).backgroundColor,this.autoResize.init(this.TEXTAREA,{minHeight:Math.min(m,w),maxHeight:w,minWidth:Math.min(g,p),maxWidth:p},!0),this.textareaParentStyle.display="block"}},m.prototype.bindEvents=function(){var e=this;this.eventManager.addEventListener(this.TEXTAREA,"cut",function(e){c.stopPropagation(e)}),this.eventManager.addEventListener(this.TEXTAREA,"paste",function(e){c.stopPropagation(e)}),this.instance.addHook("afterScrollVertically",function(){e.refreshDimensions()}),this.instance.addHook("afterColumnResize",function(){e.refreshDimensions(),e.focus()}),this.instance.addHook("afterRowResize",function(){e.refreshDimensions(),e.focus()}),this.instance.addHook("afterDestroy",function(){e.eventManager.clear()})},m.prototype.destroy=function(){this.eventManager.clear()},p("text",m)},{"./../dom.js":27,"./../editors.js":29,"./../eventManager.js":41,"./../helpers.js":42,"./_baseEditor.js":30,autoResize:"autoResize"}],41:[function(e,t,o){"use strict";function n(e,t){var o,n,r,i,a,l="HOT-TABLE";if(t.isTargetWebComponent=!1,t.realTarget=t.target,!Handsontable.eventManager.isHotTableEnv)return t;for(t=s.polymerWrap(t),a=t.path?t.path.length:0;a--;){if(t.path[a].nodeName===l)o=!0;else if(o&&t.path[a].shadowRoot){i=t.path[a];break}0!==a||i||(i=t.path[a])}return i||(i=t.target),t.isTargetWebComponent=!0,s.isWebComponentSupportedNatively()?t.realTarget=t.srcElement||t.toElement:(e instanceof Handsontable.Core||e instanceof Walkontable)&&(e instanceof Handsontable.Core?n=e.view.wt.wtTable.TABLE:e instanceof Walkontable&&(n=e.wtTable.TABLE.parentNode.parentNode),r=s.closest(t.target,[l],n),r?t.realTarget=n.querySelector(l)||t.target:t.realTarget=t.target),Object.defineProperty(t,"target",{get:function(){return s.polymerWrap(i)},enumerable:!0,configurable:!0}),t}function r(e){return new a(e)}Object.defineProperties(o,{EventManager:{get:function(){return a}},eventManager:{get:function(){return r}},__esModule:{value:!0}});var i,s=(i=e("./dom.js"),i&&i.__esModule&&i||{"default":i}),a=function(){var e=void 0!==arguments[0]?arguments[0]:null;this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])};$traceurRuntime.createClass(a,{addEventListener:function(e,t,o){function r(e){void 0==e.target&&void 0!=e.srcElement&&(e.definePoperty?e.definePoperty("target",{value:e.srcElement}):e.target=e.srcElement),void 0==e.preventDefault&&(e.definePoperty?e.definePoperty("preventDefault",{value:function(){this.returnValue=!1}}):e.preventDefault=function(){this.returnValue=!1}),e=n(s,e),o.call(this,e)}var i=this,s=this.context;return this.context.eventListeners.push({element:e,event:t,callback:o,callbackProxy:r}),window.addEventListener?e.addEventListener(t,r,!1):e.attachEvent("on"+t,r),Handsontable.countEventManagerListeners++,function(){i.removeEventListener(e,t,o)}},removeEventListener:function(e,t,o){for(var n,r=this.context.eventListeners.length;r--;)if(n=this.context.eventListeners[r],n.event==t&&n.element==e){if(o&&o!=n.callback)continue;this.context.eventListeners.splice(r,1),n.element.removeEventListener?n.element.removeEventListener(n.event,n.callbackProxy,!1):n.element.detachEvent("on"+n.event,n.callbackProxy),Handsontable.countEventManagerListeners--}},clearEvents:function(){for(var e=this.context.eventListeners.length;e--;){var t=this.context.eventListeners[e];t&&this.removeEventListener(t.element,t.event,t.callback)}},clear:function(){this.clearEvents()},fireEvent:function(e,t){var o,n={bubbles:!0,cancelable:"mousemove"!==t,view:window,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};document.createEvent?(o=document.createEvent("MouseEvents"),o.initMouseEvent(t,n.bubbles,n.cancelable,n.view,n.detail,n.screenX,n.screenY,n.clientX,n.clientY,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey,n.button,n.relatedTarget||document.body.parentNode)):o=document.createEventObject(),e.dispatchEvent?e.dispatchEvent(o):e.fireEvent("on"+t,o)}},{}),window.Handsontable=window.Handsontable||{},Handsontable.countEventManagerListeners=0,Handsontable.eventManager=r},{"./dom.js":27}],42:[function(e,t,o){"use strict";function n(e){return 32==e||e>=48&&57>=e||e>=96&&111>=e||e>=186&&192>=e||e>=219&&222>=e||e>=226||e>=65&&90>=e}function r(e){var t=[J.ARROW_DOWN,J.ARROW_UP,J.ARROW_LEFT,J.ARROW_RIGHT,J.HOME,J.END,J.DELETE,J.BACKSPACE,J.F1,J.F2,J.F3,J.F4,J.F5,J.F6,J.F7,J.F8,J.F9,J.F10,J.F11,J.F12,J.TAB,J.PAGE_DOWN,J.PAGE_UP,J.ENTER,J.ESCAPE,J.SHIFT,J.CAPS_LOCK,J.ALT];return-1!=t.indexOf(e)}function i(e){return-1!=[J.CONTROL_LEFT,224,J.COMMAND_LEFT,J.COMMAND_RIGHT].indexOf(e)}function s(e){switch(typeof e){case"string":case"number":return e+"";case"object":return null===e?"":e.toString();case"undefined":return"";default:return e.toString()}}function a(e){return e[0].toUpperCase()+e.substr(1)}function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var o=[],n=e.length;n--;){var r=s(e[n]).toLowerCase();-1===o.indexOf(r)&&o.push(r)}return 1===o.length}function u(e){var t;if(Array.isArray(e))t=[];else{t={};for(var o in e)e.hasOwnProperty(o)&&(e[o]&&"object"==typeof e[o]&&!Array.isArray(e[o])?t[o]=u(e[o]):Array.isArray(e[o])?e[o].length&&"object"==typeof e[o][0]&&!Array.isArray(e[o][0])?t[o]=[u(e[o][0])]:t[o]=[]:t[o]=null)}return t}function c(e){for(var t,o=e+1,n="";o>0;)t=(o-1)%26,n=String.fromCharCode(65+t)+n,o=parseInt((o-t)/26,10);return n}function d(e,t){e="number"==typeof e?e:100,t="number"==typeof t?t:4;var o,n,r=[];for(o=0;e>o;o++){var i=[];for(n=0;t>n;n++)i.push(c(n)+(o+1));r.push(i)}return r}function h(e,t){e="number"==typeof e?e:100,t="number"==typeof t?t:4;var o,n,r=[];for(o=0;e>o;o++){var i={};for(n=0;t>n;n++)i["prop"+n]=c(n)+(o+1);r.push(i)}return r}function f(e){var t=typeof e;return"number"==t?!isNaN(e)&&isFinite(e):"string"==t?e.length?1==e.length?/\d/.test(e):/^\s*[+-]?\s*(?:(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?)|(?:0x[a-f\d]+))\s*$/i.test(e):!1:"object"==t?!(!e||"number"!=typeof e.valueOf()||e instanceof Date):!1}function g(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()+e()}function p(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e}function m(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])}function w(e,t){for(var o in t)t.hasOwnProperty(o)&&(t[o]&&"object"==typeof t[o]?(e[o]||(Array.isArray(t[o])?e[o]=[]:e[o]={}),w(e[o],t[o])):e[o]=t[o])}function v(e){return"object"==typeof e?JSON.parse(JSON.stringify(e)):e}function C(e,t){return JSON.stringify(e)===JSON.stringify(t)}function b(e){var t;if("object"==typeof e.__proto__)t=e.__proto__;else{var o,n=e.constructor;"function"==typeof e.constructor&&(o=n,delete e.constructor&&(n=e.constructor,e.constructor=o)),t=n?n.prototype:null}return t}function y(e,t){function o(){}p(o,e);for(var n=0,r=t.length;r>n;n++)o.prototype[t[n]]=void 0;return o}function R(e){var t,o,n,r,i=[],s=0;for(t=0,o=e.length;o>t;t++)for(n=0,r=e[t].length;r>n;n++)n==s&&(i.push([]),s++),i[n].push(e[t][n]);return i}function S(e){for(var t=0,o=e.length;o>t;)e[t]=[e[t]],t++}function E(e,t){for(var o=0,n=t.length;n>o;)e.push(t[o]),o++}function T(e){var t=["INPUT","SELECT","TEXTAREA"];return t.indexOf(e.nodeName)>-1||"true"===e.contentEditable}function H(e){return T(e)&&-1==e.className.indexOf("handsontableInput")&&-1==e.className.indexOf("copyPaste")}function k(e){return"[object Object]"==Object.prototype.toString.call(e)}function O(e){var t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;for(var o=e.length,n=e[0].length,r=0;o>r;r++)for(var i=0;n>i;i++)t[i]||(t[i]=[]),t[i][r]=e[r][i];return t}function M(e,t){return function(){return e.apply(t,arguments)}}function _(e,t){function o(e){var t=Handsontable.cellTypes[e];if("undefined"==typeof t)throw new Error('You declared cell type "'+e+'" as a string that is not mapped to a known object. Cell type must be an object or a string mapped to an object in Handsontable.cellTypes');return t}return t="undefined"==typeof t?!0:t,function(n,r){return function i(n){if(n){if(n.hasOwnProperty(e)&&void 0!==n[e])return n[e];if(n.hasOwnProperty("type")&&n.type){var r;if("string"!=typeof n.type)throw new Error("Cell type must be a string ");if(r=o(n.type),r.hasOwnProperty(e))return r[e];if(t)return}return i(b(n))}}("number"==typeof n?this.getCellMeta(n,r):n)}}function A(e){return e||(e=navigator.userAgent),/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)}function P(){return"ontouchstart"in window}function j(e){"function"==typeof e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function x(e){if(e.pageX)return e.pageX;var t=Q.getWindowScrollLeft(),o=e.clientX+t;return o}function D(e){if(e.pageY)return e.pageY;var t=Q.getWindowScrollTop(),o=e.clientY+t;return o}function L(e,t,o,n){n.value=o,n.writable=n.writable===!1?!1:!0,n.enumerable=n.enumerable===!1?!1:!0,n.configurable=n.configurable===!1?!1:!0,Object.defineProperty(e,t,n)}function N(e){return te.call(window,e)}function W(e){oe.call(window,e)}function I(e,t,o,n){var r=-1,i=e.length;for(n&&i&&(o=e[++r]);++r<i;)o=t(o,e[r],r,e);return o}function B(e,t){for(var o=-1,n=e.length,r=-1,i=[];++o<n;){var s=e[o];t(s,o,e)&&(i[++r]=s)}return i}function V(e,t){for(var o=-1,n=e.length;++o<n&&t(e[o],o,e)!==!1;);return e}function F(e,t){for(var o in e)if((!e.hasOwnProperty||e.hasOwnProperty&&e.hasOwnProperty(o))&&t(e[o],o,e)===!1)break;return e}function G(e,t,o){var n=-1;for("function"==typeof t?(o=t,t=e):n=e-1;++n<=t&&o(n)!==!1;);}function z(e){return I(e,function(e,t){return e+t},0)}function U(e){return e.length?z(e)/e.length:0}function $(e){return/^([0-9][0-9]?\%$)|(^100\%$)/.test(e)}function K(e,t){return t=parseInt(t.toString().replace("%",""),10),t=parseInt(e*t/100)}function X(e){function t(){var t=this,s=arguments,a=Date.now(),l=!1;r.lastCallThrottled=!0,n||(n=a,l=!0);var u=o-(a-n);return l?(r.lastCallThrottled=!1,e.apply(this,s)):(i&&clearTimeout(i),i=setTimeout(function(){r.lastCallThrottled=!1,e.apply(t,s),n=0,i=void 0},u)),r}var o=void 0!==arguments[1]?arguments[1]:200,n=0,r={lastCallThrottled:!0},i=null;return t}function Y(e){function t(){s=r}function o(){return s?(s--,e.apply(this,arguments)):i.apply(this,arguments)}var n=void 0!==arguments[1]?arguments[1]:200,r=void 0!==arguments[2]?arguments[2]:10,i=X(e,n),s=r;return o.clearHits=t,o}Object.defineProperties(o,{isPrintableChar:{get:function(){return n}},isMetaKey:{get:function(){return r}},isCtrlKey:{get:function(){return i}},stringify:{get:function(){return s}},toUpperCaseFirst:{get:function(){return a}},equalsIgnoreCase:{get:function(){return l}},duckSchema:{get:function(){return u}},spreadsheetColumnLabel:{get:function(){return c}},createSpreadsheetData:{get:function(){return d}},createSpreadsheetObjectData:{get:function(){return h}},isNumeric:{get:function(){return f}},randomString:{get:function(){return g}},inherit:{get:function(){return p}},extend:{get:function(){return m}},deepExtend:{get:function(){return w}},deepClone:{get:function(){return v}},isObjectEquals:{get:function(){return C}},getPrototypeOf:{get:function(){return b}},columnFactory:{get:function(){return y}},translateRowsToColumns:{get:function(){return R}},to2dArray:{get:function(){return S}},extendArray:{get:function(){return E}},isInput:{get:function(){return T}},isOutsideInput:{get:function(){return H}},keyCode:{get:function(){return J}},isObject:{get:function(){return k}},pivot:{get:function(){return O}},proxy:{get:function(){return M}},cellMethodLookupFactory:{get:function(){return _}},isMobileBrowser:{get:function(){return A}},isTouchSupported:{get:function(){return P}},stopPropagation:{get:function(){return j}},pageX:{get:function(){return x}},pageY:{get:function(){return D}},defineGetter:{get:function(){return L}},requestAnimationFrame:{get:function(){return N}},cancelAnimationFrame:{get:function(){return W}},arrayFilter:{get:function(){return B}},arrayEach:{get:function(){return V}},objectEach:{get:function(){return F}},rangeEach:{get:function(){return G}},arraySum:{get:function(){return z}},arrayAvg:{get:function(){return U}},isPercentValue:{get:function(){return $}},valueAccordingPercent:{get:function(){return K}},throttle:{get:function(){return X}},throttleAfterHits:{get:function(){return Y}},__esModule:{value:!0}});for(var q,Q=(q=e("./dom.js"),q&&q.__esModule&&q||{"default":q}),J={MOUSE_LEFT:1,MOUSE_RIGHT:3,MOUSE_MIDDLE:2,BACKSPACE:8,COMMA:188,INSERT:45,DELETE:46,END:35,ENTER:13,ESCAPE:27,CONTROL_LEFT:91,COMMAND_LEFT:17,COMMAND_RIGHT:93,ALT:18,HOME:36,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,SPACE:32,SHIFT:16,CAPS_LOCK:20,TAB:9,ARROW_RIGHT:39,ARROW_LEFT:37,ARROW_UP:38,ARROW_DOWN:40,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,A:65,X:88,C:67,V:86},Z=0,ee=["ms","moz","webkit","o"],te=window.requestAnimationFrame,oe=window.cancelAnimationFrame,ne=0;ne<ee.length&&!te;++ne)te=window[ee[ne]+"RequestAnimationFrame"],oe=window[ee[ne]+"CancelAnimationFrame"]||window[ee[ne]+"CancelRequestAnimationFrame"];te||(te=function(e){var t=(new Date).getTime(),o=Math.max(0,16-(t-Z)),n=window.setTimeout(function(){e(t+o)},o);return Z=t+o,n}),oe||(oe=function(e){clearTimeout(e)}),window.Handsontable=window.Handsontable||{},Handsontable.helper={arrayAvg:U,arrayEach:V,arrayFilter:B,arrayReduce:I,arraySum:z,cancelAnimationFrame:W,cellMethodLookupFactory:_,columnFactory:y,createSpreadsheetData:d,createSpreadsheetObjectData:h,deepClone:v,deepExtend:w,defineGetter:L,duckSchema:u,equalsIgnoreCase:l,extend:m,extendArray:E,getPrototypeOf:b,inherit:p,isCtrlKey:i,isInput:T,isMetaKey:r,isMobileBrowser:A,isNumeric:f,isObject:k,isObjectEquals:C,isOutsideInput:H,isPercentValue:$,isPrintableChar:n,isTouchSupported:P,keyCode:J,objectEach:F,pageX:x,pageY:D,pivot:O,proxy:M,randomString:g,rangeEach:G,requestAnimationFrame:N,spreadsheetColumnLabel:c,stopPropagation:j,stringify:s,throttle:X,throttleAfterHits:Y,to2dArray:S,toUpperCaseFirst:a,translateRowsToColumns:R,valueAccordingPercent:K}},{"./dom.js":27}],43:[function(e,t,o){"use strict";function n(){function e(e){return null!==e&&!o(e)&&("string"==typeof e||"number"==typeof e)}function t(e){return null!==e&&("object"==typeof e||"function"==typeof e)}function o(e){return e!==e}var n={arrayMap:[],weakMap:new WeakMap};return{get:function(o){return e(o)?n.arrayMap[o]:t(o)?n.weakMap.get(o):void 0},set:function(o,r){if(e(o))n.arrayMap[o]=r;else{if(!t(o))throw new Error("Invalid key type");n.weakMap.set(o,r)}},"delete":function(o){e(o)?delete n.arrayMap[o]:t(o)&&n.weakMap["delete"](o)}}}Object.defineProperties(o,{MultiMap:{get:function(){return n}},__esModule:{value:!0}}),window.MultiMap=n},{}],44:[function(e,t,o){"use strict";Object.defineProperties(o,{Hooks:{get:function(){return i}},__esModule:{value:!0}});var n,r=["afterCellMetaReset","afterChange","afterChangesObserved","afterColumnMove","afterColumnResize","afterContextMenuDefaultOptions","afterContextMenuHide","afterContextMenuShow","afterCopyLimit","afterCreateCol","afterCreateRow","afterDeselect","afterDestroy","afterDocumentKeyDown","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterIsMultipleSelectionCheck","afterLoadData","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnCellMouseDown","afterOnCellMouseOver","afterRemoveCol","afterRemoveRow","afterRender","afterRenderer","afterRowMove","afterRowResize","afterScrollHorizontally","afterScrollVertically","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","afterSetCellMeta","afterUpdateSettings","afterValidate","beforeAutofill","beforeCellAlignment","beforeChange","beforeChangeRender","beforeDrawBorders","beforeGetCellMeta","beforeInit","beforeInitWalkontable","beforeKeyDown","beforeOnCellMouseDown","beforeRemoveCol","beforeRemoveRow","beforeRender","beforeSetRangeEnd","beforeTouchScroll","beforeValidate","modifyCol","modifyColWidth","modifyRow","modifyRowHeight","persistentStateLoad","persistentStateReset","persistentStateSave"],i=((n=e("./eventManager.js"),n&&n.__esModule&&n||{"default":n}).EventManager,function(){this.globalBucket=this.createEmptyBucket()});$traceurRuntime.createClass(i,{createEmptyBucket:function(){for(var e=Object.create(null),t=0,o=r.length;o>t;t++)e[r[t]]=[];return e},getBucket:function(){var e=void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket},add:function(e,t){var o=void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))for(var n=0,r=t.length;r>n;n++)this.add(e,t[n]);else{var i=this.getBucket(o);"undefined"==typeof i[e]&&(this.register(e),i[e]=[]),t.skip=!1,-1===i[e].indexOf(t)&&i[e].push(t)}return this},once:function(e,t){var o=void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))for(var n=0,r=t.length;r>n;n++)t[n].runOnce=!0,this.add(e,t[n],o);else t.runOnce=!0,this.add(e,t,o)},remove:function(e,t){var o=void 0!==arguments[2]?arguments[2]:null,n=this.getBucket(o);return"undefined"!=typeof n[e]&&n[e].indexOf(t)>=0?(t.skip=!0,!0):!1},run:function(e,t,o,n,r,i,s,a){for(var l=this.globalBucket[t],u=l?l.length:0,c=0;u>c;c++)if(!l[c].skip){var d=l[c].call(e,o,n,r,i,s,a);void 0!==d&&(o=d),l[c].runOnce&&this.remove(t,l[c])}for(var h=this.getBucket(e)[t],f=h?h.length:0,g=0;f>g;g++)if(!h[g].skip){var p=h[g].call(e,o,n,r,i,s,a);void 0!==p&&(o=p),h[g].runOnce&&this.remove(t,h[g],e)}return o},destroy:function(){var e=void 0!==arguments[0]?arguments[0]:null,t=this.getBucket(e);for(var o in t)for(var n=0,r=t[o].length;r>n;n++)this.remove(o,t[o],e)},register:function(e){this.isRegistered(e)||r.push(e)},deregister:function(e){this.isRegistered(e)&&r.splice(r.indexOf(e),1)},isRegistered:function(e){return r.indexOf(e)>=0},getRegistered:function(){return r}},{})},{"./eventManager.js":41}],45:[function(e,t,o){"use strict";function n(e,t){Handsontable.hooks.add("construct",function(){var o;e=e.toLowerCase(),i.has(this)||i.set(this,{}),o=i.get(this),o[e]||(o[e]=new t(this))}),Handsontable.hooks.add("afterDestroy",function(){var e,t;if(i.has(this)){t=i.get(this);for(e in t)t.hasOwnProperty(e)&&t[e].destroy();i["delete"](this)}})}function r(e,t){if("string"!=typeof t)throw Error('Only strings can be passed as "plugin" parameter');var o=t.toLowerCase();return i.has(e)&&i.get(e)[o]?i.get(e)[o]:void 0}Object.defineProperties(o,{registerPlugin:{get:function(){return n}},getPlugin:{get:function(){return r}},__esModule:{value:!0}});var i=new WeakMap},{}],46:[function(e,t,o){"use strict";Object.defineProperties(o,{"default":{get:function(){return c}},__esModule:{value:!0}});var n,r=(n=e("./../helpers.js"),n&&n.__esModule&&n||{"default":n}),i=r.defineGetter,s=r.objectEach,a=r.arrayEach,l=new WeakMap,u=function(e){var t=this;i(this,"hot",e,{writable:!1}),l.set(this,{hooks:{}}),this.enabled=!1,this.hot.addHook("afterUpdateSettings",function(){
return t.onUpdateSettings()}),this.hot.addHook("beforeInit",function(){return t.init()})};$traceurRuntime.createClass(u,{init:function(){this.isEnabled&&(this[(this.isEnabled()?"enable":"disable")+"Plugin"](),this.enabled=this.isEnabled())},enablePlugin:function(){this.enabled=!0},disablePlugin:function(){this.eventManager&&this.eventManager.clear(),this.clearHooks(),this.enabled=!1},addHook:function(e,t){var o=l.get(this).hooks[e]=l.get(this).hooks[e]||[];this.hot.addHook(e,t),o.push(t),l.get(this).hooks[e]=o},removeHooks:function(e){var t=this;a(l.get(this).hooks[e]||[],function(o){t.hot.removeHook(e,o)})},clearHooks:function(){var e=this,t=l.get(this).hooks;s(t,function(t,o){return e.removeHooks(o)}),t.length=0},onUpdateSettings:function(){this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin())},destroy:function(){this.eventManager&&this.eventManager.clear(),this.clearHooks(),delete this.hot}},{});var c=u},{"./../helpers.js":42}],47:[function(e,t,o){"use strict";Object.defineProperties(o,{AutoColumnSize:{get:function(){return y}},__esModule:{value:!0}});var n,r,i,s,a,l=(n=e("./../_base.js"),n&&n.__esModule&&n||{"default":n})["default"],u=(r=e("./../../helpers.js"),r&&r.__esModule&&r||{"default":r}),c=u.arrayEach,d=u.arrayFilter,h=(u.objectEach,u.rangeEach),f=u.requestAnimationFrame,g=u.cancelAnimationFrame,p=u.isObject,m=u.isPercentValue,w=u.valueAccordingPercent,v=(i=e("./../../utils/ghostTable.js"),i&&i.__esModule&&i||{"default":i}).GhostTable,C=(s=e("./../../plugins.js"),s&&s.__esModule&&s||{"default":s}).registerPlugin,b=(a=e("./../../utils/samplesGenerator.js"),a&&a.__esModule&&a||{"default":a}).SamplesGenerator,y=function(e){var t=this;$traceurRuntime.superConstructor(R).call(this,e),this.widths=[],this.ghostTable=new v(this.hot),this.samplesGenerator=new b(function(e,o){return t.hot.getDataAtCell(e,o)}),this.firstCalculation=!0,this.inProgress=!1},R=y;$traceurRuntime.createClass(y,{isEnabled:function(){return this.hot.getSettings().autoColumnSize!==!1&&!this.hot.getSettings().colWidths},enablePlugin:function(){var e=this;this.enabled||(this.addHook("beforeRender",function(t){return e.onBeforeRender(t)}),this.addHook("modifyColWidth",function(t,o){return e.getColumnWidth(o,t)}),this.addHook("beforeChange",function(t){return e.onBeforeChange(t)}),this.addHook("afterLoadData",function(){return e.onAfterLoadData()}),this.addHook("beforeColumnResize",function(t,o,n){return e.onBeforeColumnResize(t,o,n)}),$traceurRuntime.superGet(this,R.prototype,"enablePlugin").call(this))},calculateColumnsWidth:function(){var e=void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countRows()-1},o=void 0!==arguments[2]?arguments[2]:!1,n=this;"number"==typeof e&&(e={from:e,to:e}),"number"==typeof t&&(t={from:t,to:t}),h(e.from,e.to,function(e){if(o||void 0===n.widths[e]&&!n.hot._getColWidthFromSettings(e)){var r=n.samplesGenerator.generateColumnSamples(e,t);r.forEach(function(e,t){n.ghostTable.addColumn(t,e)})}}),this.ghostTable.columns.length&&(this.ghostTable.getWidths(function(e,t){n.widths[e]=t}),this.ghostTable.clean())},calculateAllColumnsWidth:function(){var e=void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=this,o=0,n=this.hot.countCols()-1,r=null;this.inProgress=!0;var i=function(){return t.hot?(t.calculateColumnsWidth({from:o,to:Math.min(o+R.CALCULATION_STEP,n)},e),o=o+R.CALCULATION_STEP+1,void(n>o?r=f(i):(g(r),t.inProgress=!1,t.hot.view.wt.wtOverlays.adjustElementsSize(!0),t.hot.view.wt.wtOverlays.leftOverlay.needFullRender&&t.hot.view.wt.wtOverlays.leftOverlay.clone.draw()))):(g(r),void(t.inProgress=!1))};this.firstCalculation&&this.getSyncCalculationLimit()&&(this.calculateColumnsWidth({from:0,to:this.getSyncCalculationLimit()},e),this.firstCalculation=!1,o=this.getSyncCalculationLimit()+1),n>o?i():this.inProgress=!1},recalculateAllColumnsWidth:function(){this.clearCache(),this.calculateAllColumnsWidth()},getSyncCalculationLimit:function(){var e=R.SYNC_CALCULATION_LIMIT,t=this.hot.countCols()-1;return p(this.hot.getSettings().autoColumnSize)&&(e=this.hot.getSettings().autoColumnSize.syncLimit,m(e)?e=w(t,e):e>>=0),Math.min(e,t)},getColumnWidth:function(e){var t=arguments[1],o=t;return void 0!==this.widths[e]&&this.widths[e]>(t||0)&&(o=this.widths[e]),o},getFirstVisibleColumn:function(){var e=this.hot.view.wt;return e.wtViewport.columnsVisibleCalculator?e.wtTable.getFirstVisibleColumn():e.wtViewport.columnsRenderCalculator?e.wtTable.getFirstRenderedColumn():-1},getLastVisibleColumn:function(){var e=this.hot.view.wt;return e.wtViewport.columnsVisibleCalculator?e.wtTable.getLastVisibleColumn():e.wtViewport.columnsRenderCalculator?e.wtTable.getLastRenderedColumn():-1},clearCache:function(){this.widths.length=0},isNeedRecalculate:function(){return d(this.widths,function(e){return void 0===e}).length?!0:!1},onBeforeRender:function(){var e=this.hot.renderCall;this.calculateColumnsWidth({from:this.getFirstVisibleColumn(),to:this.getLastVisibleColumn()},void 0,e),this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllColumnsWidth()},onAfterLoadData:function(){var e=this;setTimeout(function(){e.hot&&e.recalculateAllColumnsWidth()},0)},onBeforeChange:function(e){var t=this;c(e,function(e){t.widths[e[1]]=void 0})},onBeforeColumnResize:function(e,t,o){return o&&(this.calculateColumnsWidth(void 0,e,!0),t=this.getColumnWidth(e)),t},destroy:function(){this.ghostTable.clean(),$traceurRuntime.superGet(this,R.prototype,"destroy").call(this)}},{get CALCULATION_STEP(){return 50},get SYNC_CALCULATION_LIMIT(){return 50}},l),C("autoColumnSize",y)},{"./../../helpers.js":42,"./../../plugins.js":45,"./../../utils/ghostTable.js":81,"./../../utils/samplesGenerator.js":82,"./../_base.js":46}],48:[function(e,t,o){"use strict";Object.defineProperties(o,{AutoRowSize:{get:function(){return b}},__esModule:{value:!0}});var n,r,i,s,a,l=(n=e("./../_base.js"),n&&n.__esModule&&n||{"default":n})["default"],u=(r=e("./../../helpers.js"),r&&r.__esModule&&r||{"default":r}),c=(u.arrayEach,u.arrayFilter),d=(u.objectEach,u.rangeEach),h=u.requestAnimationFrame,f=u.cancelAnimationFrame,g=u.isObject,p=u.isPercentValue,m=u.valueAccordingPercent,w=(i=e("./../../utils/ghostTable.js"),i&&i.__esModule&&i||{"default":i}).GhostTable,v=(s=e("./../../plugins.js"),s&&s.__esModule&&s||{"default":s}).registerPlugin,C=(a=e("./../../utils/samplesGenerator.js"),a&&a.__esModule&&a||{"default":a}).SamplesGenerator,b=function(e){var t=this;$traceurRuntime.superConstructor(y).call(this,e),this.heights=[],this.ghostTable=new w(this.hot),this.samplesGenerator=new C(function(e,o){return t.hot.getDataAtCell(e,o)}),this.firstCalculation=!0,this.inProgress=!1},y=b;$traceurRuntime.createClass(b,{isEnabled:function(){return this.hot.getSettings().autoRowSize===!0||g(this.hot.getSettings().autoRowSize)},enablePlugin:function(){var e=this;this.enabled||(this.addHook("afterLoadData",function(){return e.onAfterLoadData()}),this.addHook("beforeChange",function(t){return e.onBeforeChange(t)}),this.addHook("beforeColumnMove",function(){return e.recalculateAllRowsHeight()}),this.addHook("beforeColumnResize",function(){return e.recalculateAllRowsHeight()}),this.addHook("beforeColumnSort",function(){return e.clearCache()}),this.addHook("beforeRender",function(t){return e.onBeforeRender(t)}),this.addHook("beforeRowMove",function(t,o){return e.onBeforeRowMove(t,o)}),this.addHook("beforeRowResize",function(t,o,n){return e.onBeforeRowResize(t,o,n)}),this.addHook("modifyRowHeight",function(t,o){return e.getRowHeight(o,t)}),$traceurRuntime.superGet(this,y.prototype,"enablePlugin").call(this))},disablePlugin:function(){$traceurRuntime.superGet(this,y.prototype,"disablePlugin").call(this)},calculateRowsHeight:function(){var e=void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countCols()-1},o=void 0!==arguments[2]?arguments[2]:!1,n=this;"number"==typeof e&&(e={from:e,to:e}),"number"==typeof t&&(t={from:t,to:t}),d(e.from,e.to,function(e){if(o||void 0===n.heights[e]){var r=n.samplesGenerator.generateRowSamples(e,t);r.forEach(function(e,t){n.ghostTable.addRow(t,e)})}}),this.ghostTable.rows.length&&(this.ghostTable.getHeights(function(e,t){n.heights[e]=t}),this.ghostTable.clean())},calculateAllRowsHeight:function(){var e=void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=this,o=0,n=this.hot.countRows()-1,r=null;this.inProgress=!0;var i=function(){return t.hot?(t.calculateRowsHeight({from:o,to:Math.min(o+y.CALCULATION_STEP,n)},e),o=o+y.CALCULATION_STEP+1,void(n>o?r=h(i):(f(r),t.inProgress=!1,t.hot.view.wt.wtOverlays.adjustElementsSize(!0),t.hot.view.wt.wtOverlays.leftOverlay.needFullRender&&t.hot.view.wt.wtOverlays.leftOverlay.clone.draw()))):(f(r),void(t.inProgress=!1))};this.firstCalculation&&this.getSyncCalculationLimit()&&(this.calculateRowsHeight({from:0,to:this.getSyncCalculationLimit()},e),this.firstCalculation=!1,o=this.getSyncCalculationLimit()+1),n>o?i():this.inProgress=!1},recalculateAllRowsHeight:function(){this.clearCache(),this.calculateAllRowsHeight()},getSyncCalculationLimit:function(){var e=y.SYNC_CALCULATION_LIMIT,t=this.hot.countRows()-1;return g(this.hot.getSettings().autoRowSize)&&(e=this.hot.getSettings().autoRowSize.syncLimit,p(e)?e=m(t,e):e>>=0),Math.min(e,t)},getRowHeight:function(e){var t=arguments[1],o=t;return void 0!==this.heights[e]&&this.heights[e]>(t||0)&&(o=this.heights[e]),o},getFirstVisibleRow:function(){var e=this.hot.view.wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getFirstVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getFirstRenderedRow():-1},getLastVisibleRow:function(){var e=this.hot.view.wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getLastVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getLastRenderedRow():-1},clearCache:function(){this.heights.length=0},clearCacheByRange:function(e){var t=this;"number"==typeof e&&(e={from:e,to:e}),d(Math.min(e.from,e.to),Math.max(e.from,e.to),function(e){t.heights[e]=void 0})},isNeedRecalculate:function(){return c(this.heights,function(e){return void 0===e}).length?!0:!1},onBeforeRender:function(){var e=this.hot.renderCall;this.calculateRowsHeight({from:this.getFirstVisibleRow(),to:this.getLastVisibleRow()},void 0,e),this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllRowsHeight()},onBeforeRowMove:function(e,t){this.clearCacheByRange({from:e,to:t}),this.calculateAllRowsHeight()},onBeforeRowResize:function(e,t,o){return o&&(this.calculateRowsHeight(e,void 0,!0),t=this.getRowHeight(e)),t},onAfterLoadData:function(){var e=this;setTimeout(function(){e.hot&&e.recalculateAllRowsHeight()},0)},onBeforeChange:function(e){var t=null;1===e.length?t=e[0][0]:e.length>1&&(t={from:e[0][0],to:e[e.length-1][0]}),t&&this.clearCacheByRange(t)},destroy:function(){this.ghostTable.clean(),$traceurRuntime.superGet(this,y.prototype,"destroy").call(this)}},{get CALCULATION_STEP(){return 50},get SYNC_CALCULATION_LIMIT(){return 500}},l),v("autoRowSize",b)},{"./../../helpers.js":42,"./../../plugins.js":45,"./../../utils/ghostTable.js":81,"./../../utils/samplesGenerator.js":82,"./../_base.js":46}],49:[function(e,t,o){"use strict";function n(e,t,o,n){var r,i,s,a,l,u=o.length,c=o?o[0].length:0,d=[],h=[];if(r=t.row-e.row,i=t.col-e.col,-1!==["down","up"].indexOf(n)){for(var f=0;i>=f;f++)s=parseInt(o[0][f],10),a=parseInt(o[u-1][f],10),l=("down"===n?a-s:s-a)/(u-1)||0,h.push(l);d.push(h)}if(-1!==["right","left"].indexOf(n))for(var g=0;r>=g;g++)s=parseInt(o[g][0],10),a=parseInt(o[g][c-1],10),l=("right"===n?a-s:s-a)/(c-1)||0,h=[],h.push(l),d.push(h);return d}function r(e){function t(t){return e.autofill?void(e.autofill.handle&&e.autofill.handle.isDragged&&(e.autofill.handle.isDragged>1&&e.autofill.apply(),e.autofill.handle.isDragged=0,a=!1)):!0}function o(e){var t,o;return s.instance.autofill?(t=u.offset(s.instance.table).top-(window.pageYOffset||document.documentElement.scrollTop)+u.outerHeight(s.instance.table),o=u.offset(s.instance.table).left-(window.pageXOffset||document.documentElement.scrollLeft)+u.outerWidth(s.instance.table),s.addingStarted===!1&&s.instance.autofill.handle.isDragged>0&&e.clientY>t&&e.clientX<=o?(s.instance.mouseDragOutside=!0,s.addingStarted=!0):s.instance.mouseDragOutside=!1,void(s.instance.mouseDragOutside&&setTimeout(function(){s.addingStarted=!1,s.instance.alter("insert_row")},200))):!1}var n,r,i,s=this,a=!1;this.instance=e,this.addingStarted=!1,i=c(e),i.addEventListener(document,"mouseup",t),i.addEventListener(document,"mousemove",o),n=this.instance.view.wt.wtSettings.settings.onCellCornerMouseDown,this.instance.view.wt.wtSettings.settings.onCellCornerMouseDown=function(t){e.autofill.handle.isDragged=1,a=!0,n(t)},r=this.instance.view.wt.wtSettings.settings.onCellMouseOver,this.instance.view.wt.wtSettings.settings.onCellMouseOver=function(t,o,n,i){e.autofill&&a&&!e.view.isMouseDown()&&e.autofill.handle&&e.autofill.handle.isDragged&&(e.autofill.handle.isDragged++,e.autofill.showBorder(o),e.autofill.checkIfNewRowNeeded()),r(t,o,n,i)},this.instance.view.wt.wtSettings.settings.onCellCornerDblClick=function(){e.autofill.selectAdjacent()}}Object.defineProperties(o,{Autofill:{get:function(){return r}},__esModule:{value:!0}});var i,s,a,l,u=(i=e("./../../dom.js"),i&&i.__esModule&&i||{"default":i}),c=(s=e("./../../eventManager.js"),s&&s.__esModule&&s||{"default":s}).eventManager,d=((a=e("./../../plugins.js"),a&&a.__esModule&&a||{"default":a}).registerPlugin,(l=e("./../../3rdparty/walkontable/src/cell/coords.js"),l&&l.__esModule&&l||{"default":l}).WalkontableCellCoords);r.prototype.init=function(){this.handle={}},r.prototype.disable=function(){this.handle.disabled=!0},r.prototype.selectAdjacent=function(){var e,t,o,n,r;e=this.instance.selection.isMultiple()?this.instance.view.wt.selections.area.getCorners():this.instance.view.wt.selections.current.getCorners(),t=this.instance.getData();e:for(o=e[2]+1;o<this.instance.countRows();o++){for(r=e[1];r<=e[3];r++)if(t[o][r])break e;(t[o][e[1]-1]||t[o][e[3]+1])&&(n=o)}n&&(this.instance.view.wt.selections.fill.clear(),this.instance.view.wt.selections.fill.add(new d(e[0],e[1])),this.instance.view.wt.selections.fill.add(new d(n,e[3])),this.apply())},r.prototype.apply=function(){var e,t,o,r,i,s,a,l;this.handle.isDragged=0,e=this.instance.view.wt.selections.fill.getCorners(),e&&(this.instance.view.wt.selections.fill.clear(),t=this.instance.selection.isMultiple()?this.instance.view.wt.selections.area.getCorners():this.instance.view.wt.selections.current.getCorners(),Handsontable.hooks.run(this.instance,"afterAutofillApplyValues",t,e),e[0]===t[0]&&e[1]<t[1]?(s="left",o=new d(e[0],e[1]),r=new d(e[2],t[1]-1)):e[0]===t[0]&&e[3]>t[3]?(s="right",o=new d(e[0],t[3]+1),r=new d(e[2],e[3])):e[0]<t[0]&&e[1]===t[1]?(s="up",o=new d(e[0],e[1]),r=new d(t[0]-1,e[3])):e[2]>t[2]&&e[1]===t[1]&&(s="down",o=new d(t[2]+1,e[1]),r=new d(e[2],e[3])),o&&o.row>-1&&o.col>-1?(l={from:this.instance.getSelectedRange().from,to:this.instance.getSelectedRange().to},i=this.instance.getData(l.from.row,l.from.col,l.to.row,l.to.col),a=n(o,r,i,s),Handsontable.hooks.run(this.instance,"beforeAutofill",o,r,i),this.instance.populateFromArray(o.row,o.col,i,r.row,r.col,"autofill",null,s,a),this.instance.selection.setRangeStart(new d(e[0],e[1])),this.instance.selection.setRangeEnd(new d(e[2],e[3]))):this.instance.selection.refreshBorders())},r.prototype.showBorder=function(e){var t=this.instance.getSelectedRange().getTopLeftCorner(),o=this.instance.getSelectedRange().getBottomRightCorner();if("horizontal"!==this.instance.getSettings().fillHandle&&(o.row<e.row||t.row>e.row))e=new d(e.row,o.col);else{if("vertical"===this.instance.getSettings().fillHandle)return;e=new d(o.row,e.col)}this.instance.view.wt.selections.fill.clear(),this.instance.view.wt.selections.fill.add(this.instance.getSelectedRange().from),this.instance.view.wt.selections.fill.add(this.instance.getSelectedRange().to),this.instance.view.wt.selections.fill.add(e),this.instance.view.render()},r.prototype.checkIfNewRowNeeded=function(){var e,t,o=this.instance.countRows(),n=this;this.instance.view.wt.selections.fill.cellRange&&this.addingStarted===!1&&(t=this.instance.getSelected(),e=this.instance.view.wt.selections.fill.getCorners(),t[2]<o-1&&e[2]===o-1&&(this.addingStarted=!0,this.instance._registerTimeout(setTimeout(function(){n.instance.alter("insert_row"),n.addingStarted=!1},200))))},Handsontable.hooks.add("afterInit",function(){var e=new r(this);"undefined"!=typeof this.getSettings().fillHandle&&(e.handle&&this.getSettings().fillHandle===!1?e.disable():e.handle||this.getSettings().fillHandle===!1||(this.autofill=e,this.autofill.init()))}),Handsontable.Autofill=r},{"./../../3rdparty/walkontable/src/cell/coords.js":5,"./../../dom.js":27,"./../../eventManager.js":41,"./../../plugins.js":45}],50:[function(e,t,o){"use strict";Object.defineProperties(o,{"default":{get:function(){return f}},__esModule:{value:!0}});var n,r,i,s,a=(n=e("./../../dom.js"),n&&n.__esModule&&n||{"default":n}),l=(r=e("./../../eventManager.js"),r&&r.__esModule&&r||{"default":r}).eventManager,u=(i=e("./../_base.js"),i&&i.__esModule&&i||{"default":i})["default"],c=(s=e("./../../plugins.js"),s&&s.__esModule&&s||{"default":s}).registerPlugin;Handsontable.hooks.register("beforeColumnSort"),Handsontable.hooks.register("afterColumnSort");var d=function(e){$traceurRuntime.superConstructor(h).call(this,e),this.sortIndicators=[]},h=d;$traceurRuntime.createClass(d,{isEnabled:function(){return!!this.hot.getSettings().columnSorting},enablePlugin:function(){var e=this;if(!this.enabled){var t=this;this.hot.sortIndex=[],this.hot.sort=function(){var e=Array.prototype.slice.call(arguments);return t.sortByColumn.apply(t,e)},"undefined"==typeof this.hot.getSettings().observeChanges&&this.enableObserveChangesPlugin(),this.bindColumnSortingAfterClick(),this.addHook("modifyRow",function(t){return e.translateRow(t)}),this.addHook("afterUpdateSettings",function(){return e.onAfterUpdateSettings()}),this.addHook("afterGetColHeader",function(t,o){return e.getColHeader(t,o)}),this.addHook("afterCreateRow",function(){t.afterCreateRow.apply(t,arguments)}),this.addHook("afterRemoveRow",function(){t.afterRemoveRow.apply(t,arguments)}),this.addHook("afterInit",function(){return e.sortBySettings()}),this.addHook("afterLoadData",function(){e.hot.sortIndex=[],e.hot.view&&e.sortBySettings()}),this.hot.view&&this.sortBySettings(),$traceurRuntime.superGet(this,h.prototype,"enablePlugin").call(this)}},disablePlugin:function(){this.hot.sort=void 0,$traceurRuntime.superGet(this,h.prototype,"disablePlugin").call(this)},onAfterUpdateSettings:function(){this.sortBySettings()},sortBySettings:function(){var e,t,o=this.hot.getSettings().columnSorting,n=this.loadSortingState();"undefined"!=typeof n?(e=n.sortColumn,t=n.sortOrder):(e=o.column,t=o.sortOrder),this.sortByColumn(e,t)},setSortingColumn:function(e,t){return"undefined"==typeof e?(this.hot.sortColumn=void 0,void(this.hot.sortOrder=void 0)):(this.hot.sortColumn===e&&"undefined"==typeof t?this.hot.sortOrder===!1?this.hot.sortOrder=void 0:this.hot.sortOrder=!this.hot.sortOrder:this.hot.sortOrder="undefined"!=typeof t?t:!0,void(this.hot.sortColumn=e))},sortByColumn:function(e,t){this.setSortingColumn(e,t),"undefined"!=typeof this.hot.sortColumn&&(Handsontable.hooks.run(this.hot,"beforeColumnSort",this.hot.sortColumn,this.hot.sortOrder),this.sort(),this.hot.render(),this.saveSortingState(),Handsontable.hooks.run(this.hot,"afterColumnSort",this.hot.sortColumn,this.hot.sortOrder))},saveSortingState:function(){var e={};"undefined"!=typeof this.hot.sortColumn&&(e.sortColumn=this.hot.sortColumn),"undefined"!=typeof this.hot.sortOrder&&(e.sortOrder=this.hot.sortOrder),(e.hasOwnProperty("sortColumn")||e.hasOwnProperty("sortOrder"))&&Handsontable.hooks.run(this.hot,"persistentStateSave","columnSorting",e)},loadSortingState:function(){var e={};return Handsontable.hooks.run(this.hot,"persistentStateLoad","columnSorting",e),e.value},bindColumnSortingAfterClick:function(){function e(){var e=n.hot.view.TBODY.querySelector("tr").querySelectorAll("th");return e.length}function t(t){var o=a.closest(t,"TH");return a.index(o)-e()}if(!this.bindedSortEvent){var o=l(this.hot),n=this;this.bindedSortEvent=!0,o.addEventListener(this.hot.rootElement,"click",function(e){if(a.hasClass(e.target,"columnSorting")){var o=t(e.target);if(o!==this.lastSortedColumn)n.sortOrderClass="ascending";else switch(n.hot.sortOrder){case void 0:n.sortOrderClass="ascending";break;case!0:n.sortOrderClass="descending";break;case!1:n.sortOrderClass=void 0}this.lastSortedColumn=o,n.sortByColumn(o)}})}},enableObserveChangesPlugin:function(){var e=this;this.hot._registerTimeout(setTimeout(function(){e.hot.updateSettings({observeChanges:!0})},0))},defaultSort:function(e){return function(t,o){return"string"==typeof t[1]&&(t[1]=t[1].toLowerCase()),"string"==typeof o[1]&&(o[1]=o[1].toLowerCase()),t[1]===o[1]?0:null===t[1]||""===t[1]?1:null===o[1]||""===o[1]?-1:t[1]<o[1]?e?-1:1:t[1]>o[1]?e?1:-1:0}},dateSort:function(e){return function(t,o){if(t[1]===o[1])return 0;if(null===t[1])return 1;if(null===o[1])return-1;var n=new Date(t[1]),r=new Date(o[1]);return r>n?e?-1:1:n>r?e?1:-1:0}},sort:function(){if("undefined"!=typeof this.hot.sortOrder){var e,t;this.hot.sortingEnabled=!1,this.hot.sortIndex.length=0;for(var o=this.hot.colOffset(),n=0,r=this.hot.countRows()-this.hot.getSettings().minSpareRows;r>n;n++)this.hot.sortIndex.push([n,this.hot.getDataAtCell(n,this.hot.sortColumn+o)]);switch(e=this.hot.getCellMeta(0,this.hot.sortColumn),this.sortIndicators[this.hot.sortColumn]=e.sortIndicator,e.type){case"date":t=this.dateSort;break;default:t=this.defaultSort}this.hot.sortIndex.sort(t(this.hot.sortOrder));for(var n=this.hot.sortIndex.length;n<this.hot.countRows();n++)this.hot.sortIndex.push([n,this.hot.getDataAtCell(n,this.hot.sortColumn+o)]);this.hot.sortingEnabled=!0}},translateRow:function(e){return this.hot.sortingEnabled&&"undefined"!=typeof this.hot.sortOrder&&this.hot.sortIndex&&this.hot.sortIndex.length&&this.hot.sortIndex[e]?this.hot.sortIndex[e][0]:e},untranslateRow:function(e){if(this.hot.sortingEnabled&&this.hot.sortIndex&&this.hot.sortIndex.length)for(var t=0;t<this.hot.sortIndex.length;t++)if(this.hot.sortIndex[t][0]==e)return t},getColHeader:function(e,t){var o=t.querySelector(".colHeader");this.hot.getSettings().columnSorting&&e>=0&&a.addClass(o,"columnSorting"),a.removeClass(o,"descending"),a.removeClass(o,"ascending"),this.sortIndicators[e]&&e===this.hot.sortColumn&&("ascending"===this.sortOrderClass?a.addClass(o,"ascending"):"descending"===this.sortOrderClass&&a.addClass(o,"descending"))},isSorted:function(){return"undefined"!=typeof this.hot.sortColumn},afterCreateRow:function(e,t){if(this.isSorted()){for(var o=0;o<this.hot.sortIndex.length;o++)this.hot.sortIndex[o][0]>=e&&(this.hot.sortIndex[o][0]+=t);for(var o=0;t>o;o++)this.hot.sortIndex.splice(e+o,0,[e+o,this.hot.getData()[e+o][this.hot.sortColumn+this.hot.colOffset()]]);this.saveSortingState()}},afterRemoveRow:function(e,t){if(this.isSorted()){var o=this.translateRow(e);this.hot.sortIndex.splice(e,t);for(var n=0;n<this.hot.sortIndex.length;n++)this.hot.sortIndex[n][0]>o&&(this.hot.sortIndex[n][0]-=t);this.saveSortingState()}}},{},u);var f=d;c("columnSorting",d)},{"./../../dom.js":27,"./../../eventManager.js":41,"./../../plugins.js":45,"./../_base.js":46}],51:[function(e,t,o){"use strict";Object.defineProperties(o,{CommentEditor:{get:function(){return i}},__esModule:{value:!0}});var n,r=(n=e("./../../dom.js"),n&&n.__esModule&&n||{"default":n}),i=function(){this.editor=this.createEditor(),this.editorStyle=this.editor.style,this.editorStyle.position="absolute",this.editorStyle.zIndex=100,this.hide()},s=i;$traceurRuntime.createClass(i,{setPosition:function(e,t){this.editorStyle.left=e+"px",this.editorStyle.top=t+"px"},show:function(){this.editorStyle.display="block"},hide:function(){this.editorStyle.display="none"},isVisible:function(){return"block"===this.editorStyle.display},setValue:function(){var e=void 0!==arguments[0]?arguments[0]:"";e=e||"",this.getInputElement().value=e},getValue:function(){return this.getInputElement().value},isFocused:function(){return document.activeElement===this.getInputElement()},focus:function(){this.getInputElement().focus()},createEditor:function(){var e,t,o=document.querySelector("."+s.CLASS_EDITOR_CONTAINER);return o||(o=document.createElement("div"),r.addClass(o,s.CLASS_EDITOR_CONTAINER),document.body.appendChild(o)),e=document.createElement("div"),r.addClass(e,s.CLASS_EDITOR),t=document.createElement("textarea"),r.addClass(t,s.CLASS_INPUT),e.appendChild(t),o.appendChild(e),e},getInputElement:function(){return this.editor.querySelector("."+s.CLASS_INPUT)},destroy:function(){this.editor.parentNode.removeChild(this.editor),this.editor=null,this.editorStyle=null}},{get CLASS_EDITOR_CONTAINER(){return"htCommentsContainer"},get CLASS_EDITOR(){return"htComments"},get CLASS_INPUT(){return"htCommentTextArea"},get CLASS_CELL(){return"htCommentCell"}})},{"./../../dom.js":27}],52:[function(e,t,o){"use strict";Object.defineProperties(o,{Comments:{get:function(){return m}},__esModule:{value:!0}});var n,r,i,s,a,l,u=(n=e("./../../dom.js"),n&&n.__esModule&&n||{"default":n}),c=(r=e("./../../eventManager.js"),r&&r.__esModule&&r||{"default":r}).EventManager,d=(i=e("./../../3rdparty/walkontable/src/cell/coords.js"),i&&i.__esModule&&i||{"default":i}).WalkontableCellCoords,h=(s=e("./../../plugins.js"),s&&s.__esModule&&s||{"default":s}),f=h.registerPlugin,g=(h.getPlugin,(a=e("./../_base.js"),a&&a.__esModule&&a||{"default":a})["default"]),p=(l=e("./commentEditor.js"),l&&l.__esModule&&l||{"default":l}).CommentEditor,m=function(e){$traceurRuntime.superConstructor(w).call(this,e),this.editor=null,this.eventManager=null,this.range={},this.mouseDown=!1,this.contextMenuEvent=!1,this.timer=null},w=m;$traceurRuntime.createClass(m,{isEnabled:function(){return this.hot.getSettings().comments},enablePlugin:function(){var e=this;this.enabled||(this.editor||(this.editor=new p),this.eventManager||(this.eventManager=new c(this)),this.addHook("afterContextMenuDefaultOptions",function(t){return e.addToContextMenu(t)}),this.addHook("afterRenderer",function(t,o,n,r,i,s){return e.onAfterRenderer(t,s)}),this.addHook("afterScrollVertically",function(){return e.refreshEditorPosition()}),this.addHook("afterColumnResize",function(){return e.refreshEditorPosition()}),this.addHook("afterRowResize",function(){return e.refreshEditorPosition()}),this.registerListeners(),$traceurRuntime.superGet(this,w.prototype,"enablePlugin").call(this))},registerListeners:function(){var e=this;this.eventManager.addEventListener(document,"mouseover",function(t){return e.onMouseOver(t)}),this.eventManager.addEventListener(document,"mousedown",function(t){return e.onMouseDown(t)}),this.eventManager.addEventListener(document,"mousemove",function(t){return e.onMouseMove(t)}),this.eventManager.addEventListener(document,"mouseup",function(t){return e.onMouseUp(t)}),this.eventManager.addEventListener(this.editor.getInputElement(),"blur",function(t){return e.onEditorBlur(t)})},setRange:function(e){this.range=e},clearRange:function(){this.range={}},targetIsCellWithComment:function(e){return u.hasClass(e.target,"htCommentCell")&&u.closest(e.target,[this.hot.rootElement])?!0:!1},targetIsCommentTextArea:function(e){return this.editor.getInputElement()===e.target},saveComment:function(){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');var e=this.editor.getValue(),t=this.range.from.row,o=this.range.from.col;this.hot.setCellMeta(t,o,"comment",e),this.hot.render()},saveCommentAtCell:function(e,t){this.setRange({from:new d(e,t)}),this.saveComment()},removeComment:function(){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');this.hot.removeCellMeta(this.range.from.row,this.range.from.col,"comment"),this.hot.render(),this.hide()},removeCommentAtCell:function(e,t){this.setRange({from:new d(e,t)}),this.removeComment()},show:function(){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');var e=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return this.refreshEditorPosition(!0),this.editor.setValue(e.comment||""),this.editor.show(),!0},showAtCell:function(e,t){return this.setRange({from:new d(e,t)}),this.show()},hide:function(){this.editor.hide()},refreshEditorPosition:function(){var e=void 0!==arguments[0]?arguments[0]:!1;if(e||this.range.from&&this.editor.isVisible()){var t=this.hot.view.wt.wtTable.getCell(this.range.from),o=u.offset(t),n=this.hot.getColWidth(this.range.from.col),r=o.top,i=o.left,s=0,a=0;this.hot.view.wt.wtViewport.hasVerticalScroll()&&(r-=this.hot.view.wt.wtOverlays.topOverlay.getScrollPosition(),s=20),this.hot.view.wt.wtViewport.hasHorizontalScroll()&&(i-=this.hot.view.wt.wtOverlays.leftOverlay.getScrollPosition(),a=20);var l=i+n,c=r,d=this.hot.view.wt.wtTable.holder.getBoundingClientRect(),h={left:d.left+u.getWindowScrollLeft()+a,right:d.right+u.getWindowScrollLeft()-15,top:d.top+u.getWindowScrollTop()+s,bottom:d.bottom+u.getWindowScrollTop()};l<=h.left||l>h.right||c<=h.top||c>h.bottom?this.hide():this.editor.setPosition(l,c)}},onMouseDown:function(e){this.mouseDown=!0,this.hot.view&&this.hot.view.wt&&(this.contextMenuEvent||this.targetIsCommentTextArea(e)||this.targetIsCellWithComment(e)||this.hide(),this.contextMenuEvent=!1)},onMouseOver:function(e){if(!this.mouseDown&&!this.editor.isFocused())if(this.targetIsCellWithComment(e)){var t=this.hot.view.wt.wtTable.getCoords(e.target),o={from:new d(t.row,t.col)};this.setRange(o),this.show()}else this.targetIsCommentTextArea(e)||this.editor.isFocused()||this.hide()},onMouseMove:function(e){var t=this;this.targetIsCommentTextArea(e)&&(this.mouseDown=!0,clearTimeout(this.timer),this.timer=setTimeout(function(){t.mouseDown=!1},200))},onMouseUp:function(e){this.mouseDown=!1},onAfterRenderer:function(e,t){t.comment&&u.addClass(e,t.commentedCellClassName)},onEditorBlur:function(e){this.saveComment()},checkSelectionCommentsConsistency:function(){var e=!1,t=this.hot.getSelectedRange().from;return this.hot.getCellMeta(t.row,t.col).comment&&(e=!0),e},onContextMenuAddComment:function(){var e=this,t=this.hot.getSelectedRange();this.contextMenuEvent=!0,this.setRange({from:t.from}),this.show(),setTimeout(function(){e.hot&&(e.hot.deselectCell(),e.editor.focus())},10)},onContextMenuRemoveComment:function(e,t){this.contextMenuEvent=!0,this.removeCommentAtCell(t.start.row,t.start.col)},addToContextMenu:function(e){var t=this;e.items.push(Handsontable.ContextMenu.SEPARATOR,{key:"commentsAddEdit",name:function(){return t.checkSelectionCommentsConsistency()?"Edit Comment":"Add Comment"},callback:function(){return t.onContextMenuAddComment()},disabled:function(){return!1}},{key:"commentsRemove",name:function(){return"Delete Comment"},callback:function(e,o){return t.onContextMenuRemoveComment(e,o)},disabled:function(){return!t.checkSelectionCommentsConsistency()}})},destroy:function(){this.eventManager&&this.eventManager.clear(),this.editor&&this.editor.destroy(),$traceurRuntime.superGet(this,w.prototype,"destroy").call(this)}},{},g),f("comments",m)},{"./../../3rdparty/walkontable/src/cell/coords.js":5,"./../../dom.js":27,"./../../eventManager.js":41,"./../../plugins.js":45,"./../_base.js":46,"./commentEditor.js":51}],53:[function(e,t,o){"use strict";function n(e,t){this.instance=e;var o=this;if(o.menus=[],o.htMenus={},o.triggerRows=[],o.eventManager=C(o),this.enabled=!0,this.instance.addHook("afterDestroy",function(){o.destroy()}),this.defaultOptions={items:[{key:"row_above",name:"Insert row above",callback:function(e,t){this.alter("insert_row",t.start.row)},disabled:function(){
var e=this.getSelected(),t=[0,e[1],this.countRows()-1,e[1]],o=t.join(",")==e.join(",");return e[0]<0||this.countRows()>=this.getSettings().maxRows||o}},{key:"row_below",name:"Insert row below",callback:function(e,t){this.alter("insert_row",t.end.row+1)},disabled:function(){var e=this.getSelected(),t=[0,e[1],this.countRows()-1,e[1]],o=t.join(",")==e.join(",");return this.getSelected()[0]<0||this.countRows()>=this.getSettings().maxRows||o}},n.SEPARATOR,{key:"col_left",name:"Insert column on the left",callback:function(e,t){this.alter("insert_col",t.start.col)},disabled:function(){if(!this.isColumnModificationAllowed())return!0;var e=this.getSelected(),t=[e[0],0,e[0],this.countCols()-1],o=t.join(",")==e.join(",");return this.getSelected()[1]<0||this.countCols()>=this.getSettings().maxCols||o}},{key:"col_right",name:"Insert column on the right",callback:function(e,t){this.alter("insert_col",t.end.col+1)},disabled:function(){if(!this.isColumnModificationAllowed())return!0;var e=this.getSelected(),t=[e[0],0,e[0],this.countCols()-1],o=t.join(",")==e.join(",");return e[1]<0||this.countCols()>=this.getSettings().maxCols||o}},n.SEPARATOR,{key:"remove_row",name:"Remove row",callback:function(e,t){var o=t.end.row-t.start.row+1;this.alter("remove_row",t.start.row,o)},disabled:function(){var e=this.getSelected(),t=[0,e[1],this.countRows()-1,e[1]],o=t.join(",")==e.join(",");return e[0]<0||o}},{key:"remove_col",name:"Remove column",callback:function(e,t){var o=t.end.col-t.start.col+1;this.alter("remove_col",t.start.col,o)},disabled:function(){if(!this.isColumnModificationAllowed())return!0;var e=this.getSelected(),t=[e[0],0,e[0],this.countCols()-1],o=t.join(",")==e.join(",");return e[1]<0||o}},n.SEPARATOR,{key:"undo",name:"Undo",callback:function(){this.undo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isUndoAvailable()}},{key:"redo",name:"Redo",callback:function(){this.redo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isRedoAvailable()}},n.SEPARATOR,{key:"make_read_only",name:function(){var e="Read only",t=o.checkSelectionReadOnlyConsistency(this);return t&&(e=o.markSelected(e)),e},callback:function(){var e=o.checkSelectionReadOnlyConsistency(this),t=this;this.getSelectedRange().forAll(function(o,n){t.getCellMeta(o,n).readOnly=e?!1:!0}),this.render()}},n.SEPARATOR,{key:"alignment",name:"Alignment",submenu:{items:[{name:function(){var e="Left",t=o.checkSelectionAlignment(this,"htLeft");return t&&(e=o.markSelected(e)),e},callback:function(){d.call(this,this.getSelectedRange(),"horizontal","htLeft")},disabled:!1},{name:function(){var e="Center",t=o.checkSelectionAlignment(this,"htCenter");return t&&(e=o.markSelected(e)),e},callback:function(){d.call(this,this.getSelectedRange(),"horizontal","htCenter")},disabled:!1},{name:function(){var e="Right",t=o.checkSelectionAlignment(this,"htRight");return t&&(e=o.markSelected(e)),e},callback:function(){d.call(this,this.getSelectedRange(),"horizontal","htRight")},disabled:!1},{name:function(){var e="Justify",t=o.checkSelectionAlignment(this,"htJustify");return t&&(e=o.markSelected(e)),e},callback:function(){d.call(this,this.getSelectedRange(),"horizontal","htJustify")},disabled:!1},n.SEPARATOR,{name:function(){var e="Top",t=o.checkSelectionAlignment(this,"htTop");return t&&(e=o.markSelected(e)),e},callback:function(){d.call(this,this.getSelectedRange(),"vertical","htTop")},disabled:!1},{name:function(){var e="Middle",t=o.checkSelectionAlignment(this,"htMiddle");return t&&(e=o.markSelected(e)),e},callback:function(){d.call(this,this.getSelectedRange(),"vertical","htMiddle")},disabled:!1},{name:function(){var e="Bottom",t=o.checkSelectionAlignment(this,"htBottom");return t&&(e=o.markSelected(e)),e},callback:function(){d.call(this,this.getSelectedRange(),"vertical","htBottom")},disabled:!1}]}}]},o.options={},w.extend(o.options,this.options),this.bindMouseEvents(),this.markSelected=function(e){return"<span class='selected'>"+String.fromCharCode(10003)+"</span>"+e},this.checkSelectionAlignment=function(e,t){var o=!1;return e.getSelectedRange().forAll(function(n,r){var i=e.getCellMeta(n,r).className;return i&&-1!=i.indexOf(t)?(o=!0,!1):void 0}),o},!this.instance.getSettings().allowInsertRow){var r=i(this.defaultOptions.items,"row_above");this.defaultOptions.items.splice(r,1);var s=i(this.defaultOptions.items,"row_above");this.defaultOptions.items.splice(s,1),this.defaultOptions.items.splice(s,1)}if(!this.instance.getSettings().allowInsertColumn){var a=i(this.defaultOptions.items,"col_left");this.defaultOptions.items.splice(a,1);var l=i(this.defaultOptions.items,"col_right");this.defaultOptions.items.splice(l,1),this.defaultOptions.items.splice(l,1)}var u,c,h=!1,f=!1;this.instance.getSettings().allowRemoveRow||(u=i(this.defaultOptions.items,"remove_row"),this.defaultOptions.items.splice(u,1),h=!0),this.instance.getSettings().allowRemoveColumn||(c=i(this.defaultOptions.items,"remove_col"),this.defaultOptions.items.splice(c,1),f=!0),h&&f&&this.defaultOptions.items.splice(c,1),this.checkSelectionReadOnlyConsistency=function(e){var t=!1;return e.getSelectedRange().forAll(function(o,n){return e.getCellMeta(o,n).readOnly?(t=!0,!1):void 0}),t},Handsontable.hooks.run(e,"afterContextMenuDefaultOptions",this.defaultOptions)}function r(e,t){for(var o=0,n=e.length;n>o;o++)if(e[o].key===t)return e[o]}function i(e,t){for(var o=0,n=e.length;n>o;o++)if(e[o].key===t)return o}function s(){if(!this.rootElement.className.indexOf("htContextMenu")){for(var e=0,t=0,o=this.getSettings().data.length,r=parseInt(this.view.wt.wtTable.hider.style.width,10),i=0;o>i;i++)this.getSettings().data[i].name==n.SEPARATOR.name?e+=1:t+=26;this.view.wt.wtTable.holder.style.width=r+22+"px",this.view.wt.wtTable.holder.style.height=t+e+4+"px"}}function a(e,t){return-1!=e.indexOf(t)?e:(e=e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ",""),e+=" "+t)}function l(e,t){return-1!=e.indexOf(t)?e:(e=e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ",""),e+=" "+t)}function u(e){for(var t={},o=e.from.row;o<=e.to.row;o++)for(var n=e.from.col;n<=e.to.col;n++)t[o]||(t[o]=[]),t[o][n]=this.getCellMeta(o,n).className;return t}function c(e,t,o,n){var r=this.getCellMeta(e,t),i=n;r.className&&(i="vertical"===o?a(r.className,n):l(r.className,n)),this.setCellMeta(e,t,"className",i)}function d(e,t,o){var n=u.call(this,e);if(this.runHooks("beforeCellAlignment",n,e,t,o),e.from.row==e.to.row&&e.from.col==e.to.col)c.call(this,e.from.row,e.from.col,t,o);else for(var r=e.from.row;r<=e.to.row;r++)for(var i=e.from.col;i<=e.to.col;i++)c.call(this,r,i,t,o);this.render()}function h(){var e=this,t=e.getSettings().contextMenu,o=w.isObject(t)?t:{};t?(e.contextMenu||(e.contextMenu=new n(e,o)),e.contextMenu.enable()):e.contextMenu&&(e.contextMenu.destroy(),delete e.contextMenu)}Object.defineProperties(o,{ContextMenu:{get:function(){return n}},__esModule:{value:!0}});var f,g,p,m,w=(f=e("./../../helpers.js"),f&&f.__esModule&&f||{"default":f}),v=(g=e("./../../dom.js"),g&&g.__esModule&&g||{"default":g}),C=(p=e("./../../eventManager.js"),p&&p.__esModule&&p||{"default":p}).eventManager;(m=e("./../../plugins.js"),m&&m.__esModule&&m||{"default":m}).registerPlugin;n.prototype.createMenu=function(e,t){e&&(e=e.replace(/ /g,"_"),e="htContextSubMenu_"+e);var o;return o=e?document.querySelector(".htContextMenu."+e):document.querySelector(".htContextMenu"),o||(o=document.createElement("DIV"),v.addClass(o,"htContextMenu"),e&&v.addClass(o,e),document.getElementsByTagName("body")[0].appendChild(o)),this.menus.indexOf(o)<0&&(this.menus.push(o),t=t||0,this.triggerRows.push(t)),o},n.prototype.bindMouseEvents=function(){function e(e){function t(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}var o,r,i,s,a=this.instance.getSettings(),l=this.instance.getSettings().rowHeaders,u=this.instance.getSettings().colHeaders;if(r=e.realTarget,this.closeAll(),e.preventDefault(),w.stopPropagation(e),l||u){if(l&&u&&(o=r.parentNode.querySelectorAll(".cornerHeader").length>0))return}else if(!(t(r)||v.hasClass(r,"current")&&v.hasClass(r,"wtBorder")))return;s=this.createMenu(),i=this.getItems(a.contextMenu),this.show(s,i),this.setMenuPosition(e,s),this.eventManager.addEventListener(document.documentElement,"mousedown",w.proxy(n.prototype.closeAll,this))}var t=C(this.instance);t.addEventListener(this.instance.rootElement,"contextmenu",w.proxy(e,this))},n.prototype.bindTableEvents=function(){this._afterScrollCallback=function(){},this.instance.addHook("afterScrollVertically",this._afterScrollCallback),this.instance.addHook("afterScrollHorizontally",this._afterScrollCallback)},n.prototype.unbindTableEvents=function(){this._afterScrollCallback&&(this.instance.removeHook("afterScrollVertically",this._afterScrollCallback),this.instance.removeHook("afterScrollHorizontally",this._afterScrollCallback),this._afterScrollCallback=null)},n.prototype.performAction=function(e,t){var o=this,r=t.getSelected()[0],i=t.getData()[r];if(i.disabled!==!0&&("function"!=typeof i.disabled||i.disabled.call(this.instance)!==!0)&&!i.hasOwnProperty("submenu")){if("function"!=typeof i.callback)return;var s=this.instance.getSelectedRange(),a=n.utils.normalizeSelection(s);i.callback.call(this.instance,i.key,a,e),o.closeAll()}},n.prototype.unbindMouseEvents=function(){this.eventManager.clear();var e=C(this.instance);e.removeEventListener(this.instance.rootElement,"contextmenu")},n.prototype.show=function(e,t){var o=this;e.removeAttribute("style"),e.style.display="block";var n={data:t,colHeaders:!1,colWidths:[200],autoRowSize:!1,readOnly:!0,copyPaste:!1,columns:[{data:"name",renderer:w.proxy(this.renderer,this)}],renderAllRows:!0,beforeKeyDown:function(e){o.onBeforeKeyDown(e,r)},afterOnCellMouseOver:function(e,t,n){o.onCellMouseOver(e,t,n,r)}},r=new Handsontable(e,n);r.isHotTableEnv=this.instance.isHotTableEnv,Handsontable.eventManager.isHotTableEnv=this.instance.isHotTableEnv,this.eventManager.removeEventListener(e,"mousedown"),this.eventManager.addEventListener(e,"mousedown",function(e){o.performAction(e,r)}),this.bindTableEvents(),r.listen(),this.htMenus[r.guid]=r,Handsontable.hooks.run(this.instance,"afterContextMenuShow",r)},n.prototype.close=function(e){this.hide(e),this.eventManager.clear(),this.unbindTableEvents(),this.instance.listen()},n.prototype.closeAll=function(){for(;this.menus.length>0;){var e=this.menus.pop();e&&this.close(e)}this.triggerRows=[]},n.prototype.closeLastOpenedSubMenu=function(){var e=this.menus.pop();e&&this.hide(e)},n.prototype.hide=function(e){e.style.display="none";var t=this.htMenus[e.id];Handsontable.hooks.run(this.instance,"afterContextMenuHide",t),t.destroy(),delete this.htMenus[e.id]},n.prototype.renderer=function(e,t,o,r,i,s){function a(e){return e.hasOwnProperty("submenu")}function l(e){return new RegExp(n.SEPARATOR.name,"i").test(e.name)}function u(e){return e.disabled===!0||"function"==typeof e.disabled&&e.disabled.call(c.instance)===!0}var c=this,d=e.getData()[o],h=document.createElement("DIV");"function"==typeof s&&(s=s.call(this.instance)),v.empty(t),t.appendChild(h),l(d)?v.addClass(t,"htSeparator"):v.fastInnerHTML(h,s),u(d)?(v.addClass(t,"htDisabled"),this.eventManager.addEventListener(h,"mouseenter",function(){e.deselectCell()})):a(d)?(v.addClass(t,"htSubmenu"),this.eventManager.addEventListener(h,"mouseenter",function(){e.selectCell(o,r)})):(v.removeClass(t,"htSubmenu"),v.removeClass(t,"htDisabled"),this.eventManager.addEventListener(h,"mouseenter",function(){e.selectCell(o,r)}))},n.prototype.onCellMouseOver=function(e,t,o,n){var r=this.menus.length;if(r>0){var i=this.menus[r-1];i.id!=n.guid&&this.closeLastOpenedSubMenu()}else this.closeLastOpenedSubMenu();if(-1!=o.className.indexOf("htSubmenu")){var s=n.getData()[t.row],a=this.getItems(s.submenu),l=this.createMenu(s.name,t.row),u=o.getBoundingClientRect();this.show(l,a),this.setSubMenuPosition(u,l)}},n.prototype.onBeforeKeyDown=function(e,t){function o(e){var t=e.getCell(0,0);n.utils.isSeparator(t)||n.utils.isDisabled(t)?i(0,0,e):e.selectCell(0,0)}function r(e){var t=e.countRows()-1,o=e.getCell(t,0);n.utils.isSeparator(o)||n.utils.isDisabled(o)?s(t,0,e):e.selectCell(t,0)}function i(e,t,o){var r=e+1,s=r<o.countRows()?o.getCell(r,t):null;s&&(n.utils.isSeparator(s)||n.utils.isDisabled(s)?i(r,t,o):o.selectCell(r,t))}function s(e,t,o){var r=e-1,i=r>=0?o.getCell(r,t):null;i&&(n.utils.isSeparator(i)||n.utils.isDisabled(i)?s(r,t,o):o.selectCell(r,t))}function a(e,t,o,n){var r=e.getData()[n],i=t.getItems(r.submenu),s=t.createMenu(r.name,n),a=o.getBoundingClientRect(),l=t.show(s,i);t.setSubMenuPosition(a,s),l.selectCell(0,0)}v.enableImmediatePropagation(e);var l=this,u=t.getSelected();switch(e.keyCode){case w.keyCode.ESCAPE:l.closeAll(),e.preventDefault(),e.stopImmediatePropagation();break;case w.keyCode.ENTER:u&&l.performAction(e,t);break;case w.keyCode.ARROW_DOWN:u?i(u[0],u[1],t,l):o(t,l),e.preventDefault(),e.stopImmediatePropagation();break;case w.keyCode.ARROW_UP:u?s(u[0],u[1],t,l):r(t,l),e.preventDefault(),e.stopImmediatePropagation();break;case w.keyCode.ARROW_RIGHT:if(u){var c=u[0],d=t.getCell(u[0],0);n.utils.hasSubMenu(d)&&a(t,l,d,c)}e.preventDefault(),e.stopImmediatePropagation();break;case w.keyCode.ARROW_LEFT:if(u){if(-1!=t.rootElement.className.indexOf("htContextSubMenu_")){l.closeLastOpenedSubMenu();var h=l.menus.length;if(h>0){var f=l.menus[h-1],g=l.triggerRows.pop();t=this.htMenus[f.id],t.selectCell(g,0)}}e.preventDefault(),e.stopImmediatePropagation()}}},n.prototype.getItems=function(e){function t(e){"string"==typeof e?this.name=e:w.extend(this,e)}var o,n;t.prototype=e,e&&e.items&&(e=e.items),e===!0&&(e=this.defaultOptions.items),o=[];for(var i in e)e.hasOwnProperty(i)&&(n="string"==typeof e[i]?r(this.defaultOptions.items,e[i]):r(this.defaultOptions.items,i),n||(n=e[i]),n=new t(n),"object"==typeof e[i]&&w.extend(n,e[i]),n.key||(n.key=i),o.push(n));return o},n.prototype.setSubMenuPosition=function(e,t){var o=v.getWindowScrollTop(),n=v.getWindowScrollLeft(),r={top:o+e.top,topRelative:e.top,left:e.left,leftRelative:e.left-n,scrollTop:o,scrollLeft:n,cellHeight:e.height,cellWidth:e.width};this.menuFitsBelowCursor(r,t,document.body.clientWidth)?this.positionMenuBelowCursor(r,t,!0):this.menuFitsAboveCursor(r,t)?this.positionMenuAboveCursor(r,t,!0):this.positionMenuBelowCursor(r,t,!0),this.menuFitsOnRightOfCursor(r,t,document.body.clientWidth)?this.positionMenuOnRightOfCursor(r,t,!0):this.positionMenuOnLeftOfCursor(r,t,!0)},n.prototype.setMenuPosition=function(e,t){var o=v.getWindowScrollTop(),n=v.getWindowScrollLeft(),r=e.pageY||e.clientY+o,i=e.pageX||e.clientX+n,s={top:r,topRelative:r-o,left:i,leftRelative:i-n,scrollTop:o,scrollLeft:n,cellHeight:e.target.clientHeight,cellWidth:e.target.clientWidth};this.menuFitsBelowCursor(s,t,document.body.clientHeight)?this.positionMenuBelowCursor(s,t):this.menuFitsAboveCursor(s,t)?this.positionMenuAboveCursor(s,t):this.positionMenuBelowCursor(s,t),this.menuFitsOnRightOfCursor(s,t,document.body.clientWidth)?this.positionMenuOnRightOfCursor(s,t):this.positionMenuOnLeftOfCursor(s,t)},n.prototype.menuFitsAboveCursor=function(e,t){return e.topRelative>=t.offsetHeight},n.prototype.menuFitsBelowCursor=function(e,t,o){return e.topRelative+t.offsetHeight<=o},n.prototype.menuFitsOnRightOfCursor=function(e,t,o){return e.leftRelative+t.offsetWidth<=o},n.prototype.positionMenuBelowCursor=function(e,t){t.style.top=e.top+"px"},n.prototype.positionMenuAboveCursor=function(e,t,o){o?t.style.top=e.top+e.cellHeight-t.offsetHeight+"px":t.style.top=e.top-t.offsetHeight+"px"},n.prototype.positionMenuOnRightOfCursor=function(e,t,o){o?t.style.left=1+e.left+e.cellWidth+"px":t.style.left=1+e.left+"px"},n.prototype.positionMenuOnLeftOfCursor=function(e,t,o){o?t.style.left=e.left-t.offsetWidth+"px":t.style.left=e.left-t.offsetWidth+"px"},n.utils={},n.utils.normalizeSelection=function(e){return{start:e.getTopLeftCorner(),end:e.getBottomRightCorner()}},n.utils.isSeparator=function(e){return v.hasClass(e,"htSeparator")},n.utils.hasSubMenu=function(e){return v.hasClass(e,"htSubmenu")},n.utils.isDisabled=function(e){return v.hasClass(e,"htDisabled")},n.prototype.enable=function(){this.enabled||(this.enabled=!0,this.bindMouseEvents())},n.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.closeAll(),this.unbindMouseEvents(),this.unbindTableEvents())},n.prototype.destroy=function(){for(this.closeAll();this.menus.length>0;){var e=this.menus.pop();this.triggerRows.pop(),e&&(this.close(e),this.isMenuEnabledByOtherHotInstance()||this.removeMenu(e))}this.unbindMouseEvents(),this.unbindTableEvents()},n.prototype.isMenuEnabledByOtherHotInstance=function(){for(var e=document.querySelectorAll(".handsontable"),t=!1,o=0,n=e.length;n>o;o++){var r=this.htMenus[e[o].id];if(r&&r.getSettings().contextMenu){t=!0;break}}return t},n.prototype.removeMenu=function(e){e.parentNode&&this.menu.parentNode.removeChild(e)},n.prototype.align=function(e,t,o){d.call(this,e,t,o)},n.SEPARATOR={name:"---------"},Handsontable.hooks.add("afterInit",h),Handsontable.hooks.add("afterUpdateSettings",h),Handsontable.hooks.add("afterInit",s),Handsontable.hooks.register("afterContextMenuDefaultOptions"),Handsontable.hooks.register("afterContextMenuShow"),Handsontable.hooks.register("afterContextMenuHide"),Handsontable.ContextMenu=n},{"./../../dom.js":27,"./../../eventManager.js":41,"./../../helpers.js":42,"./../../plugins.js":45}],54:[function(e,t,o){"use strict";Object.defineProperties(o,{ContextMenuCopyPaste:{get:function(){return f}},__esModule:{value:!0}});var n,r,i,s,a,l=(n=e("./../../dom.js"),n&&n.__esModule&&n||{"default":n}),u=(r=e("./../../eventManager.js"),r&&r.__esModule&&r||{"default":r}).eventManager,c=(i=e("./../../plugins.js"),i&&i.__esModule&&i||{"default":i}).registerPlugin,d=(s=e("./../_base.js"),s&&s.__esModule&&s||{"default":s})["default"],h=(a=e("zeroclipboard"),a&&a.__esModule&&a||{"default":a})["default"],f=function(e){var t=this;$traceurRuntime.superConstructor(g).call(this,e),this.swfPath=null,this.hotContextMenu=null,this.outsideClickDeselectsCache=null,this.hot.addHook("afterContextMenuShow",function(e){return t.setupZeroClipboard(e)}),this.hot.addHook("afterInit",function(){return t.afterInit()}),this.hot.addHook("afterContextMenuDefaultOptions",function(e){return t.addToContextMenu(e)})},g=f;$traceurRuntime.createClass(f,{afterInit:function(){if(this.hot.getSettings().contextMenuCopyPaste){if("object"==typeof this.hot.getSettings().contextMenuCopyPaste&&(this.swfPath=this.hot.getSettings().contextMenuCopyPaste.swfPath),"undefined"==typeof h)throw new Error("To be able to use the Copy/Paste feature from the context menu, you need to manualy include ZeroClipboard.js file to your website.");try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){if("undefined"==typeof navigator.mimeTypes["application/x-shockwave-flash"])throw new Error("To be able to use the Copy/Paste feature from the context menu, your browser needs to have Flash Plugin installed.")}this.prepareZeroClipboard()}},prepareZeroClipboard:function(){this.swfPath&&h.config({swfPath:this.swfPath})},getCopyValue:function(){return this.hot.copyPaste.setCopyableText(),this.hot.copyPaste.copyPasteInstance.elTextarea.value},addToContextMenu:function(e){this.hot.getSettings().contextMenuCopyPaste&&e.items.unshift({key:"copy",name:"Copy"},{key:"paste",name:"Paste",callback:function(){this.copyPaste.triggerPaste()}},Handsontable.ContextMenu.SEPARATOR)},setupZeroClipboard:function(e){var t,o,n=this;if(this.hot.getSettings().contextMenuCopyPaste){this.hotContextMenu=e,t=this.hotContextMenu.getData();for(var r=0,i=t.length;i>r;r++)if("copy"===t[r].key){o=new h(this.hotContextMenu.getCell(r,0)),o.off(),o.on("copy",function(e){var t=e.clipboardData;t.setData("text/plain",n.getCopyValue()),n.hot.getSettings().outsideClickDeselects=n.outsideClickDeselectsCache}),this.bindEvents();break}}},removeCurrentClass:function(){if(this.hotContextMenu.rootElement){var e=this.hotContextMenu.rootElement.querySelector("td.current");e&&l.removeClass(e,"current")}this.outsideClickDeselectsCache=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1},removeZeroClipboardClass:function(){if(this.hotContextMenu.rootElement){var e=this.hotContextMenu.rootElement.querySelector("td.zeroclipboard-is-hover");e&&l.removeClass(e,"zeroclipboard-is-hover")}this.hot.getSettings().outsideClickDeselects=this.outsideClickDeselectsCache},bindEvents:function(){var e=this,t=u(this.hotContextMenu);t.addEventListener(document,"mouseenter",function(){return e.removeCurrentClass()}),t.addEventListener(document,"mouseleave",function(){return e.removeZeroClipboardClass()})}},{},d),c("contextMenuCopyPaste",f)},{"./../../dom.js":27,"./../../eventManager.js":41,"./../../plugins.js":45,"./../_base.js":46,zeroclipboard:void 0}],55:[function(e,t,o){"use strict";function n(e){function t(){e.isListening()&&e.selection.empty()}function o(t){var o,n,r,i,s,a,l,u,c,d;e.isListening()&&e.selection.isSelected()&&(o=t,n=f.parse(o),r=e.getSelected(),i=new g(r[0],r[1]),s=new g(r[2],r[3]),a=new p(i,i,s),l=a.getTopLeftCorner(),u=a.getBottomRightCorner(),c=l,d=new g(Math.max(u.row,n.length-1+l.row),Math.max(u.col,n[0].length-1+l.col)),e.addHookOnce("afterChange",function(e,t){e&&e.length&&this.selectCell(c.row,c.col,d.row,d.col)}),e.populateFromArray(c.row,c.col,n,d.row,d.col,"paste",e.getSettings().pasteMode))}function n(t){if(e.getSelected()&&(!e.getActiveEditor()||!e.getActiveEditor().isOpened())){if(d.isCtrlKey(t.keyCode))return r.setCopyableText(),void t.stopImmediatePropagation();var o=(t.ctrlKey||t.metaKey)&&!t.altKey;t.keyCode==d.keyCode.A&&o&&e._registerTimeout(setTimeout(d.proxy(r.setCopyableText,r),0))}}var r=this;this.copyPasteInstance=h(),this.copyPasteInstance.onCut(t),this.copyPasteInstance.onPaste(o),e.addHook("beforeKeyDown",n),this.destroy=function(){this.copyPasteInstance.removeCallback(t),this.copyPasteInstance.removeCallback(o),this.copyPasteInstance.destroy(),e.removeHook("beforeKeyDown",n)},e.addHook("afterDestroy",d.proxy(this.destroy,this)),this.triggerPaste=d.proxy(this.copyPasteInstance.triggerPaste,this.copyPasteInstance),this.triggerCut=d.proxy(this.copyPasteInstance.triggerCut,this.copyPasteInstance),this.setCopyableText=function(){var t=e.getSettings(),o=t.copyRowsLimit,n=t.copyColsLimit,r=e.getSelectedRange(),i=r.getTopLeftCorner(),s=r.getBottomRightCorner(),a=i.row,l=i.col,u=s.row,c=s.col,d=Math.min(u,a+o-1),h=Math.min(c,l+n-1);e.copyPaste.copyPasteInstance.copyable(e.getCopyableData(a,l,d,h)),(u!==d||c!==h)&&Handsontable.hooks.run(e,"afterCopyLimit",u-a+1,c-l+1,o,n)}}function r(){var e=this,t=e.getSettings().copyPaste!==!1;t&&!e.copyPaste?e.copyPaste=new n(e):!t&&e.copyPaste&&(e.copyPaste.destroy(),delete e.copyPaste)}Object.defineProperties(o,{CopyPaste:{get:function(){return CopyPaste}},__esModule:{value:!0}});var i,s,a,l,u,c,d=(i=e("./../../helpers.js"),i&&i.__esModule&&i||{"default":i}),h=(s=e("copyPaste"),s&&s.__esModule&&s||{"default":s})["default"],f=(a=e("SheetClip"),a&&a.__esModule&&a||{"default":a})["default"],g=((l=e("./../../plugins.js"),l&&l.__esModule&&l||{"default":l}).registerPlugin,(u=e("./../../3rdparty/walkontable/src/cell/coords.js"),u&&u.__esModule&&u||{"default":u}).WalkontableCellCoords),p=(c=e("./../../3rdparty/walkontable/src/cell/range.js"),c&&c.__esModule&&c||{"default":c}).WalkontableCellRange;Handsontable.hooks.add("afterInit",r),Handsontable.hooks.add("afterUpdateSettings",r),Handsontable.hooks.register("afterCopyLimit")},{"./../../3rdparty/walkontable/src/cell/coords.js":5,"./../../3rdparty/walkontable/src/cell/range.js":6,"./../../helpers.js":42,"./../../plugins.js":45,SheetClip:"SheetClip",copyPaste:"copyPaste"}],56:[function(e,t,o){"use strict";function n(){}var r,i,s,a,l=((r=e("./../../plugins.js"),r&&r.__esModule&&r||{"default":r}).registerPlugin,(i=e("./../../3rdparty/walkontable/src/cell/range.js"),i&&i.__esModule&&i||{"default":i}).WalkontableCellRange),u=(s=e("./../../3rdparty/walkontable/src/selection.js"),s&&s.__esModule&&s||{"default":s}).WalkontableSelection,c=function(e){return"boolean"==typeof e&&e===!0?!0:"object"==typeof e&&e.length>0?!0:!1},d=function(){c(this.getSettings().customBorders)&&(this.customBorders||(a=this,this.customBorders=new n))},h=function(e){for(var t=0;t<a.view.wt.selections.length;t++)if(a.view.wt.selections[t].settings.className==e)return t;return-1},f=function(e){var t={row:e.row,col:e.col},o=new u(e,new l(t,t,t)),n=h(e.className);n>=0?a.view.wt.selections[n]=o:a.view.wt.selections.push(o)},g=function(e,t,o){var n=b(e,t);n=y(n,o),this.setCellMeta(e,t,"borders",n),f(n)},p=function(e){for(var t=e.range,o=t.from.row;o<=t.to.row;o++)for(var n=t.from.col;n<=t.to.col;n++){var r=b(o,n),i=0;o==t.from.row&&(i++,e.hasOwnProperty("top")&&(r.top=e.top)),o==t.to.row&&(i++,e.hasOwnProperty("bottom")&&(r.bottom=e.bottom)),n==t.from.col&&(i++,e.hasOwnProperty("left")&&(r.left=e.left)),n==t.to.col&&(i++,e.hasOwnProperty("right")&&(r.right=e.right)),i>0&&(this.setCellMeta(o,n,"borders",r),f(r))}},m=function(e,t){return"border_row"+e+"col"+t},w=function(){return{width:1,color:"#000"}},v=function(){return{hide:!0}},C=function(){return{width:1,color:"#000",cornerVisible:!1}},b=function(e,t){return{className:m(e,t),border:C(),row:e,col:t,top:v(),right:v(),bottom:v(),left:v()}},y=function(e,t){return t.hasOwnProperty("border")&&(e.border=t.border),t.hasOwnProperty("top")&&(e.top=t.top),t.hasOwnProperty("right")&&(e.right=t.right),t.hasOwnProperty("bottom")&&(e.bottom=t.bottom),t.hasOwnProperty("left")&&(e.left=t.left),e},R=function(e){for(var t=document.querySelectorAll("."+e),o=0;o<t.length;o++)if(t[o]&&"TD"!=t[o].nodeName){var n=t[o].parentNode;n.parentNode&&n.parentNode.removeChild(n)}},S=function(e,t){var o=m(e,t);R(o),this.removeCellMeta(e,t,"borders")},E=function(e,t,o,n){var r=this.getCellMeta(e,t).borders;r&&void 0!=r.border||(r=b(e,t)),n?r[o]=v():r[o]=w(),this.setCellMeta(e,t,"borders",r);var i=m(e,t);R(i),f(r),this.render()},T=function(e,t,o){if(e.from.row==e.to.row&&e.from.col==e.to.col)"noBorders"==t?S.call(this,e.from.row,e.from.col):E.call(this,e.from.row,e.from.col,t,o);else switch(t){case"noBorders":for(var n=e.from.col;n<=e.to.col;n++)for(var r=e.from.row;r<=e.to.row;r++)S.call(this,r,n);break;case"top":for(var i=e.from.col;i<=e.to.col;i++)E.call(this,e.from.row,i,t,o);break;case"right":for(var s=e.from.row;s<=e.to.row;s++)E.call(this,s,e.to.col,t);break;case"bottom":for(var a=e.from.col;a<=e.to.col;a++)E.call(this,e.to.row,a,t);break;case"left":for(var l=e.from.row;l<=e.to.row;l++)E.call(this,l,e.from.col,t)}},H=function(e,t){var o=!1;return e.getSelectedRange().forAll(function(n,r){var i=e.getCellMeta(n,r).borders;if(i){if(!t)return o=!0,!1;if(!i[t].hasOwnProperty("hide"))return o=!0,!1}}),o},k=function(e){return"<span class='selected'>"+String.fromCharCode(10003)+"</span>"+e},O=function(e){this.getSettings().customBorders&&(e.items.push(Handsontable.ContextMenu.SEPARATOR),e.items.push({key:"borders",name:"Borders",submenu:{items:{top:{name:function(){var e="Top",t=H(this,"top");return t&&(e=k(e)),e},callback:function(){var e=H(this,"top");T.call(this,this.getSelectedRange(),"top",e)},disabled:!1},right:{name:function(){var e="Right",t=H(this,"right");return t&&(e=k(e)),e},callback:function(){var e=H(this,"right");T.call(this,this.getSelectedRange(),"right",e)},disabled:!1},bottom:{name:function(){var e="Bottom",t=H(this,"bottom");return t&&(e=k(e)),e},callback:function(){var e=H(this,"bottom");T.call(this,this.getSelectedRange(),"bottom",e)},disabled:!1},left:{name:function(){var e="Left",t=H(this,"left");return t&&(e=k(e)),e},callback:function(){var e=H(this,"left");T.call(this,this.getSelectedRange(),"left",e)},disabled:!1},remove:{name:"Remove border(s)",callback:function(){T.call(this,this.getSelectedRange(),"noBorders")},disabled:function(){return!H(this)}}}}}))};Handsontable.hooks.add("beforeInit",d),Handsontable.hooks.add("afterContextMenuDefaultOptions",O),Handsontable.hooks.add("afterInit",function(){var e=this.getSettings().customBorders;if(e){for(var t=0;t<e.length;t++)e[t].range?p.call(this,e[t]):g.call(this,e[t].row,e[t].col,e[t]);this.render(),this.view.wt.draw(!0)}}),Handsontable.CustomBorders=n},{"./../../3rdparty/walkontable/src/cell/range.js":6,"./../../3rdparty/walkontable/src/selection.js":18,"./../../plugins.js":45}],57:[function(e,t,o){"use strict";function n(){this.boundaries=null,this.callback=null}Object.defineProperties(o,{DragToScroll:{get:function(){return n}},__esModule:{value:!0}});var r,i,s=(r=e("./../../eventManager.js"),r&&r.__esModule&&r||{"default":r}).eventManager;(i=e("./../../plugins.js"),i&&i.__esModule&&i||{"default":i}).registerPlugin;Handsontable.plugins.DragToScroll=n,n.prototype.setBoundaries=function(e){this.boundaries=e},n.prototype.setCallback=function(e){this.callback=e},n.prototype.check=function(e,t){var o=0,n=0;t<this.boundaries.top?n=t-this.boundaries.top:t>this.boundaries.bottom&&(n=t-this.boundaries.bottom),e<this.boundaries.left?o=e-this.boundaries.left:e>this.boundaries.right&&(o=e-this.boundaries.right),this.callback(o,n)};var a;if("undefined"!=typeof Handsontable)var l=function(e){e.dragToScrollListening=!1;var t=e.view.wt.wtTable.holder;a=new n,t!==window&&(a.setBoundaries(t.getBoundingClientRect()),a.setCallback(function(e,o){0>e?t.scrollLeft-=50:e>0&&(t.scrollLeft+=50),0>o?t.scrollTop-=20:o>0&&(t.scrollTop+=20)}),e.dragToScrollListening=!0)};Handsontable.hooks.add("afterInit",function(){var e=this,t=s(this);t.addEventListener(document,"mouseup",function(){e.dragToScrollListening=!1}),t.addEventListener(document,"mousemove",function(t){e.dragToScrollListening&&a.check(t.clientX,t.clientY)})}),Handsontable.hooks.add("afterDestroy",function(){s(this).clear()}),Handsontable.hooks.add("afterOnCellMouseDown",function(){l(this)}),Handsontable.hooks.add("afterOnCellCornerMouseDown",function(){l(this)}),Handsontable.plugins.DragToScroll=n},{"./../../eventManager.js":41,"./../../plugins.js":45}],58:[function(e,t,o){"use strict";function n(e){var t=[],o={rows:0,cols:0},n={rows:0,cols:0},r=[],i=[],a={groupIndicatorContainer:"htGroupIndicatorContainer",groupIndicator:function(e){return"ht"+e+"Group"},groupStart:"htGroupStart",collapseButton:"htCollapseButton",expandButton:"htExpandButton",collapseGroupId:function(e){return"htCollapse-"+e},collapseFromLevel:function(e,t){return"htCollapse"+e+"FromLevel-"+t},clickable:"clickable",levelTrigger:"htGroupLevelTrigger"},u=function(e,t){return function(o,n){return"undefined"==typeof t||"asc"===t?o[e]-n[e]:n[e]-o[e]}},c=function(e,t){for(var o=[];t>=e;)o.push(e++);return o},d=function(e,t,o){var n=[],r={row:null,col:null};if("cols"==e)for(;o>=t;)r={row:-1,col:t++},n.push(r);else for(;o>=t;)r={row:t++,col:-1},n.push(r);for(var i=h(n),s=0,a=0,l=0;l<i.length;l++)s+=i[l].filter(function(e){return e.rows}).length,a+=i[l].filter(function(e){return e.cols}).length;return{total:{rows:s,cols:a},groups:i}},h=function(e){for(var t=[],o=0;o<e.length;o++)t.push(f(e[o]));return t},f=function(e,o,n){for(var r=e.row,i=e.col,s=-1===r?0:r,a=-1===i?0:i,l=[],u=0;u<t.length;u++){var c=t[u],d=c.id,h=(c.level,c.rows||[]),f=c.cols||[];-1===l.indexOf(d)&&(-1!==h.indexOf(s)||-1!==f.indexOf(a))&&l.push(c)}-1===i?l=l.concat(w()):-1===r&&(l=l.concat(C())),o&&(l=l.filter(function(e){return e.level===o})),n&&("cols"===n?l=l.filter(function(e){return e.cols}):"rows"===n&&(l=l.filter(function(e){return e.rows})));var g=[];return l.filter(function(e){return-1===g.indexOf(e.id)?(g.push(e.id),e):void 0})},g=function(e){for(var o=0,n=t.length;n>o;o++)if(t[o].id==e)return t[o];return!1},p=function(e,o){for(var n=0,r=t.length;r>n;n++)if(t[n].level==o&&t[n].rows&&t[n].rows.indexOf(e)>-1)return t[n];return!1},m=function(e,o){for(var n=0,r=t.length;r>n;n++)if(t[n].level==o&&t[n].cols&&t[n].cols.indexOf(e)>-1)return t[n];return!1},w=function(){for(var e=[],o=0,n=t.length;n>o;o++)Array.isArray(t[o].cols)&&e.push(t[o]);return e;
},v=function(e){for(var o=[],n=0,r=t.length;r>n;n++)t[n].cols&&t[n].level===e&&o.push(t[n]);return o},C=function(){for(var e=[],o=0,n=t.length;n>o;o++)Array.isArray(t[o].rows)&&e.push(t[o]);return e},b=function(e){for(var o=[],n=0,r=t.length;r>n;n++)t[n].rows&&t[n].level===e&&o.push(t[n]);return o},y=function(e){var t=0;return e.length&&e.forEach(function(e){if(e=e.filter(function(e){return e.cols}),e.length){var o=e.sort(u("level","desc")),n=o[0].level;n>t&&(t=n)}}),t},R=function(e){var t=0;return e.length&&e.forEach(function(e){if(e=e.filter(function(e){return e.rows}),e.length){var o=e.sort(u("level","desc")),n=o[0].level;n>t&&(t=n)}}),t},S=function(e,r){var i=d("cols",e,r),s=y(i.groups);s===n.cols?n.cols++:s>n.cols&&(n.cols=s+1),o.cols||(o.cols=w().length),o.cols++,t.push({id:"c"+o.cols,level:s+1,cols:c(e,r),hidden:0})},E=function(e,r){var i=d("rows",e,r),s=R(i.groups);n.rows=Math.max(n.rows,s+1),o.rows||(o.rows=C().length),o.rows++,t.push({id:"r"+o.rows,level:s+1,rows:c(e,r),hidden:0})},T=function(e,t){for(var o,n=0,s=t.length;s>n;n++)if(t[n].hidden=e,o=t[n].level,r[o]||(r[o]=[]),i[o]||(i[o]=[]),t[n].rows)for(var a=0,l=t[n].rows.length;l>a;a++)e>0?r[o][t[n].rows[a]]=!0:r[o][t[n].rows[a]]=void 0;else if(t[n].cols)for(var a=0,u=t[n].cols.length;u>a;a++)e>0?i[o][t[n].cols[a]]=!0:i[o][t[n].cols[a]]=void 0},H=function(e,t,o,n){var r,i;switch(e){case"rows":r=p(t+1,o).id,i=Handsontable.Grouping.getGroupLevelsByRows();break;case"cols":r=m(t+1,o).id,i=Handsontable.Grouping.getGroupLevelsByCols()}return!!(i[t+1]&&i[t+1].indexOf(o)>-1&&n==r)},k=function(e,t,o,n){var r,i;switch(e){case"rows":r=p(t-1,o).id,i=Handsontable.Grouping.getGroupLevelsByRows();break;case"cols":r=m(t-1,o).id,i=Handsontable.Grouping.getGroupLevelsByCols()}return!!(i[t-1]&&i[t-1].indexOf(o)>-1&&n==r)},O=function(t,o,s,a){if(0===o)return!1;var l,u,c=k(t,o,s,a),d=H(t,o,s,a),h=!1;switch(t){case"rows":l=Handsontable.Grouping.getGroupLevelsByRows(),u=e.countRows();for(var f=0;f<=n.rows;f++)if(r[f]&&r[f][o+1]){h=!0;break}break;case"cols":l=Handsontable.Grouping.getGroupLevelsByCols(),u=e.countCols();for(var f=0;f<=n.cols;f++)if(i[f]&&i[f][o+1]){h=!0;break}}if(c){if(o==u-1)return!0;if(!d||d&&h)return!0;if(!l[o+1])return!0}return!1},M=function(t){var o;switch(t){case"rows":o=n.rows;for(var s=0;o>=s;s++)if(r[s]&&r[s][e.countRows()-1])return!0;break;case"cols":o=n.cols;for(var s=0;o>=s;s++)if(i[s]&&i[s][e.countCols()-1])return!0}return!1},_=function(t,o,s,a){var l,u,c,d=g(a),h=!1,f=function(e){for(var t=!1,s="rows"==e?r:i,a=0;a<=n[e];a++){for(c=o;d[e].indexOf(c)>-1;)t=!(!s[a]||!s[a][c]),c--;if(t)break}return t},p=k(t,o,s,a),m=H(t,o,s,a);switch(t){case"rows":l=Handsontable.Grouping.getGroupLevelsByRows(),u=e.countRows(),h=f(t);break;case"cols":l=Handsontable.Grouping.getGroupLevelsByCols(),u=e.countCols(),h=f(t)}if(o==u-1)return!1;if(0===o){if(m)return!0}else if(!p||p&&h){if(m)return!0}else if(!l[o-1]&&m)return!0;return!1},A=function(e,t,o,n,r){var i;switch(e){case"rows":i=p(t-1,o).id;break;case"cols":i=m(t-1,o).id}if(!i)return null;if(t>0&&k(e,t-1,o,i)&&i!=n){var l=document.createElement("DIV");return s.addClass(l,a.expandButton),l.id="htExpand-"+i,l.appendChild(document.createTextNode("+")),l.setAttribute("data-level",o),l.setAttribute("data-type",e),l.setAttribute("data-hidden","1"),r.appendChild(l),l}return null},P=function(e){for(var t=C(),o=w(),n=0,r=t.length;r>n;n++)if(t[n].rows.indexOf(e.row)>-1&&t[n].hidden)return!0;if(null===e.col)return!1;for(var n=0,i=o.length;i>n;n++)if(o[n].cols.indexOf(e.col)>-1&&o[n].hidden)return!0;return!1};return{getGroups:function(){return t},getLevels:function(){return n},instance:e,baseSpareRows:e.getSettings().minSpareRows,baseSpareCols:e.getSettings().minSpareCols,getRowGroups:C,getColGroups:w,init:function(){var t=e.getSettings().groups;t&&Array.isArray(t)&&Handsontable.Grouping.initGroups(t)},initGroups:function(e){t=[],e.forEach(function(e){var t=[],o=!1,n=!1;Array.isArray(e.rows)?(t=e.rows,o=!0):Array.isArray(e.cols)&&(t=e.cols,n=!0);var r=t[0],i=t[t.length-1];o?E(r,i):n&&S(r,i)})},resetGroups:function(){t=[],o={rows:0,cols:0},n={rows:0,cols:0};var e;for(var r in a)if("function"!=typeof a[r]){e=document.querySelectorAll("."+a[r]);for(var i=0,l=e.length;l>i;i++)s.removeClass(e[i],a[r])}for(var u=["htGroupColClosest","htGroupCol"],r=0,c=u.length;c>r;r++){e=document.querySelectorAll("."+u[r]);for(var i=0,l=e.length;l>i;i++)s.removeClass(e[i],u[r])}},updateGroups:function(){var e=this.getSettings().groups;Handsontable.Grouping.resetGroups(),Handsontable.Grouping.initGroups(e)},afterGetRowHeader:function(e,t){if(t.parentNode){for(var o=!1,n=0,i=r.length;i>n;n++)r[n]&&r[n][e]===!0&&(o=!0);o?s.addClass(t.parentNode,"hidden"):!o&&s.hasClass(t.parentNode,"hidden")&&s.removeClass(t.parentNode,"hidden")}},afterGetColHeader:function(t,o){var n=this.view.wt.wtSettings.getSetting("rowHeaders").length,r=e.rootElement.querySelectorAll("colgroup col:nth-child("+parseInt(t+n+1,10)+")");if(0!==r.length){for(var a=!1,l=0,u=i.length;u>l;l++)i[l]&&i[l][t]===!0&&(a=!0);if(a)for(var l=0,c=r.length;c>l;l++)s.addClass(r[l],"hidden");else if(!a&&s.hasClass(r[0],"hidden"))for(var l=0,c=r.length;c>l;l++)s.removeClass(r[l],"hidden")}},groupIndicatorsFactory:function(e,t){var r,i,u,c,d,h,f,g;switch(t){case"horizontal":r=Handsontable.Grouping.getGroupLevelsByCols(),i=function(e){return Array.prototype.indexOf.call(e.parentNode.parentNode.childNodes,e.parentNode)+1},u=function(e,t){return m(e,t).id},c="cols",d=function(e,t){return m(e-1,t)},h="columnHeaders",f=function(e){if(1===e.length){var t=e[0];e[0]=function(e,o,n){-1>e?v()(e,o,n):(s.removeClass(o,a.groupIndicatorContainer),t(e,o,n))}}return function(){return e}},g=!0;break;case"vertical":r=Handsontable.Grouping.getGroupLevelsByRows(),i=function(e){return s.index(e)+1},u=function(e,t){return p(e,t).id},c="rows",d=function(e,t){return p(e-1,t)},h="rowHeaders",f=function(e){return e}}var w=function(e){var t=document.createElement("div");return e.appendChild(t),{button:t,addClass:function(e){s.addClass(t,e)}}},v=function(){var e=t.charAt(0).toUpperCase()+t.slice(1);return function(t,o,n){n++;for(var i,h;i=o.lastChild;)o.removeChild(i);s.addClass(o,a.groupIndicatorContainer);var f=u(t,n);if(t>-1&&r[t]&&r[t].indexOf(n)>-1&&(h=w(o),h.addClass(a.groupIndicator(e)),_(c,t,n,f)&&h.addClass(a.groupStart),O(c,t,n,f)&&(h.button.appendChild(document.createTextNode("-")),h.addClass(a.collapseButton),h.button.id=a.collapseGroupId(f),h.button.setAttribute("data-level",n),h.button.setAttribute("data-type",c))),g){var p=s.index(o.parentNode);if(-1===t||-1>t&&p===Handsontable.Grouping.getLevels().cols+1||0===p&&0===Handsontable.Grouping.getLevels().cols)if(h=w(o),h.addClass(a.levelTrigger),-1===t)h.button.id=a.collapseFromLevel("Cols",n),h.button.appendChild(document.createTextNode(n));else if(-1>t&&p===Handsontable.Grouping.getLevels().cols+1||0===p&&0===Handsontable.Grouping.getLevels().cols){var m=s.index(o)+1;h.button.id=a.collapseFromLevel("Rows",m),h.button.appendChild(document.createTextNode(m))}}var v=A(c,t,n,f,o);if(t>0){var C=d(t-1,n);v&&C.hidden&&s.addClass(v,a.clickable)}l()}};if(e=f(e),o[c]>0)for(var C=0;C<n[c]+1;C++)Array.isArray(e)||(e="function"==typeof e?e():new Array(e)),e.unshift(v())},getGroupLevelsByRows:function(){for(var e=C(),t=[],o=0,n=e.length;n>o;o++)if(e[o].rows)for(var r=0,i=e[o].rows.length;i>r;r++)t[e[o].rows[r]]||(t[e[o].rows[r]]=[]),t[e[o].rows[r]].push(e[o].level);return t},getGroupLevelsByCols:function(){for(var e=w(),t=[],o=0,n=e.length;n>o;o++)if(e[o].cols)for(var r=0,i=e[o].cols.length;i>r;r++)t[e[o].cols[r]]||(t[e[o].cols[r]]=[]),t[e[o].cols[r]].push(e[o].level);return t},toggleGroupVisibility:function(t,o,r){if(s.hasClass(t.target,a.expandButton)||s.hasClass(t.target,a.collapseButton)||s.hasClass(t.target,a.levelTrigger)){var i,l,u,c,d=t.target,h=d.id.split("-"),f=[],p=function(e){e&&(d=e),h=d.id.split("-"),i=h[1],l=parseInt(d.getAttribute("data-level"),10),u=d.getAttribute("data-type"),c=parseInt(d.getAttribute("data-hidden")),c=isNaN(c)?1:c?0:1,d.setAttribute("data-hidden",c.toString()),f.push(g(i))};if(d.className.indexOf(a.levelTrigger)>-1){for(var m,w=[],C=[],y=d.id.indexOf("Rows")>-1?"rows":"cols",R=1,S=n[y];S>=R;R++)if(m="rows"==y?b(R):v(R),R>=parseInt(h[1],10))for(var E=0,H=m.length;H>E;E++)C.push(m[E]);else for(var E=0,H=m.length;H>E;E++)w.push(m[E]);T(!0,C),T(!1,w)}else p(),T(c,f);u=u||y;var k=M(u),O=u.charAt(0).toUpperCase()+u.slice(1),_=Handsontable.Grouping["baseSpare"+O];k?0==_&&(e.alter("insert_"+u.slice(0,-1),e["count"+O]()),Handsontable.Grouping["dummy"+u.slice(0,-1)]=!0):0==_&&Handsontable.Grouping["dummy"+u.slice(0,-1)]&&(e.alter("remove_"+u.slice(0,-1),e["count"+O]()-1),Handsontable.Grouping["dummy"+u.slice(0,-1)]=!1),e.render(),t.stopImmediatePropagation()}},modifySelectionFactory:function(e){var t,o=this.instance,n=new WalkontableCellCoords(0,0),r=function(e,t){var o=0;switch(e){case"down":for(;P(t);)o++,t.row+=1;break;case"up":for(;P(t);)o--,t.row-=1;break;case"right":for(;P(t);)o++,t.col+=1;break;case"left":for(;P(t);)o--,t.col-=1}return o},i=function(e,t){e.row>0?P(t)&&(e.row+=r("down",t)):e.row<0&&P(t)&&(e.row+=r("up",t)),e.col>0?P(t)&&(e.col+=r("right",t)):e.col<0&&P(t)&&(e.col+=r("left",t))};switch(e){case"start":return function(e){t=o.getSelected(),n.row=t[0]+e.row,n.col=t[1]+e.col,i(e,n)};case"end":return function(e){t=o.getSelected(),n.row=t[2]+e.row,n.col=t[3]+e.col,i(e,n)}}},modifyRowHeight:function(t,o){return e.view.wt.wtTable.rowFilter&&P({row:o,col:null})?0:void 0},validateGroups:function(){for(var t=function(e,t){return e[0]<t[0]&&e[1]<t[1]&&t[0]<=e[1]||e[0]>t[0]&&t[1]<e[1]&&e[0]<=t[1]?!0:void 0},o=e.getSettings().groups,n=[],r=[],i=0,s=o.length;s>i;i++)if(o[i].rows){if(1===o[i].rows.length)throw new Error("Grouping error: Group {"+o[i].rows[0]+"} is invalid. Cannot define single-entry groups.");if(0===o[i].rows.length)throw new Error("Grouping error: Cannot define empty groups.");r.push(o[i].rows);for(var a=0,l=r.length;l>a;a++)if(t(o[i].rows,r[a]))throw new Error("Grouping error: ranges {"+o[i].rows[0]+", "+o[i].rows[1]+"} and {"+r[a][0]+", "+r[a][1]+"} are overlapping.")}else if(o[i].cols){if(1===o[i].cols.length)throw new Error("Grouping error: Group {"+o[i].cols[0]+"} is invalid. Cannot define single-entry groups.");if(0===o[i].cols.length)throw new Error("Grouping error: Cannot define empty groups.");n.push(o[i].cols);for(var a=0,u=n.length;u>a;a++)if(t(o[i].cols,n[a]))throw new Error("Grouping error: ranges {"+o[i].cols[0]+", "+o[i].cols[1]+"} and {"+n[a][0]+", "+n[a][1]+"} are overlapping.")}return!0},afterGetRowHeaderRenderers:function(e){Handsontable.Grouping.groupIndicatorsFactory(e,"vertical")},afterGetColumnHeaderRenderers:function(e){Handsontable.Grouping.groupIndicatorsFactory(e,"horizontal")},hookProxy:function(t,o){return function(){return e.getSettings().groups?o?Handsontable.Grouping[t](o).apply(this,arguments):Handsontable.Grouping[t].apply(this,arguments):void 0}}}}var r,i,s=(r=e("./../../dom.js"),r&&r.__esModule&&r||{"default":r});(i=e("./../../plugins.js"),i&&i.__esModule&&i||{"default":i}).registerPlugin;n.prototype.beforeInit=function(){};var a=function(){var e=this,t=!!e.getSettings().groups;if(t){var o={};Handsontable.Grouping=new n(e),e.getSettings().rowHeaders||(o.rowHeaders=!0),e.getSettings().colHeaders||(o.colHeaders=!0),(o.colHeaders||o.rowHeaders)&&e.updateSettings(o);var r=Handsontable.Grouping.validateGroups();if(!r)return;e.addHook("beforeInit",Handsontable.Grouping.hookProxy("init")),e.addHook("afterUpdateSettings",Handsontable.Grouping.hookProxy("updateGroups")),e.addHook("afterGetColumnHeaderRenderers",Handsontable.Grouping.hookProxy("afterGetColumnHeaderRenderers")),e.addHook("afterGetRowHeaderRenderers",Handsontable.Grouping.hookProxy("afterGetRowHeaderRenderers")),e.addHook("afterGetRowHeader",Handsontable.Grouping.hookProxy("afterGetRowHeader")),e.addHook("afterGetColHeader",Handsontable.Grouping.hookProxy("afterGetColHeader")),e.addHook("beforeOnCellMouseDown",Handsontable.Grouping.hookProxy("toggleGroupVisibility")),e.addHook("modifyTransformStart",Handsontable.Grouping.hookProxy("modifySelectionFactory","start")),e.addHook("modifyTransformEnd",Handsontable.Grouping.hookProxy("modifySelectionFactory","end")),e.addHook("modifyRowHeight",Handsontable.Grouping.hookProxy("modifyRowHeight"))}},l=function(){for(var e=document.querySelectorAll("colgroup"),t=0,o=e.length;o>t;t++){var n=e[t].querySelectorAll("col.rowHeader");if(0===n.length)return;for(var r=0,i=n.length+1;i>r;r++){if(2==i)return;r<Handsontable.Grouping.getLevels().rows+1&&(r==Handsontable.Grouping.getLevels().rows?s.addClass(n[r],"htGroupColClosest"):s.addClass(n[r],"htGroupCol"))}}};Handsontable.hooks.add("beforeInit",a),Handsontable.hooks.add("afterUpdateSettings",function(){this.getSettings().groups&&!Handsontable.Grouping?a.call(this,arguments):!this.getSettings().groups&&Handsontable.Grouping&&(Handsontable.Grouping.resetGroups(),Handsontable.Grouping=void 0)}),Handsontable.plugins.Grouping=n},{"./../../dom.js":27,"./../../plugins.js":45}],59:[function(e,t,o){"use strict";function n(e){function t(t){t.items.push(Handsontable.ContextMenu.SEPARATOR,{key:"freeze_column",name:function(){var t=e.getSelected()[1];return t>f-1?"Freeze this column":"Unfreeze this column"},disabled:function(){var t=e.getSelected();return t[1]!==t[3]},callback:function(){var t=e.getSelected()[1];t>f-1?l(t):u(t)}})}function o(){e.updateSettings({fixedColumnsLeft:f+1}),f++}function n(){e.updateSettings({fixedColumnsLeft:f-1}),f--}function r(t){e.manualColumnPositions&&0!==e.manualColumnPositions.length||e.manualColumnPositions||(e.manualColumnPositions=[]),t?e.manualColumnPositions[t]||i(t+1):i(e.countCols())}function i(t){if(e.manualColumnPositions.length<t)for(var o=e.manualColumnPositions.length;t>o;o++)e.manualColumnPositions[o]=o}function s(t,o,n,r){null==n&&(n=t),"freeze"===r?e.manualColumnPositions.splice(f,0,e.manualColumnPositions.splice(o,1)[0]):"unfreeze"===r&&e.manualColumnPositions.splice(n,0,e.manualColumnPositions.splice(o,1)[0])}function a(e){for(var t=f,o=c(t),n=c(e);n>o;)t++,o=c(t);return t-1}function l(t){if(!(f-1>=t)){var n=c(t)||t;r(n),s(n,t,null,"freeze"),o(),e.view.wt.wtOverlays.leftOverlay.refresh(),e.view.wt.wtOverlays.adjustElementsSize()}}function u(t){if(!(t>f-1)){var o=a(t),i=c(t)||t;r(i),s(i,t,o,"unfreeze"),n(),e.view.wt.wtOverlays.leftOverlay.refresh()}}function c(t){return e.manualColumnPositions[t]}function d(e){return this.manualColumnPositionsPluginUsages.length>1?e:c(e)}function h(){e.addHook("modifyCol",d),e.addHook("afterContextMenuDefaultOptions",t)}var f=e.getSettings().fixedColumnsLeft,g=function(){"undefined"!=typeof e.manualColumnPositionsPluginUsages?e.manualColumnPositionsPluginUsages.push("manualColumnFreeze"):e.manualColumnPositionsPluginUsages=["manualColumnFreeze"],h()};return{init:g,freezeColumn:l,unfreezeColumn:u,helpers:{addFixedColumn:o,removeFixedColumn:n,checkPositionData:r,modifyColumnOrder:s,getBestColumnReturnPosition:a}}}Object.defineProperties(o,{ManualColumnFreeze:{get:function(){return n}},__esModule:{value:!0}});var r,i=((r=e("./../../plugins.js"),r&&r.__esModule&&r||{"default":r}).registerPlugin,function(){if(this.getSettings().manualColumnFreeze){var e;Handsontable.plugins.manualColumnFreeze=n,this.manualColumnFreeze=new n(this),e=this.manualColumnFreeze,e.init.call(this)}});Handsontable.hooks.add("beforeInit",i)},{"./../../plugins.js":45}],60:[function(e,t,o){"use strict";function n(){function e(e){f=this,g=e;var t=this.view.wt.wtTable.getCoords(e).col;if(t>=0){h=t;var o=g.getBoundingClientRect();d=o.left,p.style.top=o.top+"px",p.style.left=d+"px",f.rootElement.appendChild(p)}}function t(e,t){var o=e.getBoundingClientRect(),n=6;t>0?p.style.left=o.left+o.width-n+"px":p.style.left=o.left+"px"}function o(){var e=this;u.addClass(p,"active"),u.addClass(m,"active");var t=g.getBoundingClientRect();m.style.width=t.width+"px",m.style.height=e.view.maximumVisibleElementHeight(0)+"px",m.style.top=p.style.top,m.style.left=d+"px",e.rootElement.appendChild(m)}function n(e){m.style.left=d+e+"px"}function r(){u.removeClass(p,"active"),u.removeClass(m,"active")}var i,s,a,d,h,f,g,p=document.createElement("DIV"),m=document.createElement("DIV"),w=c(this);p.className="manualColumnMover",m.className="manualColumnMoverGuide";var v=function(){var e=this;Handsontable.hooks.run(e,"persistentStateSave","manualColumnPositions",e.manualColumnPositions)},C=function(){var e=this,t={};return Handsontable.hooks.run(e,"persistentStateLoad","manualColumnPositions",t),t.value},b=function(e){return"BODY"!=e.tagName?"THEAD"==e.parentNode.tagName?!0:(e=e.parentNode,b(e)):!1},y=function(e){return"TABLE"!=e.tagName?"TH"==e.tagName?e:y(e.parentNode):null},R=function(){var c,d=this;w.addEventListener(d.rootElement,"mouseover",function(o){if(b(o.target)){var n=y(o.target);if(n)if(c){var r=d.view.wt.wtTable.getCoords(n).col;r>=0&&(s=r,t(o.target,s-i))}else e.call(d,n)}}),w.addEventListener(d.rootElement,"mousedown",function(e){u.hasClass(e.target,"manualColumnMover")&&(a=l.pageX(e),o.call(d),c=d,i=h,s=h)}),w.addEventListener(window,"mousemove",function(e){c&&n(l.pageX(e)-a)}),w.addEventListener(window,"mouseup",function(t){c&&(r(),c=!1,E(d.manualColumnPositions,d.countCols()),d.manualColumnPositions.splice(s,0,d.manualColumnPositions.splice(i,1)[0]),Handsontable.hooks.run(d,"beforeColumnMove",i,s),d.forceFullRender=!0,d.view.render(),v.call(d),Handsontable.hooks.run(d,"afterColumnMove",i,s),e.call(d,g))}),d.addHook("afterDestroy",S)},S=function(){w.clear()},E=function(e,t){if(e.length<t)for(var o=e.length;t>o;o++)e[o]=o};this.beforeInit=function(){this.manualColumnPositions=[]},this.init=function(e){var t=this,o=!!this.getSettings().manualColumnMove;if(o){var n=this.getSettings().manualColumnMove,r=C.call(t);"undefined"!=typeof r?this.manualColumnPositions=r:Array.isArray(n)?this.manualColumnPositions=n:this.manualColumnPositions=[],"afterInit"==e&&("undefined"!=typeof t.manualColumnPositionsPluginUsages?t.manualColumnPositionsPluginUsages.push("manualColumnMove"):t.manualColumnPositionsPluginUsages=["manualColumnMove"],R.call(this),this.manualColumnPositions.length>0&&(this.forceFullRender=!0,this.render()))}else{var i=t.manualColumnPositionsPluginUsages?t.manualColumnPositionsPluginUsages.indexOf("manualColumnMove"):-1;i>-1&&(S.call(this),this.manualColumnPositions=[],t.manualColumnPositionsPluginUsages[i]=void 0)}},this.modifyCol=function(e){return this.getSettings().manualColumnMove?("undefined"==typeof this.manualColumnPositions[e]&&E(this.manualColumnPositions,e+1),this.manualColumnPositions[e]):e},this.afterRemoveCol=function(e,t){if(this.getSettings().manualColumnMove){var o,n=this.manualColumnPositions;o=n.splice(e,t),n=n.map(function(e){var t,n=e;for(t=0;t<o.length;t++)e>o[t]&&n--;return n}),this.manualColumnPositions=n}},this.afterCreateCol=function(e,t){if(this.getSettings().manualColumnMove){var o=this.manualColumnPositions;if(o.length){for(var n=[],r=0;t>r;r++)n.push(e+r);e>=o.length?o.concat(n):(o=o.map(function(o){return o>=e?o+t:o}),o.splice.apply(o,[e,0].concat(n))),this.manualColumnPositions=o}}}}Object.defineProperties(o,{ManualColumnMove:{get:function(){return n}},__esModule:{value:!0}});var r,i,s,a,l=(r=e("./../../helpers.js"),r&&r.__esModule&&r||{"default":r}),u=(i=e("./../../dom.js"),i&&i.__esModule&&i||{"default":i}),c=(s=e("./../../eventManager.js"),s&&s.__esModule&&s||{"default":s}).eventManager,d=((a=e("./../../plugins.js"),a&&a.__esModule&&a||{"default":a}).registerPlugin,new n);Handsontable.hooks.add("beforeInit",d.beforeInit),Handsontable.hooks.add("afterInit",function(){d.init.call(this,"afterInit")}),Handsontable.hooks.add("afterUpdateSettings",function(){d.init.call(this,"afterUpdateSettings")}),Handsontable.hooks.add("modifyCol",d.modifyCol),Handsontable.hooks.add("afterRemoveCol",d.afterRemoveCol),Handsontable.hooks.add("afterCreateCol",d.afterCreateCol),Handsontable.hooks.register("beforeColumnMove"),Handsontable.hooks.register("afterColumnMove")},{"./../../dom.js":27,"./../../eventManager.js":41,"./../../helpers.js":42,"./../../plugins.js":45}],61:[function(e,t,o){"use strict";function n(){function e(e){d=this,i=e;var t=this.view.wt.wtTable.getCoords(e).col;if(t>=0){s=t;var o=i.getBoundingClientRect();p=o.left-6,g=parseInt(o.width,10),m.style.top=o.top+"px",m.style.left=p+g+"px",d.rootElement.appendChild(m)}}function t(){m.style.left=p+a+"px"}function o(){var e=this;u.addClass(m,"active"),u.addClass(w,"active"),w.style.top=m.style.top,w.style.left=m.style.left,w.style.height=e.view.maximumVisibleElementHeight(0)+"px",e.rootElement.appendChild(w)}function n(){w.style.left=m.style.left}function r(){u.removeClass(m,"active"),u.removeClass(w,"active")}var i,s,a,d,h,f,g,p,m=document.createElement("DIV"),w=document.createElement("DIV"),v=c(this);m.className="manualColumnResizer",w.className="manualColumnResizerGuide";var C=function(){var e=this;Handsontable.hooks.run(e,"persistentStateSave","manualColumnWidths",e.manualColumnWidths)},b=function(){var e=this,t={};return Handsontable.hooks.run(e,"persistentStateLoad","manualColumnWidths",t),t.value},y=function(e){return"BODY"!=e.tagName?"THEAD"==e.parentNode.tagName?!0:(e=e.parentNode,y(e)):!1},R=function(e){return"TABLE"!=e.tagName?"TH"==e.tagName?e:R(e.parentNode):null},S=function(){var c,d=this,p=0,m=null;v.addEventListener(d.rootElement,"mouseover",function(t){if(y(t.target)){var o=R(t.target);o&&(c||e.call(d,o))}}),v.addEventListener(d.rootElement,"mousedown",function(e){u.hasClass(e.target,"manualColumnResizer")&&(o.call(d),c=d,null==m&&(m=setTimeout(function(){if(p>=2){var e=Handsontable.hooks.run(d,"beforeColumnResize",s,h,!0);void 0!==e&&(h=e),T(s,h),d.forceFullRender=!0,d.view.render(),d.view.wt.wtOverlays.adjustElementsSize(!0),Handsontable.hooks.run(d,"afterColumnResize",s,h,!0)}p=0,m=null},500),d._registerTimeout(m)),p++,f=l.pageX(e),h=g)}),v.addEventListener(window,"mousemove",function(e){c&&(a=g+(l.pageX(e)-f),h=T(s,a),t(),n())}),v.addEventListener(window,"mouseup",function(){c&&(r(),c=!1,h!=g&&(Handsontable.hooks.run(d,"beforeColumnResize",s,h),d.forceFullRender=!0,d.view.render(),d.view.wt.wtOverlays.adjustElementsSize(!0),C.call(d),Handsontable.hooks.run(d,"afterColumnResize",s,h)),e.call(d,i))}),d.addHook("afterDestroy",E)},E=function(){v.clear()};this.init=function(e){this.manualColumnWidths=[];var t=this,o=!!this.getSettings().manualColumnResize;if(o){var n=this.getSettings().manualColumnResize,r=b.call(t);"undefined"!=typeof t.manualColumnWidthsPluginUsages?t.manualColumnWidthsPluginUsages.push("manualColumnResize"):t.manualColumnWidthsPluginUsages=["manualColumnResize"],"undefined"!=typeof r?this.manualColumnWidths=r:Array.isArray(n)?this.manualColumnWidths=n:this.manualColumnWidths=[],e||S.call(this)}else{var i=t.manualColumnWidthsPluginUsages?t.manualColumnWidthsPluginUsages.indexOf("manualColumnResize"):-1;i>-1&&(E.call(this),this.manualColumnWidths=[])}};var T=function(e,t){return t=Math.max(t,20),e=Handsontable.hooks.run(d,"modifyCol",e),d.manualColumnWidths[e]=t,t};this.modifyColWidth=function(e,t){return t=this.runHooks("modifyCol",t),this.getSettings().manualColumnResize&&this.manualColumnWidths[t]?this.manualColumnWidths[t]:e}}Object.defineProperties(o,{ManualColumnResize:{get:function(){return n}},__esModule:{value:!0}});var r,i,s,a,l=(r=e("./../../helpers.js"),r&&r.__esModule&&r||{"default":r}),u=(i=e("./../../dom.js"),i&&i.__esModule&&i||{"default":i}),c=(s=e("./../../eventManager.js"),s&&s.__esModule&&s||{"default":s}).eventManager,d=((a=e("./../../plugins.js"),a&&a.__esModule&&a||{"default":a}).registerPlugin,new n);Handsontable.hooks.add("init",d.init),Handsontable.hooks.add("afterUpdateSettings",function(){d.init.call(this,"afterUpdateSettings")}),Handsontable.hooks.add("modifyColWidth",d.modifyColWidth),Handsontable.hooks.register("afterColumnResize"),Handsontable.hooks.register("beforeColumnResize")},{"./../../dom.js":27,"./../../eventManager.js":41,"./../../helpers.js":42,"./../../plugins.js":45}],62:[function(e,t,o){"use strict";function n(){function e(e){var t=this;f=e;var o=this.view.wt.wtTable.getCoords(e).row;if(o>=0){h=o;var n=f.getBoundingClientRect();d=n.top,g.style.top=d+"px",g.style.left=n.left+"px",t.rootElement.appendChild(g)}}function t(e,t){var o=e.getBoundingClientRect(),n=6;t>0?g.style.top=o.top+o.height-n+"px":g.style.top=o.top+"px"}function o(){var e=this;u.addClass(g,"active"),u.addClass(p,"active");var t=f.getBoundingClientRect();p.style.width=e.view.maximumVisibleElementWidth(0)+"px",p.style.height=t.height+"px",p.style.top=d+"px",p.style.left=g.style.left,e.rootElement.appendChild(p)}function n(e){p.style.top=d+e+"px"}function r(){u.removeClass(g,"active"),u.removeClass(p,"active")}var i,s,a,d,h,f,g=document.createElement("DIV"),p=document.createElement("DIV"),m=c(this);g.className="manualRowMover",p.className="manualRowMoverGuide";var w=function(){var e=this;Handsontable.hooks.run(e,"persistentStateSave","manualRowPositions",e.manualRowPositions)},v=function(){var e=this,t={};return Handsontable.hooks.run(e,"persistentStateLoad","manualRowPositions",t),t.value},C=function(e){return"BODY"!=e.tagName?"TBODY"==e.parentNode.tagName?!0:(e=e.parentNode,C(e)):!1},b=function(e){return"TABLE"!=e.tagName?"TH"==e.tagName?e:b(e.parentNode):null},y=function(){var c,d=this;m.addEventListener(d.rootElement,"mouseover",function(o){if(C(o.target)){var n=b(o.target);n&&(c?(s=d.view.wt.wtTable.getCoords(n).row,t(n,s-i)):e.call(d,n))}}),m.addEventListener(d.rootElement,"mousedown",function(e){u.hasClass(e.target,"manualRowMover")&&(a=l.pageY(e),o.call(d),c=d,i=h,s=h)}),m.addEventListener(window,"mousemove",function(e){c&&n(l.pageY(e)-a)}),m.addEventListener(window,"mouseup",function(t){c&&(r(),c=!1,S(d.manualRowPositions,d.countRows()),d.manualRowPositions.splice(s,0,d.manualRowPositions.splice(i,1)[0]),Handsontable.hooks.run(d,"beforeRowMove",i,s),d.forceFullRender=!0,d.view.render(),w.call(d),Handsontable.hooks.run(d,"afterRowMove",i,s),e.call(d,f))}),d.addHook("afterDestroy",R)},R=function(){m.clear()},S=function(e,t){if(e.length<t)for(var o=e.length;t>o;o++)e[o]=o};this.beforeInit=function(){this.manualRowPositions=[]},this.init=function(e){var t=this,o=!!t.getSettings().manualRowMove;if(o){var n=t.getSettings().manualRowMove,r=v.call(t);"undefined"!=typeof t.manualRowPositionsPluginUsages?t.manualRowPositionsPluginUsages.push("manualColumnMove"):t.manualRowPositionsPluginUsages=["manualColumnMove"],"undefined"!=typeof r?this.manualRowPositions=r:Array.isArray(n)?this.manualRowPositions=n:this.manualRowPositions=[],"afterInit"===e&&(y.call(this),this.manualRowPositions.length>0&&(t.forceFullRender=!0,t.render()))}else{var i=t.manualRowPositionsPluginUsages?t.manualRowPositionsPluginUsages.indexOf("manualColumnMove"):-1;i>-1&&(R.call(this),t.manualRowPositions=[],t.manualRowPositionsPluginUsages[i]=void 0)}},this.modifyRow=function(e){var t=this;return t.getSettings().manualRowMove?("undefined"==typeof t.manualRowPositions[e]&&S(this.manualRowPositions,e+1),t.manualRowPositions[e]):e}}Object.defineProperties(o,{ManualRowMove:{get:function(){return n}},__esModule:{value:!0}});var r,i,s,a,l=(r=e("./../../helpers.js"),r&&r.__esModule&&r||{"default":r}),u=(i=e("./../../dom.js"),i&&i.__esModule&&i||{"default":i}),c=(s=e("./../../eventManager.js"),s&&s.__esModule&&s||{"default":s}).eventManager,d=((a=e("./../../plugins.js"),a&&a.__esModule&&a||{"default":a}).registerPlugin,new n);Handsontable.hooks.add("beforeInit",d.beforeInit),Handsontable.hooks.add("afterInit",function(){d.init.call(this,"afterInit")}),Handsontable.hooks.add("afterUpdateSettings",function(){d.init.call(this,"afterUpdateSettings")}),Handsontable.hooks.add("modifyRow",d.modifyRow),Handsontable.hooks.register("beforeRowMove"),Handsontable.hooks.register("afterRowMove")},{"./../../dom.js":27,"./../../eventManager.js":41,"./../../helpers.js":42,"./../../plugins.js":45}],63:[function(e,t,o){"use strict";function n(){function e(e){d=this,i=e;var t=this.view.wt.wtTable.getCoords(e).row;if(t>=0){s=t;var o=i.getBoundingClientRect();p=o.top-6,g=parseInt(o.height,10),m.style.left=o.left+"px",m.style.top=p+g+"px",d.rootElement.appendChild(m)}}function t(){m.style.top=p+a+"px"}function o(){var e=this;u.addClass(m,"active"),u.addClass(w,"active"),w.style.top=m.style.top,w.style.left=m.style.left,w.style.width=e.view.maximumVisibleElementWidth(0)+"px",e.rootElement.appendChild(w)}function n(){w.style.top=m.style.top}function r(){u.removeClass(m,"active"),u.removeClass(w,"active")}var i,s,a,d,h,f,g,p,m=document.createElement("DIV"),w=document.createElement("DIV"),v=c(this);m.className="manualRowResizer",w.className="manualRowResizerGuide";var C=function(){var e=this;Handsontable.hooks.run(e,"persistentStateSave","manualRowHeights",e.manualRowHeights)},b=function(){var e=this,t={};return Handsontable.hooks.run(e,"persistentStateLoad","manualRowHeights",t),t.value},y=function(e){return"BODY"!=e.tagName?"TBODY"==e.parentNode.tagName?!0:(e=e.parentNode,y(e)):!1},R=function(e){return"TABLE"!=e.tagName?"TH"==e.tagName?e:R(e.parentNode):null},S=function(){var c,d=this,p=0,m=null;v.addEventListener(d.rootElement,"mouseover",function(t){if(y(t.target)){var o=R(t.target);o&&(c||e.call(d,o))}}),v.addEventListener(d.rootElement,"mousedown",function(e){u.hasClass(e.target,"manualRowResizer")&&(o.call(d),c=d,null==m&&(m=setTimeout(function(){if(p>=2){var e=Handsontable.hooks.run(d,"beforeRowResize",s,h,!0);void 0!==e&&(h=e),T(s,h),d.forceFullRender=!0,d.view.render(),Handsontable.hooks.run(d,"afterRowResize",s,h,!0)}p=0,m=null},500),d._registerTimeout(m)),p++,f=l.pageY(e),h=g)}),v.addEventListener(window,"mousemove",function(e){c&&(a=g+(l.pageY(e)-f),h=T(s,a),t(),n())}),v.addEventListener(window,"mouseup",function(t){c&&(r(),c=!1,h!=g&&(Handsontable.hooks.run(d,"beforeRowResize",s,h),d.forceFullRender=!0,d.view.render(),C.call(d),Handsontable.hooks.run(d,"afterRowResize",s,h)),e.call(d,i))}),d.addHook("afterDestroy",E)},E=function(){v.clear()};this.init=function(e){this.manualRowHeights=[];var t=this,o=!!this.getSettings().manualRowResize;if(o){var n=this.getSettings().manualRowResize,r=b.call(t);"undefined"!=typeof t.manualRowHeightsPluginUsages?t.manualRowHeightsPluginUsages.push("manualRowResize"):t.manualRowHeightsPluginUsages=["manualRowResize"],"undefined"!=typeof r?this.manualRowHeights=r:Array.isArray(n)?this.manualRowHeights=n:this.manualRowHeights=[],void 0===e&&S.call(this)}else{var i=t.manualRowHeightsPluginUsages?t.manualRowHeightsPluginUsages.indexOf("manualRowResize"):-1;i>-1&&(E.call(this),this.manualRowHeights=[],t.manualRowHeightsPluginUsages[i]=void 0)}};var T=function(e,t){return e=Handsontable.hooks.run(d,"modifyRow",e),d.manualRowHeights[e]=t,t};this.modifyRowHeight=function(e,t){return this.getSettings().manualRowResize&&(t=this.runHooks("modifyRow",t),void 0!==this.manualRowHeights[t])?this.manualRowHeights[t]:e}}Object.defineProperties(o,{ManualRowResize:{get:function(){return n}},__esModule:{value:!0}});var r,i,s,a,l=(r=e("./../../helpers.js"),r&&r.__esModule&&r||{"default":r}),u=(i=e("./../../dom.js"),i&&i.__esModule&&i||{"default":i}),c=(s=e("./../../eventManager.js"),s&&s.__esModule&&s||{"default":s}).eventManager,d=((a=e("./../../plugins.js"),a&&a.__esModule&&a||{"default":a}).registerPlugin,new n);Handsontable.hooks.add("init",d.init),Handsontable.hooks.add("afterUpdateSettings",function(){d.init.call(this,"afterUpdateSettings")}),Handsontable.hooks.add("modifyRowHeight",d.modifyRowHeight),Handsontable.hooks.register("beforeRowResize"),Handsontable.hooks.register("afterRowResize")},{"./../../dom.js":27,"./../../eventManager.js":41,"./../../helpers.js":42,"./../../plugins.js":45}],64:[function(e,t,o){"use strict";function n(){var e=[];return e.getInfo=function(e,t){for(var o=0,n=this.length;n>o;o++)if(this[o].row<=e&&this[o].row+this[o].rowspan-1>=e&&this[o].col<=t&&this[o].col+this[o].colspan-1>=t)return this[o];
},e.setInfo=function(e){for(var t=0,o=this.length;o>t;t++)if(this[t].row===e.row&&this[t].col===e.col)return void(this[t]=e);this.push(e)},e.removeInfo=function(e,t){for(var o=0,n=this.length;n>o;o++)if(this[o].row===e&&this[o].col===t){this.splice(o,1);break}},e}function r(e){if(this.mergedCellInfoCollection=new n,Array.isArray(e))for(var t=0,o=e.length;o>t;t++)this.mergedCellInfoCollection.setInfo(e[t])}function i(e,t){var o=this.getSettings().mergeCells;if(o&&!this.selection.isMultiple()){var n=this.mergeCells.mergedCellInfoCollection.getInfo(e[0],e[1]);n&&(e[0]=n.row,e[1]=n.col,e[2]=n.row+n.rowspan-1,e[3]=n.col+n.colspan-1)}}Object.defineProperties(o,{MergeCells:{get:function(){return r}},__esModule:{value:!0}});var s,a,l,u,c=((s=e("./../../plugins.js"),s&&s.__esModule&&s||{"default":s}).registerPlugin,(a=e("./../../3rdparty/walkontable/src/cell/coords.js"),a&&a.__esModule&&a||{"default":a}).WalkontableCellCoords),d=(l=e("./../../3rdparty/walkontable/src/cell/range.js"),l&&l.__esModule&&l||{"default":l}).WalkontableCellRange,h=(u=e("./../../3rdparty/walkontable/src/table.js"),u&&u.__esModule&&u||{"default":u}).WalkontableTable;r.prototype.canMergeRange=function(e){return!e.isSingle()},r.prototype.mergeRange=function(e){if(this.canMergeRange(e)){var t=e.getTopLeftCorner(),o=e.getBottomRightCorner(),n={};n.row=t.row,n.col=t.col,n.rowspan=o.row-t.row+1,n.colspan=o.col-t.col+1,this.mergedCellInfoCollection.setInfo(n)}},r.prototype.mergeOrUnmergeSelection=function(e){var t=this.mergedCellInfoCollection.getInfo(e.from.row,e.from.col);t?this.unmergeSelection(e.from):this.mergeSelection(e)},r.prototype.mergeSelection=function(e){this.mergeRange(e)},r.prototype.unmergeSelection=function(e){var t=this.mergedCellInfoCollection.getInfo(e.row,e.col);this.mergedCellInfoCollection.removeInfo(t.row,t.col)},r.prototype.applySpanProperties=function(e,t,o){var n=this.mergedCellInfoCollection.getInfo(t,o);n?n.row===t&&n.col===o?(e.setAttribute("rowspan",n.rowspan),e.setAttribute("colspan",n.colspan)):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="none"):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"))},r.prototype.modifyTransform=function(e,t,o){var n=function(e,t){return t.row>=e.row&&t.row<=e.row+e.rowspan-1?!0:!1},r=function(e,t){return t.col>=e.col&&t.col<=e.col+e.colspan-1?!0:!1},i=function(e){return new c(t.to.row+e.row,t.to.col+e.col)},s={row:o.row,col:o.col};if("modifyTransformStart"==e){this.lastDesiredCoords||(this.lastDesiredCoords=new c(null,null));for(var a,l=new c(t.highlight.row,t.highlight.col),u=this.mergedCellInfoCollection.getInfo(l.row,l.col),h=0,f=this.mergedCellInfoCollection.length;f>h;h++){var g=this.mergedCellInfoCollection[h];if(g=new c(g.row+g.rowspan-1,g.col+g.colspan-1),t.includes(g)){a=!0;break}}if(u){var p=new c(u.row,u.col),m=new c(u.row+u.rowspan-1,u.col+u.colspan-1),w=new d(p,p,m);w.includes(this.lastDesiredCoords)||(this.lastDesiredCoords=new c(null,null)),s.row=this.lastDesiredCoords.row?this.lastDesiredCoords.row-l.row:s.row,s.col=this.lastDesiredCoords.col?this.lastDesiredCoords.col-l.col:s.col,o.row>0?s.row=u.row+u.rowspan-1-l.row+o.row:o.row<0&&(s.row=l.row-u.row+o.row),o.col>0?s.col=u.col+u.colspan-1-l.col+o.col:o.col<0&&(s.col=l.col-u.col+o.col)}var v=new c(t.highlight.row+s.row,t.highlight.col+s.col),C=this.mergedCellInfoCollection.getInfo(v.row,v.col);C&&(this.lastDesiredCoords=v,s={row:C.row-l.row,col:C.col-l.col})}else if("modifyTransformEnd"==e)for(var h=0,f=this.mergedCellInfoCollection.length;f>h;h++){var b=this.mergedCellInfoCollection[h],p=new c(b.row,b.col),m=new c(b.row+b.rowspan-1,b.col+b.colspan-1),y=new d(p,p,m),R=t.getBordersSharedWith(y);if(y.isEqual(t))t.setDirection("NW-SE");else if(R.length>0){var S=t.highlight.isEqual(y.from);R.indexOf("top")>-1?t.to.isSouthEastOf(y.from)&&S?t.setDirection("NW-SE"):t.to.isSouthWestOf(y.from)&&S&&t.setDirection("NE-SW"):R.indexOf("bottom")>-1&&(t.to.isNorthEastOf(y.from)&&S?t.setDirection("SW-NE"):t.to.isNorthWestOf(y.from)&&S&&t.setDirection("SE-NW"))}var v=i(s),E=n(b,v),T=r(b,v);t.includesRange(y)&&(y.includes(v)||E||T)&&(E&&(s.row<0?s.row-=b.rowspan-1:s.row>0&&(s.row+=b.rowspan-1)),T&&(s.col<0?s.col-=b.colspan-1:s.col>0&&(s.col+=b.colspan-1)))}0!==s.row&&(o.row=s.row),0!==s.col&&(o.col=s.col)};var f=function(){var e=this,t=e.getSettings().mergeCells;t&&(e.mergeCells||(e.mergeCells=new r(t)))},g=function(){var e=this;e.mergeCells&&(e.view.wt.wtTable.getCell=function(t){if(e.getSettings().mergeCells){var o=e.mergeCells.mergedCellInfoCollection.getInfo(t.row,t.col);o&&(t=o)}return h.prototype.getCell.call(this,t)})},p=function(e){if(this.mergeCells){var t=(e.ctrlKey||e.metaKey)&&!e.altKey;t&&77===e.keyCode&&(this.mergeCells.mergeOrUnmergeSelection(this.getSelectedRange()),this.render(),e.stopImmediatePropagation())}},m=function(e){this.getSettings().mergeCells&&(e.items.push(Handsontable.ContextMenu.SEPARATOR),e.items.push({key:"mergeCells",name:function(){var e=this.getSelected(),t=this.mergeCells.mergedCellInfoCollection.getInfo(e[0],e[1]);return t?"Unmerge cells":"Merge cells"},callback:function(){this.mergeCells.mergeOrUnmergeSelection(this.getSelectedRange()),this.render()},disabled:function(){return!1}}))},w=function(e,t,o,n,r,i){this.mergeCells&&this.mergeCells.applySpanProperties(e,t,o)},v=function(e){return function(t){var o=this.getSettings().mergeCells;if(o){var n=this.getSelectedRange();if(this.mergeCells.modifyTransform(e,n,t),"modifyTransformEnd"===e){var r=this.countRows(),i=this.countCols();n.from.row<0?n.from.row=0:n.from.row>0&&n.from.row>=r&&(n.from.row=n.from-1),n.from.col<0?n.from.col=0:n.from.col>0&&n.from.col>=i&&(n.from.col=i-1)}}}},C=function(e){this.lastDesiredCoords=null;var t=this.getSettings().mergeCells;if(t){var o=this.getSelectedRange();o.highlight=new c(o.highlight.row,o.highlight.col),o.to=e;var n=!1;do{n=!1;for(var r=0,i=this.mergeCells.mergedCellInfoCollection.length;i>r;r++){var s=this.mergeCells.mergedCellInfoCollection[r],a=new c(s.row,s.col),l=new c(s.row+s.rowspan-1,s.col+s.colspan-1),u=new d(a,a,l);o.expandByRange(u)&&(e.row=o.to.row,e.col=o.to.col,n=!0)}}while(n)}},b=function(e,t){if(t&&"area"==t){var o=this.getSettings().mergeCells;if(o)for(var n=this.getSelectedRange(),r=new d(n.from,n.from,n.from),i=new d(n.to,n.to,n.to),s=0,a=this.mergeCells.mergedCellInfoCollection.length;a>s;s++){var l=this.mergeCells.mergedCellInfoCollection[s],u=new c(l.row,l.col),h=new c(l.row+l.rowspan-1,l.col+l.colspan-1),f=new d(u,u,h);r.expandByRange(f)&&(e[0]=r.from.row,e[1]=r.from.col),i.expandByRange(f)&&(e[2]=i.from.row,e[3]=i.from.col)}}},y=function(e,t,o){var n=this.getSettings().mergeCells;if(n){var r=this.mergeCells.mergedCellInfoCollection.getInfo(e,t);!r||r.row==e&&r.col==t||(o.copyable=!1)}},R=function(e){var t=this.getSettings().mergeCells;if(t)for(var o,n=this.countCols(),r=0;n>r;r++){if(o=this.mergeCells.mergedCellInfoCollection.getInfo(e.startRow,r),o&&o.row<e.startRow)return e.startRow=o.row,R.call(this,e);if(o=this.mergeCells.mergedCellInfoCollection.getInfo(e.endRow,r)){var i=o.row+o.rowspan-1;if(i>e.endRow)return e.endRow=i,R.call(this,e)}}},S=function(e){var t=this.getSettings().mergeCells;if(t)for(var o,n=this.countRows(),r=0;n>r;r++){if(o=this.mergeCells.mergedCellInfoCollection.getInfo(r,e.startColumn),o&&o.col<e.startColumn)return e.startColumn=o.col,S.call(this,e);if(o=this.mergeCells.mergedCellInfoCollection.getInfo(r,e.endColumn)){var i=o.col+o.colspan-1;if(i>e.endColumn)return e.endColumn=i,S.call(this,e)}}},E=function(e){if(e&&this.mergeCells){var t=this.mergeCells.mergedCellInfoCollection,o=this.getSelectedRange();for(var n in t)if(o.highlight.row==t[n].row&&o.highlight.col==t[n].col&&o.to.row==t[n].row+t[n].rowspan-1&&o.to.col==t[n].col+t[n].colspan-1)return!1}return e};Handsontable.hooks.add("beforeInit",f),Handsontable.hooks.add("afterInit",g),Handsontable.hooks.add("beforeKeyDown",p),Handsontable.hooks.add("modifyTransformStart",v("modifyTransformStart")),Handsontable.hooks.add("modifyTransformEnd",v("modifyTransformEnd")),Handsontable.hooks.add("beforeSetRangeEnd",C),Handsontable.hooks.add("beforeDrawBorders",b),Handsontable.hooks.add("afterIsMultipleSelection",E),Handsontable.hooks.add("afterRenderer",w),Handsontable.hooks.add("afterContextMenuDefaultOptions",m),Handsontable.hooks.add("afterGetCellMeta",y),Handsontable.hooks.add("afterViewportRowCalculatorOverride",R),Handsontable.hooks.add("afterViewportColumnCalculatorOverride",S),Handsontable.hooks.add("afterAutofillApplyValues",i),Handsontable.MergeCells=r},{"./../../3rdparty/walkontable/src/cell/coords.js":5,"./../../3rdparty/walkontable/src/cell/range.js":6,"./../../3rdparty/walkontable/src/table.js":20,"./../../plugins.js":45}],65:[function(e,t,o){"use strict";Object.defineProperties(o,{MultipleSelectionHandles:{get:function(){return d}},__esModule:{value:!0}});var n,r,i,s,a=(n=e("./../../dom.js"),n&&n.__esModule&&n||{"default":n}),l=(r=e("./../_base.js"),r&&r.__esModule&&r||{"default":r})["default"],u=(i=e("./../../eventManager.js"),i&&i.__esModule&&i||{"default":i}).EventManager,c=(s=e("./../../plugins.js"),s&&s.__esModule&&s||{"default":s}).registerPlugin,d=function(e){$traceurRuntime.superConstructor(h).call(this,e),this.dragged=[],this.eventManager=null,this.lastSetCell=null},h=d;$traceurRuntime.createClass(d,{isEnabled:function(){return Handsontable.mobileBrowser},enablePlugin:function(){this.enabled||(this.eventManager||(this.eventManager=new u(this)),this.registerListeners(),$traceurRuntime.superGet(this,h.prototype,"enablePlugin").call(this))},registerListeners:function(){function e(e){if(1===t.dragged.length)return t.dragged.splice(0,t.dragged.length),!0;var o=t.dragged.indexOf(e);return-1==o?!1:void(0===o?t.dragged=t.dragged.slice(0,1):1==o&&(t.dragged=t.dragged.slice(-1)))}var t=this;this.eventManager.addEventListener(this.hot.rootElement,"touchstart",function(e){var o;return a.hasClass(e.target,"topLeftSelectionHandle-HitArea")?(o=t.hot.getSelectedRange(),t.dragged.push("topLeft"),t.touchStartRange={width:o.getWidth(),height:o.getHeight(),direction:o.getDirection()},e.preventDefault(),!1):a.hasClass(e.target,"bottomRightSelectionHandle-HitArea")?(o=t.hot.getSelectedRange(),t.dragged.push("bottomRight"),t.touchStartRange={width:o.getWidth(),height:o.getHeight(),direction:o.getDirection()},e.preventDefault(),!1):void 0}),this.eventManager.addEventListener(this.hot.rootElement,"touchend",function(o){return a.hasClass(o.target,"topLeftSelectionHandle-HitArea")?(e.call(t,"topLeft"),t.touchStartRange=void 0,o.preventDefault(),!1):a.hasClass(o.target,"bottomRightSelectionHandle-HitArea")?(e.call(t,"bottomRight"),t.touchStartRange=void 0,o.preventDefault(),!1):void 0}),this.eventManager.addEventListener(this.hot.rootElement,"touchmove",function(e){var o,n,r,i,s,l,u,c=a.getWindowScrollTop(),d=a.getWindowScrollLeft();0!==t.dragged.length&&(o=document.elementFromPoint(e.touches[0].screenX-d,e.touches[0].screenY-c),o&&o!==t.lastSetCell&&(("TD"==o.nodeName||"TH"==o.nodeName)&&(n=t.hot.getCoords(o),-1==n.col&&(n.col=0),r=t.hot.getSelectedRange(),i=r.getWidth(),s=r.getHeight(),l=r.getDirection(),1==i&&1==s&&t.hot.selection.setRangeEnd(n),u=t.getCurrentRangeCoords(r,n,t.touchStartRange.direction,l,t.dragged[0]),null!==u.start&&t.hot.selection.setRangeStart(u.start),t.hot.selection.setRangeEnd(u.end),t.lastSetCell=o),e.preventDefault()))})},getCurrentRangeCoords:function(e,t,o,n,r){var i=e.getTopLeftCorner(),s=e.getBottomRightCorner(),a=e.getBottomLeftCorner(),l=e.getTopRightCorner(),u={start:null,end:null};switch(o){case"NE-SW":switch(n){case"NE-SW":case"NW-SE":u="topLeft"==r?{start:new WalkontableCellCoords(t.row,e.highlight.col),end:new WalkontableCellCoords(a.row,t.col)}:{start:new WalkontableCellCoords(e.highlight.row,t.col),end:new WalkontableCellCoords(t.row,i.col)};break;case"SE-NW":"bottomRight"==r&&(u={start:new WalkontableCellCoords(s.row,t.col),end:new WalkontableCellCoords(t.row,i.col)})}break;case"NW-SE":switch(n){case"NE-SW":"topLeft"==r?u={start:t,end:a}:u.end=t;break;case"NW-SE":"topLeft"==r?u={start:t,end:s}:u.end=t;break;case"SE-NW":"topLeft"==r?u={start:t,end:i}:u.end=t;break;case"SW-NE":"topLeft"==r?u={start:t,end:l}:u.end=t}break;case"SW-NE":switch(n){case"NW-SE":u="bottomRight"==r?{start:new WalkontableCellCoords(t.row,i.col),end:new WalkontableCellCoords(a.row,t.col)}:{start:new WalkontableCellCoords(i.row,t.col),end:new WalkontableCellCoords(t.row,s.col)};break;case"SW-NE":u="topLeft"==r?{start:new WalkontableCellCoords(e.highlight.row,t.col),end:new WalkontableCellCoords(t.row,s.col)}:{start:new WalkontableCellCoords(t.row,i.col),end:new WalkontableCellCoords(i.row,t.col)};break;case"SE-NW":"bottomRight"==r?u={start:new WalkontableCellCoords(t.row,l.col),end:new WalkontableCellCoords(i.row,t.col)}:"topLeft"==r&&(u={start:a,end:t})}break;case"SE-NW":switch(n){case"NW-SE":case"NE-SW":case"SW-NE":"topLeft"==r&&(u.end=t);break;case"SE-NW":"topLeft"==r?u.end=t:u={start:t,end:i}}}return u},isDragged:function(){return this.dragged.length>0}},{},l),c("multipleSelectionHandles",d)},{"./../../dom.js":27,"./../../eventManager.js":41,"./../../plugins.js":45,"./../_base.js":46}],66:[function(e,t,o){"use strict";function n(){}function r(){var e=this,t=e.getSettings().observeChanges;t?(e.observer&&a.call(e),i.call(e),u.call(e)):t||a.call(e)}function i(){var e=this;e.observeChangesActive=!0,e.pauseObservingChanges=function(){e.observeChangesActive=!1},e.resumeObservingChanges=function(){e.observeChangesActive=!0},e.observedData=e.getData(),e.observer=g.observe(e.observedData,function(t){e.observeChangesActive&&(s.call(e,t),e.render()),e.runHooks("afterChangesObserved")})}function s(e){function t(e){var t;return t=n(e),t=o(t)}function o(e){var t=[];return e.filter(function(e){var o=r(e.path);if(-1!=["add","remove"].indexOf(e.op)&&!isNaN(o.col)){if(-1!=t.indexOf(o.col))return!1;t.push(o.col)}return!0})}function n(e){return e.filter(function(e){return!/[/]length/gi.test(e.path)})}function r(e){var t=e.match(/^\/(\d+)\/?(.*)?$/);return{row:parseInt(t[1],10),col:/^\d*$/.test(t[2])?parseInt(t[2],10):t[2]}}for(var i=this,s=t(e),a=0,l=s.length;l>a;a++){var u=s[a],c=r(u.path);switch(u.op){case"add":isNaN(c.col)?i.runHooks("afterCreateRow",c.row):i.runHooks("afterCreateCol",c.col);break;case"remove":isNaN(c.col)?i.runHooks("afterRemoveRow",c.row,1):i.runHooks("afterRemoveCol",c.col,1);break;case"replace":i.runHooks("afterChange",[c.row,c.col,null,u.value],"external")}}}function a(){var e=this;e.observer&&(l.call(e),c.call(e))}function l(){var e=this;g.unobserve(e.observedData,e.observer),delete e.observeChangesActive,delete e.pauseObservingChanges,delete e.resumeObservingChanges}function u(){var e=this;e.addHook("afterDestroy",a),e.addHook("afterCreateRow",d),e.addHook("afterRemoveRow",d),e.addHook("afterCreateCol",d),e.addHook("afterRemoveCol",d),e.addHook("afterChange",function(e,t){"loadData"!=t&&d.call(this)})}function c(){var e=this;e.removeHook("afterDestroy",a),e.removeHook("afterCreateRow",d),e.removeHook("afterRemoveRow",d),e.removeHook("afterCreateCol",d),e.removeHook("afterRemoveCol",d),e.removeHook("afterChange",d)}function d(){var e=this;e.pauseObservingChanges(),e.addHookOnce("afterChangesObserved",function(){e.resumeObservingChanges()})}Object.defineProperties(o,{ObserveChanges:{get:function(){return n}},__esModule:{value:!0}});var h,f,g=((h=e("./../../plugins.js"),h&&h.__esModule&&h||{"default":h}).registerPlugin,(f=e("jsonpatch"),f&&f.__esModule&&f||{"default":f})["default"]);Handsontable.hooks.add("afterLoadData",r),Handsontable.hooks.add("afterUpdateSettings",r),Handsontable.hooks.register("afterChangesObserved")},{"./../../plugins.js":45,jsonpatch:"jsonpatch"}],67:[function(e,t,o){"use strict";function n(e){var t,o=function(){window.localStorage[e+"__persistentStateKeys"]=JSON.stringify(t)},n=function(){var o=window.localStorage[e+"__persistentStateKeys"],n="string"==typeof o?JSON.parse(o):void 0;t=n?n:[]},r=function(){t=[],o()};n(),this.saveValue=function(n,r){window.localStorage[e+"_"+n]=JSON.stringify(r),-1==t.indexOf(n)&&(t.push(n),o())},this.loadValue=function(t,o){t="undefined"!=typeof t?t:o;var n=window.localStorage[e+"_"+t];return"undefined"==typeof n?void 0:JSON.parse(n)},this.reset=function(t){window.localStorage.removeItem(e+"_"+t)},this.resetAll=function(){for(var o=0;o<t.length;o++)window.localStorage.removeItem(e+"_"+t[o]);r()}}function r(){function e(){var e=this;for(var t in r)r.hasOwnProperty(t)&&e.addHook(t,r[t])}function t(){var e=this;for(var t in r)r.hasOwnProperty(t)&&e.removeHook(t,r[t])}var o=this;this.init=function(){var r=this,i=r.getSettings().persistentState;return o.enabled=!!i,o.enabled?(r.storage||(r.storage=new n(r.rootElement.id)),r.resetState=o.resetValue,void e.call(r)):void t.call(r)},this.saveValue=function(e,t){var o=this;o.storage.saveValue(e,t)},this.loadValue=function(e,t){var o=this;t.value=o.storage.loadValue(e)},this.resetValue=function(e){var t=this;"undefined"!=typeof e?t.storage.reset(e):t.storage.resetAll()};var r={persistentStateSave:o.saveValue,persistentStateLoad:o.loadValue,persistentStateReset:o.resetValue};for(var i in r)r.hasOwnProperty(i)&&Handsontable.hooks.register(i)}Object.defineProperties(o,{HandsontablePersistentState:{get:function(){return r}},__esModule:{value:!0}});var i,s=((i=e("./../../plugins.js"),i&&i.__esModule&&i||{"default":i}).registerPlugin,new r);Handsontable.hooks.add("beforeInit",s.init),Handsontable.hooks.add("afterUpdateSettings",s.init)},{"./../../plugins.js":45}],68:[function(e,t,o){"use strict";function n(){var e=this,t=!!e.getSettings().search;t?e.search=new Handsontable.Search(e):delete e.search}var r,i,s=(r=e("./../../dom.js"),r&&r.__esModule&&r||{"default":r}),a=(i=e("./../../renderers.js"),i&&i.__esModule&&i||{"default":i}),l=a.registerRenderer,u=a.getRenderer;Handsontable.Search=function(e){this.query=function(t,o,n){var r=e.countRows(),i=e.countCols(),s=[];o||(o=Handsontable.Search.global.getDefaultCallback()),n||(n=Handsontable.Search.global.getDefaultQueryMethod());for(var a=0;r>a;a++)for(var l=0;i>l;l++){var u=e.getDataAtCell(a,l),c=e.getCellMeta(a,l),d=c.search.callback||o,h=c.search.queryMethod||n,f=h(t,u);if(f){var g={row:a,col:l,data:u};s.push(g)}d&&d(e,a,l,u,f)}return s}},Handsontable.Search.DEFAULT_CALLBACK=function(e,t,o,n,r){e.getCellMeta(t,o).isSearchResult=r},Handsontable.Search.DEFAULT_QUERY_METHOD=function(e,t){return"undefined"!=typeof e&&null!=e&&e.toLowerCase&&0!==e.length?"undefined"==typeof t||null==t?!1:-1!=t.toString().toLowerCase().indexOf(e.toLowerCase()):!1},Handsontable.Search.DEFAULT_SEARCH_RESULT_CLASS="htSearchResult",Handsontable.Search.global=function(){var e=Handsontable.Search.DEFAULT_CALLBACK,t=Handsontable.Search.DEFAULT_QUERY_METHOD,o=Handsontable.Search.DEFAULT_SEARCH_RESULT_CLASS;return{getDefaultCallback:function(){return e},setDefaultCallback:function(t){e=t},getDefaultQueryMethod:function(){return t},setDefaultQueryMethod:function(e){t=e},getDefaultSearchResultClass:function(){return o},setDefaultSearchResultClass:function(e){o=e}}}(),Handsontable.SearchCellDecorator=function(e,t,o,n,r,i,a){var l=null!==a.search&&"object"==typeof a.search&&a.search.searchResultClass||Handsontable.Search.global.getDefaultSearchResultClass();a.isSearchResult?s.addClass(t,l):s.removeClass(t,l)};var c=u("base");l("base",function(e,t,o,n,r,i,s){c.apply(this,arguments),Handsontable.SearchCellDecorator.apply(this,arguments)}),Handsontable.hooks.add("afterInit",n),Handsontable.hooks.add("afterUpdateSettings",n)},{"./../../dom.js":27,"./../../renderers.js":71}],69:[function(e,t,o){"use strict";Object.defineProperties(o,{TouchScroll:{get:function(){return u}},__esModule:{value:!0}});var n,r,i,s=(n=e("./../../dom.js"),n&&n.__esModule&&n||{"default":n}),a=(r=e("./../_base.js"),r&&r.__esModule&&r||{"default":r})["default"],l=(i=e("./../../plugins.js"),i&&i.__esModule&&i||{"default":i}).registerPlugin,u=function(e){var t=this;$traceurRuntime.superConstructor(c).call(this,e),this.hot.addHook("afterInit",function(){return t.init()}),this.hot.addHook("afterUpdateSettings",function(){return t.onAfterUpdateSettings()}),this.scrollbars=[],this.clones=[]},c=u;$traceurRuntime.createClass(u,{init:function(){this.registerEvents(),this.onAfterUpdateSettings()},onAfterUpdateSettings:function(){var e=this;this.hot.addHookOnce("afterRender",function(){var t=e.hot.view.wt.wtOverlays;e.scrollbars=[],e.scrollbars.push(t.topOverlay),e.scrollbars.push(t.leftOverlay),t.topLeftCornerOverlay&&e.scrollbars.push(t.topLeftCornerOverlay),e.clones=[],t.topOverlay.needFullRender&&e.clones.push(t.topOverlay.clone.wtTable.holder.parentNode),t.leftOverlay.needFullRender&&e.clones.push(t.leftOverlay.clone.wtTable.holder.parentNode),t.topLeftCornerOverlay&&e.clones.push(t.topLeftCornerOverlay.clone.wtTable.holder.parentNode)})},registerEvents:function(){var e=this;this.hot.addHook("beforeTouchScroll",function(){return e.onBeforeTouchScroll()}),this.hot.addHook("afterMomentumScroll",function(){return e.onAfterMomentumScroll()})},onBeforeTouchScroll:function(){Handsontable.freezeOverlays=!0;for(var e=0,t=this.clones.length;t>e;e++)s.addClass(this.clones[e],"hide-tween")},onAfterMomentumScroll:function(){Handsontable.freezeOverlays=!1;for(var e=this,t=0,o=this.clones.length;o>t;t++)s.removeClass(this.clones[t],"hide-tween");for(var n=0,r=this.clones.length;r>n;n++)s.addClass(this.clones[n],"show-tween");setTimeout(function(){for(var t=0,o=e.clones.length;o>t;t++)s.removeClass(e.clones[t],"show-tween")},400);for(var i=0,a=this.scrollbars.length;a>i;i++)this.scrollbars[i].refresh(),this.scrollbars[i].resetFixedPosition();this.hot.view.wt.wtOverlays.syncScrollWithMaster()}},{},a),l("touchScroll",u)},{"./../../dom.js":27,"./../../plugins.js":45,"./../_base.js":46}],70:[function(e,t,o){"use strict";function n(){var e=this,t="undefined"==typeof e.getSettings().undo||e.getSettings().undo;t?e.undoRedo||(e.undoRedo=new Handsontable.UndoRedo(e),s(e),e.addHook("beforeKeyDown",r),e.addHook("afterChange",i)):e.undoRedo&&(delete e.undoRedo,a(e),e.removeHook("beforeKeyDown",r),e.removeHook("afterChange",i))}function r(e){var t=this,o=(e.ctrlKey||e.metaKey)&&!e.altKey;o&&(89===e.keyCode||e.shiftKey&&90===e.keyCode?(t.undoRedo.redo(),e.stopImmediatePropagation()):90===e.keyCode&&(t.undoRedo.undo(),e.stopImmediatePropagation()))}function i(e,t){var o=this;return"loadData"==t?o.undoRedo.clear():void 0}function s(e){e.undo=function(){return e.undoRedo.undo()},e.redo=function(){return e.undoRedo.redo()},e.isUndoAvailable=function(){return e.undoRedo.isUndoAvailable()},e.isRedoAvailable=function(){return e.undoRedo.isRedoAvailable()},e.clearUndo=function(){return e.undoRedo.clear()}}function a(e){delete e.undo,delete e.redo,delete e.isUndoAvailable,delete e.isRedoAvailable,delete e.clearUndo}var l,u=(l=e("./../../helpers.js"),l&&l.__esModule&&l||{"default":l});Handsontable.UndoRedo=function(e){var t=this;this.instance=e,this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,e.addHook("afterChange",function(e,o){if(e){var n=new Handsontable.UndoRedo.ChangeAction(e);t.done(n)}}),e.addHook("afterCreateRow",function(e,o,n){if(!n){var r=new Handsontable.UndoRedo.CreateRowAction(e,o);t.done(r)}}),e.addHook("beforeRemoveRow",function(e,o){var n=t.instance.getData();e=(n.length+e)%n.length;var r=n.slice(e,e+o),i=new Handsontable.UndoRedo.RemoveRowAction(e,r);t.done(i)}),e.addHook("afterCreateCol",function(e,o,n){if(!n){var r=new Handsontable.UndoRedo.CreateColumnAction(e,o);t.done(r)}}),e.addHook("beforeRemoveCol",function(o,n){var r=t.instance.getData();o=(t.instance.countCols()+o)%t.instance.countCols();for(var i=[],s=0,a=r.length;a>s;s++)i[s]=r[s].slice(o,o+n);var l;Array.isArray(e.getSettings().colHeaders)&&(l=e.getSettings().colHeaders.slice(o,o+i.length));var u=new Handsontable.UndoRedo.RemoveColumnAction(o,i,l);t.done(u)}),e.addHook("beforeCellAlignment",function(e,o,n,r){var i=new Handsontable.UndoRedo.CellAlignmentAction(e,o,n,r);t.done(i)})},Handsontable.UndoRedo.prototype.done=function(e){this.ignoreNewActions||(this.doneActions.push(e),this.undoneActions.length=0)},Handsontable.UndoRedo.prototype.undo=function(){if(this.isUndoAvailable()){var e=this.doneActions.pop();this.ignoreNewActions=!0;var t=this;e.undo(this.instance,function(){t.ignoreNewActions=!1,t.undoneActions.push(e)})}},Handsontable.UndoRedo.prototype.redo=function(){if(this.isRedoAvailable()){var e=this.undoneActions.pop();this.ignoreNewActions=!0;var t=this;e.redo(this.instance,function(){t.ignoreNewActions=!1,t.doneActions.push(e)})}},Handsontable.UndoRedo.prototype.isUndoAvailable=function(){return this.doneActions.length>0},Handsontable.UndoRedo.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},Handsontable.UndoRedo.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},Handsontable.UndoRedo.Action=function(){},Handsontable.UndoRedo.Action.prototype.undo=function(){},Handsontable.UndoRedo.Action.prototype.redo=function(){},Handsontable.UndoRedo.ChangeAction=function(e){this.changes=e},u.inherit(Handsontable.UndoRedo.ChangeAction,Handsontable.UndoRedo.Action),Handsontable.UndoRedo.ChangeAction.prototype.undo=function(e,t){for(var o=u.deepClone(this.changes),n=e.countEmptyRows(!0),r=e.countEmptyCols(!0),i=0,s=o.length;s>i;i++)o[i].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtRowProp(o,null,null,"undo");for(var i=0,s=o.length;s>i;i++)e.getSettings().minSpareRows&&o[i][0]+1+e.getSettings().minSpareRows===e.countRows()&&n==e.getSettings().minSpareRows&&(e.alter("remove_row",parseInt(o[i][0]+1,10),e.getSettings().minSpareRows),e.undoRedo.doneActions.pop()),e.getSettings().minSpareCols&&o[i][1]+1+e.getSettings().minSpareCols===e.countCols()&&r==e.getSettings().minSpareCols&&(e.alter("remove_col",parseInt(o[i][1]+1,10),e.getSettings().minSpareCols),e.undoRedo.doneActions.pop())},Handsontable.UndoRedo.ChangeAction.prototype.redo=function(e,t){for(var o=u.deepClone(this.changes),n=0,r=o.length;r>n;n++)o[n].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtRowProp(o,null,null,"redo")},Handsontable.UndoRedo.CreateRowAction=function(e,t){this.index=e,this.amount=t},u.inherit(Handsontable.UndoRedo.CreateRowAction,Handsontable.UndoRedo.Action),Handsontable.UndoRedo.CreateRowAction.prototype.undo=function(e,t){var o=e.countRows(),n=e.getSettings().minSpareRows;this.index>=o&&this.index-n<o&&(this.index-=n),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount)},Handsontable.UndoRedo.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row",this.index+1,this.amount)},Handsontable.UndoRedo.RemoveRowAction=function(e,t){this.index=e,this.data=t},u.inherit(Handsontable.UndoRedo.RemoveRowAction,Handsontable.UndoRedo.Action),Handsontable.UndoRedo.RemoveRowAction.prototype.undo=function(e,t){var o=[this.index,0];Array.prototype.push.apply(o,this.data),Array.prototype.splice.apply(e.getData(),o),e.addHookOnce("afterRender",t),e.render()},Handsontable.UndoRedo.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length)},Handsontable.UndoRedo.CreateColumnAction=function(e,t){this.index=e,this.amount=t},u.inherit(Handsontable.UndoRedo.CreateColumnAction,Handsontable.UndoRedo.Action),Handsontable.UndoRedo.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount)},Handsontable.UndoRedo.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col",this.index+1,this.amount)},Handsontable.UndoRedo.CellAlignmentAction=function(e,t,o,n){this.stateBefore=e,this.range=t,this.type=o,this.alignment=n},Handsontable.UndoRedo.CellAlignmentAction.prototype.undo=function(e,t){if(e.contextMenu){for(var o=this.range.from.row;o<=this.range.to.row;o++)for(var n=this.range.from.col;n<=this.range.to.col;n++)e.setCellMeta(o,n,"className",this.stateBefore[o][n]||" htLeft");e.addHookOnce("afterRender",t),e.render()}},Handsontable.UndoRedo.CellAlignmentAction.prototype.redo=function(e,t){if(e.contextMenu){for(var o=this.range.from.row;o<=this.range.to.row;o++)for(var n=this.range.from.col;n<=this.range.to.col;n++)e.contextMenu.align.call(e,this.range,this.type,this.alignment);e.addHookOnce("afterRender",t),e.render()}},Handsontable.UndoRedo.RemoveColumnAction=function(e,t,o){this.index=e,this.data=t,this.amount=this.data[0].length,this.headers=o},u.inherit(Handsontable.UndoRedo.RemoveColumnAction,Handsontable.UndoRedo.Action),Handsontable.UndoRedo.RemoveColumnAction.prototype.undo=function(e,t){for(var o,n,r=0,i=e.getData().length;i>r;r++)o=e.getSourceDataAtRow(r),n=[this.index,0],Array.prototype.push.apply(n,this.data[r]),Array.prototype.splice.apply(o,n);"undefined"!=typeof this.headers&&(n=[this.index,0],Array.prototype.push.apply(n,this.headers),Array.prototype.splice.apply(e.getSettings().colHeaders,n)),e.addHookOnce("afterRender",t),e.render()},Handsontable.UndoRedo.RemoveColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount)},Handsontable.hooks.add("afterInit",n),Handsontable.hooks.add("afterUpdateSettings",n)},{"./../../helpers.js":42}],71:[function(e,t,o){"use strict";function n(e,t){var o;l[e]=t,o=a.toUpperCaseFirst(e)+"Renderer",Handsontable.renderers[o]=t,Handsontable[o]=t}function r(e){if("function"==typeof e)return e;if("string"!=typeof e)throw Error('Only strings and functions can be passed as "renderer" parameter');if(!(e in l))throw Error('No editor registered under name "'+e+'"');return l[e]}function i(e){return e in l}Object.defineProperties(o,{registerRenderer:{get:function(){return n}},getRenderer:{get:function(){return r}},hasRenderer:{get:function(){return i}},__esModule:{value:!0}});var s,a=(s=e("./helpers.js"),s&&s.__esModule&&s||{"default":s}),l={};Handsontable.renderers=Handsontable.renderers||{},Handsontable.renderers.registerRenderer=n,Handsontable.renderers.getRenderer=r},{"./helpers.js":42}],72:[function(e,t,o){"use strict";function n(e,t,o,n,r,i,a){a.className&&(t.className?t.className=t.className+" "+a.className:t.className=a.className),a.readOnly&&s.addClass(t,a.readOnlyCellClassName),a.valid===!1&&a.invalidCellClassName?s.addClass(t,a.invalidCellClassName):s.removeClass(t,a.invalidCellClassName),a.wordWrap===!1&&a.noWordWrapClassName&&s.addClass(t,a.noWordWrapClassName),!i&&a.placeholder&&s.addClass(t,a.placeholderCellClassName)}Object.defineProperties(o,{cellDecorator:{get:function(){return n}},__esModule:{value:!0}});var r,i,s=(r=e("./../dom.js"),r&&r.__esModule&&r||{"default":r}),a=(i=e("./../renderers.js"),i&&i.__esModule&&i||{"default":i}).registerRenderer;a("base",n),Handsontable.renderers.cellDecorator=n},{"./../dom.js":27,"./../renderers.js":71}],73:[function(e,t,o){"use strict";function n(e,t,o,n,r,i,s){var a=(g.cloneNode(!0),p.cloneNode(!0));if(d("text")(e,t,o,n,r,i,s),t.appendChild(a),l.addClass(t,"htAutocomplete"),t.firstChild||t.appendChild(document.createTextNode(String.fromCharCode(160))),!e.acArrowListener){var c=u(e);e.acArrowListener=function(r){l.hasClass(r.target,"htAutocompleteArrow")&&e.view.wt.getSetting("onCellDblClick",null,new f(o,n),t)},c.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",function(){c.clear()})}}Object.defineProperties(o,{autocompleteRenderer:{get:function(){return n}},__esModule:{value:!0}});var r,i,s,a,l=(r=e("./../dom.js"),r&&r.__esModule&&r||{"default":r}),u=(i=e("./../eventManager.js"),i&&i.__esModule&&i||{"default":i}).eventManager,c=(s=e("./../renderers.js"),s&&s.__esModule&&s||{"default":s}),d=c.getRenderer,h=c.registerRenderer,f=(a=e("./../3rdparty/walkontable/src/cell/coords.js"),a&&a.__esModule&&a||{"default":a}).WalkontableCellCoords,g=document.createElement("DIV");g.className="htAutocompleteWrapper";var p=document.createElement("DIV");p.className="htAutocompleteArrow",
p.appendChild(document.createTextNode(String.fromCharCode(9660)));h("autocomplete",n)},{"./../3rdparty/walkontable/src/cell/coords.js":5,"./../dom.js":27,"./../eventManager.js":41,"./../renderers.js":71}],74:[function(e,t,o){"use strict";function n(e,t,o,n,a,l,u){function c(e){var t=[h.keyCode.SPACE,h.keyCode.ENTER,h.keyCode.DELETE,h.keyCode.BACKSPACE];d.enableImmediatePropagation(e),-1===t.indexOf(e.keyCode)||e.isImmediatePropagationStopped()||v(function(){e.stopImmediatePropagation(),e.preventDefault()}),(e.keyCode==h.keyCode.SPACE||e.keyCode==h.keyCode.ENTER)&&g(),(e.keyCode==h.keyCode.DELETE||e.keyCode==h.keyCode.BACKSPACE)&&g(!1)}function g(){var e=void 0!==arguments[0]?arguments[0]:null;v(function(t){for(var o=0,n=t.length;n>o;o++){if(d.hasClass(t[o],w)&&null===e)return;p(t[o],e)}})}function p(e){var t=void 0!==arguments[1]?arguments[1]:null;null===t?e.checked=!e.checked:e.checked=t,C.fireEvent(e,"change")}function v(t){for(var o=e.getSelectedRange(),n=o.getTopLeftCorner(),r=o.getBottomRightCorner(),i=n.row;i<=r.row;i++)for(var s=n.col;s<=r.col;s++){var a=e.getCell(i,s),l=e.getCellMeta(i,s),u=a.querySelectorAll("input[type=checkbox]");u.length>0&&!l.readOnly&&t(u)}}var C=new f(e),b=r();"undefined"==typeof u.checkedTemplate&&(u.checkedTemplate=!0),"undefined"==typeof u.uncheckedTemplate&&(u.uncheckedTemplate=!1),d.empty(t),l===u.checkedTemplate||h.equalsIgnoreCase(l,u.checkedTemplate)?(b.checked=!0,t.appendChild(b)):l===u.uncheckedTemplate||h.equalsIgnoreCase(l,u.uncheckedTemplate)?t.appendChild(b):null===l?(d.addClass(b,"noValue"),t.appendChild(b)):(b.style.display="none",d.addClass(b,w),t.appendChild(b),t.appendChild(document.createTextNode("#bad-value#"))),u.readOnly?C.addEventListener(b,"click",i):(C.addEventListener(b,"mousedown",s),C.addEventListener(b,"mouseup",s),C.addEventListener(b,"change",function(t){e.setDataAtRowProp(o,a,t.target.checked?u.checkedTemplate:u.uncheckedTemplate)})),m.has(e)||(m.set(e,!0),e.addHook("beforeKeyDown",c))}function r(){var e=document.createElement("INPUT");return e.className="htCheckboxRendererInput",e.type="checkbox",e.setAttribute("autocomplete","off"),e.cloneNode(!1)}function i(e){e.preventDefault()}function s(e){h.stopPropagation(e)}Object.defineProperties(o,{checkboxRenderer:{get:function(){return n}},__esModule:{value:!0}});var a,l,u,c,d=(a=e("./../dom.js"),a&&a.__esModule&&a||{"default":a}),h=(l=e("./../helpers.js"),l&&l.__esModule&&l||{"default":l}),f=(u=e("./../eventManager.js"),u&&u.__esModule&&u||{"default":u}).EventManager,g=(c=e("./../renderers.js"),c&&c.__esModule&&c||{"default":c}),p=(g.getRenderer,g.registerRenderer),m=new WeakMap,w="htBadValue";p("checkbox",n)},{"./../dom.js":27,"./../eventManager.js":41,"./../helpers.js":42,"./../renderers.js":71}],75:[function(e,t,o){"use strict";function n(e,t,o,n,r,i,a){l("base").apply(this,arguments),s.fastInnerHTML(t,i)}Object.defineProperties(o,{htmlRenderer:{get:function(){return n}},__esModule:{value:!0}});var r,i,s=(r=e("./../dom.js"),r&&r.__esModule&&r||{"default":r}),a=(i=e("./../renderers.js"),i&&i.__esModule&&i||{"default":i}),l=a.getRenderer,u=a.registerRenderer;u("html",n)},{"./../dom.js":27,"./../renderers.js":71}],76:[function(e,t,o){"use strict";function n(e,t,o,n,r,i,s){u.isNumeric(i)&&("undefined"!=typeof s.language&&c.language(s.language),i=c(i).format(s.format||"0"),l.addClass(t,"htNumeric")),h("text")(e,t,o,n,r,i,s)}Object.defineProperties(o,{numericRenderer:{get:function(){return n}},__esModule:{value:!0}});var r,i,s,a,l=(r=e("./../dom.js"),r&&r.__esModule&&r||{"default":r}),u=(i=e("./../helpers.js"),i&&i.__esModule&&i||{"default":i}),c=(s=e("numeral"),s&&s.__esModule&&s||{"default":s})["default"],d=(a=e("./../renderers.js"),a&&a.__esModule&&a||{"default":a}),h=d.getRenderer,f=d.registerRenderer;f("numeric",n)},{"./../dom.js":27,"./../helpers.js":42,"./../renderers.js":71,numeral:"numeral"}],77:[function(e,t,o){"use strict";function n(e,t,o,n,r,i,a){l("text").apply(this,arguments),i=t.innerHTML;var u,c=a.hashLength||i.length,d=a.hashSymbol||"*";for(u="";u.split(d).length-1<c;u+=d);s.fastInnerHTML(t,u)}Object.defineProperties(o,{passwordRenderer:{get:function(){return n}},__esModule:{value:!0}});var r,i,s=(r=e("./../dom.js"),r&&r.__esModule&&r||{"default":r}),a=(i=e("./../renderers.js"),i&&i.__esModule&&i||{"default":i}),l=a.getRenderer,u=a.registerRenderer;u("password",n)},{"./../dom.js":27,"./../renderers.js":71}],78:[function(e,t,o){"use strict";function n(e,t,o,n,r,i,s){c("base").apply(this,arguments),!i&&s.placeholder&&(i=s.placeholder);var u=l.stringify(i);if(e.getSettings().trimWhitespace||(u=u.replace(/ /g,String.fromCharCode(160))),s.rendererTemplate){a.empty(t);var d=document.createElement("TEMPLATE");d.setAttribute("bind","{{}}"),d.innerHTML=s.rendererTemplate,HTMLTemplateElement.decorate(d),d.model=e.getSourceDataAtRow(o),t.appendChild(d)}else a.fastInnerText(t,u)}Object.defineProperties(o,{textRenderer:{get:function(){return n}},__esModule:{value:!0}});var r,i,s,a=(r=e("./../dom.js"),r&&r.__esModule&&r||{"default":r}),l=(i=e("./../helpers.js"),i&&i.__esModule&&i||{"default":i}),u=(s=e("./../renderers.js"),s&&s.__esModule&&s||{"default":s}),c=u.getRenderer,d=u.registerRenderer;d("text",n)},{"./../dom.js":27,"./../helpers.js":42,"./../renderers.js":71}],79:[function(e,t,o){"use strict";!function(e){function t(e){return{configurable:!0,enumerable:!1,value:e,writable:!0}}function o(){return"__$"+Math.floor(1e9*Math.random())+"$"+ ++z+"$__"}function n(e){return Y[e]}function r(){var e=o();return Y[e]=!0,e}function i(e){return"object"==typeof e&&e instanceof l}function s(e){return i(e)?"symbol":typeof e}function a(e){var t=new l(e);if(!(this instanceof a))return t;throw new TypeError("Symbol cannot be new'ed")}function l(e){var t=o();x(this,K,{value:this}),x(this,U,{value:t}),x(this,$,{value:e}),c(this),X[t]=this}function u(e){var t=e[q];return t&&t.self===e?t:F(e)?(J.hash.value=Z++,J.self.value=e,Q.value=P(null,J),x(e,q,Q),Q.value):void 0}function c(e){return u(e),D.apply(this,arguments)}function d(e){return u(e),B.apply(this,arguments)}function h(e){return u(e),V.apply(this,arguments)}function f(e){return X[e]||Y[e]}function g(e){return i(e)?e[U]:e}function p(e){for(var t=[],o=0;o<e.length;o++)f(e[o])||t.push(e[o]);return t}function m(e){return p(N(e))}function w(e){return p(W(e))}function v(e){for(var t=[],o=N(e),n=0;n<o.length;n++){var r=X[o[n]];r&&t.push(r)}return t}function C(e,t){return L(e,g(t))}function b(e){return I.call(this,g(e))}function y(t){return e.traceur&&e.traceur.options[t]}function R(e,t,o){return i(t)&&(t=t[U]),x(e,t,o),e}function S(e){x(e,"defineProperty",{value:R}),x(e,"getOwnPropertyNames",{value:m}),x(e,"getOwnPropertyDescriptor",{value:C}),x(e.prototype,"hasOwnProperty",{value:b}),x(e,"freeze",{value:c}),x(e,"preventExtensions",{value:d}),x(e,"seal",{value:h}),x(e,"keys",{value:w})}function E(e){for(var t=1;t<arguments.length;t++)for(var o=N(arguments[t]),n=0;n<o.length;n++){var r=o[n];f(r)||!function(t,o){x(e,o,{get:function(){return t[o]},enumerable:!0})}(arguments[t],o[n])}return e}function T(e){return null!=e&&("object"==typeof e||"function"==typeof e)}function H(e){if(null==e)throw A();return _(e)}function k(e){if(null==e)throw new TypeError("Value cannot be converted to an Object");return e}function O(e,t){e.Symbol||(e.Symbol=t,Object.getOwnPropertySymbols=v),e.Symbol.iterator||(e.Symbol.iterator=t("Symbol.iterator"))}function M(e){O(e,a),e.Reflect=e.Reflect||{},e.Reflect.global=e.Reflect.global||e,S(e.Object)}if(!e.$traceurRuntime){var _=Object,A=TypeError,P=_.create,j=_.defineProperties,x=_.defineProperty,D=_.freeze,L=_.getOwnPropertyDescriptor,N=_.getOwnPropertyNames,W=_.keys,I=_.prototype.hasOwnProperty,B=(_.prototype.toString,Object.preventExtensions),V=Object.seal,F=Object.isExtensible,G=t,z=0,U=o(),$=o(),K=o(),X=P(null),Y=P(null);x(a.prototype,"constructor",t(a)),x(a.prototype,"toString",G(function(){var e=this[K];if(!y("symbols"))return e[U];if(!e)throw TypeError("Conversion from symbol to string");var t=e[$];return void 0===t&&(t=""),"Symbol("+t+")"})),x(a.prototype,"valueOf",G(function(){var e=this[K];if(!e)throw TypeError("Conversion from symbol to string");return y("symbols")?e:e[U]})),x(l.prototype,"constructor",t(a)),x(l.prototype,"toString",{value:a.prototype.toString,enumerable:!1}),x(l.prototype,"valueOf",{value:a.prototype.valueOf,enumerable:!1});var q=r(),Q={value:void 0},J={hash:{value:void 0},self:{value:void 0}},Z=0;c(l.prototype),M(e),e.$traceurRuntime={checkObjectCoercible:k,createPrivateName:r,defineProperties:j,defineProperty:x,exportStar:E,getOwnHashObject:u,getOwnPropertyDescriptor:L,getOwnPropertyNames:N,isObject:T,isPrivateName:n,isSymbolString:f,keys:W,setupGlobals:M,toObject:H,toProperty:g,"typeof":s}}}(window),function(){function t(t,n){function r(e){return"/"===e.slice(-1)}function i(e){return"/"===e[0]}function s(e){return"."===e[0]}return o=o||"undefined"!=typeof e&&e("path"),r(n)||i(n)?void 0:e(s(n)?o.resolve(o.dirname(t),n):n)}var o;$traceurRuntime.require=t}(),function(){function e(){for(var e,t=[],o=0,n=0;n<arguments.length;n++){var r=$traceurRuntime.checkObjectCoercible(arguments[n]);if("function"!=typeof r[$traceurRuntime.toProperty(Symbol.iterator)])throw new TypeError("Cannot spread non-iterable object.");for(var i=r[$traceurRuntime.toProperty(Symbol.iterator)]();!(e=i.next()).done;)t[o++]=e.value}return t}$traceurRuntime.spread=e}(),function(){function e(e,t){var o=p(e);do{var n=g(o,t);if(n)return n;o=p(o)}while(o);return void 0}function t(e){return e.__proto__}function o(e,t,o,r){return n(e,t,o).apply(e,r)}function n(t,o,n){var r=e(o,n);return r?r.get?r.get.call(t):r.value:void 0}function r(t,o,n,r){var i=e(o,n);if(i&&i.set)return i.set.call(t,r),r;throw c("super has no setter '"+n+"'.")}function i(e){for(var t={},o=w(e),n=0;n<o.length;n++){var r=o[n];t[r]=g(e,r)}for(var i=v(e),n=0;n<i.length;n++){var s=i[n];t[$traceurRuntime.toProperty(s)]=g(e,$traceurRuntime.toProperty(s))}return t}function s(e,t,o,n){return f(t,"constructor",{value:e,configurable:!0,enumerable:!1,writable:!0}),arguments.length>3?("function"==typeof n&&(e.__proto__=n),e.prototype=d(a(n),i(t))):e.prototype=t,f(e,"prototype",{configurable:!1,writable:!1}),h(e,i(o))}function a(e){if("function"==typeof e){var t=e.prototype;if(u(t)===t||null===t)return e.prototype;throw new c("super prototype must be an Object or null")}if(null===e)return null;throw new c("Super expression must either be null or a function, not "+typeof e+".")}function l(e,t,n){null!==p(t)&&o(e,t,"constructor",n)}var u=Object,c=TypeError,d=u.create,h=$traceurRuntime.defineProperties,f=$traceurRuntime.defineProperty,g=$traceurRuntime.getOwnPropertyDescriptor,p=($traceurRuntime.getOwnPropertyNames,Object.getPrototypeOf),m=Object,w=m.getOwnPropertyNames,v=m.getOwnPropertySymbols;$traceurRuntime.createClass=s,$traceurRuntime.defaultSuperCall=l,$traceurRuntime.superCall=o,$traceurRuntime.superConstructor=t,$traceurRuntime.superGet=n,$traceurRuntime.superSet=r}()},{path:void 0}],80:[function(e,t,o){"use strict";function n(e){var t=this;this.eventManager=h(e),this.instance=e,this.settings=e.getSettings();var o=e.rootElement.getAttribute("style");o&&e.rootElement.setAttribute("data-originalstyle",o),c.addClass(e.rootElement,"handsontable");var n=document.createElement("TABLE");n.className="htCore",this.THEAD=document.createElement("THEAD"),n.appendChild(this.THEAD),this.TBODY=document.createElement("TBODY"),n.appendChild(this.TBODY),e.table=n,e.container.insertBefore(n,e.container.firstChild),this.eventManager.addEventListener(e.rootElement,"mousedown",function(e){t.isTextSelectionAllowed(e.target)||(i(),e.preventDefault(),window.focus())}),this.eventManager.addEventListener(document.documentElement,"keyup",function(t){e.selection.isInProgress()&&!t.shiftKey&&e.selection.finish()});var r;this.isMouseDown=function(){return r},this.eventManager.addEventListener(document.documentElement,"mouseup",function(t){e.selection.isInProgress()&&1===t.which&&e.selection.finish(),r=!1,d.isOutsideInput(document.activeElement)&&e.unlisten()}),this.eventManager.addEventListener(document.documentElement,"mousedown",function(o){var n=o.target,i=o.x||o.clientX,s=o.y||o.clientY;if(!r){if(n!==e.view.wt.wtTable.holder)for(;n!==document.documentElement;){if(null===n){if(o.isTargetWebComponent)break;return}if(n===e.rootElement)return;n=n.parentNode}else{var a=Handsontable.Dom.getScrollbarWidth();if(document.elementFromPoint(i+a,s)!==e.view.wt.wtTable.holder||document.elementFromPoint(i,s+a)!==e.view.wt.wtTable.holder)return}t.settings.outsideClickDeselects?e.deselectCell():e.destroyEditor()}}),this.eventManager.addEventListener(n,"selectstart",function(e){t.settings.fragmentSelection||e.preventDefault()});var i=function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty()},s=[new g({className:"current",border:{width:2,color:"#5292F7",cornerVisible:function(){return t.settings.fillHandle&&!t.isCellEdited()&&!e.selection.isMultiple()},multipleSelectionHandlesVisible:function(){return!t.isCellEdited()&&!e.selection.isMultiple()}}}),new g({className:"area",border:{width:1,color:"#89AFF9",cornerVisible:function(){return t.settings.fillHandle&&!t.isCellEdited()&&e.selection.isMultiple()},multipleSelectionHandlesVisible:function(){return!t.isCellEdited()&&e.selection.isMultiple()}}}),new g({className:"highlight",highlightRowClassName:t.settings.currentRowClassName,highlightColumnClassName:t.settings.currentColClassName}),new g({className:"fill",border:{width:1,color:"red"}})];s.current=s[0],s.area=s[1],s.highlight=s[2],s.fill=s[3];var a={debug:function(){return t.settings.debug},externalRowCalculator:this.instance.getPlugin("autoRowSize")&&this.instance.getPlugin("autoRowSize").isEnabled(),table:n,stretchH:this.settings.stretchH,data:e.getDataAtCell,totalRows:e.countRows,totalColumns:e.countCols,fixedColumnsLeft:function(){return t.settings.fixedColumnsLeft},fixedRowsTop:function(){return t.settings.fixedRowsTop},renderAllRows:t.settings.renderAllRows,rowHeaders:function(){var o=[];return e.hasRowHeaders()&&o.push(function(e,o){t.appendRowHeader(e,o)}),Handsontable.hooks.run(e,"afterGetRowHeaderRenderers",o),o},columnHeaders:function(){var o=[];return e.hasColHeaders()&&o.push(function(e,o){t.appendColHeader(e,o)}),Handsontable.hooks.run(e,"afterGetColumnHeaderRenderers",o),o},columnWidth:e.getColWidth,rowHeight:e.getRowHeight,cellRenderer:function(e,o,n){var r=t.instance.colToProp(o),i=t.instance.getCellMeta(e,o),s=t.instance.getCellRenderer(i),a=t.instance.getDataAtRowProp(e,r);s(t.instance,n,e,o,r,a,i),Handsontable.hooks.run(t.instance,"afterRenderer",n,e,o,r,a,i)},selections:s,hideBorderOnMouseDownOver:function(){return t.settings.fragmentSelection},onCellMouseDown:function(o,n,i,s){e.listen(),t.activeWt=s,r=!0,c.enableImmediatePropagation(o),Handsontable.hooks.run(e,"beforeOnCellMouseDown",o,n,i),o.isImmediatePropagationStopped()||(2===o.button&&e.selection.inInSelection(n)||(o.shiftKey?n.row>=0&&n.col>=0&&e.selection.setRangeEnd(n):(n.row<0||n.col<0)&&(n.row>=0||n.col>=0)?(n.row<0&&(e.selectCell(0,n.col,e.countRows()-1,n.col),e.selection.setSelectedHeaders(!1,!0)),n.col<0&&(e.selectCell(n.row,0,n.row,e.countCols()-1),e.selection.setSelectedHeaders(!0,!1))):(n.row=n.row<0?0:n.row,n.col=n.col<0?0:n.col,e.selection.setRangeStart(n))),Handsontable.hooks.run(e,"afterOnCellMouseDown",o,n,i),t.activeWt=t.wt)},onCellMouseOver:function(o,n,i,s){t.activeWt=s,n.row>=0&&n.col>=0?r&&e.selection.setRangeEnd(n):r&&(n.row<0&&(e.selection.setRangeEnd(new f(e.countRows()-1,n.col)),e.selection.setSelectedHeaders(!1,!0)),n.col<0&&(e.selection.setRangeEnd(new f(n.row,e.countCols()-1)),e.selection.setSelectedHeaders(!0,!1))),Handsontable.hooks.run(e,"afterOnCellMouseOver",o,n,i),t.activeWt=t.wt},onCellCornerMouseDown:function(t){t.preventDefault(),Handsontable.hooks.run(e,"afterOnCellCornerMouseDown",t)},beforeDraw:function(e){t.beforeRender(e)},onDraw:function(e){t.onDraw(e)},onScrollVertically:function(){e.runHooks("afterScrollVertically")},onScrollHorizontally:function(){e.runHooks("afterScrollHorizontally")},onBeforeDrawBorders:function(t,o){e.runHooks("beforeDrawBorders",t,o)},onBeforeTouchScroll:function(){e.runHooks("beforeTouchScroll")},onAfterMomentumScroll:function(){e.runHooks("afterMomentumScroll")},viewportRowCalculatorOverride:function(o){var n=e.countRows(),r=t.settings.viewportRowRenderingOffset;if("auto"===r&&t.settings.fixedRowsTop&&(r=10),"number"==typeof r&&(o.startRow=Math.max(o.startRow-r,0),o.endRow=Math.min(o.endRow+r,n-1)),"auto"===r){var i=o.startRow+o.endRow-o.startRow,s=Math.ceil(i/n*12);o.startRow=Math.max(o.startRow-s,0),o.endRow=Math.min(o.endRow+s,n-1)}e.runHooks("afterViewportRowCalculatorOverride",o)},viewportColumnCalculatorOverride:function(o){var n=e.countCols(),r=t.settings.viewportColumnRenderingOffset;if("auto"===r&&t.settings.fixedColumnsLeft&&(r=10),"number"==typeof r&&(o.startColumn=Math.max(o.startColumn-r,0),o.endColumn=Math.min(o.endColumn+r,n-1)),"auto"===r){var i=o.startColumn+o.endColumn-o.startColumn,s=Math.ceil(i/n*12);o.startRow=Math.max(o.startColumn-s,0),o.endColumn=Math.min(o.endColumn+s,n-1)}e.runHooks("afterViewportColumnCalculatorOverride",o)}};Handsontable.hooks.run(e,"beforeInitWalkontable",a),this.wt=new p(a),this.activeWt=this.wt,this.eventManager.addEventListener(t.wt.wtTable.spreader,"mousedown",function(e){e.target===t.wt.wtTable.spreader&&3===e.which&&d.stopPropagation(e)}),this.eventManager.addEventListener(t.wt.wtTable.spreader,"contextmenu",function(e){e.target===t.wt.wtTable.spreader&&3===e.which&&d.stopPropagation(e)}),this.eventManager.addEventListener(document.documentElement,"click",function(){t.settings.observeDOMVisibility&&t.wt.drawInterrupted&&(t.instance.forceFullRender=!0,t.render())})}Object.defineProperties(o,{TableView:{get:function(){return n}},__esModule:{value:!0}});var r,i,s,a,l,u,c=(r=e("./dom.js"),r&&r.__esModule&&r||{"default":r}),d=(i=e("./helpers.js"),i&&i.__esModule&&i||{"default":i}),h=(s=e("./eventManager.js"),s&&s.__esModule&&s||{"default":s}).eventManager,f=(a=e("./3rdparty/walkontable/src/cell/coords.js"),a&&a.__esModule&&a||{"default":a}).WalkontableCellCoords,g=(l=e("./3rdparty/walkontable/src/selection.js"),l&&l.__esModule&&l||{"default":l}).WalkontableSelection,p=(u=e("./3rdparty/walkontable/src/core.js"),u&&u.__esModule&&u||{"default":u}).Walkontable;Handsontable.TableView=n,n.prototype.isTextSelectionAllowed=function(e){return d.isInput(e)?!0:this.settings.fragmentSelection&&c.isChildOf(e,this.TBODY)?!0:!1},n.prototype.isCellEdited=function(){var e=this.instance.getActiveEditor();return e&&e.isOpened()},n.prototype.beforeRender=function(e){e&&Handsontable.hooks.run(this.instance,"beforeRender",this.instance.forceFullRender)},n.prototype.onDraw=function(e){e&&Handsontable.hooks.run(this.instance,"afterRender",this.instance.forceFullRender)},n.prototype.render=function(){this.wt.draw(!this.instance.forceFullRender),this.instance.forceFullRender=!1,this.instance.renderCall=!1},n.prototype.getCellAtCoords=function(e,t){var o=this.wt.getCell(e,t);return 0>o?null:o},n.prototype.scrollViewport=function(e){this.wt.scrollViewport(e)},n.prototype.appendRowHeader=function(e,t){if(t.firstChild){var o=t.firstChild;if(!c.hasClass(o,"relative"))return c.empty(t),void this.appendRowHeader(e,t);this.updateCellHeader(o.firstChild,e,this.instance.getRowHeader)}else{var n=document.createElement("div"),r=document.createElement("span");n.className="relative",r.className="colHeader",this.updateCellHeader(r,e,this.instance.getRowHeader),n.appendChild(r),t.appendChild(n)}Handsontable.hooks.run(this.instance,"afterGetRowHeader",e,t)},n.prototype.appendColHeader=function(e,t){if(t.firstChild){var o=t.firstChild;if(!c.hasClass(o,"relative"))return c.empty(t),void this.appendRowHeader(e,t);this.updateCellHeader(o.firstChild,e,this.instance.getColHeader)}else{var n=document.createElement("div"),r=document.createElement("span");n.className="relative",r.className="colHeader",this.updateCellHeader(r,e,this.instance.getColHeader),n.appendChild(r),t.appendChild(n)}Handsontable.hooks.run(this.instance,"afterGetColHeader",e,t)},n.prototype.updateCellHeader=function(e,t,o){t>-1?c.fastInnerHTML(e,o(t)):(c.fastInnerText(e,String.fromCharCode(160)),c.addClass(e,"cornerHeader"))},n.prototype.maximumVisibleElementWidth=function(e){var t=this.wt.wtViewport.getWorkspaceWidth(),o=t-e;return o>0?o:0},n.prototype.maximumVisibleElementHeight=function(e){var t=this.wt.wtViewport.getWorkspaceHeight(),o=t-e;return o>0?o:0},n.prototype.mainViewIsActive=function(){return this.wt===this.activeWt},n.prototype.destroy=function(){this.wt.destroy(),this.eventManager.clear()}},{"./3rdparty/walkontable/src/cell/coords.js":5,"./3rdparty/walkontable/src/core.js":7,"./3rdparty/walkontable/src/selection.js":18,"./dom.js":27,"./eventManager.js":41,"./helpers.js":42}],81:[function(e,t,o){"use strict";Object.defineProperties(o,{GhostTable:{get:function(){return d}},__esModule:{value:!0}});var n,r,i=(n=e("./../dom.js"),n&&n.__esModule&&n||{"default":n}),s=i.addClass,a=i.outerHeight,l=i.outerWidth,u=(r=e("./../helpers.js"),r&&r.__esModule&&r||{"default":r}),c=u.arrayEach,d=(u.objectEach,u.rangeEach,u.stringify,function(e){this.hot=e,this.container=null,this.injected=!1,this.rows=[],this.columns=[],this.samples=null});$traceurRuntime.createClass(d,{addRow:function(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));var o={row:e};this.rows.push(o),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.table.tr.appendChild(this.createRow(e)),this.container.container.appendChild(this.table.fragment),o.table=this.table.table},addColumn:function(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));var o={col:e};this.columns.push(o),this.samples=t,this.table=this.createTable(this.hot.table.className),null!==this.hot.getColHeader(e)&&this.hot.view.appendColHeader(e,this.table.th),this.table.tBody.appendChild(this.createCol(e)),this.container.container.appendChild(this.table.fragment),o.table=this.table.table},getHeights:function(e){this.injected||this.injectTable(),c(this.rows,function(t){e(t.row,a(t.table)-1)})},getWidths:function(e){this.injected||this.injectTable(),c(this.columns,function(t){e(t.col,l(t.table))})},createColGroupsCol:function(){var e=this,t=document,o=t.createDocumentFragment();return o.appendChild(this.createColElement(-1)),this.samples.forEach(function(t){c(t.strings,function(t){o.appendChild(e.createColElement(t.col))})}),o},createRow:function(e){var t=this,o=document,n=o.createDocumentFragment(),r=o.createElement("th");return null!==this.hot.getRowHeader(e)&&this.hot.view.appendRowHeader(e,r),n.appendChild(r),this.samples.forEach(function(r){c(r.strings,function(r){var i=r.col,s=t.hot.getCellMeta(e,i);s.col=i,s.row=e;var a=t.hot.getCellRenderer(s),l=o.createElement("td");a(t.hot,l,e,i,t.hot.colToProp(i),r.value,s),n.appendChild(l)})}),n},createCol:function(e){var t=this,o=document,n=o.createDocumentFragment();return this.samples.forEach(function(r){c(r.strings,function(r){var i=r.row,s=t.hot.getCellMeta(i,e);s.col=e,s.row=i;var a=t.hot.getCellRenderer(s),l=o.createElement("td"),u=o.createElement("tr");a(t.hot,l,i,e,t.hot.colToProp(i),r.value,s),u.appendChild(l),n.appendChild(u)})}),n},clean:function(){this.rows.length=0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()},injectTable:function(){var e=void 0!==arguments[0]?arguments[0]:null;this.injected||((e||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)},removeTable:function(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)},createColElement:function(e){var t=document,o=t.createElement("col");return o.style.width=this.hot.view.wt.wtTable.getStretchedColumnWidth(e)+"px",o},createTable:function(){var e=void 0!==arguments[0]?arguments[0]:"",t=document,o=t.createDocumentFragment(),n=t.createElement("table"),r=t.createElement("thead"),i=t.createElement("tbody"),a=t.createElement("colgroup"),l=t.createElement("tr"),u=t.createElement("th");return this.isVertical()&&n.appendChild(a),this.isHorizontal()&&(l.appendChild(u),r.appendChild(l),n.style.tableLayout="auto",n.style.width="auto"),n.appendChild(r),this.isVertical()&&i.appendChild(l),n.appendChild(i),s(n,e),o.appendChild(n),{fragment:o,table:n,tHead:r,tBody:i,colGroup:a,tr:l,th:u}},createContainer:function(){var e=void 0!==arguments[0]?arguments[0]:"",t=document,o=t.createDocumentFragment(),n=t.createElement("div");return e="htGhostTable htAutoSize "+e.trim(),s(n,e),o.appendChild(n),{fragment:o,container:n}},isVertical:function(){return this.rows.length&&!this.columns.length?!0:!1},isHorizontal:function(){return this.columns.length&&!this.rows.length?!0:!1}},{}),Handsontable.utils=Handsontable.utils||{},Handsontable.utils.GhostTable=d},{"./../dom.js":27,"./../helpers.js":42}],82:[function(e,t,o){"use strict";var n;Object.defineProperties(o,{SamplesGenerator:{get:function(){return c}},__esModule:{value:!0}});var r,i,s=(r=e("./../dom.js"),r&&r.__esModule&&r||{"default":r}),a=(s.addClass,s.outerHeight,s.outerWidth,i=e("./../helpers.js"),i&&i.__esModule&&i||{"default":i}),l=(a.arrayEach,a.objectEach,a.rangeEach),u=a.stringify,c=function(e){this.samples=null,this.dataFactory=e},d=c;$traceurRuntime.createClass(c,(n={},Object.defineProperty(n,"generateRowSamples",{value:function(e,t){return this.generateSamples("row",t,e)},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"generateColumnSamples",{value:function(e,t){return this.generateSamples("col",t,e)},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"generateSamples",{value:function(e,t,o){var n=this,r=new Map;return"number"==typeof o&&(o={from:o,to:o}),l(o.from,o.to,function(o){var i=n.generateSample(e,t,o);r.set(o,i)}),r},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(n,"generateSample",{value:function(e,t,o){var n=this,r=new Map;return l(t.from,t.to,function(t){var i,s;if("row"===e)s=n.dataFactory(o,t);else{if("col"!==e)throw new Error("Unsupported sample type");s=n.dataFactory(t,o)}Array.isArray(s)||(s=u(s));var a=s.length;r.has(a)||r.set(a,{needed:d.SAMPLE_COUNT,strings:[]});var l=r.get(a);l.needed&&(l.strings.push((i={},Object.defineProperty(i,"value",{value:s,configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(i,"row"===e?"col":"row",{value:t,configurable:!0,enumerable:!0,writable:!0}),i)),l.needed--)}),r},configurable:!0,enumerable:!0,writable:!0}),n),{get SAMPLE_COUNT(){return 3}}),Handsontable.utils=Handsontable.utils||{},Handsontable.utils.SamplesGenerator=c},{"./../dom.js":27,"./../helpers.js":42}],83:[function(e,t,o){"use strict";var n=function(e,t){var o=e,n="string"==typeof o?o.toLowerCase():null;return function(e){for(var r=!1,i=0,s=e.length;s>i;i++){if(o===e[i]){r=!0;break}if(n===Handsontable.helper.stringify(e[i]).toLowerCase()){r=!0;break}}t(r)}};Handsontable.AutocompleteValidator=function(e,t){this.strict&&this.source?"function"==typeof this.source?this.source(e,n(e,t)):n(e,t)(this.source):t(!0)}},{}],84:[function(e,t,o){"use strict";var n,r,i=(n=e("moment"),n&&n.__esModule&&n||{"default":n})["default"],s=(r=e("./../editors.js"),r&&r.__esModule&&r||{"default":r}).getEditor;Handsontable.DateValidator=function(e,t){var o=!0,n=s("date",this.instance);null===e&&(e="");var r=i(new Date(e)).isValid(),l=i(e,this.dateFormat||n.defaultDateFormat,!0).isValid();if(r||(o=!1),!r&&l&&(o=!0),r&&!l)if(this.correctFormat===!0){var u=a(e,this.dateFormat);this.instance.setDataAtCell(this.row,this.col,u,"dateValidator"),o=!0}else o=!1;t(o)};var a=function(e,t){var o=i(new Date(e));return o.format("YYYY").length>4&&o.year((o.year()+"").substr(0,4)),o.format(t)}},{"./../editors.js":29,moment:void 0}],85:[function(e,t,o){"use strict";Handsontable.NumericValidator=function(e,t){null===e&&(e=""),t(/^-?\d*(\.|\,)?\d*$/.test(e))}},{}],SheetClip:[function(e,t,o){"use strict";!function(e){function t(e){return e.split('"').length-1}var n={parse:function(e){var o,n,r,i,s,a,l,u=[],c=0;for(r=e.split("\n"),r.length>1&&""===r[r.length-1]&&r.pop(),o=0,n=r.length;n>o;o+=1){for(r[o]=r[o].split(" "),i=0,s=r[o].length;s>i;i+=1)u[c]||(u[c]=[]),a&&0===i?(l=u[c].length-1,u[c][l]=u[c][l]+"\n"+r[o][0],a&&1&t(r[o][0])&&(a=!1,u[c][l]=u[c][l].substring(0,u[c][l].length-1).replace(/""/g,'"'))):i===s-1&&0===r[o][i].indexOf('"')&&1&t(r[o][i])?(u[c].push(r[o][i].substring(1).replace(/""/g,'"')),a=!0):(u[c].push(r[o][i].replace(/""/g,'"')),a=!1);a||(c+=1)}return u},stringify:function(e){var t,o,n,r,i,s="";for(t=0,o=e.length;o>t;t+=1){for(r=e[t].length,n=0;r>n;n+=1)n>0&&(s+=" "),i=e[t][n],s+="string"==typeof i?i.indexOf("\n")>-1?'"'+i.replace(/"/g,'""')+'"':i:null===i||void 0===i?"":i;s+="\n"}return s}};"undefined"!=typeof o?(o.parse=n.parse,o.stringify=n.stringify):e.SheetClip=n}(window)},{}],autoResize:[function(e,t,o){"use strict";function n(){var e,t={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},o=document.body,n=document.createTextNode(""),r=document.createElement("SPAN"),i=function(e,t,o){window.attachEvent?e.attachEvent("on"+t,o):e.addEventListener(t,o,!1)},s=function(e,t,o){window.removeEventListener?e.removeEventListener(t,o,!1):e.detachEvent("on"+t,o)},a=function(i){var s,a;i?/^[a-zA-Z \.,\\\/\|0-9]$/.test(i)||(i="."):i="",void 0!==n.textContent?n.textContent=e.value+i:n.data=e.value+i,r.style.fontSize=Handsontable.Dom.getComputedStyle(e).fontSize,r.style.fontFamily=Handsontable.Dom.getComputedStyle(e).fontFamily,r.style.whiteSpace="pre",o.appendChild(r),s=r.clientWidth+2,o.removeChild(r),e.style.height=t.minHeight+"px",t.minWidth>s?e.style.width=t.minWidth+"px":s>t.maxWidth?e.style.width=t.maxWidth+"px":e.style.width=s+"px",a=e.scrollHeight?e.scrollHeight-1:0,t.minHeight>a?e.style.height=t.minHeight+"px":t.maxHeight<a?(e.style.height=t.maxHeight+"px",e.style.overflowY="visible"):e.style.height=a+"px"},l=function(){window.setTimeout(a,0)},u=function(o){if(o&&o.minHeight)if("inherit"==o.minHeight)t.minHeight=e.clientHeight;else{var i=parseInt(o.minHeight);isNaN(i)||(t.minHeight=i)}if(o&&o.maxHeight)if("inherit"==o.maxHeight)t.maxHeight=e.clientHeight;else{var s=parseInt(o.maxHeight);isNaN(s)||(t.maxHeight=s)}if(o&&o.minWidth)if("inherit"==o.minWidth)t.minWidth=e.clientWidth;else{var a=parseInt(o.minWidth);isNaN(a)||(t.minWidth=a)}if(o&&o.maxWidth)if("inherit"==o.maxWidth)t.maxWidth=e.clientWidth;else{var l=parseInt(o.maxWidth);isNaN(l)||(t.maxWidth=l)}r.firstChild||(r.className="autoResize",r.style.display="inline-block",r.appendChild(n))},c=function(o,n,r){e=o,u(n),"TEXTAREA"==e.nodeName&&(e.style.resize="none",e.style.overflowY="",e.style.height=t.minHeight+"px",e.style.minWidth=t.minWidth+"px",e.style.maxWidth=t.maxWidth+"px",e.style.overflowY="hidden"),r&&(i(e,"change",a),i(e,"cut",l),i(e,"paste",l),i(e,"drop",l),i(e,"keydown",l)),a()};return{init:function(e,t,o){c(e,t,o)},unObserve:function(){s(e,"change",a),s(e,"cut",l),s(e,"paste",l),s(e,"drop",l),s(e,"keydown",l)},resize:a}}"undefined"!=typeof o&&(t.exports=n)},{}],copyPaste:[function(e,t,o){"use strict";function n(){return i?i.hasBeenDestroyed()&&i.init():i=new r,i.refCounter++,i}function r(){this.refCounter=0,this.init()}var i;"undefined"!=typeof o&&(t.exports=n),r.prototype.init=function(){var e,t;this.copyCallbacks=[],this.cutCallbacks=[],this.pasteCallbacks=[],t=document.body,document.getElementById("CopyPasteDiv")?(this.elDiv=document.getElementById("CopyPasteDiv"),
this.elTextarea=this.elDiv.firstChild):(this.elDiv=document.createElement("div"),this.elDiv.id="CopyPasteDiv",e=this.elDiv.style,e.position="fixed",e.top="-10000px",e.left="-10000px",t.appendChild(this.elDiv),this.elTextarea=document.createElement("textarea"),this.elTextarea.className="copyPaste",this.elTextarea.onpaste=function(e){var t,o;return"WebkitAppearance"in document.documentElement.style?(t=e.clipboardData.getData("Text"),-1!==navigator.userAgent.indexOf("Safari")&&-1===navigator.userAgent.indexOf("Chrome")&&(o=t.split("\n"),o.pop(),t=o.join("\n")),this.value=t,!1):void 0},e=this.elTextarea.style,e.width="10000px",e.height="10000px",e.overflow="hidden",this.elDiv.appendChild(this.elTextarea),"undefined"!=typeof e.opacity&&(e.opacity=0)),this.onKeyDownRef=this.onKeyDown.bind(this),document.documentElement.addEventListener("keydown",this.onKeyDownRef,!1)},r.prototype.onKeyDown=function(e){function t(){var e=document.activeElement;return e.shadowRoot&&e.shadowRoot.activeElement&&(e=e.shadowRoot.activeElement),["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable}var o=this,n=!1;if(e.metaKey?n=!0:e.ctrlKey&&-1===navigator.userAgent.indexOf("Mac")&&(n=!0),n){if(document.activeElement!==this.elTextarea&&(""!==this.getSelectionText()||t()))return;this.selectNodeText(this.elTextarea),setTimeout(function(){document.activeElement!==o.elTextarea&&o.selectNodeText(o.elTextarea)},0)}!n||67!==e.keyCode&&86!==e.keyCode&&88!==e.keyCode||(88===e.keyCode?setTimeout(function(){o.triggerCut(e)},0):86===e.keyCode&&setTimeout(function(){o.triggerPaste(e)},0))},r.prototype.selectNodeText=function(e){e&&e.select()},r.prototype.getSelectionText=function(){var e="";return window.getSelection?e=window.getSelection().toString():document.selection&&"Control"!==document.selection.type&&(e=document.selection.createRange().text),e},r.prototype.copyable=function(e){if("string"!=typeof e&&void 0===e.toString)throw new Error("copyable requires string parameter");this.elTextarea.value=e,this.selectNodeText(this.elTextarea)},r.prototype.onCut=function(e){this.cutCallbacks.push(e)},r.prototype.onPaste=function(e){this.pasteCallbacks.push(e)},r.prototype.removeCallback=function(e){var t,o;for(t=0,o=this.copyCallbacks.length;o>t;t++)if(this.copyCallbacks[t]===e)return this.copyCallbacks.splice(t,1),!0;for(t=0,o=this.cutCallbacks.length;o>t;t++)if(this.cutCallbacks[t]===e)return this.cutCallbacks.splice(t,1),!0;for(t=0,o=this.pasteCallbacks.length;o>t;t++)if(this.pasteCallbacks[t]===e)return this.pasteCallbacks.splice(t,1),!0;return!1},r.prototype.triggerCut=function(e){var t=this;t.cutCallbacks&&setTimeout(function(){for(var o=0,n=t.cutCallbacks.length;n>o;o++)t.cutCallbacks[o](e)},50)},r.prototype.triggerPaste=function(e,t){var o=this;o.pasteCallbacks&&setTimeout(function(){for(var n=t||o.elTextarea.value,r=0,i=o.pasteCallbacks.length;i>r;r++)o.pasteCallbacks[r](n,e)},50)},r.prototype.destroy=function(){this.hasBeenDestroyed()||0!==--this.refCounter||(this.elDiv&&this.elDiv.parentNode&&(this.elDiv.parentNode.removeChild(this.elDiv),this.elDiv=null,this.elTextarea=null),document.documentElement.removeEventListener("keydown",this.onKeyDownRef))},r.prototype.hasBeenDestroyed=function(){return!this.refCounter}},{}],es6collections:[function(e,t,o){"use strict";!function(e){function t(e,t){function n(e){return this&&this.constructor===n?(this._keys=[],this._values=[],this._itp=[],this.objectOnly=t,void(e&&o.call(this,e))):new n(e)}return t||C(e,"size",{get:m}),e.constructor=n,n.prototype=e,n}function o(e){this.add?e.forEach(this.add,this):e.forEach(function(e){this.set(e[0],e[1])},this)}function n(e){return this.has(e)&&(this._keys.splice(v,1),this._values.splice(v,1),this._itp.forEach(function(e){v<e[0]&&e[0]--})),v>-1}function r(e){return this.has(e)?this._values[v]:void 0}function i(e,t){if(this.objectOnly&&t!==Object(t))throw new TypeError("Invalid value used as weak collection key");if(t!=t||0===t)for(v=e.length;v--&&!b(e[v],t););else v=e.indexOf(t);return v>-1}function s(e){return i.call(this,this._values,e)}function a(e){return i.call(this,this._keys,e)}function l(e,t){return this.has(e)?this._values[v]=t:this._values[this._keys.push(e)-1]=t,this}function u(e){return this.has(e)||this._values.push(e),this}function c(){this._values.length=0}function d(){return p(this._itp,this._keys)}function h(){return p(this._itp,this._values)}function f(){return p(this._itp,this._keys,this._values)}function g(){return p(this._itp,this._values,this._values)}function p(e,t,o){var n=[0],r=!1;return e.push(n),{next:function(){var i,s=n[0];return!r&&s<t.length?(i=o?[t[s],o[s]]:t[s],n[0]++):(r=!0,e.splice(e.indexOf(n),1)),{done:r,value:i}}}}function m(){return this._values.length}function w(e,t){for(var o=this.entries();;){var n=o.next();if(n.done)break;e.call(t,n.value[1],n.value[0],this)}}var v,C=Object.defineProperty,b=function(e,t){return isNaN(e)?isNaN(t):e===t};"undefined"==typeof WeakMap&&(e.WeakMap=t({"delete":n,clear:c,get:r,has:a,set:l},!0)),"undefined"==typeof Map&&(e.Map=t({"delete":n,has:a,get:r,set:l,keys:d,values:h,entries:f,forEach:w,clear:c})),"undefined"==typeof Set&&(e.Set=t({has:s,add:u,"delete":n,clear:c,keys:h,values:h,entries:g,forEach:w})),"undefined"==typeof WeakSet&&(e.WeakSet=t({"delete":n,add:u,clear:c,has:s},!0))}("undefined"!=typeof o&&"undefined"!=typeof global?global:window)},{}],jsonpatch:[function(e,t,o){"use strict";var n;!function(e){function t(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function o(e,n){var r;for(var i in e)if(e.hasOwnProperty(i)){if(e[i]===n)return t(i)+"/";if("object"==typeof e[i]&&(r=o(e[i],n),""!=r))return t(i)+"/"+r}return""}function n(e,t){if(e===t)return"/";var n=o(e,t);if(""===n)throw new Error("Object not found in root");return"/"+n}function r(e){for(var t=0,o=w.length;o>t;t++)if(w[t].obj===e)return w[t]}function i(e,t){for(var o=0,n=e.observers.length;n>o;o++)if(e.observers[o].callback===t)return e.observers[o].observer}function s(e,t){for(var o=0,n=e.observers.length;n>o;o++)if(e.observers[o].observer===t)return void e.observers.splice(o,1)}function a(e,t){d(t),Object.observe?c(t,e):clearTimeout(t.next);var o=r(e);s(o,t)}function l(e,t){var o,s=[],a=e,l=r(e);if(l?o=i(l,t):(l=new v(e),w.push(l)),o)return o;if(Object.observe)o=function(r){c(o,e),u(o,e);for(var i=0,l=r.length;l>i;){if(("length"!==r[i].name||!y(r[i].object))&&"__Jasmine_been_here_before__"!==r[i].name){var d=r[i].type;switch(d){case"new":d="add";break;case"deleted":d="delete";break;case"updated":d="update"}m[d].call(r[i],s,n(a,r[i].object))}i++}s&&t&&t(s),o.patches=s,s=[]};else if(o={},l.value=JSON.parse(JSON.stringify(e)),t){o.callback=t,o.next=null;var h=this.intervals||[100,1e3,1e4,6e4],f=0,g=function(){d(o)},p=function(){clearTimeout(o.next),o.next=setTimeout(function(){g(),f=0,o.next=setTimeout(b,h[f++])},0)},b=function(){g(),f==h.length&&(f=h.length-1),o.next=setTimeout(b,h[f++])};"undefined"!=typeof window&&(window.addEventListener?(window.addEventListener("mousedown",p),window.addEventListener("mouseup",p),window.addEventListener("keydown",p)):(window.attachEvent("onmousedown",p),window.attachEvent("onmouseup",p),window.attachEvent("onkeydown",p))),o.next=setTimeout(b,h[f++])}return o.patches=s,o.object=e,l.observers.push(new C(t,o)),u(o,e)}function u(e,t){if(Object.observe){Object.observe(t,e);for(var o in t)if(t.hasOwnProperty(o)){var n=t[o];n&&"object"==typeof n&&u(e,n)}}return e}function c(e,t){if(Object.observe){Object.unobserve(t,e);for(var o in t)if(t.hasOwnProperty(o)){var n=t[o];n&&"object"==typeof n&&c(e,n)}}return e}function d(e){if(Object.observe)Object.deliverChangeRecords(e);else{for(var t,o=0,n=w.length;n>o;o++)if(w[o].obj===e.object){t=w[o];break}h(t.value,e.object,e.patches,"")}var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function h(e,o,n,r){for(var i=b(o),s=b(e),a=!1,l=!1,u=s.length-1;u>=0;u--){var c=s[u],d=e[c];if(o.hasOwnProperty(c)){var f=o[c];d instanceof Object?h(d,f,n,r+"/"+t(c)):d!=f&&(a=!0,n.push({op:"replace",path:r+"/"+t(c),value:f}),e[c]=f)}else n.push({op:"remove",path:r+"/"+t(c)}),delete e[c],l=!0}if(l||i.length!=s.length)for(var u=0;u<i.length;u++){var c=i[u];e.hasOwnProperty(c)||(n.push({op:"add",path:r+"/"+t(c),value:o[c]}),e[c]=JSON.parse(JSON.stringify(o[c])))}}function f(e,t){for(var o,n=!1,r=0,i=t.length;i>r;){o=t[r];for(var s=o.path.split("/"),a=e,l=1,u=s.length;;)if(y(a)){var c=parseInt(s[l],10);if(l++,l>=u){n=p[o.op].call(o,a,c,e);break}a=a[c]}else{var d=s[l];if(-1!=d.indexOf("~")&&(d=d.replace(/~1/g,"/").replace(/~0/g,"~")),l++,l>=u){n=g[o.op].call(o,a,d,e);break}a=a[d]}r++}return n}var g={add:function(e,t){return e[t]=this.value,!0},remove:function(e,t){return delete e[t],!0},replace:function(e,t){return e[t]=this.value,!0},move:function(e,t,o){var n={op:"_get",path:this.from};return f(o,[n]),f(o,[{op:"remove",path:this.from}]),f(o,[{op:"add",path:this.path,value:n.value}]),!0},copy:function(e,t,o){var n={op:"_get",path:this.from};return f(o,[n]),f(o,[{op:"add",path:this.path,value:n.value}]),!0},test:function(e,t){return JSON.stringify(e[t])===JSON.stringify(this.value)},_get:function(e,t){this.value=e[t]}},p={add:function(e,t){return e.splice(t,0,this.value),!0},remove:function(e,t){return e.splice(t,1),!0},replace:function(e,t){return e[t]=this.value,!0},move:g.move,copy:g.copy,test:g.test,_get:g._get},m={add:function(e,o){var n={op:"add",path:o+t(this.name),value:this.object[this.name]};e.push(n)},"delete":function(e,o){var n={op:"remove",path:o+t(this.name)};e.push(n)},update:function(e,o){var n={op:"replace",path:o+t(this.name),value:this.object[this.name]};e.push(n)}},w=[];e.intervals;var v=function(){function e(e){this.observers=[],this.obj=e}return e}(),C=function(){function e(e,t){this.callback=e,this.observer=t}return e}();e.unobserve=a,e.observe=l,e.generate=d;var b;b=Object.keys?Object.keys:function(e){var t=[];for(var o in e)e.hasOwnProperty(o)&&t.push(o);return t};var y;y=Array.isArray?Array.isArray:function(e){return e.push&&"number"==typeof e.length},e.apply=f}(n||(n={})),"undefined"!=typeof o&&(o.apply=n.apply,o.observe=n.observe,o.unobserve=n.unobserve,o.generate=n.generate)},{}],numeral:[function(t,o,n){"use strict";(function(){function t(e){this._value=e}function n(e,t,o,n){var r,i,s=Math.pow(10,t);return i=(o(e*s)/s).toFixed(t),n&&(r=new RegExp("0{1,"+n+"}$"),i=i.replace(r,"")),i}function r(e,t,o){var n;return n=t.indexOf("$")>-1?s(e,t,o):t.indexOf("%")>-1?a(e,t,o):t.indexOf(":")>-1?l(e,t):c(e._value,t,o)}function i(e,t){var o,n,r,i,s,a=t,l=["KB","MB","GB","TB","PB","EB","ZB","YB"],c=!1;if(t.indexOf(":")>-1)e._value=u(t);else if(t===v)e._value=0;else{for("."!==m[w].delimiters.decimal&&(t=t.replace(/\./g,"").replace(m[w].delimiters.decimal,".")),o=new RegExp("[^a-zA-Z]"+m[w].abbreviations.thousand+"(?:\\)|(\\"+m[w].currency.symbol+")?(?:\\))?)?$"),n=new RegExp("[^a-zA-Z]"+m[w].abbreviations.million+"(?:\\)|(\\"+m[w].currency.symbol+")?(?:\\))?)?$"),r=new RegExp("[^a-zA-Z]"+m[w].abbreviations.billion+"(?:\\)|(\\"+m[w].currency.symbol+")?(?:\\))?)?$"),i=new RegExp("[^a-zA-Z]"+m[w].abbreviations.trillion+"(?:\\)|(\\"+m[w].currency.symbol+")?(?:\\))?)?$"),s=0;s<=l.length&&!(c=t.indexOf(l[s])>-1?Math.pow(1024,s+1):!1);s++);e._value=(c?c:1)*(a.match(o)?Math.pow(10,3):1)*(a.match(n)?Math.pow(10,6):1)*(a.match(r)?Math.pow(10,9):1)*(a.match(i)?Math.pow(10,12):1)*(t.indexOf("%")>-1?.01:1)*((t.split("-").length+Math.min(t.split("(").length-1,t.split(")").length-1))%2?1:-1)*Number(t.replace(/[^0-9\.]+/g,"")),e._value=c?Math.ceil(e._value):e._value}return e._value}function s(e,t,o){var n,r,i=t.indexOf("$"),s=t.indexOf("("),a=t.indexOf("-"),l="";return t.indexOf(" $")>-1?(l=" ",t=t.replace(" $","")):t.indexOf("$ ")>-1?(l=" ",t=t.replace("$ ","")):t=t.replace("$",""),r=c(e._value,t,o),1>=i?r.indexOf("(")>-1||r.indexOf("-")>-1?(r=r.split(""),n=1,(s>i||a>i)&&(n=0),r.splice(n,0,m[w].currency.symbol+l),r=r.join("")):r=m[w].currency.symbol+l+r:r.indexOf(")")>-1?(r=r.split(""),r.splice(-1,0,l+m[w].currency.symbol),r=r.join("")):r=r+l+m[w].currency.symbol,r}function a(e,t,o){var n,r="",i=100*e._value;return t.indexOf(" %")>-1?(r=" ",t=t.replace(" %","")):t=t.replace("%",""),n=c(i,t,o),n.indexOf(")")>-1?(n=n.split(""),n.splice(-1,0,r+"%"),n=n.join("")):n=n+r+"%",n}function l(e){var t=Math.floor(e._value/60/60),o=Math.floor((e._value-60*t*60)/60),n=Math.round(e._value-60*t*60-60*o);return t+":"+(10>o?"0"+o:o)+":"+(10>n?"0"+n:n)}function u(e){var t=e.split(":"),o=0;return 3===t.length?(o+=60*Number(t[0])*60,o+=60*Number(t[1]),o+=Number(t[2])):2===t.length&&(o+=60*Number(t[0]),o+=Number(t[1])),Number(o)}function c(e,t,o){var r,i,s,a,l,u,c=!1,d=!1,h=!1,f="",g=!1,p=!1,C=!1,b=!1,y=!1,R="",S="",E=Math.abs(e),T=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],H="",k=!1;if(0===e&&null!==v)return v;if(t.indexOf("(")>-1?(c=!0,t=t.slice(1,-1)):t.indexOf("+")>-1&&(d=!0,t=t.replace(/\+/g,"")),t.indexOf("a")>-1&&(g=t.indexOf("aK")>=0,p=t.indexOf("aM")>=0,C=t.indexOf("aB")>=0,b=t.indexOf("aT")>=0,y=g||p||C||b,t.indexOf(" a")>-1?(f=" ",t=t.replace(" a","")):t=t.replace("a",""),E>=Math.pow(10,12)&&!y||b?(f+=m[w].abbreviations.trillion,e/=Math.pow(10,12)):E<Math.pow(10,12)&&E>=Math.pow(10,9)&&!y||C?(f+=m[w].abbreviations.billion,e/=Math.pow(10,9)):E<Math.pow(10,9)&&E>=Math.pow(10,6)&&!y||p?(f+=m[w].abbreviations.million,e/=Math.pow(10,6)):(E<Math.pow(10,6)&&E>=Math.pow(10,3)&&!y||g)&&(f+=m[w].abbreviations.thousand,e/=Math.pow(10,3))),t.indexOf("b")>-1)for(t.indexOf(" b")>-1?(R=" ",t=t.replace(" b","")):t=t.replace("b",""),s=0;s<=T.length;s++)if(r=Math.pow(1024,s),i=Math.pow(1024,s+1),e>=r&&i>e){R+=T[s],r>0&&(e/=r);break}return t.indexOf("o")>-1&&(t.indexOf(" o")>-1?(S=" ",t=t.replace(" o","")):t=t.replace("o",""),S+=m[w].ordinal(e)),t.indexOf("[.]")>-1&&(h=!0,t=t.replace("[.]",".")),a=e.toString().split(".")[0],l=t.split(".")[1],u=t.indexOf(","),l?(l.indexOf("[")>-1?(l=l.replace("]",""),l=l.split("["),H=n(e,l[0].length+l[1].length,o,l[1].length)):H=n(e,l.length,o),a=H.split(".")[0],H=H.split(".")[1].length?m[w].delimiters.decimal+H.split(".")[1]:"",h&&0===Number(H.slice(1))&&(H="")):a=n(e,null,o),a.indexOf("-")>-1&&(a=a.slice(1),k=!0),u>-1&&(a=a.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+m[w].delimiters.thousands)),0===t.indexOf(".")&&(a=""),(c&&k?"(":"")+(!c&&k?"-":"")+(!k&&d?"+":"")+a+H+(S?S:"")+(f?f:"")+(R?R:"")+(c&&k?")":"")}function d(e,t){m[e]=t}function h(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)}function f(){var e=Array.prototype.slice.call(arguments);return e.reduce(function(e,t){var o=h(e),n=h(t);return o>n?o:n},-(1/0))}var g,p="1.5.3",m={},w="en",v=null,C="0,0",b="undefined"!=typeof o&&o.exports;g=function(e){return g.isNumeral(e)?e=e.value():0===e||"undefined"==typeof e?e=0:Number(e)||(e=g.fn.unformat(e)),new t(Number(e))},g.version=p,g.isNumeral=function(e){return e instanceof t},g.language=function(e,t){if(!e)return w;if(e&&!t){if(!m[e])throw new Error("Unknown language : "+e);w=e}return(t||!m[e])&&d(e,t),g},g.languageData=function(e){if(!e)return m[w];if(!m[e])throw new Error("Unknown language : "+e);return m[e]},g.language("en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),g.zeroFormat=function(e){v="string"==typeof e?e:null},g.defaultFormat=function(e){C="string"==typeof e?e:"0.0"},g.validate=function(e,t){var o,n,r,i,s,a,l,u;if("string"!=typeof e&&(e+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",e)),e=e.trim(),""===e)return!1;e=e.replace(/^[+-]?/,"");try{l=g.languageData(t)}catch(c){l=g.languageData(g.language())}return r=l.currency.symbol,s=l.abbreviations,o=l.delimiters.decimal,n="."===l.delimiters.thousands?"\\.":l.delimiters.thousands,u=e.match(/^[^\d\.\,]+/),null!==u&&(e=e.substr(1),u[0]!==r)?!1:(u=e.match(/[^\d]+$/),null!==u&&(e=e.slice(0,-1),u[0]!==s.thousand&&u[0]!==s.million&&u[0]!==s.billion&&u[0]!==s.trillion)?!1:e.match(/^\d+$/)?!0:(a=new RegExp(n+"{2}"),e.match(/[^\d.,]/g)?!1:(i=e.split(o),i.length>2?!1:i.length<2?!!i[0].match(/^\d+.*\d$/)&&!i[0].match(a):""===i[0]?!i[0].match(a)&&!!i[1].match(/^\d+$/):1===i[0].length?!!i[0].match(/^\d+$/)&&!i[0].match(a)&&!!i[1].match(/^\d+$/):!!i[0].match(/^\d+.*\d$/)&&!i[0].match(a)&&!!i[1].match(/^\d+$/))))},"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(e,t){if(null===this||"undefined"==typeof this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof e)throw new TypeError(e+" is not a function");var o,n,r=this.length>>>0,i=!1;for(1<arguments.length&&(n=t,i=!0),o=0;r>o;++o)this.hasOwnProperty(o)&&(i?n=e(n,this[o],o,this):(n=this[o],i=!0));if(!i)throw new TypeError("Reduce of empty array with no initial value");return n}),g.fn=t.prototype={clone:function(){return g(this)},format:function(e,t){return r(this,e?e:C,void 0!==t?t:Math.round)},unformat:function(e){return"[object Number]"===Object.prototype.toString.call(e)?e:i(this,e?e:C)},value:function(){return this._value},valueOf:function(){return this._value},set:function(e){return this._value=Number(e),this},add:function(e){function t(e,t,n,r){return e+o*t}var o=f.call(null,this._value,e);return this._value=[this._value,e].reduce(t,0)/o,this},subtract:function(e){function t(e,t,n,r){return e-o*t}var o=f.call(null,this._value,e);return this._value=[e].reduce(t,this._value*o)/o,this},multiply:function(e){function t(e,t,o,n){var r=f(e,t);return e*r*t*r/(r*r)}return this._value=[this._value,e].reduce(t,1),this},divide:function(e){function t(e,t,o,n){var r=f(e,t);return e*r/(t*r)}return this._value=[this._value,e].reduce(t),this},difference:function(e){return Math.abs(g(this._value).subtract(e).value())}},b&&(o.exports=g),"undefined"==typeof ender&&(this.numeral=g),"function"==typeof e&&e.amd&&e([],function(){return g})}).call(window)},{}]},{},[23,47,48,49,50,66,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,83,84,85,73,74,75,76,77,78,31,35,32,33,40,34,36,37,38,39])("numeral")});