window.Handsontable={version:"0.19.0",buildDate:"Fri Oct 02 2015 12:37:12 GMT+0200 (CEST)"},function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Handsontable=a()}}(function(){var a;return function(a,b,c){return function d(a,b,c){function e(h,i){if(!b[h]){if(!a[h]){var j="function"==typeof require&&require;if(!i&&j)return j(h,!0);if(f)return f(h,!0);if(g[h]&&"undefined"!=typeof window[g[h]])return window[g[h]];var k=new Error("Cannot find module '"+h+"'");throw k.code="MODULE_NOT_FOUND",k}var l=b[h]={exports:{}};a[h][0].call(l.exports,function(b){var c=a[h][1][b];return e(c?c:b)},l,l.exports,d,a,b,c)}return b[h].exports}for(var f="function"==typeof require&&require,g=JSON.parse('{"zeroclipboard":"ZeroClipboard","moment":"moment","pikaday":"Pikaday"}')||{},h=0;h1)for(b=1,d=arguments.length;d>b;b++)e.push(arguments[b]);if(i){if("undefined"==typeof i[a])throw new Error("Handsontable do not provide action: "+a);f=i[a].apply(i,e),"destroy"===a&&h.removeData()}return f}}(window,jQuery,Handsontable)},{}],2:[function(a,b,c){"use strict";Object.defineProperties(c,{WalkontableBorder:{get:function(){return u}},__esModule:{value:!0}});var d,e,f,g,h,i=(d=a("helpers/dom/element"),d&&d.__esModule&&d||{"default":d}),j=i.getComputedStyle,k=i.getTrimmingContainer,l=i.innerWidth,m=i.innerHeight,n=i.offset,o=i.outerHeight,p=i.outerWidth,q=(e=a("helpers/dom/event"),e&&e.__esModule&&e||{"default":e}).stopImmediatePropagation,r=(f=a("eventManager"),f&&f.__esModule&&f||{"default":f}).EventManager,s=(g=a("cell/coords"),g&&g.__esModule&&g||{"default":g}).WalkontableCellCoords,t=(h=a("overlay/_base.js"),h&&h.__esModule&&h||{"default":h}).WalkontableOverlay,u=function(a,b){b&&(this.eventManager=new r(a),this.instance=a,this.wot=a,this.settings=b,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(b),this.registerListeners())};$traceurRuntime.createClass(u,{registerListeners:function(){var a=this;this.eventManager.addEventListener(document.body,"mousedown",function(){return a.onMouseDown()}),this.eventManager.addEventListener(document.body,"mouseup",function(){return a.onMouseUp()});for(var b=0,c=this.main.childNodes.length;c>b;b++)this.eventManager.addEventListener(this.main.childNodes[b],"mouseenter",function(b){return a.onMouseEnter(b)})},onMouseDown:function(){this.mouseDown=!0},onMouseUp:function(){this.mouseDown=!1},onMouseEnter:function(a){function b(a){return a.clientYMath.ceil(e.top+e.height)?!0:a.clientXMath.ceil(e.left+e.width)?!0:void 0}function c(a){b(a)&&(d.eventManager.removeEventListener(document.body,"mousemove",c),d.style.display="block")}if(this.mouseDown&&this.wot.getSetting("hideBorderOnMouseDownOver")){a.preventDefault(),q(a);var d=this,e=this.getBoundingClientRect();this.style.display="none",this.eventManager.addEventListener(document.body,"mousemove",c)}},createBorders:function(a){this.main=document.createElement("div");var b=["top","left","bottom","right","corner"],c=this.main.style;c.position="absolute",c.top=0,c.left=0;for(var d=0;5>d;d++){var e=b[d],f=document.createElement("div");f.className="wtBorder "+(this.settings.className||""),this.settings[e]&&this.settings[e].hide&&(f.className+=" hidden"),c=f.style,c.backgroundColor=this.settings[e]&&this.settings[e].color?this.settings[e].color:a.border.color,c.height=this.settings[e]&&this.settings[e].width?this.settings[e].width+"px":a.border.width+"px",c.width=this.settings[e]&&this.settings[e].width?this.settings[e].width+"px":a.border.width+"px",this.main.appendChild(f)}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 a=10,b=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 c={position:"absolute",height:b+"px",width:b+"px","border-radius":parseInt(b/1.5,10)+"px"};for(var d in c)c.hasOwnProperty(d)&&(this.selectionHandles.styles.bottomRightHitArea[d]=c[d],this.selectionHandles.styles.topLeftHitArea[d]=c[d]);var e={position:"absolute",height:a+"px",width:a+"px","border-radius":parseInt(a/1.5,10)+"px",background:"#F5F5FF",border:"1px solid #4285c8"};for(var f in e)e.hasOwnProperty(f)&&(this.selectionHandles.styles.bottomRight[f]=e[f],this.selectionHandles.styles.topLeft[f]=e[f]);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(a,b){return!this.wot.selections.area.cellRange||a==this.wot.selections.area.cellRange.to.row&&b==this.wot.selections.area.cellRange.to.col?!1:!0},updateMultipleSelectionHandlesPosition:function(a,b,c,d,e,f){var g=parseInt(this.selectionHandles.styles.topLeft.width,10),h=parseInt(this.selectionHandles.styles.topLeftHitArea.width,10);this.selectionHandles.styles.topLeft.top=parseInt(c-g,10)+"px",this.selectionHandles.styles.topLeft.left=parseInt(d-g,10)+"px",this.selectionHandles.styles.topLeftHitArea.top=parseInt(c-h/4*3,10)+"px",this.selectionHandles.styles.topLeftHitArea.left=parseInt(d-h/4*3,10)+"px",this.selectionHandles.styles.bottomRight.top=parseInt(c+f,10)+"px",this.selectionHandles.styles.bottomRight.left=parseInt(d+e,10)+"px",this.selectionHandles.styles.bottomRightHitArea.top=parseInt(c+f-h/4,10)+"px",this.selectionHandles.styles.bottomRightHitArea.left=parseInt(d+e-h/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(a,b)?(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"),a==this.wot.wtSettings.getSetting("fixedRowsTop")||b==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(a){if(!this.disabled){var b,c,d,e,f,g,h,i,q,r,u,v,w,x,y,z,A,B,C;C=t.isOverlayTypeOf(this.wot.cloneOverlay,t.CLONE_TOP)||t.isOverlayTypeOf(this.wot.cloneOverlay,t.CLONE_TOP_LEFT_CORNER)?this.wot.getSetting("fixedRowsTop"):t.isOverlayTypeOf(this.wot.cloneOverlay,t.CLONE_BOTTOM)||t.isOverlayTypeOf(this.wot.cloneOverlay,t.CLONE_BOTTOM_LEFT_CORNER)?this.wot.getSetting("fixedRowsBottom"):this.wot.wtTable.getRenderedRowsCount();for(var D=0;C>D;D++){var E=this.wot.wtTable.rowFilter.renderedToSource(D);if(E>=a[0]&&E<=a[2]){w=E;break}}for(var F=C-1;F>=0;F--){var G=this.wot.wtTable.rowFilter.renderedToSource(F);if(G>=a[0]&&G<=a[2]){y=G;break}}C=this.wot.wtTable.getRenderedColumnsCount();for(var H=0;C>H;H++){var I=this.wot.wtTable.columnFilter.renderedToSource(H);if(I>=a[1]&&I<=a[3]){x=I;break}}for(var J=C-1;J>=0;J--){var K=this.wot.wtTable.columnFilter.renderedToSource(J);if(K>=a[1]&&K<=a[3]){z=K;break}}if(void 0===w||void 0===x)return void this.disappear();b=w!==y||x!==z,c=this.wot.wtTable.getCell(new s(w,x)),d=b?this.wot.wtTable.getCell(new s(y,z)):c,e=n(c),f=b?n(d):e,g=n(this.wot.wtTable.TABLE),i=e.top,u=f.top+o(d)-i,r=e.left,v=f.left+p(d)-r,h=i-g.top-1,q=r-g.left-1;var L=j(c);parseInt(L.borderTopWidth,10)>0&&(h+=1,u=u>0?u-1:0),parseInt(L.borderLeftWidth,10)>0&&(q+=1,v=v>0?v-1:0),this.topStyle.top=h+"px",this.topStyle.left=q+"px",this.topStyle.width=v+"px",this.topStyle.display="block",this.leftStyle.top=h+"px",this.leftStyle.left=q+"px",this.leftStyle.height=u+"px",this.leftStyle.display="block";var M=Math.floor(this.settings.border.width/2);this.bottomStyle.top=h+u-M+"px",this.bottomStyle.left=q+"px",this.bottomStyle.width=v+"px",this.bottomStyle.display="block",this.rightStyle.top=h+"px",this.rightStyle.left=q+v-M+"px",this.rightStyle.height=u+1+"px",this.rightStyle.display="block",Handsontable.mobileBrowser||!this.hasSetting(this.settings.border.cornerVisible)||this.isPartRange(y,z)?this.cornerStyle.display="none":(this.cornerStyle.top=h+u-4+"px",this.cornerStyle.left=q+v-4+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="block",A=k(this.wot.wtTable.TABLE),z===this.wot.getSetting("totalColumns")-1&&(B=d.offsetLeft+p(d)>=l(A),B&&(this.cornerStyle.left=Math.floor(q+v-3-parseInt(this.cornerDefaultStyle.width)/2)+"px",this.cornerStyle.borderRightWidth=0)),y===this.wot.getSetting("totalRows")-1&&(B=d.offsetTop+o(d)>=m(A),B&&(this.cornerStyle.top=Math.floor(h+u-3-parseInt(this.cornerDefaultStyle.height)/2)+"px",this.cornerStyle.borderBottomWidth=0))),Handsontable.mobileBrowser&&this.updateMultipleSelectionHandlesPosition(w,x,h,q,v,u)}},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(a){return"function"==typeof a?a():!!a}},{}),window.WalkontableBorder=u},{"cell/coords":5,eventManager:40,"helpers/dom/element":44,"helpers/dom/event":45,"overlay/_base.js":11}],3:[function(a,b,c){"use strict";Object.defineProperties(c,{WalkontableViewportColumnsCalculator:{get:function(){return e}},__esModule:{value:!0}});var d=new WeakMap,e=function(a,b,c,e,f,g,h){d.set(this,{viewportWidth:a,scrollOffset:b,totalColumns:c,columnWidthFn:e,overrideFn:f,onlyFullyVisible:g}),this.count=0,this.startColumn=null,this.endColumn=null,this.startPosition=null,this.stretchAllRatio=0,this.stretchLastWidth=0,this.stretch=h,this.totalTargetWidth=0,this.needVerifyLastColumnWidth=!0,this.stretchAllColumnsWidth=[],this.calculate()},f=e;$traceurRuntime.createClass(e,{calculate:function(){for(var a,b=0,c=!0,e=[],f=d.get(this),g=f.onlyFullyVisible,h=f.overrideFn,i=f.scrollOffset,j=f.totalColumns,k=f.viewportWidth,l=0;j>l;l++)if(a=this._getColumnWidth(l),i>=b&&!g&&(this.startColumn=l),b>=i&&i+k>=b+a&&(null==this.startColumn&&(this.startColumn=l),this.endColumn=l),e.push(b),b+=a,g||(this.endColumn=l),b>=i+k){c=!1;break}if(this.endColumn===j-1&&c)for(this.startColumn=this.endColumn;this.startColumn>0;){var m=e[this.endColumn]+a-e[this.startColumn-1];if((k>=m||!g)&&this.startColumn--,m>k)break}null!==this.startColumn&&h&&h(this),this.startPosition=e[this.startColumn],void 0==this.startPosition&&(this.startPosition=null),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)},refreshStretching:function(a){if("none"!==this.stretch){for(var b,c,e=0,f=d.get(this),g=f.totalColumns,h=0;g>h;h++)b=this._getColumnWidth(h),e+=b;this.totalTargetWidth=a,c=e-a,"all"===this.stretch&&0>c?(this.stretchAllRatio=a/e,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0):"last"===this.stretch&&a!==1/0&&(this.stretchLastWidth=-c+this._getColumnWidth(g-1))}},getStretchedColumnWidth:function(a,b){var c=null;return"all"===this.stretch&&0!==this.stretchAllRatio?c=this._getStretchedAllColumnWidth(a,b):"last"===this.stretch&&0!==this.stretchLastWidth&&(c=this._getStretchedLastColumnWidth(a)),c},_getStretchedAllColumnWidth:function(a,b){var c=0,e=d.get(this),f=e.totalColumns;if(this.stretchAllColumnsWidth[a]||(this.stretchAllColumnsWidth[a]=Math.round(b*this.stretchAllRatio)),this.stretchAllColumnsWidth.length===f&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(var g=0;gn;n++){var o=i(n);if(void 0===o&&(o=f.DEFAULT_HEIGHT),j>=a&&!g&&(this.startRow=n),a>=j&&j+l-m>=a+o&&(null===this.startRow&&(this.startRow=n),this.endRow=n),c.push(a),a+=o,g||(this.endRow=n),a>=j+l-m){b=!1;break}}if(this.endRow===k-1&&b)for(this.startRow=this.endRow;this.startRow>0;){var p=c[this.endRow]+o-c[this.startRow-1];if((l-m>=p||!g)&&this.startRow--,p>=l-m)break}null!==this.startRow&&h&&h(this),this.startPosition=c[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=e},{}],5:[function(a,b,c){"use strict";Object.defineProperties(c,{WalkontableCellCoords:{get:function(){return d}},__esModule:{value:!0}});var d=function(a,b){"undefined"!=typeof a&&"undefined"!=typeof b?(this.row=a,this.col=b):(this.row=null,this.col=null)};$traceurRuntime.createClass(d,{isValid:function(a){return this.row<0||this.col<0?!1:this.row>=a.getSetting("totalRows")||this.col>=a.getSetting("totalColumns")?!1:!0},isEqual:function(a){return a===this?!0:this.row===a.row&&this.col===a.col},isSouthEastOf:function(a){return this.row>=a.row&&this.col>=a.col},isNorthWestOf:function(a){return this.row<=a.row&&this.col<=a.col},isSouthWestOf:function(a){return this.row>=a.row&&this.col<=a.col},isNorthEastOf:function(a){return this.row<=a.row&&this.col>=a.col}},{}),window.WalkontableCellCoords=d},{}],6:[function(a,b,c){"use strict";Object.defineProperties(c,{WalkontableCellRange:{get:function(){return f}},__esModule:{value:!0}});var d,e=(d=a("cell/coords"),d&&d.__esModule&&d||{"default":d}).WalkontableCellCoords,f=function(a,b,c){this.highlight=a,this.from=b,this.to=c},g=f;$traceurRuntime.createClass(f,{isValid:function(a){return this.from.isValid(a)&&this.to.isValid(a)},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(a){var b=this.getTopLeftCorner(),c=this.getBottomRightCorner();return a.row<0&&(a.row=0),a.col<0&&(a.col=0),b.row<=a.row&&c.row>=a.row&&b.col<=a.col&&c.col>=a.col},includesRange:function(a){return this.includes(a.getTopLeftCorner())&&this.includes(a.getBottomRightCorner())},isEqual:function(a){return Math.min(this.from.row,this.to.row)==Math.min(a.from.row,a.to.row)&&Math.max(this.from.row,this.to.row)==Math.max(a.from.row,a.to.row)&&Math.min(this.from.col,this.to.col)==Math.min(a.from.col,a.to.col)&&Math.max(this.from.col,this.to.col)==Math.max(a.from.col,a.to.col)},overlaps:function(a){return a.isSouthEastOf(this.getTopLeftCorner())&&a.isNorthWestOf(this.getBottomRightCorner())},isSouthEastOf:function(a){return this.getTopLeftCorner().isSouthEastOf(a)||this.getBottomRightCorner().isSouthEastOf(a)},isNorthWestOf:function(a){return this.getTopLeftCorner().isNorthWestOf(a)||this.getBottomRightCorner().isNorthWestOf(a)},expand:function(a){var b=this.getTopLeftCorner(),c=this.getBottomRightCorner();return a.rowc.row||a.col>c.col?(this.from=new e(Math.min(b.row,a.row),Math.min(b.col,a.col)),this.to=new e(Math.max(c.row,a.row),Math.max(c.col,a.col)),!0):!1},expandByRange:function(a){if(this.includesRange(a)||!this.overlaps(a))return!1;var b=this.getTopLeftCorner(),c=this.getBottomRightCorner(),d=(this.getTopRightCorner(),this.getBottomLeftCorner(),a.getTopLeftCorner()),f=a.getBottomRightCorner(),h=Math.min(b.row,d.row),i=Math.min(b.col,d.col),j=Math.max(c.row,f.row),k=Math.max(c.col,f.col),l=new e(h,i),m=new e(j,k),n=new g(l,l,m).isCorner(this.from,a),o=a.isEqual(new g(l,l,m));return n&&!o&&(this.from.col>l.col&&(l.col=k,m.col=i),this.from.row>l.row&&(l.row=j,m.row=h)),this.from=l,this.to=m,!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(a){switch(a){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 e(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))},getBottomRightCorner:function(){return new e(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))},getTopRightCorner:function(){return new e(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))},getBottomLeftCorner:function(){return new e(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))},isCorner:function(a,b){return b&&b.includes(a)&&(this.getTopLeftCorner().isEqual(new e(b.from.row,b.from.col))||this.getTopRightCorner().isEqual(new e(b.from.row,b.to.col))||this.getBottomLeftCorner().isEqual(new e(b.to.row,b.from.col))||this.getBottomRightCorner().isEqual(new e(b.to.row,b.to.col)))?!0:a.isEqual(this.getTopLeftCorner())||a.isEqual(this.getTopRightCorner())||a.isEqual(this.getBottomLeftCorner())||a.isEqual(this.getBottomRightCorner())},getOppositeCorner:function(a,b){if(!(a instanceof e))return!1;if(b&&b.includes(a)){if(this.getTopLeftCorner().isEqual(new e(b.from.row,b.from.col)))return this.getBottomRightCorner();if(this.getTopRightCorner().isEqual(new e(b.from.row,b.to.col)))return this.getBottomLeftCorner();if(this.getBottomLeftCorner().isEqual(new e(b.to.row,b.from.col)))return this.getTopRightCorner();if(this.getBottomRightCorner().isEqual(new e(b.to.row,b.to.col)))return this.getTopLeftCorner()}return a.isEqual(this.getBottomRightCorner())?this.getTopLeftCorner():a.isEqual(this.getTopLeftCorner())?this.getBottomRightCorner():a.isEqual(this.getTopRightCorner())?this.getBottomLeftCorner():a.isEqual(this.getBottomLeftCorner())?this.getTopRightCorner():void 0},getBordersSharedWith:function(a){if(!this.includesRange(a))return[];var b={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)},c={top:Math.min(a.from.row,a.to.row),bottom:Math.max(a.from.row,a.to.row),left:Math.min(a.from.col,a.to.col),right:Math.max(a.from.col,a.to.col)},d=[];return b.top==c.top&&d.push("top"),b.right==c.right&&d.push("right"),b.bottom==c.bottom&&d.push("bottom"),b.left==c.left&&d.push("left"),d},getInner:function(){for(var a=this.getTopLeftCorner(),b=this.getBottomRightCorner(),c=[],d=a.row;d<=b.row;d++)for(var f=a.col;f<=b.col;f++)this.from.row===d&&this.from.col===f||this.to.row===d&&this.to.col===f||c.push(new e(d,f));return c},getAll:function(){for(var a=this.getTopLeftCorner(),b=this.getBottomRightCorner(),c=[],d=a.row;d<=b.row;d++)for(var f=a.col;f<=b.col;f++)a.row===d&&a.col===f?c.push(a):b.row===d&&b.col===f?c.push(b):c.push(new e(d,f));return c},forAll:function(a){for(var b=this.getTopLeftCorner(),c=this.getBottomRightCorner(),d=b.row;d<=c.row;d++)for(var e=b.col;e<=c.col;e++){var f=a(d,e);if(f===!1)return}}},{}),window.WalkontableCellRange=f},{"cell/coords":5}],7:[function(a,b,c){"use strict";Object.defineProperties(c,{Walkontable:{get:function(){return G}},__esModule:{value:!0}});var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r=(d=a("helpers/dom/element"),d&&d.__esModule&&d||{"default":d}),s=r.addClass,t=r.fastInnerText,u=r.isVisible,v=r.removeClass,w=(e=a("helpers/object"),e&&e.__esModule&&e||{"default":e}).objectEach,x=(f=a("helpers/string"),f&&f.__esModule&&f||{"default":f}),y=x.toUpperCaseFirst,z=x.randomString,A=(g=a("event"),g&&g.__esModule&&g||{"default":g}).WalkontableEvent,B=(h=a("overlays"),h&&h.__esModule&&h||{"default":h}).WalkontableOverlays,C=(i=a("scroll"),i&&i.__esModule&&i||{"default":i}).WalkontableScroll,D=(j=a("settings"),j&&j.__esModule&&j||{"default":j}).WalkontableSettings,E=(k=a("table"),k&&k.__esModule&&k||{"default":k}).WalkontableTable,F=(l=a("viewport"),l&&l.__esModule&&l||{"default":l}).WalkontableViewport,G=((m=a("overlay/_base.js"),m&&m.__esModule&&m||{"default":m}).WalkontableOverlay,(n=a("overlay/top.js"),n&&n.__esModule&&n||{"default":n}).WalkontableTopOverlay,(o=a("overlay/left.js"),o&&o.__esModule&&o||{"default":o}).WalkontableLeftOverlay,(p=a("overlay/debug.js"),p&&p.__esModule&&p||{"default":p}).WalkontableDebugOverlay,(q=a("overlay/topLeftCorner.js"),q&&q.__esModule&&q||{"default":q}).WalkontableTopLeftCornerOverlay,function(a){var b=[];if(this.guid="wt_"+z(),a.cloneSource?(this.cloneSource=a.cloneSource,this.cloneOverlay=a.cloneOverlay,this.wtSettings=a.cloneSource.wtSettings,this.wtTable=new E(this,a.table,a.wtRootElement),this.wtScroll=new C(this),this.wtViewport=a.cloneSource.wtViewport,this.wtEvent=new A(this),this.selections=this.cloneSource.selections):(this.wtSettings=new D(this,a),this.wtTable=new E(this,a.table),this.wtScroll=new C(this),this.wtViewport=new F(this),this.wtEvent=new A(this),this.selections=this.getSetting("selections"),this.wtOverlays=new B(this),this.exportSettingsAsClassNames()),this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(var c=0,d=this.wtTable.THEAD.childNodes[0].childNodes.length;d>c;c++)b.push(this.wtTable.THEAD.childNodes[0].childNodes[c].innerHTML);this.getSetting("columnHeaders").length||this.update("columnHeaders",[function(a,c){t(c,b[a])}])}this.drawn=!1,this.drawInterrupted=!1});$traceurRuntime.createClass(G,{draw:function(){var a=void 0!==arguments[0]?arguments[0]:!1;return this.drawInterrupted=!1,a||u(this.wtTable.TABLE)?this.wtTable.draw(a):this.drawInterrupted=!0,this},getCell:function(a){var b=void 0!==arguments[1]?arguments[1]:!1;if(!b)return this.wtTable.getCell(a);var c=this.wtSettings.getSetting("totalRows"),d=this.wtSettings.getSetting("fixedRowsTop"),e=this.wtSettings.getSetting("fixedRowsBottom"),f=this.wtSettings.getSetting("fixedColumnsLeft");if(a.row=c-e){if(this.wtOverlays.bottomLeftCornerOverlay.clone)return this.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell(a)}else{if(a.col=c-e&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(a)}return this.wtTable.getCell(a)},update:function(a,b){return this.wtSettings.update(a,b)},scrollVertical:function(a){return this.wtOverlays.topOverlay.scrollTo(a),this.getSetting("onScrollVertically"),this},scrollHorizontal:function(a){return this.wtOverlays.leftOverlay.scrollTo(a),this.getSetting("onScrollHorizontally"),this},scrollViewport:function(a){return this.wtScroll.scrollViewport(a),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"},exportSettingsAsClassNames:function(){var a=this,b={rowHeaders:["array"],columnHeaders:["array"]},c=[],d=[];w(b,function(b,e){b.indexOf("array")>-1&&a.getSetting(e).length&&d.push("ht"+y(e)),c.push("ht"+y(e))}),v(this.wtTable.wtRootElement.parentNode,c),s(this.wtTable.wtRootElement.parentNode,d)},getSetting:function(a,b,c,d,e){return this.wtSettings.getSetting(a,b,c,d,e)},hasSetting:function(a){return this.wtSettings.has(a)},destroy:function(){this.wtOverlays.destroy(),this.wtEvent.destroy()}},{}),window.Walkontable=G},{event:8,"helpers/dom/element":44,"helpers/object":49,"helpers/string":51,"overlay/_base.js":11,"overlay/debug.js":12,"overlay/left.js":13,"overlay/top.js":14,"overlay/topLeftCorner.js":15,overlays:16,scroll:17,settings:19,table:20,viewport:22}],8:[function(a,b,c){"use strict";function d(a){var b=this,c=k(a);this.instance=a;var d=[null,null];this.dblClickTimeout=[null,null];var e,f,g=function(a){var c=b.parentCell(a.realTarget);i(a.realTarget,"corner")?b.instance.getSetting("onCellCornerMouseDown",a,a.realTarget):c.TD&&b.instance.hasSetting("onCellMouseDown")&&b.instance.getSetting("onCellMouseDown",a,c.coords,c.TD,b.instance),2!==a.button&&c.TD&&(d[0]=c.TD,clearTimeout(b.dblClickTimeout[0]),b.dblClickTimeout[0]=setTimeout(function(){d[0]=null},1e3))},l=function(a){b.instance.touchMoving=!0},m=function(a){c.addEventListener(this,"touchmove",l),b.checkIfTouchMove=setTimeout(function(){return b.instance.touchMoving===!0?(b.instance.touchMoving=void 0,void c.removeEventListener("touchmove",l,!1)):void g(a)},30)},n=function(a){var c,d;b.instance.hasSetting("onCellMouseOver")&&(c=b.instance.wtTable.TABLE,d=h(a.realTarget,["TD","TH"],c),d&&d!==f&&j(d,c)&&(f=d,b.instance.getSetting("onCellMouseOver",a,b.instance.wtTable.getCoords(d),d,b.instance)))},o=function(a){if(2!==a.button){var c=b.parentCell(a.realTarget);c.TD===d[0]&&c.TD===d[1]?(i(a.realTarget,"corner")?b.instance.getSetting("onCellCornerDblClick",a,c.coords,c.TD,b.instance):b.instance.getSetting("onCellDblClick",a,c.coords,c.TD,b.instance),d[0]=null,d[1]=null):c.TD===d[0]&&(d[1]=c.TD,clearTimeout(b.dblClickTimeout[1]),b.dblClickTimeout[1]=setTimeout(function(){d[1]=null},500))}},p=function(a){clearTimeout(e),a.preventDefault(),o(a)};if(c.addEventListener(this.instance.wtTable.holder,"mousedown",g),c.addEventListener(this.instance.wtTable.TABLE,"mouseover",n),c.addEventListener(this.instance.wtTable.holder,"mouseup",o),this.instance.wtTable.holder.parentNode.parentNode&&Handsontable.mobileBrowser&&!b.instance.wtTable.isWorkingOnClone()){var q="."+this.instance.wtTable.holder.parentNode.className.split(" ").join(".");c.addEventListener(this.instance.wtTable.holder,"touchstart",function(a){b.instance.touchApplied=!0,j(a.target,q)&&m.call(a.target,a)}),c.addEventListener(this.instance.wtTable.holder,"touchend",function(a){b.instance.touchApplied=!1,j(a.target,q)&&p.call(a.target,a)}),b.instance.momentumScrolling||(b.instance.momentumScrolling={}),c.addEventListener(this.instance.wtTable.holder,"scroll",function(a){clearTimeout(b.instance.momentumScrolling._timeout),b.instance.momentumScrolling.ongoing||b.instance.getSetting("onBeforeTouchScroll"),b.instance.momentumScrolling.ongoing=!0,b.instance.momentumScrolling._timeout=setTimeout(function(){b.instance.touchApplied||(b.instance.momentumScrolling.ongoing=!1,b.instance.getSetting("onAfterMomentumScroll"))},200)})}c.addEventListener(window,"resize",function(){"none"!==b.instance.getSetting("stretchH")&&b.instance.draw()}),this.destroy=function(){clearTimeout(this.dblClickTimeout[0]),clearTimeout(this.dblClickTimeout[1]),c.destroy()}}Object.defineProperties(c,{WalkontableEvent:{get:function(){return d}},__esModule:{value:!0}});var e,f,g=(e=a("helpers/dom/element"),e&&e.__esModule&&e||{"default":e}),h=g.closest,i=g.hasClass,j=g.isChildOf,k=(f=a("eventManager"),f&&f.__esModule&&f||{"default":f}).eventManager;d.prototype.parentCell=function(a){var b={},c=this.instance.wtTable.TABLE,d=h(a,["TD","TH"],c);return d&&j(d,c)?(b.coords=this.instance.wtTable.getCoords(d),b.TD=d):i(a,"wtBorder")&&i(a,"current")?(b.coords=this.instance.selections.current.cellRange.highlight,b.TD=this.instance.wtTable.getCell(b.coords)):i(a,"wtBorder")&&i(a,"area")&&this.instance.selections.area.cellRange&&(b.coords=this.instance.selections.area.cellRange.to,b.TD=this.instance.wtTable.getCell(b.coords)),b},window.WalkontableEvent=d},{eventManager:40,"helpers/dom/element":44}],9:[function(a,b,c){"use strict";Object.defineProperties(c,{WalkontableColumnFilter:{get:function(){return d}},__esModule:{value:!0}});var d=function(a,b,c){this.offset=a,this.total=b,this.countTH=c};$traceurRuntime.createClass(d,{offsetted:function(a){return a+this.offset},unOffsetted:function(a){return a-this.offset},renderedToSource:function(a){return this.offsetted(a)},sourceToRendered:function(a){return this.unOffsetted(a)},offsettedTH:function(a){return a-this.countTH},unOffsettedTH:function(a){return a+this.countTH},visibleRowHeadedColumnToSourceColumn:function(a){return this.renderedToSource(this.offsettedTH(a))},sourceColumnToVisibleRowHeadedColumn:function(a){return this.unOffsettedTH(this.sourceToRendered(a)); }},{}),window.WalkontableColumnFilter=d},{}],10:[function(a,b,c){"use strict";Object.defineProperties(c,{WalkontableRowFilter:{get:function(){return d}},__esModule:{value:!0}});var d=function(a,b,c){this.offset=a,this.total=b,this.countTH=c};$traceurRuntime.createClass(d,{offsetted:function(a){return a+this.offset},unOffsetted:function(a){return a-this.offset},renderedToSource:function(a){return this.offsetted(a)},sourceToRendered:function(a){return this.unOffsetted(a)},offsettedTH:function(a){return a-this.countTH},unOffsettedTH:function(a){return a+this.countTH},visibleColHeadedRowToSourceRow:function(a){return this.renderedToSource(this.offsettedTH(a))},sourceRowToVisibleColHeadedRow:function(a){return this.unOffsettedTH(this.sourceToRendered(a))}},{}),window.WalkontableRowFilter=d},{}],11:[function(a,b,c){"use strict";Object.defineProperties(c,{WalkontableOverlay:{get:function(){return m}},__esModule:{value:!0}});var d,e,f,g=(d=a("helpers/dom/element"),d&&d.__esModule&&d||{"default":d}),h=g.getScrollableElement,i=g.getTrimmingContainer,j=(e=a("helpers/object"),e&&e.__esModule&&e||{"default":e}).defineGetter,k=(f=a("eventManager"),f&&f.__esModule&&f||{"default":f}).eventManager,l={},m=function(a){j(this,"wot",a,{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=i(this.hider.parentNode.parentNode),this.mainTableScrollableElement=h(this.wot.wtTable.TABLE),this.needFullRender=this.shouldBeRendered(),this.areElementSizesAdjusted=!1},n=m;$traceurRuntime.createClass(m,{shouldBeRendered:function(){return!0},makeClone:function(a){if(-1===n.CLONE_TYPES.indexOf(a))throw new Error('Clone type "'+a+'" is not supported.');var b=document.createElement("DIV"),c=document.createElement("TABLE");return b.className="ht_clone_"+a+" handsontable",b.style.position="absolute",b.style.top=0,b.style.left=0,b.style.overflow="hidden",c.className=this.wot.wtTable.TABLE.className,b.appendChild(c),this.type=a,this.wot.wtTable.wtRootElement.parentNode.appendChild(b),new Walkontable({cloneSource:this.wot,cloneOverlay:this,table:c})},refresh:function(){var a=void 0!==arguments[0]?arguments[0]:!1,b=this.shouldBeRendered();this.clone&&(this.needFullRender||b)&&this.clone.draw(a),this.needFullRender=b},destroy:function(){k(this.clone).destroy()}},{get CLONE_TOP(){return"top"},get CLONE_BOTTOM(){return"bottom"},get CLONE_LEFT(){return"left"},get CLONE_TOP_LEFT_CORNER(){return"top_left_corner"},get CLONE_BOTTOM_LEFT_CORNER(){return"bottom_left_corner"},get CLONE_DEBUG(){return"debug"},get CLONE_TYPES(){return[n.CLONE_TOP,n.CLONE_BOTTOM,n.CLONE_LEFT,n.CLONE_TOP_LEFT_CORNER,n.CLONE_BOTTOM_LEFT_CORNER,n.CLONE_DEBUG]},registerOverlay:function(a,b){if(-1===n.CLONE_TYPES.indexOf(a))throw new Error("Unsupported overlay ("+a+").");l[a]=b},createOverlay:function(a,b){return new l[a](b)},isOverlayTypeOf:function(a,b){return a&&l[b]?a instanceof l[b]:!1}}),window.WalkontableOverlay=m},{eventManager:40,"helpers/dom/element":44,"helpers/object":49}],12:[function(a,b,c){"use strict";Object.defineProperties(c,{WalkontableDebugOverlay:{get:function(){return h}},__esModule:{value:!0}});var d,e,f=(d=a("helpers/dom/element"),d&&d.__esModule&&d||{"default":d}).addClass,g=(e=a("_base"),e&&e.__esModule&&e||{"default":e}).WalkontableOverlay,h=function(a){$traceurRuntime.superConstructor(i).call(this,a),this.clone=this.makeClone(g.CLONE_DEBUG),this.clone.wtTable.holder.style.opacity=.4,this.clone.wtTable.holder.style.textShadow="0 0 2px #ff0000",f(this.clone.wtTable.holder.parentNode,"wtDebugVisible")},i=h;$traceurRuntime.createClass(h,{},{},g),window.WalkontableDebugOverlay=h,g.registerOverlay(g.CLONE_DEBUG,h)},{_base:11,"helpers/dom/element":44}],13:[function(a,b,c){"use strict";Object.defineProperties(c,{WalkontableLeftOverlay:{get:function(){return p}},__esModule:{value:!0}});var d,e,f=(d=a("helpers/dom/element"),d&&d.__esModule&&d||{"default":d}),g=f.addClass,h=f.getScrollbarWidth,i=f.getScrollLeft,j=f.getWindowScrollTop,k=f.hasClass,l=f.outerWidth,m=f.removeClass,n=f.setOverlayPosition,o=(e=a("_base"),e&&e.__esModule&&e||{"default":e}).WalkontableOverlay,p=function(a){$traceurRuntime.superConstructor(q).call(this,a),this.clone=this.makeClone(o.CLONE_LEFT)},q=p;$traceurRuntime.createClass(p,{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 a=this.clone.wtTable.holder.parentNode,b=0;if(this.trimmingContainer===window){var c,d,e=this.wot.wtTable.hider.getBoundingClientRect(),f=Math.ceil(e.left),g=Math.ceil(e.right);d=this.wot.wtTable.hider.style.top,d=""===d?0:d,c=0>f&&g-a.offsetWidth>0?-f:0,b=c,c+="px",n(a,c,d)}else b=this.getScrollPosition();this.adjustHeaderBordersPosition(b),this.adjustElementsSize()}},setScrollPosition:function(a){this.mainTableScrollableElement===window?window.scrollTo(a,j()):this.mainTableScrollableElement.scrollLeft=a},onScroll:function(){this.wot.getSetting("onScrollHorizontally")},sumCellSizes:function(a,b){for(var c=0,d=this.wot.wtSettings.defaultColumnWidth;b>a;)c+=this.wot.wtTable.getStretchedColumnWidth(a)||d,a++;return c},adjustElementsSize:function(){var a=void 0!==arguments[0]?arguments[0]:!1;(this.needFullRender||a)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize(),a||(this.areElementSizesAdjusted=!0))},adjustRootElementSize:function(){var a,b=this.wot.wtTable.holder,c=b.clientHeight===b.offsetHeight?0:h(),d=this.clone.wtTable.holder.parentNode,e=d.style;this.trimmingContainer!==window&&(e.height=this.wot.wtViewport.getWorkspaceHeight()-c+"px"),this.clone.wtTable.holder.style.height=e.height,a=l(this.clone.wtTable.TABLE),e.width=(0===a?a:a+4)+"px"},adjustRootChildrenSize:function(){var a=h();this.clone.wtTable.hider.style.height=this.hider.style.height,this.clone.wtTable.holder.style.height=this.clone.wtTable.holder.parentNode.style.height,0===a&&(a=30),this.clone.wtTable.holder.style.width=parseInt(this.clone.wtTable.holder.parentNode.style.width,10)+a+"px"},applyToDOM:function(){var a=this.wot.getSetting("totalColumns");if(this.areElementSizesAdjusted||this.adjustElementsSize(),"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition)this.spreader.style.left=this.wot.wtViewport.columnsRenderCalculator.startPosition+"px";else{if(0!==a)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(a,b){var c=this.getTableParentOffset(),d=this.wot.cloneSource?this.wot.cloneSource:this.wot,e=d.wtTable.holder,f=0;b&&e.offsetWidth!==e.clientWidth&&(f=h()),b?(c+=this.sumCellSizes(0,a+1),c-=this.wot.wtViewport.getViewportWidth()):c+=this.sumCellSizes(this.wot.getSetting("fixedColumnsLeft"),a),c+=f,this.setScrollPosition(c)},getTableParentOffset:function(){return this.trimmingContainer===window?this.wot.wtTable.holderOffset.left:0},getScrollPosition:function(){return i(this.mainTableScrollableElement)},adjustHeaderBordersPosition:function(a){var b=this.wot.wtTable.holder.parentNode,c=this.wot.getSetting("rowHeaders"),d=this.wot.getSetting("fixedColumnsLeft");if(d&&!c.length)g(b,"innerBorderLeft");else if(!d&&c.length){var e=k(b,"innerBorderLeft");a?g(b,"innerBorderLeft"):m(b,"innerBorderLeft"),(!e&&a||e&&!a)&&this.wot.wtOverlays.adjustElementsSize()}}},{},o),window.WalkontableLeftOverlay=p,o.registerOverlay(o.CLONE_LEFT,p)},{_base:11,"helpers/dom/element":44}],14:[function(a,b,c){"use strict";Object.defineProperties(c,{WalkontableTopOverlay:{get:function(){return p}},__esModule:{value:!0}});var d,e,f=(d=a("helpers/dom/element"),d&&d.__esModule&&d||{"default":d}),g=f.addClass,h=f.getScrollbarWidth,i=f.getScrollTop,j=f.getWindowScrollLeft,k=f.hasClass,l=f.outerHeight,m=f.removeClass,n=f.setOverlayPosition,o=(e=a("_base"),e&&e.__esModule&&e||{"default":e}).WalkontableOverlay,p=function(a){$traceurRuntime.superConstructor(q).call(this,a),this.clone=this.makeClone(o.CLONE_TOP)},q=p;$traceurRuntime.createClass(p,{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 a=this.clone.wtTable.holder.parentNode,b=0;if(this.wot.wtOverlays.leftOverlay.trimmingContainer===window){var c,d,e=this.wot.wtTable.hider.getBoundingClientRect(),f=Math.ceil(e.top),g=Math.ceil(e.bottom);c=this.wot.wtTable.hider.style.left,c=""===c?0:c,d=0>f&&g-a.offsetHeight>0?-f:0,b=d,d+="px",n(a,c,d)}else b=this.getScrollPosition();this.adjustHeaderBordersPosition(b),this.adjustElementsSize()}},setScrollPosition:function(a){this.mainTableScrollableElement===window?window.scrollTo(j(),a):this.mainTableScrollableElement.scrollTop=a},onScroll:function(){this.wot.getSetting("onScrollVertically")},sumCellSizes:function(a,b){for(var c=0,d=this.wot.wtSettings.settings.defaultRowHeight;b>a;)c+=this.wot.wtTable.getRowHeight(a)||d,a++;return c},adjustElementsSize:function(){var a=void 0!==arguments[0]?arguments[0]:!1;(this.needFullRender||a)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize(),a||(this.areElementSizesAdjusted=!0))},adjustRootElementSize:function(){var a,b=this.wot.wtTable.holder,c=b.clientWidth===b.offsetWidth?0:h(),d=this.clone.wtTable.holder.parentNode,e=d.style;this.trimmingContainer!==window&&(e.width=this.wot.wtViewport.getWorkspaceWidth()-c+"px"),this.clone.wtTable.holder.style.width=e.width,a=l(this.clone.wtTable.TABLE),e.height=(0===a?a:a+4)+"px"},adjustRootChildrenSize:function(){var a=h();this.clone.wtTable.hider.style.width=this.hider.style.width,this.clone.wtTable.holder.style.width=this.clone.wtTable.holder.parentNode.style.width,0===a&&(a=30),this.clone.wtTable.holder.style.height=parseInt(this.clone.wtTable.holder.parentNode.style.height,10)+a+"px"},applyToDOM:function(){var a=this.wot.getSetting("totalRows");if(this.areElementSizesAdjusted||this.adjustElementsSize(),"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=this.wot.wtViewport.rowsRenderCalculator.startPosition+"px";else{if(0!==a)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(a,b){var c=this.getTableParentOffset(),d=this.wot.cloneSource?this.wot.cloneSource:this.wot,e=d.wtTable.holder,f=0;if(b&&e.offsetHeight!==e.clientHeight&&(f=h()),b){var g=this.wot.getSetting("fixedRowsBottom"),i=(this.wot.getSetting("fixedRowsTop"),this.wot.getSetting("totalRows"));c+=this.sumCellSizes(0,a+1),c-=this.wot.wtViewport.getViewportHeight()-this.sumCellSizes(i-g,i),c+=1}else c+=this.sumCellSizes(this.wot.getSetting("fixedRowsTop"),a);c+=f,this.setScrollPosition(c)},getTableParentOffset:function(){return this.mainTableScrollableElement===window?this.wot.wtTable.holderOffset.top:0},getScrollPosition:function(){return i(this.mainTableScrollableElement)},adjustHeaderBordersPosition:function(a){if(0===this.wot.getSetting("fixedRowsTop")&&this.wot.getSetting("columnHeaders").length>0){var b=this.wot.wtTable.holder.parentNode,c=k(b,"innerBorderTop");a?g(b,"innerBorderTop"):m(b,"innerBorderTop"),(!c&&a||c&&!a)&&this.wot.wtOverlays.adjustElementsSize()}if(0===this.wot.getSetting("rowHeaders").length){var d=this.clone.wtTable.THEAD.querySelectorAll("th:nth-of-type(2)");if(d)for(var e=0;ek&&m-a.offsetWidth>0?-k+"px":"0",e=0>j&&l-a.offsetHeight>0?-j+"px":"0",i(a,d,e)}a.style.height=(0===b?b:b+4)+"px",a.style.width=(0===c?c:c+4)+"px"}}},{},j),window.WalkontableTopLeftCornerOverlay=k,j.registerOverlay(j.CLONE_TOP_LEFT_CORNER,k)},{_base:11,"helpers/dom/element":44}],16:[function(a,b,c){"use strict";Object.defineProperties(c,{WalkontableOverlays:{get:function(){return n}},__esModule:{value:!0}});var d,e,f,g=(d=a("helpers/dom/element"),d&&d.__esModule&&d||{"default":d}),h=g.getScrollableElement,i=g.getScrollbarWidth,j=g.getScrollLeft,k=g.getScrollTop,l=(e=a("helpers/unicode"),e&&e.__esModule&&e||{"default":e}).isKey,m=(f=a("eventManager"),f&&f.__esModule&&f||{"default":f}).EventManager,n=function(a){this.wot=a,this.instance=this.wot,this.eventManager=new m(this.wot),this.wot.update("scrollbarWidth",i()),this.wot.update("scrollbarHeight",i()),this.mainTableScrollableElement=h(this.wot.wtTable.TABLE),this.topOverlay=WalkontableOverlay.createOverlay(WalkontableOverlay.CLONE_TOP,this.wot),"undefined"==typeof WalkontableBottomOverlay?this.bottomOverlay={needFullRender:!1}:this.bottomOverlay=WalkontableOverlay.createOverlay(WalkontableOverlay.CLONE_BOTTOM,this.wot),this.leftOverlay=WalkontableOverlay.createOverlay(WalkontableOverlay.CLONE_LEFT,this.wot),this.topOverlay.needFullRender&&this.leftOverlay.needFullRender&&(this.topLeftCornerOverlay=WalkontableOverlay.createOverlay(WalkontableOverlay.CLONE_TOP_LEFT_CORNER,this.wot)),this.bottomOverlay.needFullRender&&this.leftOverlay.needFullRender&&"undefined"!=typeof WalkontableBottomLeftCornerOverlay?this.bottomLeftCornerOverlay=WalkontableOverlay.createOverlay(WalkontableOverlay.CLONE_BOTTOM_LEFT_CORNER,this.wot):this.bottomLeftCornerOverlay={needFullRender:!1},this.wot.getSetting("debug")&&(this.debug=WalkontableOverlay.createOverlay(WalkontableOverlay.CLONE_DEBUG,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},bottom:{top:null,left:0},left:{top:0,left:null}},this.registerListeners()};$traceurRuntime.createClass(n,{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 a=this;this.eventManager.addEventListener(document.documentElement,"keydown",function(b){return a.onKeyDown(b)}),this.eventManager.addEventListener(document.documentElement,"keyup",function(){return a.onKeyUp()}),this.eventManager.addEventListener(document,"visibilitychange",function(){return a.onKeyUp()}),this.eventManager.addEventListener(this.mainTableScrollableElement,"scroll",function(b){return a.onTableScroll(b)}),this.topOverlay.needFullRender&&(this.eventManager.addEventListener(this.topOverlay.clone.wtTable.holder,"scroll",function(b){return a.onTableScroll(b)}),this.eventManager.addEventListener(this.topOverlay.clone.wtTable.holder,"wheel",function(b){return a.onTableScroll(b)})),this.bottomOverlay.needFullRender&&(this.eventManager.addEventListener(this.bottomOverlay.clone.wtTable.holder,"scroll",function(b){return a.onTableScroll(b)}),this.eventManager.addEventListener(this.bottomOverlay.clone.wtTable.holder,"wheel",function(b){return a.onTableScroll(b)})),this.leftOverlay.needFullRender&&(this.eventManager.addEventListener(this.leftOverlay.clone.wtTable.holder,"scroll",function(b){return a.onTableScroll(b)}),this.eventManager.addEventListener(this.leftOverlay.clone.wtTable.holder,"wheel",function(b){return a.onTableScroll(b)})),this.topOverlay.trimmingContainer!==window&&this.leftOverlay.trimmingContainer!==window&&this.eventManager.addEventListener(window,"wheel",function(b){var c,d=b.wheelDeltaY||b.deltaY,e=b.wheelDeltaX||b.deltaX;a.topOverlay.clone.wtTable.holder.contains(b.realTarget)?c="top":a.bottomOverlay.clone&&a.bottomOverlay.clone.wtTable.holder.contains(b.realTarget)?c="bottom":a.leftOverlay.clone.wtTable.holder.contains(b.realTarget)&&(c="left"),"top"==c&&0!==d?b.preventDefault():"left"==c&&0!==e?b.preventDefault():"bottom"==c&&0!==d&&b.preventDefault()})},onTableScroll:function(a){Handsontable.mobileBrowser||(!this.keyPressed||this.mainTableScrollableElement===window||a.target.contains(this.mainTableScrollableElement))&&("scroll"===a.type?this.syncScrollPositions(a):this.translateMouseWheelToScroll(a))},onKeyDown:function(a){this.keyPressed=l(a.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")},onKeyUp:function(){this.keyPressed=!1},translateMouseWheelToScroll:function(a){for(var b,c=this.topOverlay.clone.wtTable.holder,d=this.bottomOverlay.clone?this.bottomOverlay.clone.wtTable.holder:null,e=this.leftOverlay.clone.wtTable.holder,f={type:"wheel"},g=a.target,h=a.wheelDeltaY||-1*a.deltaY,i=a.wheelDeltaX||-1*a.deltaX;g!=document&&null!=g;){if(g.className.indexOf("wtHolder")>-1){b=g;break}g=g.parentNode}return f.target=b,b==c?this.syncScrollPositions(f,-.2*h):b==d?this.syncScrollPositions(f,-.2*h):b==e&&this.syncScrollPositions(f,-.2*i),!1},syncScrollPositions:function(a){var b=void 0!==arguments[1]?arguments[1]:null;if(!this.destroyed){if(0===arguments.length)return void this.syncScrollWithMaster();var c,d,e,f=this.mainTableScrollableElement,g=a.target,h=0,i=!1;this.topOverlay.needFullRender&&(c=this.topOverlay.clone.wtTable.holder),this.bottomOverlay.needFullRender&&(e=this.bottomOverlay.clone.wtTable.holder),this.leftOverlay.needFullRender&&(d=this.leftOverlay.clone.wtTable.holder),g===document&&(g=window),g===f?(h=j(g),this.overlayScrollPositions.master.left!==h&&(this.overlayScrollPositions.master.left=h,i=!0,c&&(c.scrollLeft=h),e&&(e.scrollLeft=h)),h=k(g),this.overlayScrollPositions.master.top!==h&&(this.overlayScrollPositions.master.top=h,i=!0,d&&(d.scrollTop=h))):g===e?(h=j(g),this.overlayScrollPositions.bottom.left!==h&&(this.overlayScrollPositions.bottom.left=h,i=!0,f.scrollLeft=h),null!==b&&(i=!0,f.scrollTop+=b)):g===c?(h=j(g),this.overlayScrollPositions.top.left!==h&&(this.overlayScrollPositions.top.left=h,i=!0,f.scrollLeft=h),null!==b&&(i=!0,f.scrollTop+=b)):g===d&&(h=k(g),this.overlayScrollPositions.left.top!==h&&(this.overlayScrollPositions.left.top=h,i=!0,f.scrollTop=h),null!==b&&(i=!0,f.scrollLeft+=b)),!this.keyPressed&&i&&"scroll"===a.type&&this.refreshAll()}},syncScrollWithMaster:function(){var a=this.topOverlay.mainTableScrollableElement;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=a.scrollLeft),this.leftOverlay.needFullRender&&(this.leftOverlay.clone.wtTable.holder.scrollTop=a.scrollTop)},destroy:function(){this.eventManager.destroy(),this.topOverlay.destroy(),this.bottomOverlay.clone&&this.bottomOverlay.destroy(),this.leftOverlay.destroy(),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.destroy(),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.clone&&this.bottomLeftCornerOverlay.destroy(),this.debug&&this.debug.destroy(),this.destroyed=!0},refresh:function(){var a=void 0!==arguments[0]?arguments[0]:!1;if(this.topOverlay.areElementSizesAdjusted&&this.leftOverlay.areElementSizesAdjusted){var b=this.wot.wtTable.wtRootElement.parentNode||this.wot.wtTable.wtRootElement,c=b.clientWidth,d=b.clientHeight;(c!==this.spreaderLastSize.width||d!==this.spreaderLastSize.height)&&(this.spreaderLastSize.width=c,this.spreaderLastSize.height=d,this.adjustElementsSize())}this.bottomOverlay.clone&&this.bottomOverlay.refresh(a),this.leftOverlay.refresh(a),this.topOverlay.refresh(a),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.refresh(a),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.clone&&this.bottomLeftCornerOverlay.refresh(a),this.debug&&this.debug.refresh(a)},adjustElementsSize:function(){var a=void 0!==arguments[0]?arguments[0]:!1,b=this.wot.getSetting("totalColumns"),c=this.wot.getSetting("totalRows"),d=this.wot.wtViewport.getRowHeaderWidth(),e=this.wot.wtViewport.getColumnHeaderHeight(),f=this.wot.wtTable.hider.style;f.width=d+this.leftOverlay.sumCellSizes(0,b)+"px",f.height=e+this.topOverlay.sumCellSizes(0,c)+1+"px",this.topOverlay.adjustElementsSize(a),this.leftOverlay.adjustElementsSize(a),this.bottomOverlay.clone&&this.bottomOverlay.adjustElementsSize(a)},applyToDOM:function(){this.topOverlay.areElementSizesAdjusted&&this.leftOverlay.areElementSizesAdjusted||this.adjustElementsSize(),this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.leftOverlay.applyToDOM()}},{}),window.WalkontableOverlays=n},{eventManager:40,"helpers/dom/element":44,"helpers/unicode":52}],17:[function(a,b,c){"use strict";Object.defineProperties(c,{WalkontableScroll:{get:function(){return d}},__esModule:{value:!0}});var d=function(a){this.wot=a,this.instance=a};$traceurRuntime.createClass(d,{scrollViewport:function(a){if(this.wot.drawn){var b=this.wot.getSetting("totalRows"),c=this.wot.getSetting("totalColumns"),d=this.instance.getSetting("fixedRowsTop"),e=this.instance.getSetting("fixedRowsBottom"),f=this.instance.getSetting("fixedColumnsLeft");if(a.row<0||a.row>b-1)throw new Error("row "+a.row+" does not exist");if(a.col<0||a.col>c-1)throw new Error("column "+a.col+" does not exist");a.row>this.instance.wtTable.getLastVisibleRow()&&a.row=d&&a.rowthis.instance.wtTable.getLastVisibleColumn()?this.wot.wtOverlays.leftOverlay.scrollTo(a.col,!0):a.col>=f&&a.colj;j++)d=a.wtTable.columnFilter.renderedToSource(j),d>=i[1]&&d<=i[3]&&(e=a.wtTable.getColumnHeader(d),e&&this.settings.highlightColumnClassName&&h(e,this.settings.highlightColumnClassName));for(var k=0;f>k;k++){c=a.wtTable.rowFilter.renderedToSource(k),c>=i[0]&&c<=i[2]&&(e=a.wtTable.getRowHeader(c),e&&this.settings.highlightRowClassName&&h(e,this.settings.highlightRowClassName));for(var l=0;g>l;l++)d=a.wtTable.columnFilter.renderedToSource(l),c>=i[0]&&c<=i[2]&&d>=i[1]&&d<=i[3]?this.settings.className&&this.addClassAtCoords(a,c,d,this.settings.className):c>=i[0]&&c<=i[2]?this.settings.highlightRowClassName&&this.addClassAtCoords(a,c,d,this.settings.highlightRowClassName):d>=i[1]&&d<=i[3]&&this.settings.highlightColumnClassName&&this.addClassAtCoords(a,c,d,this.settings.highlightColumnClassName)}if(a.getSetting("onBeforeDrawBorders",i,this.settings.className),this.settings.border){var m=this.getBorder(a);m&&m.appear(i)}}}},{}),window.WalkontableSelection=l},{border:2,"cell/coords":5,"cell/range":6,"helpers/dom/element":44}],19:[function(a,b,c){"use strict";Object.defineProperties(c,{WalkontableSettings:{get:function(){return f}},__esModule:{value:!0}});var d,e=(d=a("helpers/dom/element"),d&&d.__esModule&&d||{"default":d}).fastInnerText,f=function(a,b){var c=this;this.wot=a,this.instance=a,this.defaults={table:void 0,debug:!1,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,data:void 0,fixedColumnsLeft:0,fixedRowsTop:0,fixedRowsBottom:0,minSpareRows:0,rowHeaders:function(){return[]},columnHeaders:function(){return[]},totalRows:void 0,totalColumns:void 0,cellRenderer:function(a,b,d){var f=c.getSetting("data",a,b);e(d,void 0===f||null===f?"":f)},columnWidth:function(a){},rowHeight:function(a){},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 d in this.defaults)if(this.defaults.hasOwnProperty(d))if(void 0!==b[d])this.settings[d]=b[d];else{if(void 0===this.defaults[d])throw new Error('A required setting "'+d+'" was not provided');this.settings[d]=this.defaults[d]}};$traceurRuntime.createClass(f,{update:function(a,b){if(void 0===b)for(var c in a)a.hasOwnProperty(c)&&(this.settings[c]=a[c]);else this.settings[a]=b;return this.wot},getSetting:function(a,b,c,d,e){return"function"==typeof this.settings[a]?this.settings[a](b,c,d,e):void 0!==b&&Array.isArray(this.settings[a])?this.settings[a][b]:this.settings[a]},has:function(a){return!!this.settings[a]}},{}),window.WalkontableSettings=f},{"helpers/dom/element":44}],20:[function(a,b,c){"use strict";Object.defineProperties(c,{WalkontableTable:{get:function(){return v}},__esModule:{value:!0}});var d,e,f,g,h,i,j=(d=a("helpers/dom/element"),d&&d.__esModule&&d||{"default":d}),k=j.getStyle,l=j.getTrimmingContainer,m=j.hasClass,n=j.index,o=j.offset,p=j.removeClass,q=j.removeTextNodes,r=(j.overlayContainsElement,(e=a("cell/coords"),e&&e.__esModule&&e||{"default":e}).WalkontableCellCoords),s=((f=a("cell/range"),f&&f.__esModule&&f||{"default":f}).WalkontableCellRange,(g=a("filter/column"),g&&g.__esModule&&g||{"default":g}).WalkontableColumnFilter),t=(h=a("filter/row"),h&&h.__esModule&&h||{"default":h}).WalkontableRowFilter,u=(i=a("tableRenderer"),i&&i.__esModule&&i||{"default":i}).WalkontableTableRenderer,v=function(a,b){this.wot=a,this.instance=this.wot,this.TABLE=b,this.TBODY=null,this.THEAD=null,this.COLGROUP=null,this.tableOffset=0,this.holderOffset=0,q(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(v,{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(a){var b,c=a.parentNode;return c&&1===c.nodeType&&m(c,"wtHolder")||(b=document.createElement("div"),b.className="wtSpreader",c&&c.insertBefore(b,a),b.appendChild(a)),b.style.position="relative",b},createHider:function(a){var b,c=a.parentNode;return c&&1===c.nodeType&&m(c,"wtHolder")||(b=document.createElement("div"),b.className="wtHider",c&&c.insertBefore(b,a),b.appendChild(a)),b},createHolder:function(a){var b,c=a.parentNode;return c&&1===c.nodeType&&m(c,"wtHolder")||(b=document.createElement("div"),b.style.position="relative",b.className="wtHolder",c&&c.insertBefore(b,a),this.isWorkingOnClone()||(b.parentNode.className+="ht_master handsontable"),b.appendChild(a)),b},alignOverlaysWithTrimmingContainer:function(){var a=l(this.wtRootElement);this.isWorkingOnClone()||(this.holder.parentNode.style.position="relative",a===window?(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible"):(this.holder.style.width=k(a,"width"),this.holder.style.height=k(a,"height"),this.holder.style.overflow=""))},isWorkingOnClone:function(){return!!this.wot.cloneSource},draw:function(a){var b=this.instance.getSetting("totalRows");if(this.isWorkingOnClone()||(this.holderOffset=o(this.holder),a=this.wot.wtViewport.createRenderCalculators(a)),a)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=o(this.TABLE);var c;c=WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_DEBUG)||WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_TOP)||WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_TOP_LEFT_CORNER)?0:WalkontableOverlay.isOverlayTypeOf(this.instance.cloneOverlay,WalkontableOverlay.CLONE_BOTTOM)||WalkontableOverlay.isOverlayTypeOf(this.instance.cloneOverlay,WalkontableOverlay.CLONE_BOTTOM_LEFT_CORNER)?b-this.wot.getSetting("fixedRowsBottom"):this.wot.wtViewport.rowsRenderCalculator.startRow;var d;d=WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_DEBUG)||WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_LEFT)||WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_TOP_LEFT_CORNER)||WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_BOTTOM_LEFT_CORNER)?0:this.wot.wtViewport.columnsRenderCalculator.startColumn, this.rowFilter=new t(c,b,this.wot.getSetting("columnHeaders").length),this.columnFilter=new s(d,this.wot.getSetting("totalColumns"),this.wot.getSetting("rowHeaders").length),this._doDraw(),this.alignOverlaysWithTrimmingContainer()}return this.refreshSelections(a),this.isWorkingOnClone()||(this.wot.wtOverlays.topOverlay.resetFixedPosition(),this.wot.wtOverlays.bottomOverlay.clone&&this.wot.wtOverlays.bottomOverlay.resetFixedPosition(),this.wot.wtOverlays.leftOverlay.resetFixedPosition(),this.wot.wtOverlays.topLeftCornerOverlay&&this.wot.wtOverlays.topLeftCornerOverlay.resetFixedPosition(),this.instance.wtOverlays.bottomLeftCornerOverlay&&this.instance.wtOverlays.bottomLeftCornerOverlay.clone&&this.wot.wtOverlays.bottomLeftCornerOverlay.resetFixedPosition()),this.wot.drawn=!0,this},_doDraw:function(){var a=new u(this);a.render()},removeClassFromCells:function(a){for(var b=this.TABLE.querySelectorAll("."+a),c=0,d=b.length;d>c;c++)p(b[c],a)},refreshSelections:function(a){if(this.wot.selections){var b=this.wot.selections.length;if(a)for(var c=0;b>c;c++)this.wot.selections[c].settings.className&&this.removeClassFromCells(this.wot.selections[c].settings.className),this.wot.selections[c].settings.highlightRowClassName&&this.removeClassFromCells(this.wot.selections[c].settings.highlightRowClassName),this.wot.selections[c].settings.highlightColumnClassName&&this.removeClassFromCells(this.wot.selections[c].settings.highlightColumnClassName);for(var d=0;b>d;d++)this.wot.selections[d].draw(this.wot,a)}},getCell:function(a){if(this.isRowBeforeRenderedRows(a.row))return-1;if(this.isRowAfterRenderedRows(a.row))return-2;var b=this.TBODY.childNodes[this.rowFilter.sourceToRendered(a.row)];return b?b.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(a.col)]:void 0},getColumnHeader:function(a){var b=void 0!==arguments[1]?arguments[1]:0,c=this.THEAD.childNodes[b];return c?c.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(a)]:void 0},getRowHeader:function(a){if(0===this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0))return null;var b=this.TBODY.childNodes[this.rowFilter.sourceToRendered(a)];return b?b.childNodes[0]:void 0},getCoords:function(a){var b=a.parentNode,c=n(b);c=b.parentNode===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(c):this.rowFilter.renderedToSource(c);var d=this.columnFilter.visibleRowHeadedColumnToSourceColumn(a.cellIndex);return new r(c,d)},getTrForRow:function(a){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(a)]},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(a){return this.rowFilter.sourceToRendered(a)<0&&a>=0},isRowAfterViewport:function(a){return this.rowFilter.sourceToRendered(a)>this.getLastVisibleRow()},isRowAfterRenderedRows:function(a){return this.rowFilter.sourceToRendered(a)>this.getLastRenderedRow()},isColumnBeforeViewport:function(a){return this.columnFilter.sourceToRendered(a)<0&&a>=0},isColumnAfterViewport:function(a){return this.columnFilter.sourceToRendered(a)>this.getLastVisibleColumn()},isLastRowFullyVisible:function(){return this.getLastVisibleRow()===this.getLastRenderedRow()},isLastColumnFullyVisible:function(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()},getRenderedColumnsCount:function(){return WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_DEBUG)?this.wot.getSetting("totalColumns"):WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_LEFT)||WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_TOP_LEFT_CORNER)||WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_BOTTOM_LEFT_CORNER)?this.wot.getSetting("fixedColumnsLeft"):this.wot.wtViewport.columnsRenderCalculator.count},getRenderedRowsCount:function(){return WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_DEBUG)?this.wot.getSetting("totalRows"):WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_TOP)||WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_TOP_LEFT_CORNER)?this.wot.getSetting("fixedRowsTop"):WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_BOTTOM)||WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_BOTTOM_LEFT_CORNER)?this.instance.getSetting("fixedRowsBottom"):this.wot.wtViewport.rowsRenderCalculator.count},getVisibleRowsCount:function(){return this.wot.wtViewport.rowsVisibleCalculator.count},allRowsInViewport:function(){return this.wot.getSetting("totalRows")==this.getVisibleRowsCount()},getRowHeight:function(a){var b=this.wot.wtSettings.settings.rowHeight(a),c=this.wot.wtViewport.oversizedRows[a];return void 0!==c&&(b=b?Math.max(b,c):c),b},getColumnHeaderHeight:function(a){var b=this.wot.wtSettings.settings.defaultRowHeight,c=this.wot.wtViewport.oversizedColumnHeaders[a];return void 0!==c&&(b=b?Math.max(b,c):c),b},getVisibleColumnsCount:function(){return this.wot.wtViewport.columnsVisibleCalculator.count},allColumnsInViewport:function(){return this.wot.getSetting("totalColumns")==this.getVisibleColumnsCount()},getColumnWidth:function(a){var b=this.wot.wtSettings.settings.columnWidth;return"function"==typeof b?b=b(a):"object"==typeof b&&(b=b[a]),b||this.wot.wtSettings.settings.defaultColumnWidth},getStretchedColumnWidth:function(a){var b=this.getColumnWidth(a),c=-1===[void 0,null].indexOf(b)?b:this.instance.wtSettings.settings.defaultColumnWidth,d=this.wot.wtViewport.columnsRenderCalculator;if(d){var e=d.getStretchedColumnWidth(a,c);e&&(c=e)}return c}},{}),window.WalkontableTable=v},{"cell/coords":5,"cell/range":6,"filter/column":9,"filter/row":10,"helpers/dom/element":44,tableRenderer:21}],21:[function(a,b,c){"use strict";function d(a,b){var c=document.createElement("TH");return b.insertBefore(c,a),b.removeChild(a),c}function e(a,b){var c=document.createElement("TD");return b.insertBefore(c,a),b.removeChild(a),c}Object.defineProperties(c,{WalkontableTableRenderer:{get:function(){return m}},__esModule:{value:!0}});var f,g=(f=a("helpers/dom/element"),f&&f.__esModule&&f||{"default":f}),h=g.addClass,i=g.empty,j=g.getScrollbarWidth,k=g.hasClass,l=g.innerHeight,m=function(a){this.wtTable=a,this.wot=a.instance,this.instance=a.instance,this.rowFilter=a.rowFilter,this.columnFilter=a.columnFilter,this.TABLE=a.TABLE,this.THEAD=a.THEAD,this.TBODY=a.TBODY,this.COLGROUP=a.COLGROUP,this.rowHeaders=[],this.rowHeaderCount=0,this.columnHeaders=[],this.columnHeaderCount=0,this.fixedRowsTop=0,this.fixedRowsBottom=0};$traceurRuntime.createClass(m,{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.fixedRowsBottom=this.wot.getSetting("fixedRowsBottom"),this.columnHeaders=this.wot.getSetting("columnHeaders"),this.columnHeaderCount=this.columnHeaders.length;var a,b=this.wtTable.getRenderedColumnsCount(),c=this.wtTable.getRenderedRowsCount(),d=this.wot.getSetting("totalColumns"),e=this.wot.getSetting("totalRows"),f=!1;if((WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_BOTTOM)||WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_BOTTOM_LEFT_CORNER))&&(this.columnHeaders=[],this.columnHeaderCount=0),d>0&&(this.adjustAvailableNodes(),f=!0,this.renderColumnHeaders(),this.renderRows(e,c,b),this.wtTable.isWorkingOnClone()||(a=this.wot.wtViewport.getWorkspaceWidth(),this.wot.wtViewport.containerWidth=null),this.adjustColumnHeaderHeights(),this.adjustColumnWidths(b),this.markOversizedColumns()),f||this.adjustAvailableNodes(),this.removeRedundantRows(c),this.wtTable.isWorkingOnClone()){if(WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_BOTTOM)){var g=this.wot.cloneOverlay.instance;this.wot.cloneOverlay.markOversizedFixedBottomRows(),g.wtOverlays.adjustElementsSize()}}else{if(this.markOversizedRows(),this.wot.wtViewport.createVisibleCalculators(),this.wot.wtOverlays.refresh(!1),this.wot.wtOverlays.applyToDOM(),a!==this.wot.wtViewport.getWorkspaceWidth()){this.wot.wtViewport.containerWidth=null;for(var h=this.wtTable.getFirstRenderedColumn(),i=this.wtTable.getLastRenderedColumn(),j=h;i>j;j++){var k=this.wtTable.getStretchedColumnWidth(j),l=this.columnFilter.sourceToRendered(j);this.COLGROUP.childNodes[l+this.rowHeaderCount].style.width=k+"px"}}this.wot.getSetting("onDraw",!0)}},removeRedundantRows:function(a){for(;this.wtTable.tbodyChildrenLength>a;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength--},renderRows:function(a,b,c){for(var d,e,f=0,g=this.rowFilter.renderedToSource(f),h=this.wtTable.isWorkingOnClone();a>g&&g>=0;){if(f>1e3)throw new Error("Security brake: Too much TRs. Please define height for your table, which will enforce scrollbars.");if(void 0!==b&&f===b)break;if(e=this.getOrCreateTrForRow(f,e),this.renderRowHeaders(g,e),this.adjustColumns(e,c+this.rowHeaderCount),d=this.renderCells(g,e,c),(!h||WalkontableOverlay.isOverlayTypeOf(this.wot.cloneOverlay,WalkontableOverlay.CLONE_BOTTOM))&&this.resetOversizedRow(g),e.firstChild){var i=this.wot.wtTable.getRowHeight(g);i?(i--,e.firstChild.style.height=i+"px"):e.firstChild.style.height=""}f++,g=this.rowFilter.renderedToSource(f)}},resetOversizedRow:function(a){this.wot.getSetting("externalRowCalculator")||this.wot.wtViewport.oversizedRows&&this.wot.wtViewport.oversizedRows[a]&&(this.wot.wtViewport.oversizedRows[a]=void 0)},markOversizedRows:function(){if(!this.wot.getSetting("externalRowCalculator")){var a,b,c,d,e,f=this.instance.wtTable.TBODY.childNodes.length,g=f*this.instance.wtSettings.settings.defaultRowHeight,h=l(this.instance.wtTable.TBODY)-1;this.instance.getSetting("totalRows");if(g!==h||this.instance.getSetting("fixedRowsBottom"))for(;f;)f--,c=this.instance.wtTable.rowFilter.renderedToSource(f),a=this.instance.wtTable.getRowHeight(c),d=this.instance.wtTable.getTrForRow(c),e=d.querySelector("th"),b=e?l(e):l(d)-1,(!a&&this.instance.wtSettings.settings.defaultRowHeighta)&&(this.instance.wtViewport.oversizedRows[c]=++b)}},markOversizedColumns:function(){var a=this.wot.getOverlayName();if(this.columnHeaderCount&&!this.wot.wtViewport.isMarkedOversizedColumn[a]&&!this.wtTable.isWorkingOnClone()){for(var b=this.wtTable.getRenderedColumnsCount(),c=0;cd;d++)this.markIfOversizedColumnHeader(d);this.wot.wtViewport.isMarkedOversizedColumn[a]=!0}},adjustColumnHeaderHeights:function(){for(var a=this.wot.getSetting("columnHeaders"),b=this.wot.wtTable.THEAD.childNodes,c=this.wot.wtViewport.oversizedColumnHeaders,d=0,e=a.length;e>d;d++)if(c[d]){if(0===b[d].childNodes.length)return;b[d].childNodes[0].style.height=c[d]+"px"}},markIfOversizedColumnHeader:function(a){for(var b,c,d,e=this.wot.wtTable.columnFilter.renderedToSource(a),f=this.columnHeaderCount,g=this.wot.wtSettings.settings.defaultRowHeight;f;)f--,b=this.wot.wtTable.getColumnHeaderHeight(f),c=this.wot.wtTable.getColumnHeader(e,f),c&&(d=l(c),(!b&&d>g||d>b)&&(this.wot.wtViewport.oversizedColumnHeaders[f]=d))},renderCells:function(a,b,c){for(var d,f,g=0;c>g;g++)f=this.columnFilter.renderedToSource(g),d=0===g?b.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(f)]:d.nextSibling,"TH"==d.nodeName&&(d=e(d,b)),k(d,"hide")||(d.className=""),d.removeAttribute("style"),this.wot.wtSettings.settings.cellRenderer(a,f,d);return d},adjustColumnWidths:function(a){var b=0,c=this.wot.cloneSource?this.wot.cloneSource:this.wot,d=c.wtTable.holder;d.offsetHeighte;e++){var f=this.wtTable.getStretchedColumnWidth(this.columnFilter.renderedToSource(e));this.COLGROUP.childNodes[e+this.rowHeaderCount].style.width=f+"px"}},appendToTbody:function(a){this.TBODY.appendChild(a),this.wtTable.tbodyChildrenLength++},getOrCreateTrForRow:function(a,b){var c;return a>=this.wtTable.tbodyChildrenLength?(c=this.createRow(),this.appendToTbody(c)):c=0===a?this.TBODY.firstChild:b.nextSibling,c.className&&c.removeAttribute("class"),c},createRow:function(){for(var a=document.createElement("TR"),b=0;bd;d++){var e=this.columnFilter.renderedToSource(d);this.renderColumnHeader(b,e,c.childNodes[d+this.rowHeaderCount])}},adjustColGroups:function(){for(var a=this.wtTable.getRenderedColumnsCount();this.wtTable.colgroupChildrenLengtha+this.rowHeaderCount;)this.COLGROUP.removeChild(this.COLGROUP.lastChild),this.wtTable.colgroupChildrenLength--;this.rowHeaderCount&&h(this.COLGROUP.childNodes[0],"rowHeader")},adjustThead:function(){var a=this.wtTable.getRenderedColumnsCount(),b=this.THEAD.firstChild;if(this.columnHeaders.length){for(var c=0,d=this.columnHeaders.length;d>c;c++){for(b=this.THEAD.childNodes[c],b||(b=document.createElement("TR"),this.THEAD.appendChild(b)),this.theadChildrenLength=b.childNodes.length;this.theadChildrenLengtha+this.rowHeaderCount;)b.removeChild(b.lastChild),this.theadChildrenLength--}var e=this.THEAD.childNodes.length;if(e>this.columnHeaders.length)for(var f=this.columnHeaders.length;e>f;f++)this.THEAD.removeChild(this.THEAD.lastChild)}else b&&i(b)},getTrForColumnHeaders:function(a){return this.THEAD.childNodes[a]},renderColumnHeader:function(a,b,c){return c.className="",c.removeAttribute("style"),this.columnHeaders[a](b,c,a)},adjustColumns:function(a,b){for(var c=a.childNodes.length;b>c;){var d=document.createElement("TD");a.appendChild(d),c++}for(;c>b;)a.removeChild(a.lastChild),c--},removeRedundantColumns:function(a){for(;this.wtTable.tbodyChildrenLength>a;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength--}},{}),window.WalkontableTableRenderer=m},{"helpers/dom/element":44}],22:[function(a,b,c){"use strict";Object.defineProperties(c,{WalkontableViewport:{get:function(){return r}},__esModule:{value:!0}});var d,e,f,g,h=(d=a("helpers/dom/element"),d&&d.__esModule&&d||{"default":d}),i=h.getScrollbarWidth,j=h.getScrollTop,k=h.getStyle,l=h.offset,m=h.outerHeight,n=h.outerWidth,o=(e=a("eventManager"),e&&e.__esModule&&e||{"default":e}).EventManager,p=(f=a("calculator/viewportColumns"),f&&f.__esModule&&f||{"default":f}).WalkontableViewportColumnsCalculator,q=(g=a("calculator/viewportRows"),g&&g.__esModule&&g||{"default":g}).WalkontableViewportRowsCalculator,r=function(a){var b=this;this.wot=a,this.instance=this.wot,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.isMarkedOversizedColumn={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.eventManager=new o(this.wot),this.eventManager.addEventListener(window,"resize",function(){b.clientHeight=b.getWorkspaceHeight()})};$traceurRuntime.createClass(r,{getWorkspaceHeight:function(){var a,b=this.instance.wtOverlays.topOverlay.trimmingContainer,c=0;return b===window?c=document.documentElement.clientHeight:(a=m(b),c=a>0&&b.clientHeight>0?b.clientHeight:1/0),c},getWorkspaceWidth:function(){var a,b,c=this.instance.getSetting("totalColumns"),d=this.instance.wtOverlays.leftOverlay.trimmingContainer,e=this.instance.getSetting("stretchH"),f=document.documentElement.offsetWidth;return a=Handsontable.freezeOverlays?Math.min(f-this.getWorkspaceOffset().left,f):Math.min(this.getContainerFillWidth(),f-this.getWorkspaceOffset().left,f),d===window&&c>0&&this.sumColumnWidths(0,c-1)>a?document.documentElement.clientWidth:d!==window&&(b=k(this.instance.wtOverlays.leftOverlay.trimmingContainer,"overflow"),"scroll"==b||"hidden"==b||"auto"==b)?Math.max(a,d.clientWidth):"none"!==e&&e?a:Math.max(a,n(this.instance.wtTable.TABLE))},hasVerticalScroll:function(){return this.getWorkspaceActualHeight()>this.getWorkspaceHeight()},hasHorizontalScroll:function(){return this.getWorkspaceActualWidth()>this.getWorkspaceWidth()},sumColumnWidths:function(a,b){for(var c=0;b>a;)c+=this.wot.wtTable.getColumnWidth(a),a++;return c},getContainerFillWidth:function(){if(this.containerWidth)return this.containerWidth;var a,b,c=this.instance.wtTable.holder;return b=document.createElement("div"),b.style.width="100%",b.style.height="1px",c.appendChild(b),a=b.offsetWidth,this.containerWidth=a,c.removeChild(b),a},getWorkspaceOffset:function(){return l(this.wot.wtTable.TABLE)},getWorkspaceActualHeight:function(){return m(this.wot.wtTable.TABLE)},getWorkspaceActualWidth:function(){return n(this.wot.wtTable.TABLE)||n(this.wot.wtTable.TBODY)||n(this.wot.wtTable.THEAD)},getColumnHeaderHeight:function(){return isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=m(this.wot.wtTable.THEAD)),this.columnHeaderHeight},getViewportHeight:function(){var a,b=this.getWorkspaceHeight();return b===1/0?b:(a=this.getColumnHeaderHeight(),a>0&&(b-=a),b)},getRowHeaderWidth:function(){if(this.wot.cloneSource)return this.wot.cloneSource.wtViewport.getRowHeaderWidth();if(isNaN(this.rowHeaderWidth)){var a=this.instance.getSetting("rowHeaders");if(a.length){var b=this.instance.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(var c=0,d=a.length;d>c;c++)b?(this.rowHeaderWidth+=n(b),b=b.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0}return this.rowHeaderWidth},getViewportWidth:function(){var a,b=this.getWorkspaceWidth();return b===1/0?b:(a=this.getRowHeaderWidth(),a>0?b-a:b)},createRowsCalculator:function(){var a,b,c,d,e,f,g,h=void 0!==arguments[0]?arguments[0]:!1,k=this;return this.rowHeaderWidth=NaN,a=this.wot.wtSettings.settings.renderAllRows?1/0:this.getViewportHeight(),b=j(this.wot.wtOverlays.mainTableScrollableElement)-this.wot.wtOverlays.topOverlay.getTableParentOffset(),0>b&&(b=0),c=this.wot.getSetting("fixedRowsTop"),e=this.wot.getSetting("fixedRowsBottom"),g=this.wot.getSetting("totalRows"),c&&(f=this.wot.wtOverlays.topOverlay.sumCellSizes(0,c),b+=f,a-=f),e&&this.wot.wtOverlays.bottomOverlay.clone&&(f=this.wot.wtOverlays.bottomOverlay.sumCellSizes(g-e,g),a-=f),d=this.wot.wtTable.holder.clientHeight===this.wot.wtTable.holder.offsetHeight?0:i(),new q(a,b,this.wot.getSetting("totalRows"),function(a){return k.wot.wtTable.getRowHeight(a)},h?null:this.wot.wtSettings.settings.viewportRowCalculatorOverride,h,d)},createColumnsCalculator:function(){var a,b,c=void 0!==arguments[0]?arguments[0]:!1,d=this,e=this.getViewportWidth();if(this.columnHeaderHeight=NaN,a=this.wot.wtOverlays.leftOverlay.getScrollPosition()-this.wot.wtOverlays.leftOverlay.getTableParentOffset(),0>a&&(a=0),b=this.wot.getSetting("fixedColumnsLeft")){var f=this.wot.wtOverlays.leftOverlay.sumCellSizes(0,b);a+=f,e-=f}return this.wot.wtTable.holder.clientWidth!==this.wot.wtTable.holder.offsetWidth&&(e-=i()),new p(e,a,this.wot.getSetting("totalColumns"),function(a){return d.wot.wtTable.getColumnWidth(a)},c?null:this.wot.wtSettings.settings.viewportColumnCalculatorOverride,c,this.wot.getSetting("stretchH"))},createRenderCalculators:function(){var a=void 0!==arguments[0]?arguments[0]:!1;if(a){var b=this.createRowsCalculator(!0),c=this.createColumnsCalculator(!0);this.areAllProposedVisibleRowsAlreadyRendered(b)&&this.areAllProposedVisibleColumnsAlreadyRendered(c)||(a=!1)}return a||(this.rowsRenderCalculator=this.createRowsCalculator(),this.columnsRenderCalculator=this.createColumnsCalculator()),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,a},createVisibleCalculators:function(){this.rowsVisibleCalculator=this.createRowsCalculator(!0),this.columnsVisibleCalculator=this.createColumnsCalculator(!0)},areAllProposedVisibleRowsAlreadyRendered:function(a){return this.rowsVisibleCalculator?a.startRow0?!1:a.endRow>this.rowsRenderCalculator.endRow||a.endRow===this.rowsRenderCalculator.endRow&&a.endRow0?!1:a.endColumn>this.columnsRenderCalculator.endColumn||a.endColumn===this.columnsRenderCalculator.endColumn&&a.endColumn=0;g--)if(null===a[g])a.splice(g,1);else{var h=a[g][0],i=l.propToCol(a[g][1]),j=p.runHooks("modifyCol",i),k=p.getCellMeta(h,j);if("numeric"===k.type&&"string"==typeof a[g][3]&&a[g][3].length>0&&(/^-?[\d\s]*(\.|\,)?\d*$/.test(a[g][3])||k.format)){var m=a[g][3].length;"undefined"==typeof k.language?v.language("en"):a[g][3].indexOf(".")===m-3&&-1===a[g][3].indexOf(",")?v.language("en"):v.language(k.language),v.validate(a[g][3])&&(a[g][3]=v().unformat(a[g][3]))}p.getCellValidator(k)&&(f.addValidatorToQueue(),p.validateCell(a[g][3],k,function(b,c){return function(d){if("boolean"!=typeof d)throw new Error("Validation error: result is not boolean");d===!1&&c.allowInvalid===!1&&(a.splice(b,1),c.valid=!0,--b),f.removeValidatorFormQueue()}}(g,k),b))}f.checkIfQueueIsEmpty()}function e(a,b){var c=a.length-1;if(!(0>c)){for(;c>=0;c--)if(null!==a[c]){if(null!=a[c][2]||null!=a[c][3]){if(k.settings.allowInsertRow)for(;a[c][0]>p.countRows()-1;)l.createRow();if("array"===p.dataType&&k.settings.allowInsertColumn)for(;l.propToCol(a[c][1])>p.countCols()-1;)l.createCol();l.set(a[c][0],a[c][1],a[c][3])}}else a.splice(c,1);p.forceFullRender=!0,m.adjustRowsAndCols(),Handsontable.hooks.run(p,"beforeChangeRender",a,b),n.refreshBorders(null,!0),p.view.wt.wtOverlays.adjustElementsSize(),Handsontable.hooks.run(p,"afterChange",a,b||"edit")}}function f(a,b,c){ return"object"==typeof a?a:[[a,b,c]]}function g(a){if(a.hasOwnProperty("type")){var b,c={};if("object"==typeof a.type)b=a.type;else if("string"==typeof a.type&&(b=Handsontable.cellTypes[a.type],void 0===b))throw new Error('You declared cell type "'+a.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 d in b)b.hasOwnProperty(d)&&!a.hasOwnProperty(d)&&(c[d]=b[d]);return c}}function h(a){return Handsontable.hooks.run(p,"modifyRow",a)}function i(a){return Handsontable.hooks.run(p,"modifyCol",a)}function j(){throw new Error("This method cannot be called because this Handsontable instance has been destroyed")}var k,l,m,n,o,p=this,q=function(){},r=E(p);G(q.prototype,X.prototype),G(q.prototype,b),G(q.prototype,g(b)),this.rootElement=a,this.isHotTableEnv=z(this.rootElement),Handsontable.eventManager.isHotTableEnv=this.isHotTableEnv,this.container=document.createElement("DIV"),this.renderCall=!1,a.insertBefore(this.container,a.firstChild),this.guid="ht_"+N(),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid),k={cellSettings:[],columnSettings:[],columnsSettingConflicts:["data","width"],settings:new q,selRange:null,isPopulated:null,scrollable:null,firstRun:!0},m={alter:function(a,b,c,d,e){var f;switch(c=c||1,a){case"insert_row":if(p.getSettings().maxRows===p.countRows())return;f=l.createRow(b,c),f&&(n.isSelected()&&k.selRange.from.row>=b?(k.selRange.from.row=k.selRange.from.row+f,n.transformEnd(f,0)):n.refreshBorders());break;case"insert_col":if(f=l.createCol(b,c)){if(Array.isArray(p.getSettings().colHeaders)){var g=[b,0];g.length+=f,Array.prototype.splice.apply(p.getSettings().colHeaders,g)}n.isSelected()&&k.selRange.from.col>=b?(k.selRange.from.col=k.selRange.from.col+f,n.transformEnd(0,f)):n.refreshBorders()}break;case"remove_row":b=p.runHooks("modifyCol",b),l.removeRow(b,c),k.cellSettings.splice(b,c);var h=p.countRows(),i=p.getSettings().fixedRowsTop;i>=b+1&&(p.getSettings().fixedRowsTop-=Math.min(c,i-b));var j=p.getSettings().fixedRowsBottom;j&&b+1>=h-j&&(p.getSettings().fixedRowsBottom-=Math.min(c,j-b)),m.adjustRowsAndCols(),n.refreshBorders();break;case"remove_col":l.removeCol(b,c);for(var o=0,q=l.getAll().length;q>o;o++)o in k.cellSettings&&k.cellSettings[o].splice(b,c);var r=p.getSettings().fixedColumnsLeft;r>=b+1&&(p.getSettings().fixedColumnsLeft-=Math.min(c,r-b)),Array.isArray(p.getSettings().colHeaders)&&("undefined"==typeof b&&(b=-1),p.getSettings().colHeaders.splice(b,c)),m.adjustRowsAndCols(),n.refreshBorders();break;default:throw new Error('There is no such action "'+a+'"')}e||m.adjustRowsAndCols()},adjustRowsAndCols:function(){if(k.settings.minRows){var a=p.countRows();if(ab;b++)l.createRow(p.countRows(),1,!0)}if(k.settings.minSpareRows){var d=p.countEmptyRows(!0);if(df-1?(i=f-1,h=!0,m>i&&(m=i)):m>f-1&&(m=f-1,h=!0,i>m&&(i=m)),j>g-1?(j=g-1,h=!0,o>j&&(o=j)):o>g-1&&(o=g-1,h=!0,j>o&&(j=o)),h&&p.selectCell(i,j,m,o)}p.view&&p.view.wt.wtOverlays.adjustElementsSize()},populateFromArray:function(a,b,c,d,e,f,g){var h,i,j,l,m=[],n={};if(i=b.length,0===i)return!1;var o,q,r,s;({row:null===c?null:c.row,col:null===c?null:c.col});switch(e){case"shift_down":for(o=c?c.col-a.col+1:0,q=c?c.row-a.row+1:0,b=R(b),j=0,l=b.length,r=Math.max(l,o);r>j;j++)if(l>j){for(h=0,i=b[j].length;q-i>h;h++)b[j].push(b[j][h%i]);b[j].unshift(a.col+j,a.row,0),p.spliceCol.apply(p,b[j])}else b[j%l][0]=a.col+j,p.spliceCol.apply(p,b[j%l]);break;case"shift_right":for(o=c?c.col-a.col+1:0,q=c?c.row-a.row+1:0,h=0,i=b.length,s=Math.max(i,q);s>h;h++)if(i>h){for(j=0,l=b[h].length;o-l>j;j++)b[h].push(b[h][j%l]);b[h].unshift(a.row+h,a.col,0),p.spliceRow.apply(p,b[h])}else b[h%i][0]=a.row+h,p.spliceRow.apply(p,b[h%i]);break;case"overwrite":default:n.row=a.row,n.col=a.col;var t,u={row:c&&a?c.row-a.row+1:1,col:c&&a?c.col-a.col+1:1},v=0,w=0,x=!0,y=function(a){var c=void 0!==arguments[1]?arguments[1]:null,d=b[a%b.length];return null!==c?d[c%d.length]:d},z=b.length,A=c?c.row-a.row+1:0;for(i=c?A:Math.max(z,A),h=0;i>h&&!(c&&n.row>c.row&&A>z||!k.settings.allowInsertRow&&n.row>p.countRows()-1||n.row>=k.settings.maxRows);h++){var B=h-v,C=y(B).length,D=c?c.col-a.col+1:0;if(l=c?D:Math.max(C,D),n.col=a.col,t=p.getCellMeta(n.row,n.col),"paste"!==d&&"autofill"!==d||!t.skipRowOnPaste){for(w=0,j=0;l>j&&!(c&&n.col>c.col&&D>C||!k.settings.allowInsertColumn&&n.col>p.countCols()-1||n.col>=k.settings.maxCols);j++)if(t=p.getCellMeta(n.row,n.col),"paste"!==d&&"autofill"!==d||!t.skipColumnOnPaste)if(t.readOnly)n.col++;else{var E=j-w,F=y(B,E),G=p.getDataAtCell(n.row,n.col),K={row:B,col:E};if("autofill"===d){var L=p.runHooks("beforeAutofillInsidePopulate",K,f,b,g,{},u);L&&(F="undefined"==typeof L.value?F:L.value)}if(null!==F&&"object"==typeof F)if(null===G||"object"!=typeof G)x=!1;else{var M=H(G[0]||G),N=H(F[0]||F);I(M,N)?F=J(F):x=!1}else null!==G&&"object"==typeof G&&(x=!1);x&&m.push([n.row,n.col,F]),x=!0,n.col++}else w++,n.col++,l++;n.row++}else v++,n.row++,i++}p.setDataAtCell(m,null,null,d||"populateFromArray")}}},this.selection=n={inProgress:!1,selectedHeader:{cols:!1,rows:!1},setSelectedHeaders:function(a,b){p.selection.selectedHeader.rows=a,p.selection.selectedHeader.cols=b},begin:function(){p.selection.inProgress=!0},finish:function(){var a=p.getSelected();Handsontable.hooks.run(p,"afterSelectionEnd",a[0],a[1],a[2],a[3]),Handsontable.hooks.run(p,"afterSelectionEndByProp",a[0],p.colToProp(a[1]),a[2],p.colToProp(a[3])),p.selection.inProgress=!1},isInProgress:function(){return p.selection.inProgress},setRangeStart:function(a,b){Handsontable.hooks.run(p,"beforeSetRangeStart",a),k.selRange=new V(a,a,a),n.setRangeEnd(a,null,b)},setRangeEnd:function(a,b,c){if(null!==k.selRange){var d,e=!1,f=!0,g=p.view.wt.wtTable.getFirstVisibleRow(),h=p.view.wt.wtTable.getFirstVisibleColumn(),i={row:null,col:null};Handsontable.hooks.run(p,"beforeSetRangeEnd",a),p.selection.begin(),i.row=a.row<0?g:a.row,i.col=a.col<0?h:a.col,k.selRange.to=new U(i.row,i.col),k.settings.multiSelect||(k.selRange.from=a),p.view.wt.selections.current.clear(),d=p.getCellMeta(k.selRange.highlight.row,k.selRange.highlight.col).disableVisualSelection,"string"==typeof d&&(d=[d]),(d===!1||Array.isArray(d)&&-1===d.indexOf("current"))&&p.view.wt.selections.current.add(k.selRange.highlight),p.view.wt.selections.area.clear(),(d===!1||Array.isArray(d)&&-1===d.indexOf("area"))&&n.isMultiple()&&(p.view.wt.selections.area.add(k.selRange.from),p.view.wt.selections.area.add(k.selRange.to)),(k.settings.currentRowClassName||k.settings.currentColClassName)&&(p.view.wt.selections.highlight.clear(),p.view.wt.selections.highlight.add(k.selRange.from),p.view.wt.selections.highlight.add(k.selRange.to)),Handsontable.hooks.run(p,"afterSelection",k.selRange.from.row,k.selRange.from.col,k.selRange.to.row,k.selRange.to.col),Handsontable.hooks.run(p,"afterSelectionByProp",k.selRange.from.row,l.colToProp(k.selRange.from.col),k.selRange.to.row,l.colToProp(k.selRange.to.col)),(0===k.selRange.from.row&&k.selRange.to.row===p.countRows()-1&&p.countRows()>1||0===k.selRange.from.col&&k.selRange.to.col===p.countCols()-1&&p.countCols()>1)&&(e=!0),(a.row<0||a.col<0)&&(f=!1),b!==!1&&!e&&f&&(k.selRange.from&&!n.isMultiple()?p.view.scrollViewport(k.selRange.from):p.view.scrollViewport(a)),n.refreshBorders(null,c)}},refreshBorders:function(a,b){b||o.destroyEditor(a),p.view.render(),n.isSelected()&&!b&&o.prepareEditor()},isMultiple:function(){var a=!(k.selRange.to.col===k.selRange.from.col&&k.selRange.to.row===k.selRange.from.row),b=Handsontable.hooks.run(p,"afterIsMultipleSelection",a);return a?b:void 0},transformStart:function(a,b,c,d){var e,f,g,h,i=new U(a,b),j=0,l=0;p.runHooks("modifyTransformStart",i),e=p.countRows(),f=p.countCols(),h=p.getSettings().fixedRowsBottom,k.selRange.highlight.row+a>e-1?c&&k.settings.minSpareRows>0&&!(h&&k.selRange.highlight.row>=e-h-1)?(p.alter("insert_row",e),e=p.countRows()):k.settings.autoWrapCol&&(i.row=1-e,i.col=k.selRange.highlight.col+i.col==f-1?1-f:1):k.settings.autoWrapCol&&k.selRange.highlight.row+i.row<0&&k.selRange.highlight.col+i.col>=0&&(i.row=e-1,i.col=k.selRange.highlight.col+i.col==0?f-1:-1),k.selRange.highlight.col+i.col>f-1?c&&k.settings.minSpareCols>0?(p.alter("insert_col",f),f=p.countCols()):k.settings.autoWrapRow&&(i.row=k.selRange.highlight.row+i.row==e-1?1-e:1,i.col=1-f):k.settings.autoWrapRow&&k.selRange.highlight.col+i.col<0&&k.selRange.highlight.row+i.row>=0&&(i.row=k.selRange.highlight.row+i.row==0?e-1:-1,i.col=f-1),g=new U(k.selRange.highlight.row+i.row,k.selRange.highlight.col+i.col),g.row<0?(j=-1,g.row=0):g.row>0&&g.row>=e&&(j=1,g.row=e-1),g.col<0?(l=-1,g.col=0):g.col>0&&g.col>=f&&(l=1,g.col=f-1),p.runHooks("afterModifyTransformStart",g,j,l),n.setRangeStart(g,d)},transformEnd:function(a,b){var c,d,e,f=new U(a,b),g=0,h=0;p.runHooks("modifyTransformEnd",f),c=p.countRows(),d=p.countCols(),e=new U(k.selRange.to.row+f.row,k.selRange.to.col+f.col),e.row<0?(g=-1,e.row=0):e.row>0&&e.row>=c&&(g=1,e.row=c-1),e.col<0?(h=-1,e.col=0):e.col>0&&e.col>=d&&(h=1,e.col=d-1),p.runHooks("afterModifyTransformEnd",e,g,h),n.setRangeEnd(e,!0)},isSelected:function(){return null!==k.selRange},inInSelection:function(a){return n.isSelected()?k.selRange.includes(a):!1},deselect:function(){n.isSelected()&&(p.selection.inProgress=!1,k.selRange=null,p.view.wt.selections.current.clear(),p.view.wt.selections.area.clear(),(k.settings.currentRowClassName||k.settings.currentColClassName)&&p.view.wt.selections.highlight.clear(),o.destroyEditor(),n.refreshBorders(),Handsontable.hooks.run(p,"afterDeselect"))},selectAll:function(){k.settings.multiSelect&&(n.setRangeStart(new U(0,0)),n.setRangeEnd(new U(p.countRows()-1,p.countCols()-1),!1))},empty:function(){if(n.isSelected()){var a,b,c=k.selRange.getTopLeftCorner(),d=k.selRange.getBottomRightCorner(),e=[];for(a=c.row;a<=d.row;a++)for(b=c.col;b<=d.col;b++)p.getCellMeta(a,b).readOnly||e.push([a,b,""]);p.setDataAtCell(e)}}},this.init=function(){Handsontable.hooks.run(p,"beforeInit"),Handsontable.mobileBrowser&&x(p.rootElement,"mobile"),this.updateSettings(k.settings,!0),this.view=new P(this),o=new D(p,k,n,l),this.forceFullRender=!0,Handsontable.hooks.run(p,"init"),this.view.render(),"object"==typeof k.firstRun&&(Handsontable.hooks.run(p,"afterChange",k.firstRun[0],k.firstRun[1]),k.firstRun=!1),Handsontable.hooks.run(p,"afterInit")},this.validateCell=function(a,b,c,d){function e(a){var d=b.col,e=b.row,f=p.getCell(e,d,!0);f&&p.view.wt.wtSettings.settings.cellRenderer(e,d,f),c(a)}var f=p.getCellValidator(b);"[object RegExp]"===Object.prototype.toString.call(f)&&(f=function(a){return function(b,c){c(a.test(b))}}(f)),"function"==typeof f?(a=Handsontable.hooks.run(p,"beforeValidate",a,b.row,b.prop,d),p._registerTimeout(setTimeout(function(){f.call(b,a,function(c){c=Handsontable.hooks.run(p,"afterValidate",c,a,b.row,b.prop,d),b.valid=c,e(c),Handsontable.hooks.run(p,"postAfterValidate",c,a,b.row,b.prop,d)})},0))):(b.valid=!0,e(b.valid))},this.setDataAtCell=function(a,b,c,g){var h,i,j,k=f(a,b,c),m=[];for(h=0,i=k.length;i>h;h++){if("object"!=typeof k[h])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof k[h][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`");j=l.colToProp(k[h][1]),m.push([k[h][0],j,l.get(k[h][0],j),k[h][2]])}g||"object"!=typeof a||(g=b),d(m,g,function(){e(m,g)})},this.setDataAtRowProp=function(a,b,c,g){var h,i,j=f(a,b,c),k=[];for(h=0,i=j.length;i>h;h++)k.push([j[h][0],j[h][1],l.get(j[h][0],j[h][1]),j[h][2]]);g||"object"!=typeof a||(g=b),d(k,g,function(){e(k,g)})},this.listen=function(){Handsontable.activeGuid=p.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===p.guid},this.destroyEditor=function(a){n.refreshBorders(a)},this.populateFromArray=function(a,b,c,d,e,f,g,h,i){var j;if("object"!=typeof c||"object"!=typeof c[0])throw new Error("populateFromArray parameter `input` must be an array of arrays");return j="number"==typeof d?new U(d,e):null,m.populateFromArray(new U(a,b),c,j,f,g,h,i)},this.spliceCol=function(a,b,c){return l.spliceCol.apply(l,arguments)},this.spliceRow=function(a,b,c){return l.spliceRow.apply(l,arguments)},this.getSelected=function(){return n.isSelected()?[k.selRange.from.row,k.selRange.from.col,k.selRange.to.row,k.selRange.to.col]:void 0},this.getSelectedRange=function(){return n.isSelected()?k.selRange:void 0},this.render=function(){p.view&&(p.renderCall=!0,p.forceFullRender=!0,n.refreshBorders(null,!0))},this.loadData=function(a){function b(){k.cellSettings.length=0}if("object"==typeof a&&null!==a)a.push&&a.splice||(a=[a]);else{if(null!==a)throw new Error("loadData only accepts array of objects or array of arrays ("+typeof a+" given)");a=[];for(var c,d=0,e=k.settings.startRows;e>d;d++){c=[];for(var f=0,g=k.settings.startCols;g>f;f++)c.push(null);a.push(c)}}k.isPopulated=!1,q.prototype.data=a,Array.isArray(k.settings.dataSchema)||Array.isArray(a[0])?p.dataType="array":"function"==typeof k.settings.dataSchema?p.dataType="function":p.dataType="object",l=new C(p,k,q),b(),m.adjustRowsAndCols(),Handsontable.hooks.run(p,"afterLoadData"),k.firstRun?k.firstRun=[null,"loadData"]:(Handsontable.hooks.run(p,"afterChange",null,"loadData"),p.render()),k.isPopulated=!0},this.getData=function(a,b,c,d){return"undefined"==typeof a?l.getAll():l.getRange(new U(a,b),new U(c,d),l.DESTINATION_RENDERER)},this.getCopyableText=function(a,b,c,d){return l.getCopyableText(new U(a,b),new U(c,d))},this.getCopyableData=function(a,b){return l.getCopyable(a,l.colToProp(b))},this.getSchema=function(){return l.getSchema()},this.updateSettings=function(a,b){var c,d;if("undefined"!=typeof a.rows)throw new Error('"rows" setting is no longer supported. do you mean startRows, minRows or maxRows?');if("undefined"!=typeof a.cols)throw new Error('"cols" setting is no longer supported. do you mean startCols, minCols or maxCols?');for(c in a)"data"!==c&&(Handsontable.hooks.getRegistered().indexOf(c)>-1?("function"==typeof a[c]||Array.isArray(a[c]))&&p.addHook(c,a[c]):!b&&a.hasOwnProperty(c)&&(q.prototype[c]=a[c]));if(void 0===a.data&&void 0===k.settings.data?p.loadData(null):void 0!==a.data?p.loadData(a.data):void 0!==a.columns&&l.createMap(),d=p.countCols(),k.cellSettings.length=0,d>0){var e,f;for(c=0;d>c;c++)k.columnSettings[c]=B(q,k.columnsSettingConflicts),e=k.columnSettings[c].prototype,q.prototype.columns&&(f=q.prototype.columns[c],G(e,f),G(e,g(f)))}if("undefined"!=typeof a.cell)for(c in a.cell)if(a.cell.hasOwnProperty(c)){var h=a.cell[c];p.setCellMetaObject(h.row,h.col,h)}if(Handsontable.hooks.run(p,"afterCellMetaReset"),"undefined"!=typeof a.className&&(q.prototype.className&&A(p.rootElement,q.prototype.className),a.className&&x(p.rootElement,a.className)),"undefined"!=typeof a.height){var i=a.height;"function"==typeof i&&(i=i()),p.rootElement.style.height=i+"px"}if("undefined"!=typeof a.width){var j=a.width;"function"==typeof j&&(j=j()),p.rootElement.style.width=j+"px"}i&&(p.rootElement.style.overflow="hidden"),b||Handsontable.hooks.run(p,"afterUpdateSettings"),m.adjustRowsAndCols(),p.view&&!k.firstRun&&(p.forceFullRender=!0,n.refreshBorders(null,!0))},this.getValue=function(){var a=p.getSelected();if(q.prototype.getValue){if("function"==typeof q.prototype.getValue)return q.prototype.getValue.call(p);if(a)return p.getData()[a[0]][q.prototype.getValue]}else if(a)return p.getDataAtCell(a[0],a[1])},this.getSettings=function(){return k.settings},this.clear=function(){n.selectAll(),n.empty()},this.alter=function(a,b,c,d,e){m.alter(a,b,c,d,e)},this.getCell=function(a,b,c){return p.view.getCellAtCoords(new U(a,b),c)},this.getCoords=function(a){return this.view.wt.wtTable.getCoords.call(this.view.wt.wtTable,a)},this.colToProp=function(a){return l.colToProp(a)},this.propToCol=function(a){return l.propToCol(a)},this.getDataAtCell=function(a,b){return l.get(a,l.colToProp(b))},this.getDataAtRowProp=function(a,b){return l.get(a,b)},this.getDataAtCol=function(a){var b=[];return b.concat.apply(b,l.getRange(new U(0,a),new U(k.settings.data.length-1,a),l.DESTINATION_RENDERER))},this.getDataAtProp=function(a){var b,c=[];return b=l.getRange(new U(0,l.propToCol(a)),new U(k.settings.data.length-1,l.propToCol(a)),l.DESTINATION_RENDERER),c.concat.apply(c,b)},this.getSourceDataAtCol=function(a){for(var b=[],c=k.settings.data,d=0;d=0;){for(var e=p.countCols()-1;e>=0;)b.addValidatorToQueue(),p.validateCell(p.getDataAtCell(d,e),p.getCellMeta(d,e),function(a){if("boolean"!=typeof a)throw new Error("Validation error: result is not boolean");a===!1&&(b.valid=!1),b.removeValidatorFormQueue()},"validateCells"),e--;d--}b.checkIfQueueIsEmpty()},this.getRowHeader=function(a){if(void 0===a){for(var b=[],c=0,d=p.countRows();d>c;c++)b.push(p.getRowHeader(c));return b}return Array.isArray(k.settings.rowHeaders)&&void 0!==k.settings.rowHeaders[a]?k.settings.rowHeaders[a]:"function"==typeof k.settings.rowHeaders?k.settings.rowHeaders(a):k.settings.rowHeaders&&"string"!=typeof k.settings.rowHeaders&&"number"!=typeof k.settings.rowHeaders?a+1:k.settings.rowHeaders},this.hasRowHeaders=function(){return!!k.settings.rowHeaders},this.hasColHeaders=function(){if(void 0!==k.settings.colHeaders&&null!==k.settings.colHeaders)return!!k.settings.colHeaders;for(var a=0,b=p.countCols();b>a;a++)if(p.getColHeader(a))return!0;return!1},this.getColHeader=function(a){if(void 0===a){for(var b=[],c=0,d=p.countCols();d>c;c++)b.push(p.getColHeader(c));return b}var e=a;return a=Handsontable.hooks.run(p,"modifyCol",a),k.settings.columns&&k.settings.columns[a]&&k.settings.columns[a].title?k.settings.columns[a].title:Array.isArray(k.settings.colHeaders)&&void 0!==k.settings.colHeaders[a]?k.settings.colHeaders[a]:"function"==typeof k.settings.colHeaders?k.settings.colHeaders(a):k.settings.colHeaders&&"string"!=typeof k.settings.colHeaders&&"number"!=typeof k.settings.colHeaders?T(e):k.settings.colHeaders},this._getColWidthFromSettings=function(a){var b=p.getCellMeta(0,a),c=b.width;if((void 0===c||c===k.settings.width)&&(c=b.colWidths),void 0!==c&&null!==c){switch(typeof c){case"object":c=c[a];break;case"function":c=c(a)}"string"==typeof c&&(c=parseInt(c,10))}return c},this.getColWidth=function(a){var b=p._getColWidthFromSettings(a);return b=Handsontable.hooks.run(p,"modifyColWidth",b,a),void 0===b&&(b=W.DEFAULT_WIDTH),b},this._getRowHeightFromSettings=function(a){var b=k.settings.rowHeights;if(void 0!==b&&null!==b){switch(typeof b){case"object":b=b[a];break;case"function":b=b(a)}"string"==typeof b&&(b=parseInt(b,10))}return b},this.getRowHeight=function(a){var b=p._getRowHeightFromSettings(a);return b=Handsontable.hooks.run(p,"modifyRowHeight",b,a)},this.countRows=function(){return k.settings.data.length},this.countCols=function(){return"object"===p.dataType||"function"===p.dataType?k.settings.columns&&k.settings.columns.length?k.settings.columns.length:l.colToPropCache.length:"array"===p.dataType?k.settings.columns&&k.settings.columns.length?k.settings.columns.length:k.settings.data&&k.settings.data[0]&&k.settings.data[0].length?k.settings.data[0].length:0:void 0},this.getColspanOffset=function(a,b){var c=0;if(p.colspanArray){for(var d=0;a>d;d++)c+=p.colspanArray[b][d]-1||0;return c}for(var c=0,e=p.view.wt.wtTable.THEAD.childNodes.length-b-1,f=p.view.wt.wtTable.THEAD.querySelector("tr:nth-child("+parseInt(e+1,10)+")"),g=p.view.wt.wtSettings.settings.rowHeaders().length,d=g;g+a>d;d++)f.childNodes[d].hasAttribute("colspan")&&(c+=parseInt(f.childNodes[d].getAttribute("colspan"),10)-1);return c},this.getHeaderColspan=function(a,b){var c=p.view.wt.wtTable.THEAD.childNodes.length-b-1,d=p.view.wt.wtSettings.settings.rowHeaders().length,e=p.view.wt.wtTable.THEAD.querySelector("tr:nth-child("+parseInt(c+1,10)+")"),f=d+a-p.view.wt.wtViewport.columnsRenderCalculator.startColumn;return e.childNodes[f].hasAttribute("colspan")?parseInt(e.childNodes[f].getAttribute("colspan"),10):0},this.rowOffset=function(){return p.view.wt.wtTable.getFirstRenderedRow()},this.colOffset=function(){return p.view.wt.wtTable.getFirstRenderedColumn()},this.countRenderedRows=function(){return p.view.wt.drawn?p.view.wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return p.view.wt.drawn?p.view.wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return p.view.wt.drawn?p.view.wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return p.view.wt.drawn?p.view.wt.wtTable.getVisibleColumnsCount():-1},this.countEmptyRows=function(a){for(var b,c=p.countRows()-1,d=0;c>=0;){if(b=Handsontable.hooks.run(this,"modifyRow",c),p.isEmptyRow(b))d++;else if(a)break;c--}return d},this.countEmptyCols=function(a){if(p.countRows()<1)return 0;for(var b=p.countCols()-1,c=0;b>=0;){if(p.isEmptyCol(b))c++;else if(a)break;b--}return c},this.isEmptyRow=function(a){return k.settings.isEmptyRow.call(p,a)},this.isEmptyCol=function(a){return k.settings.isEmptyCol.call(p,a)},this.selectCell=function(a,b,c,d,e,f){var g;if(f="undefined"==typeof f||f===!0,"number"!=typeof a||0>a||a>=p.countRows())return!1;if("number"!=typeof b||0>b||b>=p.countCols())return!1;if("undefined"!=typeof c){if("number"!=typeof c||0>c||c>=p.countRows())return!1;if("number"!=typeof d||0>d||d>=p.countCols())return!1}return g=new U(a,b),k.selRange=new V(g,g,g),document.activeElement&&document.activeElement!==document.documentElement&&document.activeElement!==document.body&&document.activeElement.blur(),f&&p.listen(),"undefined"==typeof c?n.setRangeEnd(k.selRange.from,e):n.setRangeEnd(new U(c,d),e),p.selection.finish(),!0},this.selectCellByProp=function(a,b,c,d,e){return arguments[1]=l.propToCol(arguments[1]),"undefined"!=typeof arguments[3]&&(arguments[3]=l.propToCol(arguments[3])),p.selectCell.apply(p,arguments)},this.deselectCell=function(){n.deselect()},this.destroy=function(){p._clearTimeouts(),p.view&&p.view.destroy(),y(p.rootElement),r.destroy(),Handsontable.hooks.run(p,"afterDestroy"),Handsontable.hooks.destroy(p);for(var a in p)p.hasOwnProperty(a)&&("function"==typeof p[a]?p[a]=j:"guid"!==a&&(p[a]=null));k=null,l=null,m=null,n=null,o=null,p=null,q=null},this.getActiveEditor=function(){return o.getActiveEditor()},this.getPlugin=function(a){return L(this,a)},this.getInstance=function(){return p},this.addHook=function(a,b){Handsontable.hooks.add(a,b,p)},this.addHookOnce=function(a,b){Handsontable.hooks.once(a,b,p)},this.removeHook=function(a,b){Handsontable.hooks.remove(a,b,p)},this.runHooks=function(a,b,c,d,e,f,g){return Handsontable.hooks.run(p,a,b,c,d,e,f,g)},this.timeouts=[],this._registerTimeout=function(a){this.timeouts.push(a)},this._clearTimeouts=function(){for(var a=0,b=this.timeouts.length;b>a;a++)clearTimeout(this.timeouts[a])},this.version=Handsontable.version,Handsontable.hooks.run(p,"construct")};var X=function(){};X.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,fixedRowsBottom: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,className:void 0,tableClassName:void 0,stretchH:"none",isEmptyRow:function(a){var b,c,d,e;for(b=0,c=this.countCols();c>b;b++)if(d=this.getDataAtCell(a,b),""!==d&&null!==d&&"undefined"!=typeof d)return"object"==typeof d?(e=this.getCellMeta(a,b),I(this.getSchema()[e.prop],d)):!1;return!0},isEmptyCol:function(a){var b,c,d;for(b=0,c=this.countRows();c>b;b++)if(d=this.getDataAtCell(b,a),""!==d&&null!==d&&"undefined"!=typeof d)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,skipColumnOnPaste:!1,search:!1,type:"text",copyable:!0,editor:void 0,autoComplete:void 0,visibleRows:10,trimDropdown:!0,debug:!1,wordWrap:!0,noWordWrapClassName:"htNoWrap",contextMenu:void 0,contextMenuCopyPaste:void 0,copyPaste: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",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,label:void 0,format:void 0,language:void 0,selectOptions:void 0,autoColumnSize:void 0,autoRowSize:void 0,dateFormat:void 0,correctFormat:!1,defaultDate:void 0,strict:void 0,renderAllRows:void 0},Handsontable.DefaultSettings=X},{"3rdparty/walkontable/src/calculator/viewportColumns":3,"3rdparty/walkontable/src/cell/coords":5,"3rdparty/walkontable/src/cell/range":6,"3rdparty/walkontable/src/selection":18,dataMap:26,editorManager:27,eventManager:40,"helpers/array":41,"helpers/data":43,"helpers/dom/element":44,"helpers/number":48,"helpers/object":49,"helpers/setting":50,"helpers/string":51,numeral:"numeral",plugins:55,renderers:86,tableView:95}],26:[function(a,b,c){"use strict";function d(a,b,c){this.instance=a,this.priv=b,this.GridSettings=c,this.dataSource=this.instance.getSettings().data,this.dataSource[0]?this.duckSchema=this.recursiveDuckSchema(this.dataSource[0]):this.duckSchema={},this.createMap()}Object.defineProperties(c,{DataMap:{get:function(){return d}},__esModule:{value:!0}});var e,f,g,h,i,j,k=(e=a("SheetClip"),e&&e.__esModule&&e||{"default":e})["default"],l=(f=a("helpers/data"),f&&f.__esModule&&f||{"default":f}).cellMethodLookupFactory,m=(g=a("helpers/setting"),g&&g.__esModule&&g||{"default":g}).columnFactory,n=(h=a("helpers/object"),h&&h.__esModule&&h||{"default":h}),o=n.duckSchema,p=n.deepExtend,q=(i=a("helpers/array"),i&&i.__esModule&&i||{"default":i}),r=q.extendArray,s=q.to2dArray,t=(j=a("multiMap"),j&&j.__esModule&&j||{"default":j}).MultiMap;d.prototype.DESTINATION_RENDERER=1,d.prototype.DESTINATION_CLIPBOARD_GENERATOR=2,d.prototype.recursiveDuckSchema=function(a){return o(a)},d.prototype.recursiveDuckColumns=function(a,b,c){var d,e;if("undefined"==typeof b&&(b=0,c=""),"object"==typeof a&&!Array.isArray(a))for(e in a)a.hasOwnProperty(e)&&(null===a[e]?(d=c+e,this.colToPropCache.push(d),this.propToColCache.set(d,b),b++):b=this.recursiveDuckColumns(a[e],b,e+"."));return b},d.prototype.createMap=function(){var a,b,c=this.getSchema();if("undefined"==typeof c)throw new Error("trying to create `columns` definition but you didnt' provide `schema` nor `data`");this.colToPropCache=[],this.propToColCache=new t;var d=this.instance.getSettings().columns;if(d)for(a=0,b=d.length;b>a;a++)"undefined"!=typeof d[a].data&&(this.colToPropCache[a]=d[a].data,this.propToColCache.set(d[a].data,a));else this.recursiveDuckColumns(c)},d.prototype.colToProp=function(a){return a=Handsontable.hooks.run(this.instance,"modifyCol",a),this.colToPropCache&&"undefined"!=typeof this.colToPropCache[a]?this.colToPropCache[a]:a},d.prototype.propToCol=function(a){var b;return b="undefined"==typeof this.propToColCache.get(a)?a:this.propToColCache.get(a),b=Handsontable.hooks.run(this.instance,"modifyCol",b)},d.prototype.getSchema=function(){var a=this.instance.getSettings().dataSchema;return a?"function"==typeof a?a():a:this.duckSchema},d.prototype.createRow=function(a,b,c){var d,e,f=this.instance.countCols(),g=0;b||(b=1),("number"!=typeof a||a>=this.instance.countRows())&&(a=this.instance.countRows()),e=a;for(var h=this.instance.getSettings().maxRows;b>g&&this.instance.countRows()i;i++)d.push(null)}else"function"===this.instance.dataType?d=this.instance.getSettings().dataSchema(a):(d={},p(d,this.getSchema()));a===this.instance.countRows()?this.dataSource.push(d):this.dataSource.splice(a,0,d),g++,e++}return Handsontable.hooks.run(this.instance,"afterCreateRow",a,g,c),this.instance.forceFullRender=!0,g},d.prototype.createCol=function(a,b,c){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 d,e,f=this.instance.countRows(),g=this.dataSource,h=0;b||(b=1),e=a;for(var i=this.instance.getSettings().maxCols;b>h&&this.instance.countCols()=this.instance.countCols()){for(var j=0;f>j;j++)"undefined"==typeof g[j]&&(g[j]=[]), g[j].push(null);this.priv.columnSettings.push(d)}else{for(var j=0;f>j;j++)g[j].splice(e,0,null);this.priv.columnSettings.splice(e,0,d)}h++,e++}return Handsontable.hooks.run(this.instance,"afterCreateCol",a,h,c),this.instance.forceFullRender=!0,h},d.prototype.removeRow=function(a,b){b||(b=1),"number"!=typeof a&&(a=-b),a=(this.instance.countRows()+a)%this.instance.countRows();var c=this.physicalRowsToLogical(a,b),d=Handsontable.hooks.run(this.instance,"beforeRemoveRow",a,b);if(d!==!1){var e=this.dataSource,f=e.filter(function(a,b){return-1==c.indexOf(b)});e.length=0,Array.prototype.push.apply(e,f),Handsontable.hooks.run(this.instance,"afterRemoveRow",a,b),this.instance.forceFullRender=!0}},d.prototype.removeCol=function(a,b){if("object"===this.instance.dataType||this.instance.getSettings().columns)throw new Error("cannot remove column with object data source or columns option specified");b||(b=1),"number"!=typeof a&&(a=-b),a=(this.instance.countCols()+a)%this.instance.countCols();var c=Handsontable.hooks.run(this.instance,"beforeRemoveCol",a,b);if(c!==!1){for(var d=this.dataSource,e=0,f=this.instance.countRows();f>e;e++)d[e].splice(a,b);this.priv.columnSettings.splice(a,b),Handsontable.hooks.run(this.instance,"afterRemoveCol",a,b),this.instance.forceFullRender=!0}},d.prototype.spliceCol=function(a,b,c){var d=4<=arguments.length?[].slice.call(arguments,3):[],e=this.instance.getDataAtCol(a),f=e.slice(b,b+c),g=e.slice(b+c);r(d,g);for(var h=0;c>h;)d.push(null),h++;return s(d),this.instance.populateFromArray(b,a,d,null,null,"spliceCol"),f},d.prototype.spliceRow=function(a,b,c){var d=4<=arguments.length?[].slice.call(arguments,3):[],e=this.instance.getSourceDataAtRow(a),f=e.slice(b,b+c),g=e.slice(b+c);r(d,g);for(var h=0;c>h;)d.push(null),h++;return this.instance.populateFromArray(a,b,[d],null,null,"spliceRow"),f},d.prototype.get=function(a,b){if(a=Handsontable.hooks.run(this.instance,"modifyRow",a),"string"==typeof b&&b.indexOf(".")>-1){var c=b.split("."),d=this.dataSource[a];if(!d)return null;for(var e=0,f=c.length;f>e;e++)if(d=d[c[e]],"undefined"==typeof d)return null;return d}return"function"==typeof b?b(this.dataSource.slice(a,a+1)[0]):this.dataSource[a]?this.dataSource[a][b]:null};var u=l("copyable",!1);d.prototype.getCopyable=function(a,b){return u.call(this.instance,a,this.propToCol(b))?this.get(a,b):""},d.prototype.set=function(a,b,c,d){if(a=Handsontable.hooks.run(this.instance,"modifyRow",a,d||"datamapGet"),"string"==typeof b&&b.indexOf(".")>-1){for(var e=b.split("."),f=this.dataSource[a],g=0,h=e.length-1;h>g;g++)"undefined"==typeof f[e[g]]&&(f[e[g]]={}),f=f[e[g]];f[e[g]]=c}else"function"==typeof b?b(this.dataSource.slice(a,a+1)[0],c):this.dataSource[a][b]=c},d.prototype.physicalRowsToLogical=function(a,b){for(var c,d=this.instance.countRows(),e=(d+a)%d,f=[],g=b;d>e&&g;)c=Handsontable.hooks.run(this.instance,"modifyRow",e),f.push(c),g--,e++;return f},d.prototype.clear=function(){for(var a=0;a=d;d++){for(h=[],f=Math.min(a.col,b.col);g>=f;f++)h.push(j.call(this,d,this.colToProp(f)));i.push(h)}return i},d.prototype.getText=function(a,b){return k.stringify(this.getRange(a,b,this.DESTINATION_RENDERER))},d.prototype.getCopyableText=function(a,b){return k.stringify(this.getRange(a,b,this.DESTINATION_CLIPBOARD_GENERATOR))},Handsontable.DataMap=d},{SheetClip:"SheetClip","helpers/array":41,"helpers/data":43,"helpers/object":49,"helpers/setting":50,multiMap:53}],27:[function(a,b,c){"use strict";function d(a,b,c){function d(a){var d="function"==typeof b.settings.enterMoves?b.settings.enterMoves(event):b.settings.enterMoves;a?c.transformStart(-d.row,-d.col):c.transformStart(d.row,d.col,!0)}function e(a){a?c.transformEnd(-1,0):c.transformStart(-1,0)}function f(a){a?c.transformEnd(1,0):c.transformStart(1,0)}function g(a){a?c.transformEnd(0,1):c.transformStart(0,1)}function h(a){a?c.transformEnd(0,-1):c.transformStart(0,-1)}function i(i){var k,o;if(a.isListening()&&(Handsontable.hooks.run(a,"beforeKeyDown",i),!v&&!r(i)&&(b.lastKeyCode=i.keyCode,c.isSelected()))){if(k=(i.ctrlKey||i.metaKey)&&!i.altKey,t&&!t.isWaiting()&&!(m(i.keyCode)||n(i.keyCode)||k||u.isEditorOpened()))return void u.openEditor("",i);switch(o=i.shiftKey?c.setRangeEnd:c.setRangeStart,i.keyCode){case l.A:!u.isEditorOpened()&&k&&(c.selectAll(),i.preventDefault(),p(i));break;case l.ARROW_UP:u.isEditorOpened()&&!t.isWaiting()&&u.closeEditorAndSaveChanges(k),e(i.shiftKey),i.preventDefault(),p(i);break;case l.ARROW_DOWN:u.isEditorOpened()&&!t.isWaiting()&&u.closeEditorAndSaveChanges(k),f(i.shiftKey),i.preventDefault(),p(i);break;case l.ARROW_RIGHT:u.isEditorOpened()&&!t.isWaiting()&&u.closeEditorAndSaveChanges(k),g(i.shiftKey),i.preventDefault(),p(i);break;case l.ARROW_LEFT:u.isEditorOpened()&&!t.isWaiting()&&u.closeEditorAndSaveChanges(k),h(i.shiftKey),i.preventDefault(),p(i);break;case l.TAB:var s="function"==typeof b.settings.tabMoves?b.settings.tabMoves(i):b.settings.tabMoves;i.shiftKey?c.transformStart(-s.row,-s.col):c.transformStart(s.row,s.col,!0),i.preventDefault(),p(i);break;case l.BACKSPACE:case l.DELETE:c.empty(i),u.prepareEditor(),i.preventDefault();break;case l.F2:u.openEditor(null,i),t&&t.enableFullEditMode(),i.preventDefault();break;case l.ENTER:u.isEditorOpened()?(t&&t.state!==Handsontable.EditorState.WAITING&&u.closeEditorAndSaveChanges(k),d(i.shiftKey)):a.getSettings().enterBeginsEditing?(u.openEditor(null,i),t&&t.enableFullEditMode()):d(i.shiftKey),i.preventDefault(),q(i);break;case l.ESCAPE:u.isEditorOpened()&&u.closeEditorAndRestoreOriginalValue(k),i.preventDefault();break;case l.HOME:o(i.ctrlKey||i.metaKey?new j(0,b.selRange.from.col):new j(b.selRange.from.row,0)),i.preventDefault(),p(i);break;case l.END:o(i.ctrlKey||i.metaKey?new j(a.countRows()-1,b.selRange.from.col):new j(b.selRange.from.row,a.countCols()-1)),i.preventDefault(),p(i);break;case l.PAGE_UP:c.transformStart(-a.countVisibleRows(),0),i.preventDefault(),p(i);break;case l.PAGE_DOWN:c.transformStart(a.countVisibleRows(),0),i.preventDefault(),p(i)}}}function k(){function b(a,b,c){"TD"==c.nodeName&&(u.openEditor(),t&&t.enableFullEditMode())}a.addHook("afterDocumentKeyDown",i),o.addEventListener(document.documentElement,"keydown",function(b){a.runHooks("afterDocumentKeyDown",b)}),a.view.wt.update("onCellDblClick",b),a.addHook("afterDestroy",function(){v=!0})}var o,t,u=this,v=!1;o=s(a),this.destroyEditor=function(a){this.closeEditor(a)},this.getActiveEditor=function(){return t},this.prepareEditor=function(){var c,d,e,f,g,h,i;return t&&t.isWaiting()?void this.closeEditor(!1,!1,function(a){a&&u.prepareEditor()}):(c=b.selRange.highlight.row,d=b.selRange.highlight.col,e=a.colToProp(d),f=a.getCell(c,d),g=a.getDataAtCell(c,d),h=a.getCellMeta(c,d),i=a.getCellEditor(h),void(i?(t=Handsontable.editors.getEditor(i,a),t.prepare(c,d,e,f,g,h)):t=void 0))},this.isEditorOpened=function(){return t&&t.isOpened()},this.openEditor=function(a,b){t&&!t.cellProperties.readOnly?t.beginEditing(a,b):t&&t.cellProperties.readOnly&&b&&b.keyCode===l.ENTER&&d()},this.closeEditor=function(a,b,c){t?t.finishEditing(a,b,c):c&&c(!1)},this.closeEditorAndSaveChanges=function(a){return this.closeEditor(!1,a)},this.closeEditorAndRestoreOriginalValue=function(a){return this.closeEditor(!0,a)},k()}Object.defineProperties(c,{EditorManager:{get:function(){return d}},__esModule:{value:!0}});var e,f,g,h,i,j=(e=a("3rdparty/walkontable/src/cell/coords"),e&&e.__esModule&&e||{"default":e}).WalkontableCellCoords,k=(f=a("helpers/unicode"),f&&f.__esModule&&f||{"default":f}),l=k.KEY_CODES,m=k.isMetaKey,n=k.isCtrlKey,o=(g=a("helpers/dom/event"),g&&g.__esModule&&g||{"default":g}),p=o.stopPropagation,q=o.stopImmediatePropagation,r=o.isImmediatePropagationStopped,s=((h=a("editors"),h&&h.__esModule&&h||{"default":h}).getEditor,(i=a("eventManager"),i&&i.__esModule&&i||{"default":i}).eventManager);Handsontable.EditorManager=d},{"3rdparty/walkontable/src/cell/coords":5,editors:28,eventManager:40,"helpers/dom/event":45,"helpers/unicode":52}],28:[function(a,b,c){"use strict";function d(a){var b,c;c={},b=a,this.getConstructor=function(){return a},this.getInstance=function(a){return a.guid in c||(c[a.guid]=new b(a)),c[a.guid]}}function e(a,b){var c=new d(b);"string"==typeof a&&(k[a]=c,Handsontable.editors[j(a)+"Editor"]=b),l.set(b,c)}function f(a,b){var c;if("function"==typeof a)l.get(a)||e(null,a),c=l.get(a);else{if("string"!=typeof a)throw Error('Only strings and functions can be passed as "editor" parameter ');c=k[a]}if(!c)throw Error('No editor registered under name "'+a+'"');return c.getInstance(b)}function g(a){var b;if("string"!=typeof a)throw Error('Only strings and functions can be passed as "editor" parameter ');if(b=k[a],!b)throw Error('No editor registered under name "'+a+'"');return b.getConstructor()}function h(a){return k[a]?!0:!1}Object.defineProperties(c,{registerEditor:{get:function(){return e}},getEditor:{get:function(){return f}},hasEditor:{get:function(){return h}},getEditorConstructor:{get:function(){return g}},__esModule:{value:!0}});var i,j=(i=a("helpers/string"),i&&i.__esModule&&i||{"default":i}).toUpperCaseFirst,k={},l=new WeakMap;Handsontable.editors=Handsontable.editors||{},Handsontable.editors.registerEditor=e,Handsontable.editors.getEditor=f},{"helpers/string":51}],29:[function(a,b,c){"use strict";function d(a){this.instance=a,this.state=Handsontable.EditorState.VIRGIN,this._opened=!1,this._fullEditMode=!1,this._closeCallback=null,this.init()}Object.defineProperties(c,{BaseEditor:{get:function(){return d}},__esModule:{value:!0}});var e,f,g=(e=a("helpers/mixed"),e&&e.__esModule&&e||{"default":e}).stringify,h=(f=a("3rdparty/walkontable/src/cell/coords"),f&&f.__esModule&&f||{"default":f}).WalkontableCellCoords;Handsontable.editors=Handsontable.editors||{},Handsontable.editors.BaseEditor=d,Handsontable.EditorState={VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"},d.prototype._fireCallbacks=function(a){this._closeCallback&&(this._closeCallback(a),this._closeCallback=null)},d.prototype.init=function(){},d.prototype.getValue=function(){throw Error("Editor getValue() method unimplemented")},d.prototype.setValue=function(a){throw Error("Editor setValue() method unimplemented")},d.prototype.open=function(){throw Error("Editor open() method unimplemented")},d.prototype.close=function(){throw Error("Editor close() method unimplemented")},d.prototype.prepare=function(a,b,c,d,e,f){this.TD=d,this.row=a,this.col=b,this.prop=c,this.originalValue=e,this.cellProperties=f,this.state=Handsontable.EditorState.VIRGIN},d.prototype.extend=function(){function a(){c.apply(this,arguments)}function b(a,b){function c(){}return c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a,a}var c=this.constructor;return b(a,c)},d.prototype.saveValue=function(a,b){var c,d;b?(c=this.instance.getSelected(),c[0]>c[2]&&(d=c[0],c[0]=c[2],c[2]=d),c[1]>c[3]&&(d=c[1],c[1]=c[3],c[3]=d),this.instance.populateFromArray(c[0],c[1],a,c[2],c[3],"edit")):this.instance.populateFromArray(this.row,this.col,a,null,null,"edit")},d.prototype.beginEditing=function(a,b){this.state==Handsontable.EditorState.VIRGIN&&(this.instance.view.scrollViewport(new h(this.row,this.col)),this.instance.view.render(),this.state=Handsontable.EditorState.EDITING,a="string"==typeof a?a:this.originalValue,this.setValue(g(a)),this.open(b),this._opened=!0,this.focus(),this.instance.view.render())},d.prototype.finishEditing=function(a,b,c){var d,e=this;if(c){var f=this._closeCallback;this._closeCallback=function(a){f&&f(a),c(a)}}if(!this.isWaiting()){if(this.state==Handsontable.EditorState.VIRGIN)return void this.instance._registerTimeout(setTimeout(function(){e._fireCallbacks(!0)},0));if(this.state==Handsontable.EditorState.EDITING){if(a)return this.cancelChanges(),void this.instance.view.render();d=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(d,b),this.instance.getCellValidator(this.cellProperties)?this.instance.addHookOnce("postAfterValidate",function(a){e.state=Handsontable.EditorState.FINISHED,e.discardEditor(a)}):(this.state=Handsontable.EditorState.FINISHED,this.discardEditor(!0))}}},d.prototype.cancelChanges=function(){this.state=Handsontable.EditorState.FINISHED,this.discardEditor()},d.prototype.discardEditor=function(a){this.state===Handsontable.EditorState.FINISHED&&(a===!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._fullEditMode=!1,this.state=Handsontable.EditorState.VIRGIN,this._fireCallbacks(!0)))},d.prototype.enableFullEditMode=function(){this._fullEditMode=!0},d.prototype.isInFullEditMode=function(){return this._fullEditMode},d.prototype.isOpened=function(){return this._opened},d.prototype.isWaiting=function(){return this.state===Handsontable.EditorState.WAITING},d.prototype.checkEditorSection=function(){var a=this.instance.countRows(),b="";return this.row=a-this.instance.getSettings().fixedRowsBottom?b=this.col"+h+"")))},autoColumnSize:!0,modifyColWidth:function(a,b){var d=this.getPlugin("autoColumnSize").widths;return d[b]&&(a=d[b]),c?a:a+15}}),this.htEditor.view.wt.wtTable.holder.parentNode.style["padding-right"]=s()+2+"px",A&&(A=!1),b.instance._registerTimeout(setTimeout(function(){b.queryChoices(b.TEXTAREA.value)},0))},z.prototype.close=function(){y.prototype.close.apply(this,arguments)},z.prototype.queryChoices=function(a){if(this.query=a,"function"==typeof this.cellProperties.source){var b=this;this.cellProperties.source(a,function(a){b.updateChoicesList(a)})}else if(Array.isArray(this.cellProperties.source)){var c;if(a&&this.cellProperties.filter!==!1){var d=this.cellProperties.filteringCaseSensitive===!0,e=a.toLowerCase();c=this.cellProperties.source.filter(function(b){return d?-1!=b.indexOf(a):-1!=b.toLowerCase().indexOf(e)})}else c=this.cellProperties.source;this.updateChoicesList(c)}else this.updateChoicesList([])},z.prototype.updateChoicesList=function(a){var b,c=r(this.TEXTAREA),d=t(this.TEXTAREA),e=z.sortByRelevance(this.getValue(),a,this.cellProperties.filteringCaseSensitive);if(0==this.cellProperties.filter)b=e[0];else{for(var f=[],g=0,h=e.length;h>g;g++)f.push(a[e[g]]);b=0,a=f}this.choices=a,this.htEditor.loadData(o([a])),this.updateDropdownHeight(),this.cellProperties.strict===!0&&this.highlightBestMatchingChoice(b),this.instance.listen(),this.TEXTAREA.focus(),v(this.TEXTAREA,c,c==d?void 0:d)},z.prototype.updateDropdownHeight=function(){var a=this.htEditor.getColWidth(0)+s()+2,b=void 0===this.cellProperties.trimDropdown?!0:this.cellProperties.trimDropdown;this.htEditor.updateSettings({height:this.getDropdownHeight(),width:b?void 0:a}),this.htEditor.view.wt.wtTable.alignOverlaysWithTrimmingContainer()},z.prototype.finishEditing=function(a){a||this.instance.removeHook("beforeKeyDown",d),y.prototype.finishEditing.apply(this,arguments)},z.prototype.highlightBestMatchingChoice=function(a){"number"==typeof a?this.htEditor.selectCell(a,0):this.htEditor.deselectCell()},z.sortByRelevance=function(a,b,c){var d,e,f,g,h,i=[],j=a.length,k=[];if(0===j){for(g=0,h=b.length;h>g;g++)k.push(g);return k}for(g=0,h=b.length;h>g;g++)d=n(b[g]),e=c?d.indexOf(a):d.toLowerCase().indexOf(a.toLowerCase()),-1!=e&&(f=d.length-e-j,i.push({baseIndex:g,index:e,charsLeft:f,value:d}));for(i.sort(function(a,b){return-1===b.index?-1:-1===a.index?1:a.indexb.charsLeft?1:0:void 0}),g=0,h=i.length;h>g;g++)k.push(i[g].baseIndex);return k},z.prototype.getDropdownHeight=function(){var a=this.htEditor.getInstance().getRowHeight(0)||23,b=this.cellProperties.visibleRows;return this.choices.length>=b?b*a:this.choices.length*a+8},z.prototype.allowKeyEventPropagation=function(a){var b={row:this.htEditor.getSelectedRange()?this.htEditor.getSelectedRange().from.row:-1},c=!1;return a===l.ARROW_DOWN&&b.row-1&&(c=!0),c},x("autocomplete",z)},{editors:28,handsontableEditor:34,"helpers/array":41,"helpers/dom/element":44,"helpers/mixed":47,"helpers/unicode":52}],31:[function(a,b,c){"use strict";Object.defineProperties(c,{CheckboxEditor:{get:function(){return j}},__esModule:{value:!0}});var d,e,f,g=(d=a("editors"),d&&d.__esModule&&d||{"default":d}).registerEditor,h=(e=a("_baseEditor"),e&&e.__esModule&&e||{"default":e}).BaseEditor,i=(f=a("helpers/dom/element"),f&&f.__esModule&&f||{"default":f}).hasClass,j=function(){$traceurRuntime.superConstructor(k).apply(this,arguments)},k=j;$traceurRuntime.createClass(j,{beginEditing:function(){var a=this.TD.querySelector('input[type="checkbox"]');i(a,"htBadValue")||a.click()},finishEditing:function(){},init:function(){},open:function(){},close:function(){},getValue:function(){},setValue:function(){},focus:function(){}},{},h),g("checkbox",j)},{_baseEditor:29,editors:28,"helpers/dom/element":44}],32:[function(a,b,c){"use strict";Object.defineProperties(c,{DateEditor:{get:function(){return y}},__esModule:{value:!0}});var d,e,f,g,h,i,j,k,l,m=(d=a("helpers/dom/element"),d&&d.__esModule&&d||{"default":d}),n=m.addClass,o=m.outerHeight,p=(e=a("helpers/object"),e&&e.__esModule&&e||{"default":e}).deepExtend,q=(f=a("eventManager"),f&&f.__esModule&&f||{"default":f}).EventManager,r=(g=a("editors"),g&&g.__esModule&&g||{"default":g}),s=(r.getEditor,r.registerEditor),t=(h=a("helpers/unicode"),h&&h.__esModule&&h||{"default":h}).isMetaKey,u=(i=a("helpers/dom/event"),i&&i.__esModule&&i||{"default":i}).stopPropagation,v=(j=a("textEditor"),j&&j.__esModule&&j||{"default":j}).TextEditor,w=(k=a("moment"),k&&k.__esModule&&k||{"default":k})["default"],x=(l=a("pikaday"),l&&l.__esModule&&l||{"default":l})["default"];Handsontable.editors=Handsontable.editors||{},Handsontable.editors.DateEditor=y;var y=function(a){this.$datePicker=null,this.datePicker=null,this.datePickerStyle=null,this.defaultDateFormat="DD/MM/YYYY",this.isCellEdited=!1,this.parentDestroyed=!1,$traceurRuntime.superConstructor(z).call(this,a)},z=y;$traceurRuntime.createClass(y,{init:function(){var a=this;if("function"!=typeof w)throw new Error("You need to include moment.js to your project.");if("function"!=typeof x)throw new Error("You need to include Pikaday to your project.");$traceurRuntime.superGet(this,z.prototype,"init").call(this),this.instance.addHook("afterDestroy",function(){a.parentDestroyed=!0,a.destroyElements()})},createElements:function(){$traceurRuntime.superGet(this,z.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,n(this.datePicker,"htDatepickerHolder"),document.body.appendChild(this.datePicker),this.$datePicker=new x(this.getDatePickerConfig());var a=new q(this);a.addEventListener(this.datePicker,"mousedown",function(a){return u(a)}),this.hideDatepicker()},destroyElements:function(){this.$datePicker.destroy()},prepare:function(a,b,c,d,e,f){this._opened=!1,$traceurRuntime.superGet(this,z.prototype,"prepare").call(this,a,b,c,d,e,f)},open:function(){var a=void 0!==arguments[0]?arguments[0]:null;$traceurRuntime.superGet(this,z.prototype,"open").call(this),this.showDatepicker(a)},close:function(){var a=this;this._opened=!1,this.instance._registerTimeout(setTimeout(function(){a.instance.selection.refreshBorders()},0)),$traceurRuntime.superGet(this,z.prototype,"close").call(this)},finishEditing:function(){var a=void 0!==arguments[0]?arguments[0]:!1,b=void 0!==arguments[1]?arguments[1]:!1;if(a){var c=this.originalValue;void 0!==c&&this.setValue(c)}this.hideDatepicker(),$traceurRuntime.superGet(this,z.prototype,"finishEditing").call(this,a,b)},showDatepicker:function(a){this.$datePicker.config(this.getDatePickerConfig());var b,c=this.TD.getBoundingClientRect(),d=this.cellProperties.dateFormat||this.defaultDateFormat,e=this.$datePicker.config(),f=this.instance.view.isMouseDown(),g=a?t(a.keyCode):!1;this.datePickerStyle.top=window.pageYOffset+c.top+o(this.TD)+"px",this.datePickerStyle.left=window.pageXOffset+c.left+"px",this.$datePicker._onInputFocus=function(){},e.format=d,this.originalValue?(b=this.originalValue,w(b,d,!0).isValid()&&this.$datePicker.setMoment(w(b,d),!0),g||f||this.setValue("")):this.cellProperties.defaultDate?(b=this.cellProperties.defaultDate,e.defaultDate=b,w(b,d,!0).isValid()&&this.$datePicker.setMoment(w(b,d),!0),g||f||this.setValue("")):this.$datePicker.gotoToday(),this.datePickerStyle.display="block",this.$datePicker.show()},hideDatepicker:function(){this.datePickerStyle.display="none",this.$datePicker.hide()},getDatePickerConfig:function(){var a=this,b=this.TEXTAREA,c={};this.cellProperties&&this.cellProperties.datePickerConfig&&p(c,this.cellProperties.datePickerConfig);var d=c.onSelect,e=c.onClose;return c.field=b,c.trigger=b,c.container=this.datePicker,c.bound=!1,c.format=c.format||this.defaultDateFormat,c.reposition=c.reposition||!1,c.onSelect=function(b){isNaN(b.getTime())||(b=w(b).format(a.cellProperties.dateFormat||a.defaultDateFormat)),a.setValue(b),a.hideDatepicker(),d&&d()},c.onClose=function(){a.parentDestroyed||a.finishEditing(!1),e&&e()},c}},{},v),s("date",y)},{editors:28,eventManager:40,"helpers/dom/element":44,"helpers/dom/event":45,"helpers/object":49,"helpers/unicode":52,moment:"moment",pikaday:"pikaday",textEditor:39}],33:[function(a,b,c){"use strict";Object.defineProperties(c,{DropdownEditor:{get:function(){return i}},__esModule:{value:!0}});var d,e,f=(d=a("editors"),d&&d.__esModule&&d||{"default":d}),g=(f.getEditor,f.registerEditor),h=(e=a("autocompleteEditor"),e&&e.__esModule&&e||{"default":e}).AutocompleteEditor,i=function(){$traceurRuntime.superConstructor(j).apply(this,arguments)},j=i;$traceurRuntime.createClass(i,{prepare:function(a,b,c,d,e,f){$traceurRuntime.superGet(this,j.prototype,"prepare").call(this,a,b,c,d,e,f),this.cellProperties.filter=!1,this.cellProperties.strict=!0}},{},h),Handsontable.hooks.add("beforeValidate",function(a,b,c,d){var e=this.getCellMeta(b,c);e.editor===Handsontable.editors.DropdownEditor&&void 0===e.strict&&(e.filter=!1,e.strict=!0)}),g("dropdown",i)},{autocompleteEditor:30,editors:28}],34:[function(a,b,c){"use strict";Object.defineProperties(c,{HandsontableEditor:{get:function(){return s}},__esModule:{value:!0}});var d,e,f,g,h,i,j=(d=a("helpers/unicode"),d&&d.__esModule&&d||{"default":d}).KEY_CODES,k=(e=a("helpers/object"),e&&e.__esModule&&e||{"default":e}).extend,l=(f=a("helpers/dom/element"),f&&f.__esModule&&f||{"default":f}).setCaretPosition,m=(g=a("helpers/dom/event"),g&&g.__esModule&&g||{"default":g}),n=m.stopImmediatePropagation,o=m.isImmediatePropagationStopped,p=(h=a("editors"),h&&h.__esModule&&h||{"default":h}),q=(p.getEditor,p.registerEditor),r=(i=a("textEditor"),i&&i.__esModule&&i||{"default":i}).TextEditor,s=r.prototype.extend();s.prototype.createElements=function(){r.prototype.createElements.apply(this,arguments);var a=document.createElement("DIV");a.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(a),this.htContainer=a,this.assignHooks()},s.prototype.prepare=function(a,b,c,d,e,f){r.prototype.prepare.apply(this,arguments);var g=this,h={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,afterOnCellMouseDown:function(){var a=this.getValue();void 0!==a&&g.setValue(a),g.instance.destroyEditor()}};this.cellProperties.handsontable&&k(h,f.handsontable),this.htOptions=h};var t=function(a){if(!o(a)){var b,c=this.getActiveEditor(),d=c.htEditor.getInstance();if(a.keyCode==j.ARROW_DOWN)if(d.getSelected()){var e=d.getSelected()[0],f=d.countRows()-1;b=Math.min(f,e+1)}else b=0;else if(a.keyCode==j.ARROW_UP&&d.getSelected()){var e=d.getSelected()[0];b=e-1}void 0!==b&&(0>b?d.deselectCell():d.selectCell(b,0),d.getData().length&&(a.preventDefault(),n(a),c.instance.listen(),c.TEXTAREA.focus()))}};s.prototype.open=function(){this.instance.addHook("beforeKeyDown",t),r.prototype.open.apply(this,arguments),this.htEditor&&this.htEditor.destroy(),this.htEditor=new Handsontable(this.htContainer,this.htOptions),this.cellProperties.strict?(this.htEditor.selectCell(0,0),this.TEXTAREA.style.visibility="hidden"):(this.htEditor.deselectCell(),this.TEXTAREA.style.visibility="visible"),l(this.TEXTAREA,0,this.TEXTAREA.value.length)},s.prototype.close=function(){this.instance.removeHook("beforeKeyDown",t),this.instance.listen(),r.prototype.close.apply(this,arguments)},s.prototype.focus=function(){this.instance.listen(),r.prototype.focus.apply(this,arguments)},s.prototype.beginEditing=function(a){var b=this.instance.getSettings().onBeginEditing;b&&b()===!1||r.prototype.beginEditing.apply(this,arguments)},s.prototype.finishEditing=function(a,b){if(this.htEditor&&this.htEditor.isListening()&&this.instance.listen(),this.htEditor&&this.htEditor.getSelected()){var c=this.htEditor.getInstance().getValue();void 0!==c&&this.setValue(c)}return r.prototype.finishEditing.apply(this,arguments)},s.prototype.assignHooks=function(){var a=this;this.instance.addHook("afterDestroy",function(){a.htEditor&&a.htEditor.destroy()})},q("handsontable",s)},{editors:28,"helpers/dom/element":44,"helpers/dom/event":45,"helpers/object":49,"helpers/unicode":52,textEditor:39}],35:[function(a,b,c){"use strict";Object.defineProperties(c,{MobileTextEditor:{get:function(){return C}},__esModule:{value:!0}});var d,e,f,g,h,i,j=(d=a("helpers/unicode"),d&&d.__esModule&&d||{"default":d}).KEY_CODES,k=(e=a("helpers/dom/event"),e&&e.__esModule&&e||{"default":e}),l=k.stopImmediatePropagation,m=k.isImmediatePropagationStopped,n=(f=a("helpers/dom/element"),f&&f.__esModule&&f||{"default":f}),o=n.addClass,p=n.getScrollLeft,q=n.getScrollTop,r=n.hasClass,s=n.isChildOf,t=n.offset,u=n.outerHeight,v=n.outerWidth,w=n.removeClass,x=n.setCaretPosition,y=(g=a("editors"),g&&g.__esModule&&g||{"default":g}),z=(y.getEditor,y.registerEditor),A=(h=a("_baseEditor"),h&&h.__esModule&&h||{"default":h}).BaseEditor,B=(i=a("eventManager"),i&&i.__esModule&&i||{"default":i}).eventManager,C=A.prototype.extend(),D={},E=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 a in this.controls)this.controls.hasOwnProperty(a)&&this.positionControls.appendChild(this.controls[a])};C.prototype.valueChanged=function(){return this.initValue!=this.getValue()},C.prototype.init=function(){var a=this;this.eventManager=B(this.instance),this.createElements(),this.bindEvents(),this.instance.addHook("afterDestroy",function(){a.destroy()})},C.prototype.getValue=function(){return this.TEXTAREA.value},C.prototype.setValue=function(a){this.initValue=a,this.TEXTAREA.value=a},C.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"),o(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),E.call(this),document.body.appendChild(this.editorContainer)},C.prototype.onBeforeKeyDown=function(a){var b=this,c=b.getActiveEditor();if(a.target===c.TEXTAREA&&!m(a))switch(a.keyCode){case j.ENTER:c.close(),a.preventDefault();break;case j.BACKSPACE:l(a)}},C.prototype.open=function(){this.instance.addHook("beforeKeyDown",this.onBeforeKeyDown),o(this.editorContainer,"active"),w(this.cellPointer,"hidden"),this.updateEditorPosition()},C.prototype.focus=function(){this.TEXTAREA.focus(),x(this.TEXTAREA,this.TEXTAREA.value.length)},C.prototype.close=function(){this.TEXTAREA.blur(),this.instance.removeHook("beforeKeyDown",this.onBeforeKeyDown),w(this.editorContainer,"active")},C.prototype.scrollToView=function(){var a=this.instance.getSelectedRange().highlight;this.instance.view.scrollViewport(a)},C.prototype.hideCellPointer=function(){r(this.cellPointer,"hidden")||o(this.cellPointer,"hidden")},C.prototype.updateEditorPosition=function(a,b){if(a&&b)a=parseInt(a,10),b=parseInt(b,10), this.editorContainer.style.top=b+"px",this.editorContainer.style.left=a+"px";else{var c=this.instance.getSelected(),d=this.instance.getCell(c[0],c[1]);if(D.cellPointer||(D.cellPointer={height:u(this.cellPointer),width:v(this.cellPointer)}),D.editorContainer||(D.editorContainer={width:v(this.editorContainer)}),void 0!==d){var e=this.instance.view.wt.wtOverlays.leftOverlay.trimmingContainer==window?0:p(this.instance.view.wt.wtOverlays.leftOverlay.holder),f=this.instance.view.wt.wtOverlays.topOverlay.trimmingContainer==window?0:q(this.instance.view.wt.wtOverlays.topOverlay.holder),g=t(d),h=v(d),i={x:e,y:f};this.editorContainer.style.top=parseInt(g.top+u(d)-i.y+D.cellPointer.height,10)+"px",this.editorContainer.style.left=parseInt(window.innerWidth/2-D.editorContainer.width/2,10)+"px",g.left+h/2>parseInt(this.editorContainer.style.left,10)+D.editorContainer.width?this.editorContainer.style.left=window.innerWidth-D.editorContainer.width+"px":g.left+h/2c;c++)b[a[c]]=a[c];else"object"==typeof a&&(b=a);return b},y.prototype.getValue=function(){return this.select.value},y.prototype.setValue=function(a){this.select.value=a};var z=function(a){var b=this,c=b.getActiveEditor();switch(a.keyCode){case u.ARROW_UP:var d=c.select.selectedIndex-1;d>=0&&(c.select[d].selected=!0),t(a),a.preventDefault();break;case u.ARROW_DOWN:var e=c.select.selectedIndex+1;e<=c.select.length-1&&(c.select[e].selected=!0),t(a),a.preventDefault()}};y.prototype.open=function(){this._opened=!0,this.refreshDimensions(),this.select.style.display="",this.instance.addHook("beforeKeyDown",z)},y.prototype.close=function(){this._opened=!1,this.select.style.display="none",this.instance.removeHook("beforeKeyDown",z)},y.prototype.focus=function(){this.select.focus()},y.prototype.refreshDimensions=function(){if(this.state===Handsontable.EditorState.EDITING){if(this.TD=this.getEditedCell(),!this.TD)return void this.close();var a,b=r(this.TD)+1,c=q(this.TD)+1,d=p(this.TD),e=p(this.instance.rootElement),f=o(this.TD),g=d.top-e.top-1-(f.scrollTop||0),h=d.left-e.left-1-(f.scrollLeft||0),i=this.checkEditorSection(),j=this.instance.getSettings();j.rowHeaders?1:0,j.colHeaders?1:0;switch(i){case"top":a=n(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);break;case"left":a=n(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":a=n(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":a=n(this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":a=n(this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.holder.parentNode)}0===this.instance.getSelected()[0]&&(g+=1),0===this.instance.getSelected()[1]&&(h+=1);var k=this.select.style;a&&-1!=a?k[a[0]]=a[1]:s(this.select);var l=m(this.TD);parseInt(l.borderTopWidth,10)>0&&(c-=1),parseInt(l.borderLeftWidth,10)>0&&(b-=1),k.height=c+"px",k.minWidth=b+"px",k.top=g+"px",k.left=h+"px",k.margin="0px"}},y.prototype.getEditedCell=function(){var a,b=this.checkEditorSection();switch(b){case"top":a=this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=101;break;case"corner":a=this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=103;break;case"left":a=this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=102;break;default:a=this.instance.getCell(this.row,this.col),this.select.style.zIndex=""}return-1!=a&&-2!=a?a:void 0},w("select",y)},{_baseEditor:29,editors:28,"helpers/dom/element":44,"helpers/dom/event":45,"helpers/unicode":52}],39:[function(a,b,c){"use strict";Object.defineProperties(c,{TextEditor:{get:function(){return E}},__esModule:{value:!0}});var d,e,f,g,h,i,j,k=(d=a("helpers/dom/element"),d&&d.__esModule&&d||{"default":d}),l=k.addClass,m=k.getCaretPosition,n=k.getComputedStyle,o=k.getCssTransform,p=k.getScrollableElement,q=k.innerWidth,r=k.offset,s=k.resetCssTransform,t=k.setCaretPosition,u=(e=a("autoResize"),e&&e.__esModule&&e||{"default":e})["default"],v=(f=a("_baseEditor"),f&&f.__esModule&&f||{"default":f}).BaseEditor,w=(g=a("eventManager"),g&&g.__esModule&&g||{"default":g}).eventManager,x=(h=a("editors"),h&&h.__esModule&&h||{"default":h}),y=(x.getEditor,x.registerEditor),z=(i=a("helpers/unicode"),i&&i.__esModule&&i||{"default":i}).KEY_CODES,A=(j=a("helpers/dom/event"),j&&j.__esModule&&j||{"default":j}),B=A.stopPropagation,C=A.stopImmediatePropagation,D=A.isImmediatePropagationStopped,E=v.prototype.extend();E.prototype.init=function(){var a=this;this.createElements(),this.eventManager=w(this),this.bindEvents(),this.autoResize=u(),this.instance.addHook("afterDestroy",function(){a.destroy()})},E.prototype.getValue=function(){return this.TEXTAREA.value},E.prototype.setValue=function(a){this.TEXTAREA.value=a};var F=function(a){var b,c=this,d=c.getActiveEditor();if(b=(a.ctrlKey||a.metaKey)&&!a.altKey,a.target===d.TEXTAREA&&!D(a)){if(17===a.keyCode||224===a.keyCode||91===a.keyCode||93===a.keyCode)return void C(a);switch(a.keyCode){case z.ARROW_RIGHT:d.isInFullEditMode()&&(!d.isWaiting()&&!d.allowKeyEventPropagation||!d.isWaiting()&&d.allowKeyEventPropagation&&!d.allowKeyEventPropagation(a.keyCode))&&C(a);break;case z.ARROW_LEFT:d.isInFullEditMode()&&(!d.isWaiting()&&!d.allowKeyEventPropagation||!d.isWaiting()&&d.allowKeyEventPropagation&&!d.allowKeyEventPropagation(a.keyCode))&&C(a);break;case z.ARROW_UP:case z.ARROW_DOWN:d.isInFullEditMode()&&(!d.isWaiting()&&!d.allowKeyEventPropagation||!d.isWaiting()&&d.allowKeyEventPropagation&&!d.allowKeyEventPropagation(a.keyCode))&&C(a);break;case z.ENTER:var e=d.instance.getSelected(),f=!(e[0]===e[2]&&e[1]===e[3]);if(b&&!f||a.altKey){if(d.isOpened()){var g=m(d.TEXTAREA),h=d.getValue(),i=h.slice(0,g)+"\n"+h.slice(g);d.setValue(i),t(d.TEXTAREA,g+1)}else d.beginEditing(d.originalValue+"\n");C(a)}a.preventDefault();break;case z.A:case z.X:case z.C:case z.V:b&&C(a);break;case z.BACKSPACE:case z.DELETE:case z.HOME:case z.END:C(a)}-1===[z.ARROW_UP,z.ARROW_RIGHT,z.ARROW_DOWN,z.ARROW_LEFT].indexOf(a.keyCode)&&d.autoResize.resize(String.fromCharCode(a.keyCode))}};E.prototype.open=function(){this.refreshDimensions(),this.instance.addHook("beforeKeyDown",F)},E.prototype.close=function(a){this.textareaParentStyle.display="none",this.autoResize.unObserve(),document.activeElement===this.TEXTAREA&&this.instance.listen(),this.instance.removeHook("beforeKeyDown",F)},E.prototype.focus=function(){this.TEXTAREA.focus(),t(this.TEXTAREA,this.TEXTAREA.value.length)},E.prototype.createElements=function(){this.TEXTAREA=document.createElement("TEXTAREA"),l(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.TEXTAREA_PARENT=document.createElement("DIV"),l(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 a=this;this.instance._registerTimeout(setTimeout(function(){a.refreshDimensions()},0))},E.prototype.getEditedCell=function(){var a,b=this.checkEditorSection();switch(b){case"top":a=this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=101;break;case"top-left-corner":a=this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=103;break;case"bottom-left-corner":a=this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=103;break;case"left":a=this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=102;break;case"bottom":a=this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=102;break;default:a=this.instance.getCell(this.row,this.col),this.textareaParentStyle.zIndex=""}return-1!=a&&-2!=a?a:void 0},E.prototype.refreshDimensions=function(){if(this.state===Handsontable.EditorState.EDITING){if(this.TD=this.getEditedCell(),!this.TD)return void this.close(!0);var a,b=r(this.TD),c=r(this.instance.rootElement),d=p(this.TD),e=this.instance.countRows(),f=b.top-c.top-1-(d.scrollTop||0),g=b.left-c.left-1-(d.scrollLeft||0),h=this.instance.getSettings(),i=(h.rowHeaders?1:0,h.colHeaders?1:0),j=this.checkEditorSection(),k=this.TD.style.backgroundColor;switch(j){case"top":a=o(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);break;case"left":a=o(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":a=o(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":a=o(this.instance.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":a=o(this.instance.view.wt.wtOverlays.bottomOverlay.clone.wtTable.holder.parentNode)}(i&&0===this.instance.getSelected()[0]||h.fixedRowsBottom&&this.instance.getSelected()[0]===e-h.fixedRowsBottom)&&(f+=1),0===this.instance.getSelected()[1]&&(g+=1),a&&-1!=a?this.textareaParentStyle[a[0]]=a[1]:s(this.textareaParentStyle),this.textareaParentStyle.top=f+"px",this.textareaParentStyle.left=g+"px";var l=this.TD.offsetTop-this.instance.view.wt.wtOverlays.topOverlay.getScrollPosition(),m=this.TD.offsetLeft-this.instance.view.wt.wtOverlays.leftOverlay.getScrollPosition(),t=q(this.TD)-8,u=this.instance.view.maximumVisibleElementWidth(m)-9,v=this.TD.scrollHeight+1,w=Math.max(this.instance.view.maximumVisibleElementHeight(l)-2,23),x=n(this.TD);this.TEXTAREA.style.fontSize=x.fontSize,this.TEXTAREA.style.fontFamily=x.fontFamily,this.TEXTAREA.style.backgroundColor="",this.TEXTAREA.style.backgroundColor=k?k:n(this.TEXTAREA).backgroundColor,this.autoResize.init(this.TEXTAREA,{minHeight:Math.min(v,w),maxHeight:w,minWidth:Math.min(t,u),maxWidth:u},!0),this.textareaParentStyle.display="block"}},E.prototype.bindEvents=function(){var a=this;this.eventManager.addEventListener(this.TEXTAREA,"cut",function(a){B(a)}),this.eventManager.addEventListener(this.TEXTAREA,"paste",function(a){B(a)}),this.instance.addHook("afterScrollVertically",function(){a.refreshDimensions()}),this.instance.addHook("afterColumnResize",function(){a.refreshDimensions(),a.focus()}),this.instance.addHook("afterRowResize",function(){a.refreshDimensions(),a.focus()}),this.instance.addHook("afterDestroy",function(){a.eventManager.destroy()})},E.prototype.destroy=function(){this.eventManager.destroy()},y("text",E)},{_baseEditor:29,autoResize:"autoResize",editors:28,eventManager:40,"helpers/dom/element":44,"helpers/dom/event":45,"helpers/unicode":52}],40:[function(a,b,c){"use strict";function d(a,b){var c,d,e,f,g,h="HOT-TABLE";if(b.isTargetWebComponent=!1,b.realTarget=b.target,!Handsontable.eventManager.isHotTableEnv)return b;for(b=i(b),g=b.path?b.path.length:0;g--;){if(b.path[g].nodeName===h)c=!0;else if(c&&b.path[g].shadowRoot){f=b.path[g];break}0!==g||f||(f=b.path[g])}return f||(f=b.target),b.isTargetWebComponent=!0,k()?b.realTarget=b.srcElement||b.toElement:(a instanceof Handsontable.Core||a instanceof Walkontable)&&(a instanceof Handsontable.Core?d=a.view?a.view.wt.wtTable.TABLE:null:a instanceof Walkontable&&(d=a.wtTable.TABLE.parentNode.parentNode),e=j(b.target,[h],d),e?b.realTarget=d.querySelector(h)||b.target:b.realTarget=b.target),Object.defineProperty(b,"target",{get:function(){return i(f)},enumerable:!0,configurable:!0}),b}function e(a){return new l(a)}Object.defineProperties(c,{EventManager:{get:function(){return l}},eventManager:{get:function(){return e}},__esModule:{value:!0}});var f,g,h=(f=a("helpers/dom/element"),f&&f.__esModule&&f||{"default":f}),i=h.polymerWrap,j=h.closest,k=(g=a("helpers/browser"),g&&g.__esModule&&g||{"default":g}).isWebComponentSupportedNatively,l=function(){var a=void 0!==arguments[0]?arguments[0]:null;this.context=a||this,this.context.eventListeners||(this.context.eventListeners=[])};$traceurRuntime.createClass(l,{addEventListener:function(a,b,c){function e(a){void 0==a.target&&void 0!=a.srcElement&&(a.definePoperty?a.definePoperty("target",{value:a.srcElement}):a.target=a.srcElement),void 0==a.preventDefault&&(a.definePoperty?a.definePoperty("preventDefault",{value:function(){this.returnValue=!1}}):a.preventDefault=function(){this.returnValue=!1}),a=d(g,a),c.call(this,a)}var f=this,g=this.context;return this.context.eventListeners.push({element:a,event:b,callback:c,callbackProxy:e}),window.addEventListener?a.addEventListener(b,e,!1):a.attachEvent("on"+b,e),Handsontable.countEventManagerListeners++,function(){f.removeEventListener(a,b,c)}},removeEventListener:function(a,b,c){for(var d,e=this.context.eventListeners.length;e--;)if(d=this.context.eventListeners[e],d.event==b&&d.element==a){if(c&&c!=d.callback)continue;this.context.eventListeners.splice(e,1),d.element.removeEventListener?d.element.removeEventListener(d.event,d.callbackProxy,!1):d.element.detachEvent("on"+d.event,d.callbackProxy),Handsontable.countEventManagerListeners--}},clearEvents:function(){if(this.context)for(var a=this.context.eventListeners.length;a--;){var b=this.context.eventListeners[a];b&&this.removeEventListener(b.element,b.event,b.callback)}},clear:function(){this.clearEvents()},destroy:function(){this.clearEvents(),this.context=null},fireEvent:function(a,b){var c,d={bubbles:!0,cancelable:"mousemove"!==b,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?(c=document.createEvent("MouseEvents"),c.initMouseEvent(b,d.bubbles,d.cancelable,d.view,d.detail,d.screenX,d.screenY,d.clientX,d.clientY,d.ctrlKey,d.altKey,d.shiftKey,d.metaKey,d.button,d.relatedTarget||document.body.parentNode)):c=document.createEventObject(),a.dispatchEvent?a.dispatchEvent(c):a.fireEvent("on"+b,c)}},{}),window.Handsontable=window.Handsontable||{},Handsontable.countEventManagerListeners=0,Handsontable.eventManager=e},{"helpers/browser":42,"helpers/dom/element":44}],41:[function(a,b,c){"use strict";function d(a){for(var b=0,c=a.length;c>b;)a[b]=[a[b]],b++}function e(a,b){for(var c=0,d=b.length;d>c;)a.push(b[c]),c++}function f(a){var b=[];if(!a||0===a.length||!a[0]||0===a[0].length)return b;for(var c=a.length,d=a[0].length,e=0;c>e;e++)for(var f=0;d>f;f++)b[f]||(b[f]=[]),b[f][e]=a[e][f];return b}function g(a,b,c,d){var e=-1,f=a.length;for(d&&f&&(c=a[++e]);++et
t";var c=document.createElement("CAPTION");c.innerHTML="c
c
c
c",c.style.padding=0,c.style.margin=0,a.insertBefore(c,b),document.body.appendChild(a),m=a.offsetHeight<2*a.lastChild.offsetHeight,document.body.removeChild(a)}function l(){return void 0===m&&k(),m}Object.defineProperties(c,{isIE8:{get:function(){return d}},isIE9:{get:function(){return e}},isSafari:{get:function(){return f}},isChrome:{get:function(){return g}},isMobileBrowser:{get:function(){return h}},isTouchSupported:{get:function(){return i}},isWebComponentSupportedNatively:{get:function(){return j}},hasCaptionProblem:{get:function(){return l}},__esModule:{value:!0}});var m,n=!document.createTextNode("test").textContent,o=!!document.documentMode,p=/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor),q=/Chrome/.test(navigator.userAgent)&&/Google/.test(navigator.vendor)},{}],43:[function(a,b,c){"use strict";function d(a){for(var b,c=a+1,d="";c>0;)b=(c-1)%26,d=String.fromCharCode(65+b)+d,c=parseInt((c-b)/26,10);return d}function e(a,b){a="number"==typeof a?a:100,b="number"==typeof b?b:4;var c,e,f=[];for(c=0;a>c;c++){var g=[];for(e=0;b>e;e++)g.push(d(e)+(c+1));f.push(g)}return f}function f(a,b){a="number"==typeof a?a:100,b="number"==typeof b?b:4;var c,e,f=[];for(c=0;a>c;c++){var g={};for(e=0;b>e;e++)g["prop"+e]=d(e)+(c+1);f.push(g)}return f}function g(a){var b,c,d,e,f=[],g=0;for(b=0,c=a.length;c>b;b++)for(d=0,e=a[b].length;e>d;d++)d==g&&(f.push([]),g++),f[d].push(a[b][d]);return f}function h(a,b){function c(a){var b=Handsontable.cellTypes[a];if("undefined"==typeof b)throw new Error('You declared cell type "'+a+'" 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 b}return b="undefined"==typeof b?!0:b,function(d,e){return function f(d){if(d){if(d.hasOwnProperty(a)&&void 0!==d[a])return d[a];if(d.hasOwnProperty("type")&&d.type){var e;if("string"!=typeof d.type)throw new Error("Cell type must be a string ");if(e=c(d.type),e.hasOwnProperty(a))return e[a];if(b)return}return f(j(d))}}("number"==typeof d?this.getCellMeta(d,e):d)}}Object.defineProperties(c,{spreadsheetColumnLabel:{get:function(){return d}},createSpreadsheetData:{get:function(){return e}},createSpreadsheetObjectData:{get:function(){return f}},translateRowsToColumns:{get:function(){return g}},cellMethodLookupFactory:{get:function(){return h}},__esModule:{value:!0}});var i,j=(i=a("object"),i&&i.__esModule&&i||{"default":i}).getPrototypeOf},{object:49}],44:[function(a,b,c){"use strict";function d(a,b,c){for(;null!=a&&a!==c;){if(a.nodeType===Node.ELEMENT_NODE&&(b.indexOf(a.nodeName)>-1||b.indexOf(a)>-1))return a;a=a.host&&a.nodeType===Node.DOCUMENT_FRAGMENT_NODE?a.host:a.parentNode}return null}function e(a,b){var c=a.parentNode,d=[];for("string"==typeof b?d=Array.prototype.slice.call(document.querySelectorAll(b),0):d.push(b);null!=c;){if(d.indexOf(c)>-1)return!0;c=c.parentNode}return!1}function f(a){function b(a){return a.nodeType===Node.ELEMENT_NODE&&a.nodeName===d.toUpperCase()}var c,d="hot-table",e=!1;for(c=g(a);null!=c;){if(b(c)){e=!0;break}if(c.host&&c.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(e=b(c.host))break;c=c.host}c=c.parentNode}return e}function g(a){return"undefined"!=typeof Polymer&&"function"==typeof wrap?wrap(a):a}function h(a){return"undefined"!=typeof Polymer&&"function"==typeof unwrap?unwrap(a):a}function i(a){var b=0;if(a.previousSibling)for(;a=a.previousSibling;)++b;return b}function j(a,b){var c=document.querySelector(".ht_clone_"+a);return c?c.contains(b):null}function k(a){var b=0,c=[];if(!a||!a.length)return c;for(;a[b];)c.push(a[b]),b++;return c}function l(a,b){return V(a,b)}function m(a,b){return W(a,b)}function n(a,b){return X(a,b)}function o(a,b){if(3===a.nodeType)b.removeChild(a);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(a.nodeName)>-1)for(var c=a.childNodes,d=c.length-1;d>=0;d--)o(c[d],a)}function p(a){for(var b;b=a.lastChild;)a.removeChild(b)}function q(a,b){fa.test(b)?a.innerHTML=b:r(a,b)}function r(a,b){var c=a.firstChild;c&&3===c.nodeType&&null===c.nextSibling?ga?c.textContent=b:c.data=b:(p(a),a.appendChild(document.createTextNode(b)))}function s(a){for(var b=a;h(b)!==document.documentElement;){if(null===b)return!1;if(b.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(b.host){if(b.host.impl)return s(b.host.impl);if(b.host)return s(b.host);throw new Error("Lost in Web Components world")}return!1}if("none"===b.style.display)return!1;b=b.parentNode}return!0}function t(a){var b,c,d,e,f;if(e=document.documentElement,aa()&&a.firstChild&&"CAPTION"===a.firstChild.nodeName)return f=a.getBoundingClientRect(),{top:f.top+(window.pageYOffset||e.scrollTop)-(e.clientTop||0),left:f.left+(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)};for(b=a.offsetLeft,c=a.offsetTop,d=a;(a=a.offsetParent)&&a!==document.body;)b+=a.offsetLeft,c+=a.offsetTop,d=a;return d&&"fixed"===d.style.position&&(b+=window.pageXOffset||e.scrollLeft,c+=window.pageYOffset||e.scrollTop),{left:b,top:c}}function u(){var a=window.scrollY;return void 0===a&&(a=document.documentElement.scrollTop),a}function v(){var a=window.scrollX;return void 0===a&&(a=document.documentElement.scrollLeft),a}function w(a){return a===window?u():a.scrollTop}function x(a){return a===window?v():a.scrollLeft}function y(a){for(var b,c,d,e=a.parentNode,f=["auto","scroll"],g="",h="",i="",j="";e&&e.style&&document.body!==e;){if(b=e.style.overflow,c=e.style.overflowX,d=e.style.overflowY,"scroll"==b||"scroll"==c||"scroll"==d)return e;if(window.getComputedStyle&&(g=window.getComputedStyle(e),h=g.getPropertyValue("overflow"),i=g.getPropertyValue("overflow-y"),j=g.getPropertyValue("overflow-x"),"scroll"===h||"scroll"===j||"scroll"===i))return e;if(e.clientHeight<=e.scrollHeight&&(-1!==f.indexOf(d)||-1!==f.indexOf(b)||-1!==f.indexOf(h)||-1!==f.indexOf(i)))return e;if(e.clientWidth<=e.scrollWidth&&(-1!==f.indexOf(c)||-1!==f.indexOf(b)||-1!==f.indexOf(h)||-1!==f.indexOf(j)))return e;e=e.parentNode}return window}function z(a){for(var b=a.parentNode;b&&b.style&&document.body!==b;){if("visible"!==b.style.overflow&&""!==b.style.overflow)return b;if(window.getComputedStyle){var c=window.getComputedStyle(b);if("visible"!==c.getPropertyValue("overflow")&&""!==c.getPropertyValue("overflow"))return b}b=b.parentNode}return window}function A(a,b){if(a){if(a!==window){var c,d=a.style[b];return""!==d&&void 0!==d?d:(c=B(a),""!==c[b]&&void 0!==c[b]?c[b]:void 0)}if("width"===b)return window.innerWidth+"px";if("height"===b)return window.innerHeight+"px"}}function B(a){return a.currentStyle||document.defaultView.getComputedStyle(a)}function C(a){return a.offsetWidth}function D(a){return aa()&&a.firstChild&&"CAPTION"===a.firstChild.nodeName?a.offsetHeight+a.firstChild.offsetHeight:a.offsetHeight}function E(a){return a.clientHeight||a.innerHeight}function F(a){return a.clientWidth||a.innerWidth}function G(a,b,c){window.addEventListener?a.addEventListener(b,c,!1):a.attachEvent("on"+b,c)}function H(a,b,c){window.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent("on"+b,c)}function I(a){if(a.selectionStart)return a.selectionStart;if(document.selection){a.focus();var b=document.selection.createRange();if(null==b)return 0;var c=a.createTextRange(),d=c.duplicate();return c.moveToBookmark(b.getBookmark()),d.setEndPoint("EndToStart",c),d.text.length}return 0}function J(a){if(a.selectionEnd)return a.selectionEnd;if(document.selection){var b=document.selection.createRange();if(null==b)return 0;var c=a.createTextRange();return c.text.indexOf(b.text)+b.text.length}}function K(a,b,c){if(void 0===c&&(c=b),a.setSelectionRange){a.focus();try{a.setSelectionRange(b,c)}catch(d){var e=a.parentNode,f=e.style.display;e.style.display="block",a.setSelectionRange(b,c),e.style.display=f}}else if(a.createTextRange){var g=a.createTextRange();g.collapse(!0),g.moveEnd("character",c),g.moveStart("character",b),g.select()}}function L(){var a=document.createElement("p");a.style.width="100%",a.style.height="200px";var b=document.createElement("div");b.style.position="absolute",b.style.top="0px",b.style.left="0px",b.style.visibility="hidden",b.style.width="200px",b.style.height="150px",b.style.overflow="hidden",b.appendChild(a),(document.body||document.documentElement).appendChild(b);var c=a.offsetWidth;b.style.overflow="scroll";var d=a.offsetWidth;return c==d&&(d=b.clientWidth),(document.body||document.documentElement).removeChild(b),c-d}function M(){return void 0===ea&&(ea=L()),ea}function N(a,b,c){Z()||$()?(a.style.top=c,a.style.left=b):_()?a.style["-webkit-transform"]="translate3d("+b+","+c+",0)":a.style.transform="translate3d("+b+","+c+",0)"}function O(a){var b;return a.style.transform&&""!==(b=a.style.transform)?["transform",b]:a.style["-webkit-transform"]&&""!==(b=a.style["-webkit-transform"])?["-webkit-transform",b]:-1}function P(a){a.transform&&""!==a.transform?a.transform="":a["-webkit-transform"]&&""!==a["-webkit-transform"]&&(a["-webkit-transform"]="")}function Q(a){var b=["INPUT","SELECT","TEXTAREA"];return b.indexOf(a.nodeName)>-1||"true"===a.contentEditable}function R(a){return Q(a)&&-1==a.className.indexOf("handsontableInput")&&-1==a.className.indexOf("copyPaste")}function S(a){return ja.call(window,a)}function T(a){ka.call(window,a)}Object.defineProperties(c,{ closest:{get:function(){return d}},isChildOf:{get:function(){return e}},isChildOfWebComponentTable:{get:function(){return f}},polymerWrap:{get:function(){return g}},polymerUnwrap:{get:function(){return h}},index:{get:function(){return i}},overlayContainsElement:{get:function(){return j}},hasClass:{get:function(){return l}},addClass:{get:function(){return m}},removeClass:{get:function(){return n}},removeTextNodes:{get:function(){return o}},empty:{get:function(){return p}},HTML_CHARACTERS:{get:function(){return fa}},fastInnerHTML:{get:function(){return q}},fastInnerText:{get:function(){return r}},isVisible:{get:function(){return s}},offset:{get:function(){return t}},getWindowScrollTop:{get:function(){return u}},getWindowScrollLeft:{get:function(){return v}},getScrollTop:{get:function(){return w}},getScrollLeft:{get:function(){return x}},getScrollableElement:{get:function(){return y}},getTrimmingContainer:{get:function(){return z}},getStyle:{get:function(){return A}},getComputedStyle:{get:function(){return B}},outerWidth:{get:function(){return C}},outerHeight:{get:function(){return D}},innerHeight:{get:function(){return E}},innerWidth:{get:function(){return F}},addEvent:{get:function(){return G}},removeEvent:{get:function(){return H}},getCaretPosition:{get:function(){return I}},getSelectionEndPosition:{get:function(){return J}},setCaretPosition:{get:function(){return K}},getScrollbarWidth:{get:function(){return M}},setOverlayPosition:{get:function(){return N}},getCssTransform:{get:function(){return O}},resetCssTransform:{get:function(){return P}},isInput:{get:function(){return Q}},isOutsideInput:{get:function(){return R}},requestAnimationFrame:{get:function(){return S}},cancelAnimationFrame:{get:function(){return T}},__esModule:{value:!0}});var U,V,W,X,Y=(U=a("../browser"),U&&U.__esModule&&U||{"default":U}),Z=Y.isIE8,$=Y.isIE9,_=Y.isSafari,aa=Y.hasCaptionProblem,ba=document.documentElement.classList?!0:!1;if(ba){var ca=function(){var a=document.createElement("div");return a.classList.add("test","test2"),a.classList.contains("test2")}();V=function(a,b){return""===b?!1:a.classList.contains(b)},W=function(a,b){var c=0;if("string"==typeof b&&(b=b.split(" ")),b=k(b),ca)a.classList.add.apply(a.classList,b);else for(;b&&b[c];)a.classList.add(b[c]),c++},X=function(a,b){var c=0;if("string"==typeof b&&(b=b.split(" ")),b=k(b),ca)a.classList.remove.apply(a.classList,b);else for(;b&&b[c];)a.classList.remove(b[c]),c++}}else{var da=function(a){return new RegExp("(\\s|^)"+a+"(\\s|$)")};V=function(a,b){return a.className.match(da(b))?!0:!1},W=function(a,b){var c=0,d=a.className;if("string"==typeof b&&(b=b.split(" ")),""===d)d=b.join(" ");else for(;b&&b[c];)da(b[c]).test(d)||(d+=" "+b[c]),c++;a.className=d},X=function(a,b){var c=0,d=a.className;for("string"==typeof b&&(b=b.split(" "));b&&b[c];)d=d.replace(da(b[c])," ").trim(),c++;a.className!==d&&(a.className=d)}}for(var ea,fa=/(<(.*)>|&(.*);)/,ga=document.createTextNode("test").textContent?!0:!1,ha=0,ia=["ms","moz","webkit","o"],ja=window.requestAnimationFrame,ka=window.cancelAnimationFrame,la=0;la=a)for(;++e<=f&&c(e)!==!1;);else for(e=a+1;--e>=b&&c(e)!==!1;);}function f(a,b){return b=parseInt(b.toString().replace("%",""),10),b=parseInt(a*b/100)}Object.defineProperties(c,{isNumeric:{get:function(){return d}},rangeEach:{get:function(){return e}},valueAccordingPercent:{get:function(){return f}},__esModule:{value:!0}})},{}],49:[function(a,b,c){"use strict";function d(a){var b;return Array.isArray(a)?b=[]:(b={},o(a,function(a,c){a&&"object"==typeof a&&!Array.isArray(a)?b[c]=d(a):Array.isArray(a)?a.length&&"object"==typeof a[0]&&!Array.isArray(a[0])?b[c]=[d(a[0])]:b[c]=[]:b[c]=null})),b}function e(a,b){return b.prototype.constructor=b,a.prototype=new b,a.prototype.constructor=a,a}function f(a,b){return o(b,function(b,c){a[c]=b}),a}function g(a,b){o(b,function(c,d){b[d]&&"object"==typeof b[d]?(a[d]||(Array.isArray(b[d])?a[d]=[]:a[d]={}),g(a[d],b[d])):a[d]=b[d]})}function h(a){return"object"==typeof a?JSON.parse(JSON.stringify(a)):a}function i(a){var b={};return o(a,function(a,c){return b[c]=a}),b}function j(a){for(var b=[],c=1;cd;d++)c.prototype[b[d]]=void 0;return c}Object.defineProperties(c,{columnFactory:{get:function(){return d}},__esModule:{value:!0}});var e,f=(e=a("object"),e&&e.__esModule&&e||{"default":e}).inherit},{object:49}],51:[function(a,b,c){"use strict";function d(a){return a[0].toUpperCase()+a.substr(1)}function e(a,b){var c=!0;return m(b.length-1,function(d){return a.charAt(d)!==b.charAt(d)?(c=!1,!1):void 0}),c}function f(a,b){var c=!0,d=b.length-1,e=a.length-1;return m(d,function(f){var g=e-f,h=d-f;return a.charAt(g)!==b.charAt(h)?(c=!1,!1):void 0}),c}function g(){for(var a=[],b=0;b=48&&57>=a||a>=96&&111>=a||a>=186&&192>=a||a>=219&&222>=a||a>=226||a>=65&&90>=a}function e(a){var b=[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!==b.indexOf(a)}function f(a){return-1!==[j.CONTROL_LEFT,224,j.COMMAND_LEFT,j.COMMAND_RIGHT].indexOf(a)}function g(a,b){var c=b.split("|"),d=!1;return i(c,function(b){return a===j[b]?(d=!0,!1):void 0}),d}Object.defineProperties(c,{KEY_CODES:{get:function(){return j}},isPrintableChar:{get:function(){return d}},isMetaKey:{get:function(){return e}},isCtrlKey:{get:function(){return f}},isKey:{get:function(){return g}},__esModule:{value:!0}});var h,i=(h=a("array"),h&&h.__esModule&&h||{"default":h}).arrayEach,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}},{array:41}],53:[function(a,b,c){"use strict";function d(){function a(a){return null!==a&&!c(a)&&("string"==typeof a||"number"==typeof a)}function b(a){return null!==a&&("object"==typeof a||"function"==typeof a)}function c(a){return a!==a}var d={arrayMap:[],weakMap:new WeakMap};return{get:function(c){return a(c)?d.arrayMap[c]:b(c)?d.weakMap.get(c):void 0},set:function(c,e){if(a(c))d.arrayMap[c]=e;else{if(!b(c))throw new Error("Invalid key type");d.weakMap.set(c,e)}},"delete":function(c){a(c)?delete d.arrayMap[c]:b(c)&&d.weakMap["delete"](c)}}}Object.defineProperties(c,{MultiMap:{get:function(){return d}},__esModule:{value:!0}}),window.MultiMap=d},{}],54:[function(a,b,c){"use strict";Object.defineProperties(c,{Hooks:{get:function(){return i}},localHooks:{get:function(){return j}},__esModule:{value:!0}});var d,e,f=["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","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","construct","init","modifyCol","modifyColWidth","modifyRow","modifyRowHeight","persistentStateLoad","persistentStateReset","persistentStateSave","beforeColumnSort","afterColumnSort","afterAutofillApplyValues","modifyCopyableRange","beforeColumnMove","afterColumnMove","beforeRowMove","afterRowMove","beforeColumnResize","afterColumnResize","beforeRowResize","afterRowResize"],g=(d=a("helpers/array"),d&&d.__esModule&&d||{"default":d}).arrayEach,h=(e=a("helpers/object"),e&&e.__esModule&&e||{"default":e}).objectEach,i=function(){this.globalBucket=this.createEmptyBucket()};$traceurRuntime.createClass(i,{createEmptyBucket:function(){var a=Object.create(null);return g(f,function(b){return a[b]=[]}),a},getBucket:function(){var a=void 0!==arguments[0]?arguments[0]:null;return a?(a.pluginHookBucket||(a.pluginHookBucket=this.createEmptyBucket()),a.pluginHookBucket):this.globalBucket},add:function(a,b){var c=void 0!==arguments[2]?arguments[2]:null,d=this;if(Array.isArray(b))g(b,function(b){return d.add(a,b,c)});else{var e=this.getBucket(c);"undefined"==typeof e[a]&&(this.register(a),e[a]=[]),b.skip=!1,-1===e[a].indexOf(b)&&e[a].push(b)}return this},once:function(a,b){var c=void 0!==arguments[2]?arguments[2]:null,d=this;Array.isArray(b)?g(b,function(b){return d.once(a,b,c)}):(b.runOnce=!0,this.add(a,b,c))},remove:function(a,b){var c=void 0!==arguments[2]?arguments[2]:null,d=this.getBucket(c);return"undefined"!=typeof d[a]&&d[a].indexOf(b)>=0?(b.skip=!0,!0):!1},run:function(a,b,c,d,e,f,g,h){var i=this.globalBucket[b],j=-1,k=i?i.length:0;if(k)for(;++j=0},getRegistered:function(){return f}},{});var j={_localHooks:Object.create(null),addLocalHook:function(a,b){this._localHooks[a]||(this._localHooks[a]=[]),this._localHooks[a].push(b)},runLocalHooks:function(a){for(var b=[],c=1;c=0&&o.splice(o.indexOf(this.pluginName),1),o.length||this.hot.runHooks("afterPluginsInitialized"),this.initialized=!0},enablePlugin:function(){this.enabled=!0},disablePlugin:function(){this.eventManager&&this.eventManager.clear(),this.clearHooks(),this.enabled=!1},addHook:function(a,b){var c=n.get(this).hooks[a]=n.get(this).hooks[a]||[];this.hot.addHook(a,b),c.push(b),n.get(this).hooks[a]=c},removeHooks:function(a){var b=this;j(n.get(this).hooks[a]||[],function(c){b.hot.removeHook(a,c)})},clearHooks:function(){var a=this,b=n.get(this).hooks;i(b,function(b,c){return a.removeHooks(c)}),b.length=0},callOnPluginsReady:function(a){this.isPluginsReady?a():this.pluginsInitializedCallbacks.push(a)},onAfterPluginsInitialized:function(){j(this.pluginsInitializedCallbacks,function(a){return a()}),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0},onUpdateSettings:function(){this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&this.updatePlugin&&this.updatePlugin())},updatePlugin:function(){},destroy:function(){this.eventManager&&this.eventManager.destroy(),this.clearHooks(),delete this.hot}},{});var q=p},{"helpers/array":41,"helpers/object":49,plugins:55}],57:[function(a,b,c){"use strict";Object.defineProperties(c,{AutoColumnSize:{get:function(){return F}},__esModule:{value:!0}});var d,e,f,g,h,i,j,k,l,m,n=(d=a("_base"),d&&d.__esModule&&d||{"default":d})["default"],o=(e=a("helpers/array"),e&&e.__esModule&&e||{"default":e}),p=o.arrayEach,q=o.arrayFilter,r=(f=a("helpers/dom/element"),f&&f.__esModule&&f||{"default":f}),s=r.cancelAnimationFrame,t=r.requestAnimationFrame,u=r.isVisible,v=(g=a("utils/ghostTable"),g&&g.__esModule&&g||{"default":g}).GhostTable,w=(h=a("helpers/object"),h&&h.__esModule&&h||{"default":h}),x=w.isObject,y=(w.objectEach,i=a("helpers/number"),i&&i.__esModule&&i||{"default":i}),z=y.valueAccordingPercent,A=y.rangeEach,B=(j=a("plugins"),j&&j.__esModule&&j||{"default":j}).registerPlugin,C=(k=a("utils/samplesGenerator"),k&&k.__esModule&&k||{"default":k}).SamplesGenerator,D=(l=a("helpers/string"),l&&l.__esModule&&l||{"default":l}).isPercentValue,E=(m=a("3rdparty/walkontable/src/calculator/viewportColumns"),m&&m.__esModule&&m||{"default":m}).WalkontableViewportColumnsCalculator,F=function(a){var b=this;$traceurRuntime.superConstructor(G).call(this,a),this.widths=[],this.ghostTable=new v(this.hot),this.samplesGenerator=new C(function(a,c){return b.hot.getDataAtCell(a,c)}),this.firstCalculation=!0,this.inProgress=!1,this.addHook("beforeColumnResize",function(a,c,d){return b.onBeforeColumnResize(a,c,d)})},G=F;$traceurRuntime.createClass(F,{isEnabled:function(){return this.hot.getSettings().autoColumnSize!==!1&&!this.hot.getSettings().colWidths},enablePlugin:function(){var a=this;this.enabled||(this.addHook("afterLoadData",function(){return a.onAfterLoadData()}),this.addHook("beforeChange",function(b){return a.onBeforeChange(b)}),this.addHook("beforeRender",function(b){return a.onBeforeRender(b)}),this.addHook("modifyColWidth",function(b,c){return a.getColumnWidth(c,b)}),$traceurRuntime.superGet(this,G.prototype,"enablePlugin").call(this))},disablePlugin:function(){$traceurRuntime.superGet(this,G.prototype,"disablePlugin").call(this)},calculateColumnsWidth:function(){var a=void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},b=void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countRows()-1},c=void 0!==arguments[2]?arguments[2]:!1,d=this;"number"==typeof a&&(a={from:a,to:a}),"number"==typeof b&&(b={from:b,to:b}),A(a.from,a.to,function(a){if(c||void 0===d.widths[a]&&!d.hot._getColWidthFromSettings(a)){var e=d.samplesGenerator.generateColumnSamples(a,b);e.forEach(function(a,b){return d.ghostTable.addColumn(b,a)})}}),this.ghostTable.columns.length&&(this.ghostTable.getWidths(function(a,b){return d.widths[a]=b}),this.ghostTable.clean())},calculateAllColumnsWidth:function(){var a=void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},b=this,c=0,d=this.hot.countCols()-1,e=null;this.inProgress=!0;var f=function(){return b.hot?(b.calculateColumnsWidth({from:c,to:Math.min(c+G.CALCULATION_STEP,d)},a),c=c+G.CALCULATION_STEP+1,void(d>c?e=t(f):(s(e),b.inProgress=!1,b.hot.view.wt.wtOverlays.adjustElementsSize(!0),b.hot.view.wt.wtOverlays.leftOverlay.needFullRender&&b.hot.view.wt.wtOverlays.leftOverlay.clone.draw()))):(s(e),void(b.inProgress=!1))};this.firstCalculation&&this.getSyncCalculationLimit()&&(this.calculateColumnsWidth({from:0,to:this.getSyncCalculationLimit()},a),this.firstCalculation=!1,c=this.getSyncCalculationLimit()+1),d>c?f():this.inProgress=!1},recalculateAllColumnsWidth:function(){this.hot.view&&u(this.hot.view.wt.wtTable.TABLE)&&(this.clearCache(),this.calculateAllColumnsWidth())},getSyncCalculationLimit:function(){var a=G.SYNC_CALCULATION_LIMIT,b=this.hot.countCols()-1;return x(this.hot.getSettings().autoColumnSize)&&(a=this.hot.getSettings().autoColumnSize.syncLimit,D(a)?a=z(b,a):a>>=0),Math.min(a,b)},getColumnWidth:function(a){var b=arguments[1],c=void 0!==arguments[2]?arguments[2]:!0,d=b;return void 0===d&&(d=this.widths[a],c&&"number"==typeof d&&(d=Math.max(d,E.DEFAULT_WIDTH))),d},getFirstVisibleColumn:function(){var a=this.hot.view.wt;return a.wtViewport.columnsVisibleCalculator?a.wtTable.getFirstVisibleColumn():a.wtViewport.columnsRenderCalculator?a.wtTable.getFirstRenderedColumn():-1},getLastVisibleColumn:function(){var a=this.hot.view.wt;return a.wtViewport.columnsVisibleCalculator?a.wtTable.getLastVisibleColumn():a.wtViewport.columnsRenderCalculator?a.wtTable.getLastRenderedColumn():-1},clearCache:function(){this.widths.length=0},isNeedRecalculate:function(){return q(this.widths,function(a){return void 0===a}).length?!0:!1},onBeforeRender:function(){var a=this.hot.renderCall;this.calculateColumnsWidth({from:this.getFirstVisibleColumn(),to:this.getLastVisibleColumn()},void 0,a),this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllColumnsWidth()},onAfterLoadData:function(){var a=this;this.hot.view?this.recalculateAllColumnsWidth():setTimeout(function(){a.hot&&a.recalculateAllColumnsWidth()},0)},onBeforeChange:function(a){var b=this;p(a,function(a){return b.widths[a[1]]=void 0})},onBeforeColumnResize:function(a,b,c){return c&&(this.calculateColumnsWidth(a,void 0,!0),b=this.getColumnWidth(a,void 0,!1)),b},destroy:function(){this.ghostTable.clean(),$traceurRuntime.superGet(this,G.prototype,"destroy").call(this)}},{get CALCULATION_STEP(){return 50},get SYNC_CALCULATION_LIMIT(){return 50}},n),B("autoColumnSize",F)},{"3rdparty/walkontable/src/calculator/viewportColumns":3,_base:56,"helpers/array":41,"helpers/dom/element":44,"helpers/number":48,"helpers/object":49,"helpers/string":51,plugins:55,"utils/ghostTable":96,"utils/samplesGenerator":97}],58:[function(a,b,c){"use strict";Object.defineProperties(c,{AutoRowSize:{get:function(){return C}},__esModule:{value:!0}});var d,e,f,g,h,i,j,k,l,m=(d=a("_base"),d&&d.__esModule&&d||{"default":d})["default"],n=(e=a("helpers/array"),e&&e.__esModule&&e||{"default":e}),o=(n.arrayEach,n.arrayFilter),p=(f=a("helpers/dom/element"),f&&f.__esModule&&f||{"default":f}),q=p.cancelAnimationFrame,r=p.requestAnimationFrame,s=p.isVisible,t=(g=a("utils/ghostTable"),g&&g.__esModule&&g||{"default":g}).GhostTable,u=(h=a("helpers/object"),h&&h.__esModule&&h||{"default":h}),v=u.isObject,w=(u.objectEach,i=a("helpers/number"),i&&i.__esModule&&i||{"default":i}),x=w.valueAccordingPercent,y=w.rangeEach,z=(j=a("plugins"),j&&j.__esModule&&j||{"default":j}).registerPlugin,A=(k=a("utils/samplesGenerator"),k&&k.__esModule&&k||{"default":k}).SamplesGenerator,B=(l=a("helpers/string"),l&&l.__esModule&&l||{"default":l}).isPercentValue,C=function(a){var b=this;$traceurRuntime.superConstructor(D).call(this,a),this.heights=[],this.ghostTable=new t(this.hot),this.samplesGenerator=new A(function(a,c){return b.hot.getDataAtCell(a,c)}),this.firstCalculation=!0,this.inProgress=!1,this.addHook("beforeRowResize",function(a,c,d){return b.onBeforeRowResize(a,c,d)})},D=C;$traceurRuntime.createClass(C,{isEnabled:function(){return this.hot.getSettings().autoRowSize===!0||v(this.hot.getSettings().autoRowSize)},enablePlugin:function(){var a=this;this.enabled||(this.addHook("afterLoadData",function(){return a.onAfterLoadData()}),this.addHook("beforeChange",function(b){return a.onBeforeChange(b)}),this.addHook("beforeColumnMove",function(){return a.recalculateAllRowsHeight()}),this.addHook("beforeColumnResize",function(){return a.recalculateAllRowsHeight()}),this.addHook("beforeColumnSort",function(){return a.clearCache()}),this.addHook("beforeRender",function(b){return a.onBeforeRender(b)}),this.addHook("beforeRowMove",function(b,c){return a.onBeforeRowMove(b,c)}),this.addHook("modifyRowHeight",function(b,c){return a.getRowHeight(c,b)}),$traceurRuntime.superGet(this,D.prototype,"enablePlugin").call(this))},disablePlugin:function(){$traceurRuntime.superGet(this,D.prototype,"disablePlugin").call(this)},calculateRowsHeight:function(){var a=void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},b=void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countCols()-1},c=void 0!==arguments[2]?arguments[2]:!1,d=this;"number"==typeof a&&(a={from:a,to:a}),"number"==typeof b&&(b={from:b,to:b}),y(a.from,a.to,function(a){if(c||void 0===d.heights[a]){var e=d.samplesGenerator.generateRowSamples(a,b);e.forEach(function(a,b){return d.ghostTable.addRow(b,a)})}}),this.ghostTable.rows.length&&(this.ghostTable.getHeights(function(a,b){return d.heights[a]=b}),this.ghostTable.clean())},calculateAllRowsHeight:function(){var a=void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},b=this,c=0,d=this.hot.countRows()-1,e=null;this.inProgress=!0;var f=function(){return b.hot?(b.calculateRowsHeight({from:c,to:Math.min(c+D.CALCULATION_STEP,d)},a),c=c+D.CALCULATION_STEP+1,void(d>c?e=r(f):(q(e),b.inProgress=!1,b.hot.view.wt.wtOverlays.adjustElementsSize(!0),b.hot.view.wt.wtOverlays.leftOverlay.needFullRender&&b.hot.view.wt.wtOverlays.leftOverlay.clone.draw()))):(q(e),void(b.inProgress=!1))};this.firstCalculation&&this.getSyncCalculationLimit()&&(this.calculateRowsHeight({from:0,to:this.getSyncCalculationLimit()},a),this.firstCalculation=!1,c=this.getSyncCalculationLimit()+1),d>c?f():this.inProgress=!1},recalculateAllRowsHeight:function(){s(this.hot.view.wt.wtTable.TABLE)&&(this.clearCache(),this.calculateAllRowsHeight())},getSyncCalculationLimit:function(){var a=D.SYNC_CALCULATION_LIMIT,b=this.hot.countRows()-1;return v(this.hot.getSettings().autoRowSize)&&(a=this.hot.getSettings().autoRowSize.syncLimit,B(a)?a=x(b,a):a>>=0),Math.min(a,b)},getRowHeight:function(a){var b=arguments[1],c=b;return void 0!==this.heights[a]&&this.heights[a]>(b||0)&&(c=this.heights[a]),c},getFirstVisibleRow:function(){var a=this.hot.view.wt;return a.wtViewport.rowsVisibleCalculator?a.wtTable.getFirstVisibleRow():a.wtViewport.rowsRenderCalculator?a.wtTable.getFirstRenderedRow():-1},getLastVisibleRow:function(){var a=this.hot.view.wt;return a.wtViewport.rowsVisibleCalculator?a.wtTable.getLastVisibleRow():a.wtViewport.rowsRenderCalculator?a.wtTable.getLastRenderedRow():-1},clearCache:function(){this.heights.length=0},clearCacheByRange:function(a){var b=this;"number"==typeof a&&(a={from:a,to:a}),y(Math.min(a.from,a.to),Math.max(a.from,a.to),function(a){return b.heights[a]=void 0})},isNeedRecalculate:function(){return o(this.heights,function(a){return void 0===a}).length?!0:!1},onBeforeRender:function(){var a=this.hot.renderCall;this.calculateRowsHeight({from:this.getFirstVisibleRow(),to:this.getLastVisibleRow()},void 0,a),this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllRowsHeight()},onBeforeRowMove:function(a,b){this.clearCacheByRange({from:a,to:b}),this.calculateAllRowsHeight()},onBeforeRowResize:function(a,b,c){return c&&(this.calculateRowsHeight(a,void 0,!0),b=this.getRowHeight(a)),b},onAfterLoadData:function(){var a=this;this.hot.view?this.recalculateAllRowsHeight():setTimeout(function(){a.hot&&a.recalculateAllRowsHeight()},0)},onBeforeChange:function(a){var b=null;1===a.length?b=a[0][0]:a.length>1&&(b={from:a[0][0],to:a[a.length-1][0]}),null!==b&&this.clearCacheByRange(b)},destroy:function(){this.ghostTable.clean(),$traceurRuntime.superGet(this,D.prototype,"destroy").call(this)}},{get CALCULATION_STEP(){return 50},get SYNC_CALCULATION_LIMIT(){return 500}},m),z("autoRowSize",C)},{_base:56,"helpers/array":41,"helpers/dom/element":44,"helpers/number":48,"helpers/object":49,"helpers/string":51,plugins:55,"utils/ghostTable":96,"utils/samplesGenerator":97}],59:[function(a,b,c){"use strict";function d(a,b,c,d){var e,f,g,h,i,j=c.length,k=c?c[0].length:0,l=[],m=[];if(e=b.row-a.row,f=b.col-a.col,-1!==["down","up"].indexOf(d)){for(var n=0;f>=n;n++)g=parseInt(c[0][n],10),h=parseInt(c[j-1][n],10),i=("down"===d?h-g:g-h)/(j-1)||0,m.push(i);l.push(m)}if(-1!==["right","left"].indexOf(d))for(var o=0;e>=o;o++)g=parseInt(c[o][0],10),h=parseInt(c[o][k-1],10),i=("right"===d?h-g:g-h)/(k-1)||0,m=[],m.push(i),l.push(m);return l}function e(a){function b(b){return a.autofill?void(a.autofill.handle&&a.autofill.handle.isDragged&&(a.autofill.handle.isDragged>1&&a.autofill.apply(),a.autofill.handle.isDragged=0,h=!1)):!0}function c(a){var b,c;return g.instance.autofill?(b=k(g.instance.table).top-(window.pageYOffset||document.documentElement.scrollTop)+l(g.instance.table),c=k(g.instance.table).left-(window.pageXOffset||document.documentElement.scrollLeft)+m(g.instance.table),g.addingStarted===!1&&g.instance.autofill.handle.isDragged>0&&a.clientY>b&&a.clientX<=c?(g.instance.mouseDragOutside=!0,g.addingStarted=!0):g.instance.mouseDragOutside=!1,void(g.instance.mouseDragOutside&&setTimeout(function(){g.addingStarted=!1,g.instance.alter("insert_row")},200))):!1}var d,e,f,g=this,h=!1;this.instance=a,this.addingStarted=!1,f=n(a),f.addEventListener(document,"mouseup",b),f.addEventListener(document,"mousemove",c),d=this.instance.view.wt.wtSettings.settings.onCellCornerMouseDown,this.instance.view.wt.wtSettings.settings.onCellCornerMouseDown=function(b){a.autofill.handle.isDragged=1,h=!0,d(b); },e=this.instance.view.wt.wtSettings.settings.onCellMouseOver,this.instance.view.wt.wtSettings.settings.onCellMouseOver=function(b,c,d,f){a.autofill&&h&&!a.view.isMouseDown()&&a.autofill.handle&&a.autofill.handle.isDragged&&(a.autofill.handle.isDragged++,a.autofill.showBorder(c),a.autofill.checkIfNewRowNeeded()),e(b,c,d,f)},this.instance.view.wt.wtSettings.settings.onCellCornerDblClick=function(){a.autofill.selectAdjacent()}}Object.defineProperties(c,{Autofill:{get:function(){return e}},__esModule:{value:!0}});var f,g,h,i,j=(f=a("helpers/dom/element"),f&&f.__esModule&&f||{"default":f}),k=j.offset,l=j.outerHeight,m=j.outerWidth,n=(g=a("eventManager"),g&&g.__esModule&&g||{"default":g}).eventManager,o=((h=a("plugins"),h&&h.__esModule&&h||{"default":h}).registerPlugin,(i=a("3rdparty/walkontable/src/cell/coords"),i&&i.__esModule&&i||{"default":i}).WalkontableCellCoords);e.prototype.init=function(){this.handle={}},e.prototype.disable=function(){this.handle.disabled=!0},e.prototype.selectAdjacent=function(){var a,b,c,d,e;a=this.instance.selection.isMultiple()?this.instance.view.wt.selections.area.getCorners():this.instance.view.wt.selections.current.getCorners(),b=this.instance.getData();a:for(c=a[2]+1;cb[3]?(g="right",c=new o(a[0],b[3]+1),e=new o(a[2],a[3])):a[0]b[2]&&a[1]===b[1]&&(g="down",c=new o(b[2]+1,a[1]),e=new o(a[2],a[3])),c&&c.row>-1&&c.col>-1?(i={from:this.instance.getSelectedRange().from,to:this.instance.getSelectedRange().to},f=this.instance.getData(i.from.row,i.from.col,i.to.row,i.to.col),h=d(c,e,f,g),Handsontable.hooks.run(this.instance,"beforeAutofill",c,e,f),this.instance.populateFromArray(c.row,c.col,f,e.row,e.col,"autofill",null,g,h),this.instance.selection.setRangeStart(new o(a[0],a[1])),this.instance.selection.setRangeEnd(new o(a[2],a[3]))):this.instance.selection.refreshBorders())},e.prototype.showBorder=function(a){var b=this.instance.getSelectedRange().getTopLeftCorner(),c=this.instance.getSelectedRange().getBottomRightCorner();if("horizontal"!==this.instance.getSettings().fillHandle&&(c.rowa.row))a=new o(a.row,c.col);else{if("vertical"===this.instance.getSettings().fillHandle)return;a=new o(c.row,a.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(a),this.instance.view.render()},e.prototype.checkIfNewRowNeeded=function(){var a,b,c=this.instance.countRows(),d=this;this.instance.view.wt.selections.fill.cellRange&&this.addingStarted===!1&&(b=this.instance.getSelected(),a=this.instance.view.wt.selections.fill.getCorners(),b[2]c[1]?a?1:-1:0}},dateSort:function(a){return function(b,c){if(b[1]===c[1])return 0;if(null===b[1]||""===b[1])return 1;if(null===c[1]||""===c[1])return-1;var d=new Date(b[1]),e=new Date(c[1]);return e>d?a?-1:1:d>e?a?1:-1:0}},sort:function(){if("undefined"!=typeof this.hot.sortOrder){var a,b;this.hot.sortingEnabled=!1,this.hot.sortIndex.length=0;for(var c=this.hot.colOffset(),d=0,e=this.hot.countRows()-this.hot.getSettings().minSpareRows;e>d;d++)this.hot.sortIndex.push([d,this.hot.getDataAtCell(d,this.hot.sortColumn+c)]);switch(a=this.hot.getCellMeta(0,this.hot.sortColumn),this.sortIndicators[this.hot.sortColumn]=a.sortIndicator,a.type){case"date":b=this.dateSort;break;default:b=this.defaultSort}this.hot.sortIndex.sort(b(this.hot.sortOrder));for(var d=this.hot.sortIndex.length;d=0&&-1===e&&i(c,"columnSorting"),m(c,"descending"),m(c,"ascending"),this.sortIndicators[a]&&a===this.hot.sortColumn&&("ascending"===this.sortOrderClass?i(c,"ascending"):"descending"===this.sortOrderClass&&i(c,"descending")))},isSorted:function(){return"undefined"!=typeof this.hot.sortColumn},afterCreateRow:function(a,b){if(this.isSorted()){for(var c=0;c=a&&(this.hot.sortIndex[c][0]+=b);for(var c=0;b>c;c++)this.hot.sortIndex.splice(a+c,0,[a+c,this.hot.getData()[a+c][this.hot.sortColumn+this.hot.colOffset()]]);this.saveSortingState()}},afterRemoveRow:function(a,b){if(this.isSorted()){var c=this.translateRow(a);this.hot.sortIndex.splice(a,b);for(var d=0;dc&&(this.hot.sortIndex[d][0]-=b);this.saveSortingState()}}},{},o);var s=q;p("columnSorting",q)},{_base:56,eventManager:40,"helpers/dom/element":44,plugins:55}],61:[function(a,b,c){"use strict";Object.defineProperties(c,{CommentEditor:{get:function(){return f}},__esModule:{value:!0}});var d,e=(d=a("helpers/dom/element"),d&&d.__esModule&&d||{"default":d}).addClass,f=function(){this.editor=this.createEditor(),this.editorStyle=this.editor.style,this.editorStyle.position="absolute",this.editorStyle.zIndex=100,this.hide()},g=f;$traceurRuntime.createClass(f,{setPosition:function(a,b){this.editorStyle.left=a+"px",this.editorStyle.top=b+"px"},show:function(){this.editorStyle.display="block"},hide:function(){this.editorStyle.display="none"},isVisible:function(){return"block"===this.editorStyle.display},setValue:function(){var a=void 0!==arguments[0]?arguments[0]:"";a=a||"",this.getInputElement().value=a},getValue:function(){return this.getInputElement().value},isFocused:function(){return document.activeElement===this.getInputElement()},focus:function(){this.getInputElement().focus()},createEditor:function(){var a,b,c=document.querySelector("."+g.CLASS_EDITOR_CONTAINER);return c||(c=document.createElement("div"),e(c,g.CLASS_EDITOR_CONTAINER),document.body.appendChild(c)),a=document.createElement("div"),e(a,g.CLASS_EDITOR),b=document.createElement("textarea"),e(b,g.CLASS_INPUT),a.appendChild(b),c.appendChild(a),a},getInputElement:function(){return this.editor.querySelector("."+g.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"}})},{"helpers/dom/element":44}],62:[function(a,b,c){"use strict";Object.defineProperties(c,{Comments:{get:function(){return w}},__esModule:{value:!0}});var d,e,f,g,h,i,j=(d=a("helpers/dom/element"),d&&d.__esModule&&d||{"default":d}),k=j.addClass,l=j.closest,m=j.getWindowScrollLeft,n=j.getWindowScrollTop,o=j.hasClass,p=j.offset,q=(e=a("eventManager"),e&&e.__esModule&&e||{"default":e}).EventManager,r=(f=a("3rdparty/walkontable/src/cell/coords"),f&&f.__esModule&&f||{"default":f}).WalkontableCellCoords,s=(g=a("plugins"),g&&g.__esModule&&g||{"default":g}),t=s.registerPlugin,u=(s.getPlugin,(h=a("_base"),h&&h.__esModule&&h||{"default":h})["default"]),v=(i=a("commentEditor"),i&&i.__esModule&&i||{"default":i}).CommentEditor,w=function(a){$traceurRuntime.superConstructor(x).call(this,a),this.editor=null,this.eventManager=null,this.range={},this.mouseDown=!1,this.contextMenuEvent=!1,this.timer=null},x=w;$traceurRuntime.createClass(w,{isEnabled:function(){return this.hot.getSettings().comments},enablePlugin:function(){var a=this;this.enabled||(this.editor||(this.editor=new v),this.eventManager||(this.eventManager=new q(this)),this.addHook("afterContextMenuDefaultOptions",function(b){return a.addToContextMenu(b)}),this.addHook("afterRenderer",function(b,c,d,e,f,g){return a.onAfterRenderer(b,g)}),this.addHook("afterScrollVertically",function(){return a.refreshEditorPosition()}),this.addHook("afterColumnResize",function(){return a.refreshEditorPosition()}),this.addHook("afterRowResize",function(){return a.refreshEditorPosition()}),this.registerListeners(),$traceurRuntime.superGet(this,x.prototype,"enablePlugin").call(this))},disablePlugin:function(){$traceurRuntime.superGet(this,x.prototype,"disablePlugin").call(this)},registerListeners:function(){var a=this;this.eventManager.addEventListener(document,"mouseover",function(b){return a.onMouseOver(b)}),this.eventManager.addEventListener(document,"mousedown",function(b){return a.onMouseDown(b)}),this.eventManager.addEventListener(document,"mousemove",function(b){return a.onMouseMove(b)}),this.eventManager.addEventListener(document,"mouseup",function(b){return a.onMouseUp(b)}),this.eventManager.addEventListener(this.editor.getInputElement(),"blur",function(b){return a.onEditorBlur(b)})},setRange:function(a){this.range=a},clearRange:function(){this.range={}},targetIsCellWithComment:function(a){return o(a.target,"htCommentCell")&&l(a.target,[this.hot.rootElement])?!0:!1},targetIsCommentTextArea:function(a){return this.editor.getInputElement()===a.target},saveComment:function(){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');var a=this.editor.getValue(),b=this.range.from.row,c=this.range.from.col;this.hot.setCellMeta(b,c,"comment",a),this.hot.render()},saveCommentAtCell:function(a,b){this.setRange({from:new r(a,b)}),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(a,b){this.setRange({from:new r(a,b)}),this.removeComment()},show:function(){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');var a=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return this.refreshEditorPosition(!0),this.editor.setValue(a.comment||""),this.editor.show(),!0},showAtCell:function(a,b){return this.setRange({from:new r(a,b)}),this.show()},hide:function(){this.editor.hide()},refreshEditorPosition:function(){var a=void 0!==arguments[0]?arguments[0]:!1;if(a||this.range.from&&this.editor.isVisible()){var b=this.hot.view.wt.wtTable.getCell(this.range.from),c=p(b),d=this.hot.getColWidth(this.range.from.col),e=c.top,f=c.left,g=0,h=0;this.hot.view.wt.wtViewport.hasVerticalScroll()&&(e-=this.hot.view.wt.wtOverlays.topOverlay.getScrollPosition(),g=20),this.hot.view.wt.wtViewport.hasHorizontalScroll()&&(f-=this.hot.view.wt.wtOverlays.leftOverlay.getScrollPosition(),h=20);var i=f+d,j=e,k=this.hot.view.wt.wtTable.holder.getBoundingClientRect(),l={left:k.left+m()+h,right:k.right+m()-15,top:k.top+n()+g,bottom:k.bottom+n()};i<=l.left||i>l.right||j<=l.top||j>l.bottom?this.hide():this.editor.setPosition(i,j)}},onMouseDown:function(a){this.mouseDown=!0,this.hot.view&&this.hot.view.wt&&(this.contextMenuEvent||this.targetIsCommentTextArea(a)||this.targetIsCellWithComment(a)||this.hide(),this.contextMenuEvent=!1)},onMouseOver:function(a){if(!this.mouseDown&&!this.editor.isFocused())if(this.targetIsCellWithComment(a)){var b=this.hot.view.wt.wtTable.getCoords(a.target),c={from:new r(b.row,b.col)};this.setRange(c),this.show()}else this.targetIsCommentTextArea(a)||this.editor.isFocused()||this.hide()},onMouseMove:function(a){var b=this;this.targetIsCommentTextArea(a)&&(this.mouseDown=!0,clearTimeout(this.timer),this.timer=setTimeout(function(){b.mouseDown=!1},200))},onMouseUp:function(a){this.mouseDown=!1},onAfterRenderer:function(a,b){b.comment&&k(a,b.commentedCellClassName)},onEditorBlur:function(a){this.saveComment()},checkSelectionCommentsConsistency:function(){var a=this.hot.getSelectedRange();if(!a)return!1;var b=!1,c=a.from;return this.hot.getCellMeta(c.row,c.col).comment&&(b=!0),b},onContextMenuAddComment:function(){var a=this,b=this.hot.getSelectedRange();this.contextMenuEvent=!0,this.setRange({from:b.from}),this.show(),setTimeout(function(){a.hot&&(a.hot.deselectCell(),a.editor.focus())},10)},onContextMenuRemoveComment:function(a,b){this.contextMenuEvent=!0,this.removeCommentAtCell(b.start.row,b.start.col)},addToContextMenu:function(a){var b=this;a.items.push(Handsontable.plugins.ContextMenu.SEPARATOR,{key:"commentsAddEdit",name:function(){return b.checkSelectionCommentsConsistency()?"Edit Comment":"Add Comment"},callback:function(){return b.onContextMenuAddComment()},disabled:function(){return this.getSelected()?!1:!0}},{key:"commentsRemove",name:function(){return"Delete Comment"},callback:function(a,c){return b.onContextMenuRemoveComment(a,c)},disabled:function(){return!b.checkSelectionCommentsConsistency()}})},destroy:function(){this.editor&&this.editor.destroy(),$traceurRuntime.superGet(this,x.prototype,"destroy").call(this)}},{},u),t("comments",w)},{"3rdparty/walkontable/src/cell/coords":5,_base:56,commentEditor:61,eventManager:40,"helpers/dom/element":44,plugins:55}],63:[function(a,b,c){"use strict";function d(a,b){var c;return f(b,function(b){var d=b.key?b.key.split(":"):null;return Array.isArray(d)&&d[1]===a?(c=b,!1):void 0}),c}Object.defineProperties(c,{CommandExecutor:{get:function(){return g}},__esModule:{value:!0}});var e,f=(e=a("helpers/array"),e&&e.__esModule&&e||{"default":e}).arrayEach,g=function(a){this.hot=a,this.commands={},this.commonCallback=null};$traceurRuntime.createClass(g,{registerCommand:function(a,b){this.commands[a]=b},setCommonCallback:function(a){this.commonCallback=a},execute:function(a){for(var b=[],c=1;c0;if(g)return}}else if(!(b(f)||s(f,"current")&&s(f,"wtBorder")))return;this.open(a)}},{get DEFAULT_ITEMS(){return[z,A,J,B,C,J,D,E,J,F,G,J,H,J,I]}},o),K.SEPARATOR={name:J},Handsontable.hooks.register("afterContextMenuDefaultOptions"),Handsontable.hooks.register("afterContextMenuShow"),Handsontable.hooks.register("afterContextMenuHide"),Handsontable.hooks.register("afterContextMenuExecute"),w("contextMenu",K)},{_base:56,commandExecutor:63,eventManager:40,"helpers/array":41,"helpers/dom/element":44,"helpers/dom/event":45,"helpers/object":49,itemsFactory:66,menu:67,plugins:55,predefinedItems:68}],65:[function(a,b,c){"use strict";Object.defineProperties(c,{Cursor:{get:function(){return l}},__esModule:{value:!0}});var d,e,f=(d=a("helpers/dom/element"),d&&d.__esModule&&d||{"default":d}),g=f.getWindowScrollLeft,h=f.getWindowScrollTop,i=(e=a("helpers/dom/event"),e&&e.__esModule&&e||{"default":e}),j=i.pageX,k=i.pageY,l=function(a){var b,c,d,e,f,i,l,m,n=h(),o=g();this.type=this.getSourceType(a),"literal"===this.type?(b=parseInt(a.top,10),d=parseInt(a.left,10),l=a.height,m=a.width):"event"===this.type&&(b=parseInt(k(a),10),d=parseInt(j(a),10),l=a.target.clientHeight,m=a.target.clientWidth),c=b-n,e=d-o,f=n,i=o,this.top=b,this.topRelative=c,this.left=d,this.leftRelative=e,this.scrollTop=f,this.scrollLeft=i,this.cellHeight=l,this.cellWidth=m};$traceurRuntime.createClass(l,{getSourceType:function(a){var b="literal";return a instanceof Event&&(b="event"),b},fitsAbove:function(a){return this.topRelative>=a.offsetHeight},fitsBelow:function(a){var b=void 0!==arguments[1]?arguments[1]:window.innerHeight;return this.topRelative+a.offsetHeight<=b},fitsOnRight:function(a){var b=void 0!==arguments[1]?arguments[1]:window.innerWidth;return this.leftRelative+this.cellWidth+a.offsetWidth<=b},fitsOnLeft:function(a){return this.leftRelative>=a.offsetWidth}},{}),Handsontable.plugins.utils=Handsontable.plugins.utils||{},Handsontable.plugins.utils.Cursor=l},{"helpers/dom/element":44,"helpers/dom/event":45}],66:[function(a,b,c){"use strict";function d(){var a=void 0!==arguments[0]?arguments[0]:null,b=void 0!==arguments[1]?arguments[1]:[],c=void 0!==arguments[2]?arguments[2]:{},d=[];return a&&a.items?a=a.items:Array.isArray(a)||(a=b),j(a)?i(a,function(a,b){var e=c["string"==typeof a?a:b];e||(e=a),j(a)?k(e,a):"string"==typeof e&&(e={name:e}),void 0===e.key&&(e.key=b),d.push(e)}):l(a,function(a,b){var e=c[a];!e&&o.indexOf(a)>=0||(e||(e={name:a,key:b+""}),j(a)&&k(e,a),void 0===e.key&&(e.key=b),d.push(e))}),d[0].name===n&&d.shift(),d}Object.defineProperties(c,{ItemsFactory:{get:function(){return q}},__esModule:{value:!0}});var e,f,g,h=(e=a("helpers/object"),e&&e.__esModule&&e||{"default":e}),i=h.objectEach,j=h.isObject,k=h.extend,l=(f=a("helpers/array"),f&&f.__esModule&&f||{"default":f}).arrayEach,m=(g=a("predefinedItems"),g&&g.__esModule&&g||{"default":g}),n=m.SEPARATOR,o=m.ITEMS,p=m.predefinedItems,q=function(a){var b=void 0!==arguments[1]?arguments[1]:null;this.hot=a,this.predefinedItems=p(),this.defaultOrderPattern=b};$traceurRuntime.createClass(q,{setPredefinedItems:function(a){var b=this,c={};this.defaultOrderPattern.length=0,i(a,function(a,d){var e="";a.name===n?(c[n]=a,e=n):isNaN(parseInt(d,10))?(a.key=void 0===a.key?d:a.key,c[d]=a,e=a.key):(c[a.key]=a,e=a.key),b.defaultOrderPattern.push(e)}),this.predefinedItems=c},getVisibleItems:function(){var a=void 0!==arguments[0]?arguments[0]:null,b=this,c={};return i(this.predefinedItems,function(a,d){(!a.hidden||a.hidden&&!a.hidden.apply(b.hot))&&(c[d]=a)}),d(a,this.defaultOrderPattern,c)},getItems:function(){var a=void 0!==arguments[0]?arguments[0]:null;return d(a,this.defaultOrderPattern,this.predefinedItems)}},{})},{"helpers/array":41,"helpers/object":49,predefinedItems:68}],67:[function(a,b,c){"use strict";Object.defineProperties(c,{Menu:{get:function(){return L}},__esModule:{value:!0}});var d,e,f,g,h,i,j,k,l,m,n=(d=a("helpers/dom/element"),d&&d.__esModule&&d||{"default":d}),o=n.addClass,p=n.empty,q=n.fastInnerHTML,r=(n.getComputedStyle,n.getScrollbarWidth),s=(n.getWindowScrollLeft,n.getWindowScrollTop,n.hasClass,n.isChildOf),t=n.removeClass,u=(e=a("helpers/array"),e&&e.__esModule&&e||{"default":e}).arrayEach,v=(f=a("cursor"),f&&f.__esModule&&f||{"default":f}).Cursor,w=(g=a("eventManager"),g&&g.__esModule&&g||{"default":g}).EventManager,x=(h=a("helpers/object"),h&&h.__esModule&&h||{"default":h}),y=(x.extend,x.isObject,x.objectEach,x.mixin),z=(i=a("utils"),i&&i.__esModule&&i||{"default":i}),A=z.isSeparator,B=z.isDisabled,C=z.isSelectionDisabled,D=z.hasSubMenu,E=z.normalizeSelection,F=(j=a("helpers/unicode"),j&&j.__esModule&&j||{"default":j}).KEY_CODES,G=(k=a("pluginHooks"),k&&k.__esModule&&k||{"default":k}).localHooks,H=(l=a("predefinedItems"),l&&l.__esModule&&l||{"default":l}),I=H.SEPARATOR,J=(H.predefinedItems,m=a("helpers/dom/event"),m&&m.__esModule&&m||{"default":m}),K=(J.stopPropagation,J.stopImmediatePropagation),L=(J.pageX,J.pageY,function(a){var b=void 0!==arguments[1]?arguments[1]:{parent:null,name:null,className:"",keepInViewport:!0};this.hot=a,this.options=b,this.eventManager=new w(this),this.container=this.createContainer(this.options.name),this.hotMenu=null,this.hotSubMenus={},this.parentMenu=this.options.parent||null,this.menuItems=null,this.origOutsideClickDeselects=null,this._afterScrollCallback=null,this.registerEvents()}),M=L;$traceurRuntime.createClass(L,{registerEvents:function(){var a=this;this.eventManager.addEventListener(document.documentElement,"mousedown",function(b){return a.onDocumentMouseDown(b)})},setMenuItems:function(a){this.menuItems=a},isSubMenu:function(){return null!==this.parentMenu},open:function(){var a=this;this.container.removeAttribute("style"),this.container.style.display="block";var b={data:this.menuItems,colHeaders:!1,colWidths:[200],autoRowSize:!1,readOnly:!0,copyPaste:!1,columns:[{data:"name",renderer:function(b,c,d,e,f,g){return a.menuItemRenderer(b,c,d,e,f,g)}}],renderAllRows:!0,beforeKeyDown:function(b){return a.onBeforeKeyDown(b)},afterOnCellMouseOver:function(b,c,d){return a.openSubMenu(c.row)}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new Handsontable.Core(this.container,b),this.hotMenu.addHook("afterInit",function(){return a.onAfterInit()}),this.hotMenu.init(),this.hotMenu.listen(),this.blockMainTableCallbacks(),this.runLocalHooks("afterOpen")},close:function(){var a=void 0!==arguments[0]?arguments[0]:!1;this.isOpened()&&(a&&this.parentMenu?this.parentMenu.close():(this.closeAllSubMenus(),this.container.style.display="none",this.releaseMainTableCallbacks(),this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.hot.listen(),this.runLocalHooks("afterClose")))},openSubMenu:function(a){var b=this.hotMenu.getCell(a,0);if(this.closeAllSubMenus(),!b||!D(b))return!1;var c=this.hotMenu.getData()[a],d=new M(this.hot,{parent:this,name:c.name,className:this.options.className});return d.setMenuItems(c.submenu.items),d.open(),d.setPosition(b.getBoundingClientRect()),this.hotSubMenus[c.key]=d,d},closeSubMenu:function(a){var b=this.hotMenu.getData()[a],c=this.hotSubMenus[b.key];c&&(c.destroy(),delete this.hotSubMenus[b.key])},closeAllSubMenus:function(){var a=this;u(this.hotMenu.getData(),function(b,c){return a.closeSubMenu(c)})},isAllSubMenusClosed:function(){return 0===Object.keys(this.hotSubMenus).length},destroy:function(){this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy()},isOpened:function(){return null!==this.hotMenu},executeCommand:function(){var a=arguments[0];if(this.isOpened()&&this.hotMenu.getSelected()){var b=this.hotMenu.getData()[this.hotMenu.getSelected()[0]];if(this.runLocalHooks("select",b,a),b.isCommand!==!1){var c=this.hot.getSelectedRange(),d=c?E(c):{};this.runLocalHooks("executeCommand",b.key,d,a),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",b.key,d,a),this.close(!0)}}},setPosition:function(a){var b=new v(a);this.options.keepInViewport?(b.fitsBelow(this.container)?this.setPositionBelowCursor(b):b.fitsAbove(this.container)?this.setPositionAboveCursor(b):this.setPositionBelowCursor(b),b.fitsOnRight(this.container)?this.setPositionOnRightOfCursor(b):this.setPositionOnLeftOfCursor(b)):(this.setPositionBelowCursor(b),this.setPositionOnRightOfCursor(b)); },setPositionAboveCursor:function(a){var b=a.top-this.container.offsetHeight;this.isSubMenu()&&(b=window.scrollY+a.top+a.cellHeight-this.container.offsetHeight+3),this.container.style.top=b+"px"},setPositionBelowCursor:function(a){var b=a.top-1;this.isSubMenu()&&(b=a.top+window.scrollY-1),this.container.style.top=b+"px"},setPositionOnRightOfCursor:function(a){var b;b=this.isSubMenu()?window.scrollX+1+a.left+a.cellWidth:1+a.left,this.container.style.left=b+"px"},setPositionOnLeftOfCursor:function(a){this.container.style.left=a.left-this.container.offsetWidth+r()+4+"px"},selectFirstCell:function(){var a=this.hotMenu.getCell(0,0);A(a)||B(a)||C(a)?this.selectNextCell(0,0):this.hotMenu.selectCell(0,0)},selectLastCell:function(){var a=this.hotMenu.countRows()-1,b=this.hotMenu.getCell(a,0);A(b)||B(b)||C(b)?this.selectPrevCell(a,0):this.hotMenu.selectCell(a,0)},selectNextCell:function(a,b){var c=a+1,d=c=0?this.hotMenu.getCell(c,b):null;d&&(A(d)||B(d)||C(d)?this.selectPrevCell(c,b):this.hotMenu.selectCell(c,b))},menuItemRenderer:function(a,b,c,d,e,f){var g=this,h=a.getData()[c],i=document.createElement("div"),j=function(a){return a.hasOwnProperty("submenu")},k=function(a){return new RegExp(I,"i").test(a.name)},l=function(a){return a.disabled===!0||"function"==typeof a.disabled&&a.disabled.call(g.hot)===!0},m=function(a){return a.disableSelection};"function"==typeof f&&(f=f.call(this.hot)),p(b),o(i,"htItemWrapper"),b.appendChild(i),k(h)?o(b,"htSeparator"):"function"==typeof h.renderer?(o(b,"htCustomMenuRenderer"),b.appendChild(h.renderer(a,i,c,d,e,f))):q(i,f),l(h)?(o(b,"htDisabled"),this.eventManager.addEventListener(i,"mouseenter",function(){return a.deselectCell()})):m(h)?(o(b,"htSelectionDisabled"),this.eventManager.addEventListener(i,"mouseenter",function(){return a.deselectCell()})):j(h)?(o(b,"htSubmenu"),m(h)?this.eventManager.addEventListener(i,"mouseenter",function(){return a.deselectCell()}):this.eventManager.addEventListener(i,"mouseenter",function(){return a.selectCell(c,d)})):(t(b,"htSubmenu"),t(b,"htDisabled"),m(h)?this.eventManager.addEventListener(i,"mouseenter",function(){return a.deselectCell()}):this.eventManager.addEventListener(i,"mouseenter",function(){return a.selectCell(c,d)}))},createContainer:function(){var a=void 0!==arguments[0]?arguments[0]:null;a&&(a=a.replace(/ /g,"_"),a=this.options.className+"Sub_"+a);var b;return b=a?document.querySelector("."+this.options.className+"."+a):document.querySelector("."+this.options.className),b||(b=document.createElement("div"),o(b,"htMenu "+this.options.className),a&&o(b,a),document.getElementsByTagName("body")[0].appendChild(b)),b},blockMainTableCallbacks:function(){this._afterScrollCallback=function(){},this.hot.addHook("afterScrollVertically",this._afterScrollCallback),this.hot.addHook("afterScrollHorizontally",this._afterScrollCallback)},releaseMainTableCallbacks:function(){this._afterScrollCallback&&(this.hot.removeHook("afterScrollVertically",this._afterScrollCallback),this.hot.removeHook("afterScrollHorizontally",this._afterScrollCallback),this._afterScrollCallback=null)},onBeforeKeyDown:function(a){var b=this.hotMenu.getSelected(),c=!1;switch(a.keyCode){case F.ESCAPE:this.close(),c=!0;break;case F.ENTER:b&&(this.hotMenu.getData()[b[0]].submenu?c=!0:(this.executeCommand(a),this.close(!0)));break;case F.ARROW_DOWN:b?this.selectNextCell(b[0],b[1]):this.selectFirstCell(),c=!0;break;case F.ARROW_UP:b?this.selectPrevCell(b[0],b[1]):this.selectLastCell(),c=!0;break;case F.ARROW_RIGHT:if(b){var d=this.openSubMenu(b[0]);d&&d.selectFirstCell()}c=!0;break;case F.ARROW_LEFT:b&&this.isSubMenu()&&(this.close(),this.parentMenu&&this.parentMenu.hotMenu.listen(),c=!0)}c&&(a.preventDefault(),K(a))},onAfterInit:function(){var a=this.hotMenu.getSettings().data,b=this.hotMenu.view.wt.wtTable.hider.style,c=this.hotMenu.view.wt.wtTable.holder.style,d=parseInt(b.width,10),e=0;u(a,function(a){return e+=a.name===I?1:26}),c.width=d+22+"px",c.height=e+4+"px"},onDocumentMouseDown:function(a){this.isOpened()&&(this.container&&s(a.target,this.container)&&this.executeCommand(a),(this.isAllSubMenusClosed()||this.isSubMenu())&&!s(a.target,".htMenu")&&s(a.target,document)&&this.close(!0))}},{}),y(L,G)},{cursor:65,eventManager:40,"helpers/array":41,"helpers/dom/element":44,"helpers/dom/event":45,"helpers/object":49,"helpers/unicode":52,pluginHooks:54,predefinedItems:68,utils:69}],68:[function(a,b,c){"use strict";function d(){var a={};return k(F,function(b,c){return a[c]=l(b)}),a}function e(a,b){-1===E.indexOf(a)&&(F[a]=b)}var f;Object.defineProperties(c,{ROW_ABOVE:{get:function(){return s}},ROW_BELOW:{get:function(){return t}},COLUMN_LEFT:{get:function(){return u}},COLUMN_RIGHT:{get:function(){return v}},CLEAR_COLUMN:{get:function(){return w}},REMOVE_ROW:{get:function(){return x}},REMOVE_COLUMN:{get:function(){return y}},UNDO:{get:function(){return z}},REDO:{get:function(){return A}},READ_ONLY:{get:function(){return B}},ALIGNMENT:{get:function(){return C}},SEPARATOR:{get:function(){return D}},ITEMS:{get:function(){return E}},predefinedItems:{get:function(){return d}},addItem:{get:function(){return e}},__esModule:{value:!0}});var g,h,i,j=(g=a("helpers/object"),g&&g.__esModule&&g||{"default":g}),k=j.objectEach,l=j.clone,m=((h=a("helpers/number"),h&&h.__esModule&&h||{"default":h}).rangeEach,i=a("utils"),i&&i.__esModule&&i||{"default":i}),n=m.align,o=m.getAlignmentClasses,p=m.getValidSelection,q=m.checkSelectionConsistency,r=m.markLabelAsSelected,s="row_above",t="row_below",u="col_left",v="col_right",w="clear_column",x="remove_row",y="remove_col",z="undo",A="redo",B="make_read_only",C="alignment",D="---------",E=[s,t,u,v,w,x,y,z,A,B,C,D],F=(f={},Object.defineProperty(f,D,{value:{name:D},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(f,s,{value:{key:s,name:"Insert row above",callback:function(a,b){this.alter("insert_row",b.start.row)},disabled:function(){var a=p(this);if(!a)return!0;var b=this.countRows(),c=[0,a[1],b-1,a[1]];return c.join(",")===a.join(",")&&b>1},hidden:function(){return!this.getSettings().allowInsertRow}},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(f,t,{value:{key:t,name:"Insert row below",callback:function(a,b){this.alter("insert_row",b.end.row+1)},disabled:function(){var a=p(this);if(!a)return!0;var b=this.countRows(),c=[0,a[1],b-1,a[1]];return c.join(",")===a.join(",")&&b>1},hidden:function(){return!this.getSettings().allowInsertRow}},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(f,u,{value:{key:u,name:"Insert column on the left",callback:function(a,b){this.alter("insert_col",b.start.col)},disabled:function(){var a=p(this);if(!a)return!0;if(!this.isColumnModificationAllowed())return!0;var b=[a[0],0,a[0],this.countCols()-1],c=b.join(",")==a.join(",");return a[1]<0||this.countCols()>=this.getSettings().maxCols||c},hidden:function(){return!this.getSettings().allowInsertColumn}},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(f,v,{value:{key:v,name:"Insert column on the right",callback:function(a,b){this.alter("insert_col",b.end.col+1)},disabled:function(){var a=p(this);if(!a)return!0;if(!this.isColumnModificationAllowed())return!0;var b=[a[0],0,a[0],this.countCols()-1],c=b.join(",")==a.join(",");return a[1]<0||this.countCols()>=this.getSettings().maxCols||c},hidden:function(){return!this.getSettings().allowInsertColumn}},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(f,w,{value:{key:w,name:"Clear column",callback:function(a,b){var c=b.start.col;this.populateFromArray(0,c,[[null]],Math.max(b.start.row,b.end.row),c)},disabled:function(){var a=p(this);if(!a)return!0;var b=[a[0],0,a[0],this.countCols()-1],c=b.join(",")==a.join(",");return a[1]<0||this.countCols()>=this.getSettings().maxCols||c}},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(f,x,{value:{key:x,name:"Remove row",callback:function(a,b){var c=b.end.row-b.start.row+1;this.alter("remove_row",b.start.row,c)},disabled:function(){var a=p(this);if(!a)return!0;var b=[0,a[1],this.countRows()-1,a[1]];return b.join(",")===a.join(",")},hidden:function(){return!this.getSettings().allowRemoveRow}},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(f,y,{value:{key:y,name:"Remove column",callback:function(a,b){var c=b.end.col-b.start.col+1;this.alter("remove_col",b.start.col,c)},disabled:function(){var a=p(this);if(!a)return!0;if(!this.isColumnModificationAllowed())return!0;var b=[a[0],0,a[0],this.countCols()-1],c=b.join(",")==a.join(",");return a[1]<0||c},hidden:function(){return!this.getSettings().allowRemoveColumn}},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(f,z,{value:{key:z,name:"Undo",callback:function(){this.undo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isUndoAvailable()}},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(f,A,{value:{key:A,name:"Redo",callback:function(){this.redo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isRedoAvailable()}},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(f,B,{value:{key:B,name:function(){var a=this,b="Read only",c=q(this.getSelectedRange(),function(b,c){return a.getCellMeta(b,c).readOnly});return c&&(b=r(b)),b},callback:function(){var a=this,b=this.getSelectedRange(),c=q(b,function(b,c){return a.getCellMeta(b,c).readOnly});b.forAll(function(b,d){a.getCellMeta(b,d).readOnly=c?!1:!0}),this.render()},disabled:function(){return this.getSelectedRange()?!1:!0}},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(f,C,{value:{key:C,name:"Alignment",disabled:function(){return this.getSelectedRange()?!1:!0},submenu:{items:[{key:C+":left",name:function(){var a=this,b="Left",c=q(this.getSelectedRange(),function(b,c){var d=a.getCellMeta(b,c).className;return d&&-1!==d.indexOf("htLeft")?!0:void 0});return c&&(b=r(b)),b},callback:function(){var a=this,b=this.getSelectedRange(),c=o(b,function(b,c){return a.getCellMeta(b,c).className}),d="horizontal",e="htLeft";this.runHooks("beforeCellAlignment",c,b,d,e),n(b,d,e,function(b,c){return a.getCellMeta(b,c)}),this.render()},disabled:!1},{key:C+":center",name:function(){var a=this,b="Center",c=q(this.getSelectedRange(),function(b,c){var d=a.getCellMeta(b,c).className;return d&&-1!==d.indexOf("htCenter")?!0:void 0});return c&&(b=r(b)),b},callback:function(){var a=this,b=this.getSelectedRange(),c=o(b,function(b,c){return a.getCellMeta(b,c).className}),d="horizontal",e="htCenter";this.runHooks("beforeCellAlignment",c,b,d,e),n(b,d,e,function(b,c){return a.getCellMeta(b,c)}),this.render()},disabled:!1},{key:C+":right",name:function(){var a=this,b="Right",c=q(this.getSelectedRange(),function(b,c){var d=a.getCellMeta(b,c).className;return d&&-1!==d.indexOf("htRight")?!0:void 0});return c&&(b=r(b)),b},callback:function(){var a=this,b=this.getSelectedRange(),c=o(b,function(b,c){return a.getCellMeta(b,c).className}),d="horizontal",e="htRight";this.runHooks("beforeCellAlignment",c,b,d,e),n(b,d,e,function(b,c){return a.getCellMeta(b,c)}),this.render()},disabled:!1},{key:C+":justify",name:function(){var a=this,b="Justify",c=q(this.getSelectedRange(),function(b,c){var d=a.getCellMeta(b,c).className;return d&&-1!==d.indexOf("htJustify")?!0:void 0});return c&&(b=r(b)),b},callback:function(){var a=this,b=this.getSelectedRange(),c=o(b,function(b,c){return a.getCellMeta(b,c).className}),d="horizontal",e="htJustify";this.runHooks("beforeCellAlignment",c,b,d,e),n(b,d,e,function(b,c){return a.getCellMeta(b,c)}),this.render()},disabled:!1},{name:D},{key:C+":top",name:function(){var a=this,b="Top",c=q(this.getSelectedRange(),function(b,c){var d=a.getCellMeta(b,c).className;return d&&-1!==d.indexOf("htTop")?!0:void 0});return c&&(b=r(b)),b},callback:function(){var a=this,b=this.getSelectedRange(),c=o(b,function(b,c){return a.getCellMeta(b,c).className}),d="vertical",e="htTop";this.runHooks("beforeCellAlignment",c,b,d,e),n(b,d,e,function(b,c){return a.getCellMeta(b,c)}),this.render()},disabled:!1},{key:C+":middle",name:function(){var a=this,b="Middle",c=q(this.getSelectedRange(),function(b,c){var d=a.getCellMeta(b,c).className;return d&&-1!==d.indexOf("htMiddle")?!0:void 0});return c&&(b=r(b)),b},callback:function(){var a=this,b=this.getSelectedRange(),c=o(b,function(b,c){return a.getCellMeta(b,c).className}),d="vertical",e="htMiddle";this.runHooks("beforeCellAlignment",c,b,d,e),n(b,d,e,function(b,c){return a.getCellMeta(b,c)}),this.render()},disabled:!1},{key:C+":bottom",name:function(){var a=this,b="Bottom",c=q(this.getSelectedRange(),function(b,c){var d=a.getCellMeta(b,c).className;return d&&-1!==d.indexOf("htBottom")?!0:void 0});return c&&(b=r(b)),b},callback:function(){var a=this,b=this.getSelectedRange(),c=o(b,function(b,c){return a.getCellMeta(b,c).className}),d="vertical",e="htBottom";this.runHooks("beforeCellAlignment",c,b,d,e),n(b,d,e,function(b,c){return a.getCellMeta(b,c)}),this.render()},disabled:!1}]}},configurable:!0,enumerable:!0,writable:!0}),f)},{"helpers/number":48,"helpers/object":49,utils:69}],69:[function(a,b,c){"use strict";function d(a){return{start:a.getTopLeftCorner(),end:a.getBottomRightCorner()}}function e(a){return r(a,"htSeparator")}function f(a){return r(a,"htSubmenu")}function g(a){return r(a,"htDisabled")}function h(a){return r(a,"htSelectionDisabled")}function i(a){var b=a.getSelected();return b?b[0]<0?null:a.countRows()>=a.getSettings().maxRows?null:b:null}function j(a,b){return-1!=a.indexOf(b)?a:(a=a.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ",""),a+=" "+b)}function k(a,b){return-1!=a.indexOf(b)?a:(a=a.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ",""),a+=" "+b)}function l(a,b){for(var c={},d=a.from.row;d<=a.to.row;d++)for(var e=a.from.col;e<=a.to.col;e++)c[d]||(c[d]=[]),c[d][e]=b(d,e);return c}function m(a,b,c,d){if(a.from.row==a.to.row&&a.from.col==a.to.col)n(a.from.row,a.from.col,b,c,d);else for(var e=a.from.row;e<=a.to.row;e++)for(var f=a.from.col;f<=a.to.col;f++)n(e,f,b,c,d)}function n(a,b,c,d,e){var f=e(a,b),g=d;f.className&&(g="vertical"===c?j(f.className,d):k(f.className,d)),f.className=g}function o(a,b){var c=!1;return a&&a.forAll(function(a,d){return b(a,d)?(c=!0,!1):void 0}),c}function p(a){return''+String.fromCharCode(10003)+""+a}Object.defineProperties(c,{normalizeSelection:{get:function(){return d}},isSeparator:{get:function(){return e}},hasSubMenu:{get:function(){return f}},isDisabled:{get:function(){return g}},isSelectionDisabled:{get:function(){return h}},getValidSelection:{get:function(){return i}},prepareVerticalAlignClass:{get:function(){return j}},prepareHorizontalAlignClass:{get:function(){return k}},getAlignmentClasses:{get:function(){return l}},align:{get:function(){return m}},checkSelectionConsistency:{get:function(){return o}},markLabelAsSelected:{get:function(){return p}},__esModule:{value:!0}});var q,r=(q=a("helpers/dom/element"),q&&q.__esModule&&q||{"default":q}).hasClass},{"helpers/dom/element":44}],70:[function(a,b,c){"use strict";Object.defineProperties(c,{ContextMenuCopyPaste:{get:function(){return p}},__esModule:{value:!0}});var d,e,f,g,h,i,j=(d=a("helpers/dom/element"),d&&d.__esModule&&d||{"default":d}).removeClass,k=(e=a("helpers/array"),e&&e.__esModule&&e||{"default":e}).arrayEach,l=(f=a("eventManager"),f&&f.__esModule&&f||{"default":f}).EventManager,m=(g=a("plugins"),g&&g.__esModule&&g||{"default":g}).registerPlugin,n=(h=a("_base"),h&&h.__esModule&&h||{"default":h})["default"],o=(i=a("zeroclipboard"),i&&i.__esModule&&i||{"default":i})["default"],p=function(a){$traceurRuntime.superConstructor(q).call(this,a),this.eventManager=new l(this),this.swfPath=null,this.outsideClickDeselectsCache=null},q=p;$traceurRuntime.createClass(p,{isEnabled:function(){return this.hot.getSettings().contextMenuCopyPaste},enablePlugin:function(){var a=this;if(!this.enabled){"object"==typeof this.hot.getSettings().contextMenuCopyPaste&&(this.swfPath=this.hot.getSettings().contextMenuCopyPaste.swfPath),"undefined"==typeof o&&console.error("To be able to use the Copy/Paste feature from the context menu, you need to manually include ZeroClipboard.js file to your website.");try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(b){"undefined"==typeof navigator.mimeTypes["application/x-shockwave-flash"]&&console.error("To be able to use the Copy/Paste feature from the context menu, your browser needs to have Flash Plugin installed.")}this.swfPath&&o.config({swfPath:this.swfPath}),this.hot.addHook("afterContextMenuShow",function(){return a.onAfterContextMenuShow()}),this.hot.addHook("afterContextMenuDefaultOptions",function(b){return a.onAfterContextMenuDefaultOptions(b)}),this.registerEvents(),$traceurRuntime.superGet(this,q.prototype,"enablePlugin").call(this)}},disablePlugin:function(){$traceurRuntime.superGet(this,q.prototype,"disablePlugin").call(this)},registerEvents:function(){var a=this;this.eventManager.addEventListener(document,"mouseenter",function(){return a.removeCurrentClass()}),this.eventManager.addEventListener(document,"mouseleave",function(){return a.removeZeroClipboardClass()})},getCopyValue:function(){return this.hot.copyPaste.setCopyableText(),this.hot.copyPaste.copyPasteInstance.elTextarea.value},onAfterContextMenuDefaultOptions:function(a){a.items.unshift({key:"copy",name:"Copy"},{key:"paste",name:"Paste",callback:function(){this.copyPaste.triggerPaste()}},Handsontable.plugins.ContextMenu.SEPARATOR)},onAfterContextMenuShow:function(){var a=this,b=this.hot.getPlugin("contextMenu"),c=b.menu.hotMenu.getData();k(c,function(c,d){if("copy"===c.key){var e=new o(b.menu.hotMenu.getCell(d,0));return e.off(),e.on("copy",function(b){var c=b.clipboardData;c.setData("text/plain",a.getCopyValue()),a.hot.getSettings().outsideClickDeselects=a.outsideClickDeselectsCache}),!1}})},removeCurrentClass:function(){var a=this.hot.getPlugin("contextMenu");if(a.menu.isOpened()){var b=a.menu.hotMenu.rootElement.querySelector("td.current");b&&j(b,"current")}this.outsideClickDeselectsCache=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1},removeZeroClipboardClass:function(){var a=this.hot.getPlugin("contextMenu");if(a.menu.isOpened()){var b=a.menu.hotMenu.rootElement.querySelector("td.zeroclipboard-is-hover");b&&j(b,"zeroclipboard-is-hover")}this.hot.getSettings().outsideClickDeselects=this.outsideClickDeselectsCache}},{},n),m("contextMenuCopyPaste",p)},{_base:56,eventManager:40,"helpers/array":41,"helpers/dom/element":44,plugins:55,zeroclipboard:"zeroclipboard"}],71:[function(a,b,c){"use strict";function d(a){function b(){a.isListening()&&a.selection.empty()}function c(b){var c,d,e,f,g,h,i,j,k,l;if(a.isListening()&&a.selection.isSelected()){c=b,d=q.parse(c),e=a.getSelected(),f=new y(e[0],e[1]),g=new y(e[2],e[3]),h=new z(f,f,g),i=h.getTopLeftCorner(),j=h.getBottomRightCorner(),k=i,l=new y(Math.max(j.row,d.length-1+i.row),Math.max(j.col,d[0].length-1+i.col));var m=g.row-f.row>=d.length-1,n=g.col-f.col>=d[0].length-1;a.addHookOnce("afterChange",function(b,c){var d=b?b.length:0;if(d){var e={row:0,col:0},f=-1;u(b,function(a,c){var g=d>c+1?b[c+1]:null;g&&(m||(e.row=e.row+Math.max(g[0]-a[0]-1,0)),!n&&a[1]>f&&(f=a[1],e.col=e.col+Math.max(g[1]-a[1]-1,0)))}),a.selectCell(k.row,k.col,l.row+e.row,l.col+e.col)}}),a.populateFromArray(k.row,k.col,d,l.row,l.col,"paste",a.getSettings().pasteMode)}}function d(b){if(a.getSelected()&&(!a.getActiveEditor()||!a.getActiveEditor().isOpened())){if(t(b.keyCode))return e.setCopyableText(),void w(b);var c=(b.ctrlKey||b.metaKey)&&!b.altKey;b.keyCode==s.A&&c&&a._registerTimeout(setTimeout(x(e.setCopyableText,e),0))}}var e=this;this.copyPasteInstance=p(),this.copyPasteInstance.onCut(b),this.copyPasteInstance.onPaste(c),this.onPaste=c,a.addHook("beforeKeyDown",d),this.destroy=function(){this.copyPasteInstance&&(this.copyPasteInstance.removeCallback(b),this.copyPasteInstance.removeCallback(c),this.copyPasteInstance.destroy(),this.copyPasteInstance=null),a.removeHook("beforeKeyDown",d)},a.addHook("afterDestroy",x(this.destroy,this)),this.triggerPaste=x(this.copyPasteInstance.triggerPaste,this.copyPasteInstance),this.triggerCut=x(this.copyPasteInstance.triggerCut,this.copyPasteInstance),this.setCopyableText=function(){var b=a.getSettings(),c=b.copyRowsLimit,d=b.copyColsLimit,e=a.getSelectedRange(),f=e.getTopLeftCorner(),g=e.getBottomRightCorner(),h=f.row,i=f.col,j=g.row,k=g.col,l=Math.min(j,h+c-1),m=Math.min(k,i+d-1),n=[];n.push({startRow:h,startCol:i,endRow:l,endCol:m}),n=Handsontable.hooks.run(a,"modifyCopyableRange",n);var o=this.getRangedCopyableData(n);a.copyPaste.copyPasteInstance.copyable(o),(j!==l||k!==m)&&Handsontable.hooks.run(a,"afterCopyLimit",j-h+1,k-i+1,c,d)},this.getRangedCopyableData=function(b){var c=[],d=[],e=[];return u(b,function(a){v(a.startRow,a.endRow,function(a){-1===d.indexOf(a)&&d.push(a)}),v(a.startCol,a.endCol,function(a){-1===e.indexOf(a)&&e.push(a)})}),u(d,function(b){var d=[];u(e,function(c){d.push(a.getCopyableData(b,c))}),c.push(d)}),q.stringify(c)}}function e(){var a=this,b=a.getSettings().copyPaste!==!1;b&&!a.copyPaste?a.copyPaste=new d(a):!b&&a.copyPaste&&(a.copyPaste.destroy(),a.copyPaste=null)}Object.defineProperties(c,{CopyPastePlugin:{get:function(){return d}},__esModule:{value:!0}});var f,g,h,i,j,k,l,m,n,o,p=(f=a("copyPaste"),f&&f.__esModule&&f||{"default":f})["default"],q=(g=a("SheetClip"),g&&g.__esModule&&g||{"default":g})["default"],r=(h=a("helpers/unicode"),h&&h.__esModule&&h||{"default":h}),s=r.KEY_CODES,t=r.isCtrlKey,u=(i=a("helpers/array"),i&&i.__esModule&&i||{"default":i}).arrayEach,v=(j=a("helpers/number"),j&&j.__esModule&&j||{"default":j}).rangeEach,w=(k=a("helpers/dom/event"),k&&k.__esModule&&k||{"default":k}).stopImmediatePropagation,x=(l=a("helpers/function"),l&&l.__esModule&&l||{"default":l}).proxy,y=((m=a("plugins"),m&&m.__esModule&&m||{"default":m}).registerPlugin,(n=a("3rdparty/walkontable/src/cell/coords"),n&&n.__esModule&&n||{"default":n}).WalkontableCellCoords),z=(o=a("3rdparty/walkontable/src/cell/range"),o&&o.__esModule&&o||{"default":o}).WalkontableCellRange;Handsontable.hooks.add("afterInit",e),Handsontable.hooks.add("afterUpdateSettings",e),Handsontable.hooks.register("afterCopyLimit"),Handsontable.hooks.register("modifyCopyableRange")},{"3rdparty/walkontable/src/cell/coords":5,"3rdparty/walkontable/src/cell/range":6,SheetClip:"SheetClip",copyPaste:"copyPaste","helpers/array":41,"helpers/dom/event":45,"helpers/function":46,"helpers/number":48,"helpers/unicode":52,plugins:55}],72:[function(a,b,c){"use strict";function d(){}var e,f,g,h,i=((e=a("plugins"),e&&e.__esModule&&e||{"default":e}).registerPlugin,(f=a("3rdparty/walkontable/src/cell/range"),f&&f.__esModule&&f||{"default":f}).WalkontableCellRange),j=(g=a("3rdparty/walkontable/src/selection"),g&&g.__esModule&&g||{"default":g}).WalkontableSelection,k=function(a){return"boolean"==typeof a&&a===!0?!0:"object"==typeof a&&a.length>0?!0:!1},l=function(){k(this.getSettings().customBorders)&&(this.customBorders||(h=this,this.customBorders=new d))},m=function(a){for(var b=0;b=0?h.view.wt.selections[d]=c:h.view.wt.selections.push(c)},o=function(a,b,c){var d=u(a,b);d=v(d,c),this.setCellMeta(a,b,"borders",d),n(d)},p=function(a){for(var b=a.range,c=b.from.row;c<=b.to.row;c++)for(var d=b.from.col;d<=b.to.col;d++){var e=u(c,d),f=0;c==b.from.row&&(f++,a.hasOwnProperty("top")&&(e.top=a.top)),c==b.to.row&&(f++,a.hasOwnProperty("bottom")&&(e.bottom=a.bottom)),d==b.from.col&&(f++,a.hasOwnProperty("left")&&(e.left=a.left)),d==b.to.col&&(f++,a.hasOwnProperty("right")&&(e.right=a.right)),f>0&&(this.setCellMeta(c,d,"borders",e),n(e))}},q=function(a,b){return"border_row"+a+"col"+b},r=function(){return{width:1,color:"#000"}},s=function(){return{hide:!0}},t=function(){return{width:1,color:"#000",cornerVisible:!1}},u=function(a,b){return{className:q(a,b),border:t(),row:a,col:b,top:s(),right:s(),bottom:s(),left:s()}},v=function(a,b){return b.hasOwnProperty("border")&&(a.border=b.border),b.hasOwnProperty("top")&&(a.top=b.top),b.hasOwnProperty("right")&&(a.right=b.right),b.hasOwnProperty("bottom")&&(a.bottom=b.bottom),b.hasOwnProperty("left")&&(a.left=b.left),a},w=function(a){for(var b=document.querySelectorAll("."+a),c=0;c'+String.fromCharCode(10003)+""+a},C=function(a){this.getSettings().customBorders&&(a.items.push(Handsontable.plugins.ContextMenu.SEPARATOR),a.items.push({key:"borders",name:"Borders",submenu:{items:[{key:"borders:top",name:function(){var a="Top",b=A(this,"top");return b&&(a=B(a)),a},callback:function(){var a=A(this,"top");z.call(this,this.getSelectedRange(),"top",a)},disabled:!1},{key:"borders:right",name:function(){var a="Right",b=A(this,"right");return b&&(a=B(a)),a},callback:function(){var a=A(this,"right");z.call(this,this.getSelectedRange(),"right",a)},disabled:!1},{key:"borders:bottom",name:function(){var a="Bottom",b=A(this,"bottom");return b&&(a=B(a)),a},callback:function(){var a=A(this,"bottom");z.call(this,this.getSelectedRange(),"bottom",a)},disabled:!1},{key:"borders:left",name:function(){var a="Left",b=A(this,"left");return b&&(a=B(a)),a},callback:function(){var a=A(this,"left");z.call(this,this.getSelectedRange(),"left",a)},disabled:!1},{key:"borders:no_borders",name:"Remove border(s)",callback:function(){z.call(this,this.getSelectedRange(),"noBorders")},disabled:function(){return!A(this)}}]}}))};Handsontable.hooks.add("beforeInit",l),Handsontable.hooks.add("afterContextMenuDefaultOptions",C),Handsontable.hooks.add("afterInit",function(){var a=this.getSettings().customBorders;if(a){for(var b=0;bthis.boundaries.bottom&&(d=b-this.boundaries.bottom),athis.boundaries.right&&(c=a-this.boundaries.right),this.callback(c,d)};var h,i=function(a){a.dragToScrollListening=!1;var b=a.view.wt.wtTable.holder;h=new d,b!==window&&(h.setBoundaries(b.getBoundingClientRect()),h.setCallback(function(a,c){0>a?b.scrollLeft-=50:a>0&&(b.scrollLeft+=50),0>c?b.scrollTop-=20:c>0&&(b.scrollTop+=20)}),a.dragToScrollListening=!0)};Handsontable.hooks.add("afterInit",function(){var a=this,b=g(this);b.addEventListener(document,"mouseup",function(){a.dragToScrollListening=!1}),b.addEventListener(document,"mousemove",function(b){a.dragToScrollListening&&h.check(b.clientX,b.clientY)})}),Handsontable.hooks.add("afterDestroy",function(){g(this).clear()}),Handsontable.hooks.add("afterOnCellMouseDown",function(){i(this)}),Handsontable.hooks.add("afterOnCellCornerMouseDown",function(){i(this)}),Handsontable.plugins.DragToScroll=d},{eventManager:40,plugins:55}],74:[function(a,b,c){"use strict";Object.defineProperties(c,{ManualColumnFreeze:{get:function(){return h}},__esModule:{value:!0}});var d,e,f=(d=a("_base"),d&&d.__esModule&&d||{"default":d})["default"],g=(e=a("plugins"),e&&e.__esModule&&e||{"default":e}).registerPlugin,h=function(a){$traceurRuntime.superConstructor(i).call(this,a)},i=h;$traceurRuntime.createClass(h,{isEnabled:function(){return!!this.hot.getSettings().manualColumnFreeze},enablePlugin:function(){var a=this;this.enabled||(this.addHook("modifyCol",function(b){return a.onModifyCol(b)}),this.addHook("afterContextMenuDefaultOptions",function(b){return a.addContextMenuEntry(b)}),$traceurRuntime.superGet(this,i.prototype,"enablePlugin").call(this))},disablePlugin:function(){$traceurRuntime.superGet(this,i.prototype,"disablePlugin").call(this)},init:function(){$traceurRuntime.superGet(this,i.prototype,"init").call(this),"undefined"==typeof this.hot.manualColumnPositionsPluginUsages?this.hot.manualColumnPositionsPluginUsages=["manualColumnFreeze"]:this.hot.manualColumnPositionsPluginUsages.push("manualColumnFreeze"),this.fixedColumnsCount=this.hot.getSettings().fixedColumnsLeft},onModifyCol:function(a){return this.hot.manualColumnPositionsPluginUsages.length>1?a:this.getModifiedColumnIndex(a)},getModifiedColumnIndex:function(a){return this.hot.manualColumnPositions[a]},addContextMenuEntry:function(a){var b=this;a.items.push(Handsontable.plugins.ContextMenu.SEPARATOR,{key:"freeze_column",name:function(){var a=b.hot.getSelected()[1];return a>b.fixedColumnsCount-1?"Freeze this column":"Unfreeze this column"},disabled:function(){var a=b.hot.getSelected();return a[1]!==a[3]},callback:function(){var a=b.hot.getSelected()[1];a>b.fixedColumnsCount-1?b.freezeColumn(a):b.unfreezeColumn(a)}})},freezeColumn:function(a){if(!(a<=this.fixedColumnsCount-1)){var b=this.getModifiedColumnIndex(a)||a;this.checkPositionData(b),this.modifyColumnOrder(b,a,null,"freeze"),this.addFixedColumn(),this.hot.view.wt.wtOverlays.leftOverlay.refresh(),this.hot.view.wt.wtOverlays.adjustElementsSize()}},unfreezeColumn:function(a){if(!(a>this.fixedColumnsCount-1)){var b=this.getBestColumnReturnPosition(a),c=this.getModifiedColumnIndex(a)||a;this.checkPositionData(c),this.modifyColumnOrder(c,a,b,"unfreeze"),this.removeFixedColumn(),this.hot.view.wt.wtOverlays.leftOverlay.refresh(),this.hot.view.wt.wtOverlays.adjustElementsSize()}},addFixedColumn:function(){this.hot.updateSettings({fixedColumnsLeft:this.fixedColumnsCount+1}),this.fixedColumnsCount++},removeFixedColumn:function(){this.hot.updateSettings({fixedColumnsLeft:this.fixedColumnsCount-1}),this.fixedColumnsCount--},checkPositionData:function(a){this.hot.manualColumnPositions&&0!==this.hot.manualColumnPositions.length||this.hot.manualColumnPositions||(this.hot.manualColumnPositions=[]),a?this.hot.manualColumnPositions[a]||this.createPositionData(a+1):this.createPositionData(this.hot.countCols())},createPositionData:function(a){if(this.hot.manualColumnPositions.lengthb;b++)this.hot.manualColumnPositions[b]=b; },modifyColumnOrder:function(a,b,c,d){null==c&&(c=a),"freeze"===d?this.hot.manualColumnPositions.splice(this.fixedColumnsCount,0,this.hot.manualColumnPositions.splice(b,1)[0]):"unfreeze"===d&&this.hot.manualColumnPositions.splice(c,0,this.hot.manualColumnPositions.splice(b,1)[0])},getBestColumnReturnPosition:function(a){for(var b=this.fixedColumnsCount,c=this.getModifiedColumnIndex(b),d=this.getModifiedColumnIndex(a);d>c;)b++,c=this.getModifiedColumnIndex(b);return b-1}},{},f),g("manualColumnFreeze",h)},{_base:56,plugins:55}],75:[function(a,b,c){"use strict";function d(){function a(a){p=this,q=a;var b=this.view.wt.wtTable.getCoords(a).col;if(b>=0){n=b;var c=q.getBoundingClientRect();i=c.left,r.style.top=c.top+"px",r.style.left=i+"px",p.rootElement.appendChild(r)}}function b(a,b){var c=a.getBoundingClientRect(),d=6;b>0?r.style.left=c.left+c.width-d+"px":r.style.left=c.left+"px"}function c(){var a=this;j(r,"active"),j(s,"active");var b=q.getBoundingClientRect();s.style.width=b.width+"px",s.style.height=a.view.maximumVisibleElementHeight(0)+"px",s.style.top=r.style.top,s.style.left=i+"px",a.rootElement.appendChild(s)}function d(a){s.style.left=i+a+"px"}function e(){l(r,"active"),l(s,"active")}var f,g,h,i,n,p,q,r=document.createElement("DIV"),s=document.createElement("DIV"),t=m(this);r.className="manualColumnMover",s.className="manualColumnMoverGuide";var u=function(){var a=this;Handsontable.hooks.run(a,"persistentStateSave","manualColumnPositions",a.manualColumnPositions)},v=function(){var a=this,b={};return Handsontable.hooks.run(a,"persistentStateLoad","manualColumnPositions",b),b.value},w=function(a){return"BODY"!=a.tagName?"THEAD"==a.parentNode.tagName?!0:(a=a.parentNode,w(a)):!1},x=function(a){return"TABLE"!=a.tagName?"TH"==a.tagName?a:x(a.parentNode):null},y=function(){var i,j=this;t.addEventListener(j.rootElement,"mouseover",function(c){if(w(c.target)){var d=x(c.target);if(d)if(i){var e=j.view.wt.wtTable.getCoords(d).col;e>=0&&(g=e,b(c.target,g-f))}else a.call(j,d)}}),t.addEventListener(j.rootElement,"mousedown",function(a){k(a.target,"manualColumnMover")&&(h=o(a),c.call(j),i=j,f=n,g=n)}),t.addEventListener(window,"mousemove",function(a){i&&d(o(a)-h)}),t.addEventListener(window,"mouseup",function(b){i&&(e(),i=!1,A(j.manualColumnPositions,j.countCols()),j.manualColumnPositions.splice(g,0,j.manualColumnPositions.splice(f,1)[0]),Handsontable.hooks.run(j,"beforeColumnMove",f,g),j.forceFullRender=!0,j.view.render(),u.call(j),Handsontable.hooks.run(j,"afterColumnMove",f,g),a.call(j,q))}),j.addHook("afterDestroy",z)},z=function(){t.clear()},A=function(a,b){if(a.lengthc;c++)a[c]=c};this.beforeInit=function(){this.manualColumnPositions=[]},this.init=function(a){var b=this,c=!!this.getSettings().manualColumnMove;if(c){var d=this.getSettings().manualColumnMove,e=v.call(b);"undefined"!=typeof e?this.manualColumnPositions=e:Array.isArray(d)?this.manualColumnPositions=d:this.manualColumnPositions=[],("afterInit"===a||"afterUpdateSettings"===a&&0===t.context.eventListeners.length)&&("undefined"==typeof b.manualColumnPositionsPluginUsages?b.manualColumnPositionsPluginUsages=["manualColumnMove"]:b.manualColumnPositionsPluginUsages.push("manualColumnMove"),y.call(this),this.manualColumnPositions.length>0&&(this.forceFullRender=!0,this.render()))}else{var f=b.manualColumnPositionsPluginUsages?b.manualColumnPositionsPluginUsages.indexOf("manualColumnMove"):-1;f>-1&&(z.call(this),this.manualColumnPositions=[],b.manualColumnPositionsPluginUsages[f]=void 0)}},this.modifyCol=function(a){return this.getSettings().manualColumnMove?("undefined"==typeof this.manualColumnPositions[a]&&A(this.manualColumnPositions,a+1),this.manualColumnPositions[a]):a},this.afterRemoveCol=function(a,b){if(this.getSettings().manualColumnMove){var c,d=this.manualColumnPositions;c=d.splice(a,b),d=d.map(function(a){var b,d=a;for(b=0;bc[b]&&d--;return d}),this.manualColumnPositions=d}},this.afterCreateCol=function(a,b){if(this.getSettings().manualColumnMove){var c=this.manualColumnPositions;if(c.length){for(var d=[],e=0;b>e;e++)d.push(a+e);a>=c.length?c.concat(d):(c=c.map(function(c){return c>=a?c+b:c}),c.splice.apply(c,[a,0].concat(d))),this.manualColumnPositions=c}}}}Object.defineProperties(c,{ManualColumnMove:{get:function(){return d}},__esModule:{value:!0}});var e,f,g,h,i=(e=a("helpers/dom/element"),e&&e.__esModule&&e||{"default":e}),j=i.addClass,k=i.hasClass,l=i.removeClass,m=(f=a("eventManager"),f&&f.__esModule&&f||{"default":f}).eventManager,n=(g=a("helpers/dom/event"),g&&g.__esModule&&g||{"default":g}),o=n.pageX,p=(n.pageY,(h=a("plugins"),h&&h.__esModule&&h||{"default":h}).registerPlugin,new d);Handsontable.hooks.add("beforeInit",p.beforeInit),Handsontable.hooks.add("afterInit",function(){p.init.call(this,"afterInit")}),Handsontable.hooks.add("afterUpdateSettings",function(){p.init.call(this,"afterUpdateSettings")}),Handsontable.hooks.add("modifyCol",p.modifyCol),Handsontable.hooks.add("afterRemoveCol",p.afterRemoveCol),Handsontable.hooks.add("afterCreateCol",p.afterCreateCol),Handsontable.hooks.register("beforeColumnMove"),Handsontable.hooks.register("afterColumnMove")},{eventManager:40,"helpers/dom/element":44,"helpers/dom/event":45,plugins:55}],76:[function(a,b,c){"use strict";Object.defineProperties(c,{ManualColumnResize:{get:function(){return r}},__esModule:{value:!0}});var d,e,f,g,h,i=(d=a("_base.js"),d&&d.__esModule&&d||{"default":d})["default"],j=(e=a("helpers/dom/element"),e&&e.__esModule&&e||{"default":e}),k=j.addClass,l=j.hasClass,m=j.removeClass,n=(f=a("eventManager"),f&&f.__esModule&&f||{"default":f}).eventManager,o=(g=a("helpers/dom/event"),g&&g.__esModule&&g||{"default":g}),p=o.pageX,q=(o.pageY,(h=a("plugins"),h&&h.__esModule&&h||{"default":h}).registerPlugin),r=function(a){$traceurRuntime.superConstructor(s).call(this,a),this.currentTH=null,this.currentCol=null,this.currentWidth=null,this.newSize=null,this.startY=null,this.startWidth=null,this.startOffset=null,this.handle=document.createElement("DIV"),this.guide=document.createElement("DIV"),this.eventManager=n(this),this.pressed=null,this.dblclick=0,this.autoresizeTimeout=null,this.manualColumnWidths=[],k(this.handle,"manualColumnResizer"),k(this.guide,"manualColumnResizerGuide")},s=r;$traceurRuntime.createClass(r,{isEnabled:function(){return this.hot.getSettings().manualColumnResize},enablePlugin:function(){var a=this;if(!this.enabled){this.manualColumnWidths=[];var b=this.hot.getSettings().manualColumnResize,c=this.loadManualColumnWidths();this.addHook("modifyColWidth",function(b,c){return a.onModifyColWidth(b,c)}),"undefined"!=typeof c?this.manualColumnWidths=c:Array.isArray(b)?this.manualColumnWidths=b:this.manualColumnWidths=[],Handsontable.hooks.register("beforeColumnResize"),Handsontable.hooks.register("afterColumnResize"),this.bindEvents(),$traceurRuntime.superGet(this,s.prototype,"enablePlugin").call(this)}},updatePlugin:function(){var a=this.hot.getSettings().manualColumnResize;Array.isArray(a)?this.manualColumnWidths=a:this.manualColumnWidths=[]},disablePlugin:function(){$traceurRuntime.superGet(this,s.prototype,"disablePlugin").call(this)},saveManualColumnWidths:function(){this.hot.runHooks("persistentStateSave","manualColumnWidths",this.manualColumnWidths)},loadManualColumnWidths:function(){var a={};return this.hot.runHooks("persistentStateLoad","manualColumnWidths",a),a.value},setupHandlePosition:function(a){this.currentTH=a;var b=this.hot.view.wt.wtTable.getCoords(a).col;if(b>=0){var c=this.currentTH.getBoundingClientRect();this.currentCol=b,this.startOffset=c.left-6,this.startWidth=parseInt(c.width,10),this.handle.style.top=c.top+"px",this.handle.style.left=this.startOffset+this.startWidth+"px",this.hot.rootElement.appendChild(this.handle)}},refreshHandlePosition:function(){this.handle.style.left=this.startOffset+this.currentWidth+"px"},setupGuidePosition:function(){k(this.handle,"active"),k(this.guide,"active"),this.guide.style.top=this.handle.style.top,this.guide.style.left=this.handle.style.left,this.guide.style.height=this.hot.view.maximumVisibleElementHeight(0)+"px",this.hot.rootElement.appendChild(this.guide)},refreshGuidePosition:function(){this.guide.style.left=this.handle.style.left},hideHandleAndGuide:function(){m(this.handle,"active"),m(this.guide,"active")},checkIfColumnHeader:function(a){return"BODY"!=a.tagName?"THEAD"==a.parentNode.tagName?!0:(a=a.parentNode,this.checkIfColumnHeader(a)):!1},getTHFromTargetElement:function(a){return"TABLE"!=a.tagName?"TH"==a.tagName?a:this.getTHFromTargetElement(a.parentNode):null},onMouseOver:function(a){if(this.checkIfColumnHeader(a.target)){var b=this.getTHFromTargetElement(a.target);if(!b)return;var c=b.getAttribute("colspan");!b||null!==c&&1!==c||this.pressed||this.setupHandlePosition(b)}},afterMouseDownTimeout:function(){if(this.dblclick>=2){var a=this.hot.runHooks("beforeColumnResize",this.currentCol,this.newSize,!0);void 0!==a&&(this.newSize=a),this.setManualSize(this.currentCol,this.newSize),this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.wt.wtOverlays.adjustElementsSize(!0),this.hot.runHooks("afterColumnResize",this.currentCol,this.newSize,!0)}this.dblclick=0,this.autoresizeTimeout=null},onMouseDown:function(a){var b=this;l(a.target,"manualColumnResizer")&&(this.setupGuidePosition(),this.pressed=this.hot,null===this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout(function(){return b.afterMouseDownTimeout()},500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick++,this.startX=p(a),this.newSize=this.startWidth)},onMouseMove:function(a){this.pressed&&(this.currentWidth=this.startWidth+(p(a)-this.startX),this.newSize=this.setManualSize(this.currentCol,this.currentWidth),this.refreshHandlePosition(),this.refreshGuidePosition())},onMouseUp:function(a){this.pressed&&(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!=this.startWidth&&(this.hot.runHooks("beforeColumnResize",this.currentCol,this.newSize),this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.wt.wtOverlays.adjustElementsSize(!0),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",this.currentCol,this.newSize)),this.setupHandlePosition(this.currentTH))},bindEvents:function(){var a=this;this.eventManager.addEventListener(this.hot.rootElement,"mouseover",function(b){return a.onMouseOver(b)}),this.eventManager.addEventListener(this.hot.rootElement,"mousedown",function(b){return a.onMouseDown(b)}),this.eventManager.addEventListener(window,"mousemove",function(b){return a.onMouseMove(b)}),this.eventManager.addEventListener(window,"mouseup",function(b){return a.onMouseUp(b)})},setManualSize:function(a,b){return b=Math.max(b,20),a=this.hot.runHooks("modifyCol",a),this.manualColumnWidths[a]=b,b},onModifyColWidth:function(a,b){return this.enabled&&(b=this.hot.runHooks("modifyCol",b),this.hot.getSettings().manualColumnResize&&this.manualColumnWidths[b])?this.manualColumnWidths[b]:a}},{},i),q("manualColumnResize",r)},{"_base.js":56,eventManager:40,"helpers/dom/element":44,"helpers/dom/event":45,plugins:55}],77:[function(a,b,c){"use strict";function d(){function a(a){var b=this;p=a;var c=this.view.wt.wtTable.getCoords(a).row;if(c>=0){n=c;var d=p.getBoundingClientRect();i=d.top,q.style.top=i+"px",q.style.left=d.left+"px",b.rootElement.appendChild(q)}}function b(a,b){var c=a.getBoundingClientRect(),d=6;b>0?q.style.top=c.top+c.height-d+"px":q.style.top=c.top+"px"}function c(){var a=this;j(q,"active"),j(r,"active");var b=p.getBoundingClientRect();r.style.width=a.view.maximumVisibleElementWidth(0)+"px",r.style.height=b.height+"px",r.style.top=i+"px",r.style.left=q.style.left,a.rootElement.appendChild(r)}function d(a){r.style.top=i+a+"px"}function e(){l(q,"active"),l(r,"active")}var f,g,h,i,n,p,q=document.createElement("DIV"),r=document.createElement("DIV"),s=m(this);q.className="manualRowMover",r.className="manualRowMoverGuide";var t=function(){var a=this;Handsontable.hooks.run(a,"persistentStateSave","manualRowPositions",a.manualRowPositions)},u=function(){var a=this,b={};return Handsontable.hooks.run(a,"persistentStateLoad","manualRowPositions",b),b.value},v=function(a){return"BODY"!=a.tagName?"TBODY"==a.parentNode.tagName?!0:(a=a.parentNode,v(a)):!1},w=function(a){return"TABLE"!=a.tagName?"TH"==a.tagName?a:w(a.parentNode):null},x=function(){var i,j=this;s.addEventListener(j.rootElement,"mouseover",function(c){if(v(c.target)){var d=w(c.target);d&&(i?(g=j.view.wt.wtTable.getCoords(d).row,b(d,g-f)):a.call(j,d))}}),s.addEventListener(j.rootElement,"mousedown",function(a){k(a.target,"manualRowMover")&&(h=o(a),c.call(j),i=j,f=n,g=n)}),s.addEventListener(window,"mousemove",function(a){i&&d(o(a)-h)}),s.addEventListener(window,"mouseup",function(b){i&&(e(),i=!1,z(j.manualRowPositions,j.countRows()),j.manualRowPositions.splice(g,0,j.manualRowPositions.splice(f,1)[0]),Handsontable.hooks.run(j,"beforeRowMove",f,g),j.forceFullRender=!0,j.view.render(),t.call(j),Handsontable.hooks.run(j,"afterRowMove",f,g),a.call(j,p))}),j.addHook("afterDestroy",y)},y=function(){s.clear()},z=function(a,b){if(a.lengthc;c++)a[c]=c};this.beforeInit=function(){this.manualRowPositions=[]},this.init=function(a){var b=this,c=!!b.getSettings().manualRowMove;if(c){var d=b.getSettings().manualRowMove,e=u.call(b);"undefined"==typeof b.manualRowPositionsPluginUsages?b.manualRowPositionsPluginUsages=["manualColumnMove"]:b.manualRowPositionsPluginUsages.push("manualColumnMove"),"undefined"!=typeof e?this.manualRowPositions=e:Array.isArray(d)?this.manualRowPositions=d:this.manualRowPositions=[],("afterInit"===a||"afterUpdateSettings"===a&&0===s.context.eventListeners.length)&&(x.call(this),this.manualRowPositions.length>0&&(b.forceFullRender=!0,b.render()))}else{var f=b.manualRowPositionsPluginUsages?b.manualRowPositionsPluginUsages.indexOf("manualColumnMove"):-1;f>-1&&(y.call(this),b.manualRowPositions=[],b.manualRowPositionsPluginUsages[f]=void 0)}},this.modifyRow=function(a){var b=this;return b.getSettings().manualRowMove?("undefined"==typeof b.manualRowPositions[a]&&z(this.manualRowPositions,a+1),b.manualRowPositions[a]):a}}Object.defineProperties(c,{ManualRowMove:{get:function(){return d}},__esModule:{value:!0}});var e,f,g,h,i=(e=a("helpers/dom/element"),e&&e.__esModule&&e||{"default":e}),j=i.addClass,k=i.hasClass,l=i.removeClass,m=(f=a("eventManager"),f&&f.__esModule&&f||{"default":f}).eventManager,n=(g=a("helpers/dom/event"),g&&g.__esModule&&g||{"default":g}),o=(n.pageX,n.pageY),p=((h=a("plugins"),h&&h.__esModule&&h||{"default":h}).registerPlugin,new d);Handsontable.hooks.add("beforeInit",p.beforeInit),Handsontable.hooks.add("afterInit",function(){p.init.call(this,"afterInit")}),Handsontable.hooks.add("afterUpdateSettings",function(){p.init.call(this,"afterUpdateSettings")}),Handsontable.hooks.add("modifyRow",p.modifyRow),Handsontable.hooks.register("beforeRowMove"),Handsontable.hooks.register("afterRowMove")},{eventManager:40,"helpers/dom/element":44,"helpers/dom/event":45,plugins:55}],78:[function(a,b,c){"use strict";Object.defineProperties(c,{ManualRowResize:{get:function(){return r}},__esModule:{value:!0}});var d,e,f,g,h,i=(d=a("_base.js"),d&&d.__esModule&&d||{"default":d})["default"],j=(e=a("helpers/dom/element"),e&&e.__esModule&&e||{"default":e}),k=j.addClass,l=j.hasClass,m=j.removeClass,n=(f=a("eventManager"),f&&f.__esModule&&f||{"default":f}).eventManager,o=(g=a("helpers/dom/event"),g&&g.__esModule&&g||{"default":g}),p=(o.pageX,o.pageY),q=(h=a("plugins"),h&&h.__esModule&&h||{"default":h}).registerPlugin,r=function(a){$traceurRuntime.superConstructor(s).call(this,a),this.currentTH=null,this.currentRow=null,this.currentHeight=null,this.newSize=null,this.startY=null,this.startHeight=null,this.startOffset=null,this.handle=document.createElement("DIV"),this.guide=document.createElement("DIV"),this.eventManager=n(this),this.pressed=null,this.dblclick=0,this.autoresizeTimeout=null,this.manualRowHeights=[],k(this.handle,"manualRowResizer"),k(this.guide,"manualRowResizerGuide")},s=r;$traceurRuntime.createClass(r,{isEnabled:function(){return this.hot.getSettings().manualRowResize},enablePlugin:function(){var a=this;if(!this.enabled){this.manualRowHeights=[];var b=this.hot.getSettings().manualRowResize,c=this.loadManualRowHeights();"undefined"!=typeof c?this.manualRowHeights=c:Array.isArray(b)?this.manualRowHeights=b:this.manualRowHeights=[],this.addHook("modifyRowHeight",function(b,c){return a.onModifyRowHeight(b,c)}),Handsontable.hooks.register("beforeRowResize"),Handsontable.hooks.register("afterRowResize"),this.bindEvents(),$traceurRuntime.superGet(this,s.prototype,"enablePlugin").call(this)}},updatePlugin:function(){var a=this.hot.getSettings().manualRowResize;Array.isArray(a)?this.manualRowHeights=a:this.manualRowHeights=[]},disablePlugin:function(){$traceurRuntime.superGet(this,s.prototype,"disablePlugin").call(this)},saveManualRowHeights:function(){this.hot.runHooks("persistentStateSave","manualRowHeights",this.manualRowHeights)},loadManualRowHeights:function(){var a={};return this.hot.runHooks("persistentStateLoad","manualRowHeights",a),a.value},setupHandlePosition:function(a){this.currentTH=a;var b=this.hot.view.wt.wtTable.getCoords(a).row;if(b>=0){var c=this.currentTH.getBoundingClientRect();this.currentRow=b,this.startOffset=c.top-6,this.startHeight=parseInt(c.height,10),this.handle.style.left=c.left+"px",this.handle.style.top=this.startOffset+this.startHeight+"px",this.hot.rootElement.appendChild(this.handle)}},refreshHandlePosition:function(){this.handle.style.top=this.startOffset+this.currentHeight+"px"},setupGuidePosition:function(){k(this.handle,"active"),k(this.guide,"active"),this.guide.style.top=this.handle.style.top,this.guide.style.left=this.handle.style.left,this.guide.style.width=this.hot.view.maximumVisibleElementWidth(0)+"px",this.hot.rootElement.appendChild(this.guide)},refreshGuidePosition:function(){this.guide.style.top=this.handle.style.top},hideHandleAndGuide:function(){m(this.handle,"active"),m(this.guide,"active")},checkIfRowHeader:function(a){return"BODY"!=a.tagName?"TBODY"==a.parentNode.tagName?!0:(a=a.parentNode,this.checkIfRowHeader(a)):!1},getTHFromTargetElement:function(a){return"TABLE"!=a.tagName?"TH"==a.tagName?a:this.getTHFromTargetElement(a.parentNode):null},onMouseOver:function(a){if(this.checkIfRowHeader(a.target)){var b=this.getTHFromTargetElement(a.target);b&&(this.pressed||this.setupHandlePosition(b))}},afterMouseDownTimeout:function(){if(this.dblclick>=2){var a=this.hot.runHooks("beforeRowResize",this.currentRow,this.newSize,!0);void 0!==a&&(this.newSize=a),this.setManualSize(this.currentRow,this.newSize),this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.wt.wtOverlays.adjustElementsSize(!0),this.hot.runHooks("afterRowResize",this.currentRow,this.newSize,!0)}this.dblclick=0,this.autoresizeTimeout=null},onMouseDown:function(a){var b=this;l(a.target,"manualRowResizer")&&(this.setupGuidePosition(),this.pressed=this.hot,null==this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout(function(){return b.afterMouseDownTimeout()},500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick++,this.startY=p(a),this.newSize=this.startHeight)},onMouseMove:function(a){this.pressed&&(this.currentHeight=this.startHeight+(p(a)-this.startY),this.newSize=this.setManualSize(this.currentRow,this.currentHeight),this.refreshHandlePosition(),this.refreshGuidePosition())},onMouseUp:function(a){this.pressed&&(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!=this.startHeight&&(this.hot.runHooks("beforeRowResize",this.currentRow,this.newSize),this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.wt.wtOverlays.adjustElementsSize(!0),this.saveManualRowHeights(),this.hot.runHooks("afterRowResize",this.currentRow,this.newSize)),this.setupHandlePosition(this.currentTH))},bindEvents:function(){var a=this;this.eventManager.addEventListener(this.hot.rootElement,"mouseover",function(b){return a.onMouseOver(b)}),this.eventManager.addEventListener(this.hot.rootElement,"mousedown",function(b){return a.onMouseDown(b)}),this.eventManager.addEventListener(window,"mousemove",function(b){return a.onMouseMove(b)}),this.eventManager.addEventListener(window,"mouseup",function(b){return a.onMouseUp(b)})},setManualSize:function(a,b){return a=this.hot.runHooks("modifyRow",a),this.manualRowHeights[a]=b,b},onModifyRowHeight:function(a,b){if(this.enabled){var c=this.hot.getPlugin("autoRowSize"),d=c?c.heights[b]:null;b=this.hot.runHooks("modifyRow",b);var e=this.manualRowHeights[b];if(void 0!==e&&(e===d||e>(a||0)))return e}return a}},{},i),q("manualRowResize",r)},{"_base.js":56,eventManager:40,"helpers/dom/element":44,"helpers/dom/event":45,plugins:55}],79:[function(a,b,c){"use strict";function d(){var a=[];return a.getInfo=function(a,b){for(var c=0,d=this.length;d>c;c++)if(this[c].row<=a&&this[c].row+this[c].rowspan-1>=a&&this[c].col<=b&&this[c].col+this[c].colspan-1>=b)return this[c]},a.setInfo=function(a){for(var b=0,c=this.length;c>b;b++)if(this[b].row===a.row&&this[b].col===a.col)return void(this[b]=a);this.push(a)},a.removeInfo=function(a,b){for(var c=0,d=this.length;d>c;c++)if(this[c].row===a&&this[c].col===b){this.splice(c,1);break}},a}function e(a){if(this.mergedCellInfoCollection=new d,Array.isArray(a))for(var b=0,c=a.length;c>b;b++)this.mergedCellInfoCollection.setInfo(a[b])}function f(a,b){var c=this.getSettings().mergeCells;if(c&&!this.selection.isMultiple()){var d=this.mergeCells.mergedCellInfoCollection.getInfo(a[0],a[1]);d&&(a[0]=d.row,a[1]=d.col,a[2]=d.row+d.rowspan-1,a[3]=d.col+d.colspan-1)}}function g(a,b){this.mergeCells&&this.mergeCells.shiftCollection("right",a,b)}function h(a,b){this.mergeCells&&this.mergeCells.shiftCollection("left",a,b)}function i(a,b){this.mergeCells&&this.mergeCells.shiftCollection("down",a,b)}function j(a,b){this.mergeCells&&this.mergeCells.shiftCollection("up",a,b)}Object.defineProperties(c,{MergeCells:{get:function(){return e}},__esModule:{value:!0}});var k,l,m,n,o,p=((k=a("plugins"),k&&k.__esModule&&k||{"default":k}).registerPlugin,(l=a("helpers/dom/event"),l&&l.__esModule&&l||{"default":l}).stopImmediatePropagation),q=(m=a("3rdparty/walkontable/src/cell/coords"),m&&m.__esModule&&m||{"default":m}).WalkontableCellCoords,r=(n=a("3rdparty/walkontable/src/cell/range"),n&&n.__esModule&&n||{"default":n}).WalkontableCellRange,s=(o=a("3rdparty/walkontable/src/table"),o&&o.__esModule&&o||{"default":o}).WalkontableTable;e.prototype.canMergeRange=function(a){return!a.isSingle()},e.prototype.mergeRange=function(a){if(this.canMergeRange(a)){var b=a.getTopLeftCorner(),c=a.getBottomRightCorner(),d={};d.row=b.row,d.col=b.col,d.rowspan=c.row-b.row+1,d.colspan=c.col-b.col+1,this.mergedCellInfoCollection.setInfo(d)}},e.prototype.mergeOrUnmergeSelection=function(a){var b=this.mergedCellInfoCollection.getInfo(a.from.row,a.from.col);b?this.unmergeSelection(a.from):this.mergeSelection(a)},e.prototype.mergeSelection=function(a){this.mergeRange(a)},e.prototype.unmergeSelection=function(a){var b=this.mergedCellInfoCollection.getInfo(a.row,a.col);this.mergedCellInfoCollection.removeInfo(b.row,b.col)},e.prototype.applySpanProperties=function(a,b,c){var d=this.mergedCellInfoCollection.getInfo(b,c);d?d.row===b&&d.col===c?(a.setAttribute("rowspan",d.rowspan),a.setAttribute("colspan",d.colspan)):(a.removeAttribute("rowspan"),a.removeAttribute("colspan"),a.style.display="none"):(a.removeAttribute("rowspan"),a.removeAttribute("colspan"))},e.prototype.modifyTransform=function(a,b,c){var d=function(a,b){return b.row>=a.row&&b.row<=a.row+a.rowspan-1?!0:!1},e=function(a,b){return b.col>=a.col&&b.col<=a.col+a.colspan-1?!0:!1},f=function(a){return new q(b.to.row+a.row,b.to.col+a.col)},g={row:c.row,col:c.col};if("modifyTransformStart"==a){this.lastDesiredCoords||(this.lastDesiredCoords=new q(null,null));for(var h,i=new q(b.highlight.row,b.highlight.col),j=this.mergedCellInfoCollection.getInfo(i.row,i.col),k=0,l=this.mergedCellInfoCollection.length;l>k;k++){var m=this.mergedCellInfoCollection[k];if(m=new q(m.row+m.rowspan-1,m.col+m.colspan-1),b.includes(m)){h=!0;break}}if(j){var n=new q(j.row,j.col),o=new q(j.row+j.rowspan-1,j.col+j.colspan-1),p=new r(n,n,o);p.includes(this.lastDesiredCoords)||(this.lastDesiredCoords=new q(null,null)),g.row=this.lastDesiredCoords.row?this.lastDesiredCoords.row-i.row:g.row,g.col=this.lastDesiredCoords.col?this.lastDesiredCoords.col-i.col:g.col,c.row>0?g.row=j.row+j.rowspan-1-i.row+c.row:c.row<0&&(g.row=i.row-j.row+c.row),c.col>0?g.col=j.col+j.colspan-1-i.col+c.col:c.col<0&&(g.col=i.col-j.col+c.col)}var s=new q(b.highlight.row+g.row,b.highlight.col+g.col),t=this.mergedCellInfoCollection.getInfo(s.row,s.col);t&&(this.lastDesiredCoords=s,g={row:t.row-i.row,col:t.col-i.col})}else if("modifyTransformEnd"==a)for(var k=0,l=this.mergedCellInfoCollection.length;l>k;k++){var u=this.mergedCellInfoCollection[k],n=new q(u.row,u.col),o=new q(u.row+u.rowspan-1,u.col+u.colspan-1),v=new r(n,n,o),w=b.getBordersSharedWith(v);if(v.isEqual(b))b.setDirection("NW-SE");else if(w.length>0){var x=b.highlight.isEqual(v.from);w.indexOf("top")>-1?b.to.isSouthEastOf(v.from)&&x?b.setDirection("NW-SE"):b.to.isSouthWestOf(v.from)&&x&&b.setDirection("NE-SW"):w.indexOf("bottom")>-1&&(b.to.isNorthEastOf(v.from)&&x?b.setDirection("SW-NE"):b.to.isNorthWestOf(v.from)&&x&&b.setDirection("SE-NW"))}var s=f(g),y=d(u,s),z=e(u,s);b.includesRange(v)&&(v.includes(s)||y||z)&&(y&&(g.row<0?g.row-=u.rowspan-1:g.row>0&&(g.row+=u.rowspan-1)),z&&(g.col<0?g.col-=u.colspan-1:g.col>0&&(g.col+=u.colspan-1)))}0!==g.row&&(c.row=g.row),0!==g.col&&(c.col=g.col)},e.prototype.shiftCollection=function(a,b,c){var d=[0,0];switch(a){case"right":d[0]+=1;break;case"left":d[0]-=1;break;case"down":d[1]+=1;break;case"up":d[1]-=1}for(var e=0;ec;c++)a.mergeCells.mergedCellInfoCollection.setInfo(b[c])}else a.mergeCells=new e(b);else a.mergeCells&&(a.mergeCells.mergedCellInfoCollection=new d)},w=function(a){if(this.mergeCells){var b=(a.ctrlKey||a.metaKey)&&!a.altKey;b&&77===a.keyCode&&(this.mergeCells.mergeOrUnmergeSelection(this.getSelectedRange()),this.render(),p(a))}},x=function(a){this.getSettings().mergeCells&&(a.items.push(Handsontable.plugins.ContextMenu.SEPARATOR),a.items.push({key:"mergeCells",name:function(){var a=this.getSelected(),b=this.mergeCells.mergedCellInfoCollection.getInfo(a[0],a[1]);return b?"Unmerge cells":"Merge cells"},callback:function(){this.mergeCells.mergeOrUnmergeSelection(this.getSelectedRange()),this.render()},disabled:function(){return!1}}))},y=function(a,b,c,d,e,f){this.mergeCells&&this.mergeCells.applySpanProperties(a,b,c)},z=function(a){return function(b){var c=this.getSettings().mergeCells;if(c){var d=this.getSelectedRange();if(this.mergeCells.modifyTransform(a,d,b),"modifyTransformEnd"===a){var e=this.countRows(),f=this.countCols();d.from.row<0?d.from.row=0:d.from.row>0&&d.from.row>=e&&(d.from.row=d.from-1),d.from.col<0?d.from.col=0:d.from.col>0&&d.from.col>=f&&(d.from.col=f-1)}}}},A=function(a){this.lastDesiredCoords=null;var b=this.getSettings().mergeCells;if(b){var c=this.getSelectedRange();c.highlight=new q(c.highlight.row,c.highlight.col),c.to=a;var d=!1;do{d=!1;for(var e=0,f=this.mergeCells.mergedCellInfoCollection.length;f>e;e++){var g=this.mergeCells.mergedCellInfoCollection[e],h=new q(g.row,g.col),i=new q(g.row+g.rowspan-1,g.col+g.colspan-1),j=new r(h,h,i);c.expandByRange(j)&&(a.row=c.to.row,a.col=c.to.col,d=!0)}}while(d)}},B=function(a,b){if(b&&"area"==b){var c=this.getSettings().mergeCells;if(c)for(var d=this.getSelectedRange(),e=new r(d.from,d.from,d.from),f=new r(d.to,d.to,d.to),g=0,h=this.mergeCells.mergedCellInfoCollection.length;h>g;g++){var i=this.mergeCells.mergedCellInfoCollection[g],j=new q(i.row,i.col),k=new q(i.row+i.rowspan-1,i.col+i.colspan-1),l=new r(j,j,k);e.expandByRange(l)&&(a[0]=e.from.row,a[1]=e.from.col),f.expandByRange(l)&&(a[2]=f.from.row,a[3]=f.from.col)}}},C=function(a,b,c){var d=this.getSettings().mergeCells;if(d){var e=this.mergeCells.mergedCellInfoCollection.getInfo(a,b);!e||e.row==a&&e.col==b||(c.copyable=!1)}},D=function(a){var b=this.getSettings().mergeCells;if(b)for(var c,d=this.countCols(),e=0;d>e;e++){if(c=this.mergeCells.mergedCellInfoCollection.getInfo(a.startRow,e),c&&c.rowa.endRow)return a.endRow=f,D.call(this,a)}}},E=function(a){var b=this.getSettings().mergeCells;if(b)for(var c,d=this.countRows(),e=0;d>e;e++){if(c=this.mergeCells.mergedCellInfoCollection.getInfo(e,a.startColumn),c&&c.cola.endColumn)return a.endColumn=f,E.call(this,a)}}},F=function(a){if(a&&this.mergeCells){var b=this.mergeCells.mergedCellInfoCollection,c=this.getSelectedRange();for(var d in b)if(c.highlight.row==b[d].row&&c.highlight.col==b[d].col&&c.to.row==b[d].row+b[d].rowspan-1&&c.to.col==b[d].col+b[d].colspan-1)return!1}return a};Handsontable.hooks.add("beforeInit",t),Handsontable.hooks.add("afterInit",u),Handsontable.hooks.add("afterUpdateSettings",v),Handsontable.hooks.add("beforeKeyDown",w),Handsontable.hooks.add("modifyTransformStart",z("modifyTransformStart")),Handsontable.hooks.add("modifyTransformEnd",z("modifyTransformEnd")),Handsontable.hooks.add("beforeSetRangeEnd",A),Handsontable.hooks.add("beforeDrawBorders",B),Handsontable.hooks.add("afterIsMultipleSelection",F),Handsontable.hooks.add("afterRenderer",y),Handsontable.hooks.add("afterContextMenuDefaultOptions",x),Handsontable.hooks.add("afterGetCellMeta",C),Handsontable.hooks.add("afterViewportRowCalculatorOverride",D),Handsontable.hooks.add("afterViewportColumnCalculatorOverride",E),Handsontable.hooks.add("afterAutofillApplyValues",f),Handsontable.hooks.add("afterCreateCol",g),Handsontable.hooks.add("afterRemoveCol",h),Handsontable.hooks.add("afterCreateRow",i),Handsontable.hooks.add("afterRemoveRow",j),Handsontable.MergeCells=e},{"3rdparty/walkontable/src/cell/coords":5,"3rdparty/walkontable/src/cell/range":6,"3rdparty/walkontable/src/table":20,"helpers/dom/event":45,plugins:55}],80:[function(a,b,c){"use strict";Object.defineProperties(c,{MultipleSelectionHandles:{get:function(){return o}},__esModule:{value:!0}});var d,e,f,g,h=(d=a("helpers/dom/element"),d&&d.__esModule&&d||{"default":d}),i=h.getWindowScrollTop,j=h.hasClass,k=h.getWindowScrollLeft,l=(e=a("_base"),e&&e.__esModule&&e||{"default":e})["default"],m=(f=a("eventManager"),f&&f.__esModule&&f||{"default":f}).EventManager,n=(g=a("plugins"),g&&g.__esModule&&g||{"default":g}).registerPlugin,o=function(a){$traceurRuntime.superConstructor(p).call(this,a),this.dragged=[],this.eventManager=null,this.lastSetCell=null},p=o;$traceurRuntime.createClass(o,{isEnabled:function(){return Handsontable.mobileBrowser},enablePlugin:function(){this.enabled||(this.eventManager||(this.eventManager=new m(this)),this.registerListeners(),$traceurRuntime.superGet(this,p.prototype,"enablePlugin").call(this))},registerListeners:function(){function a(a){if(1===b.dragged.length)return b.dragged.splice(0,b.dragged.length),!0;var c=b.dragged.indexOf(a);return-1==c?!1:void(0===c?b.dragged=b.dragged.slice(0,1):1==c&&(b.dragged=b.dragged.slice(-1)))}var b=this;this.eventManager.addEventListener(this.hot.rootElement,"touchstart",function(a){ var c;return j(a.target,"topLeftSelectionHandle-HitArea")?(c=b.hot.getSelectedRange(),b.dragged.push("topLeft"),b.touchStartRange={width:c.getWidth(),height:c.getHeight(),direction:c.getDirection()},a.preventDefault(),!1):j(a.target,"bottomRightSelectionHandle-HitArea")?(c=b.hot.getSelectedRange(),b.dragged.push("bottomRight"),b.touchStartRange={width:c.getWidth(),height:c.getHeight(),direction:c.getDirection()},a.preventDefault(),!1):void 0}),this.eventManager.addEventListener(this.hot.rootElement,"touchend",function(c){return j(c.target,"topLeftSelectionHandle-HitArea")?(a.call(b,"topLeft"),b.touchStartRange=void 0,c.preventDefault(),!1):j(c.target,"bottomRightSelectionHandle-HitArea")?(a.call(b,"bottomRight"),b.touchStartRange=void 0,c.preventDefault(),!1):void 0}),this.eventManager.addEventListener(this.hot.rootElement,"touchmove",function(a){var c,d,e,f,g,h,j,l=i(),m=k();0!==b.dragged.length&&(c=document.elementFromPoint(a.touches[0].screenX-m,a.touches[0].screenY-l),c&&c!==b.lastSetCell&&(("TD"==c.nodeName||"TH"==c.nodeName)&&(d=b.hot.getCoords(c),-1==d.col&&(d.col=0),e=b.hot.getSelectedRange(),f=e.getWidth(),g=e.getHeight(),h=e.getDirection(),1==f&&1==g&&b.hot.selection.setRangeEnd(d),j=b.getCurrentRangeCoords(e,d,b.touchStartRange.direction,h,b.dragged[0]),null!==j.start&&b.hot.selection.setRangeStart(j.start),b.hot.selection.setRangeEnd(j.end),b.lastSetCell=c),a.preventDefault()))})},getCurrentRangeCoords:function(a,b,c,d,e){var f=a.getTopLeftCorner(),g=a.getBottomRightCorner(),h=a.getBottomLeftCorner(),i=a.getTopRightCorner(),j={start:null,end:null};switch(c){case"NE-SW":switch(d){case"NE-SW":case"NW-SE":j="topLeft"==e?{start:new WalkontableCellCoords(b.row,a.highlight.col),end:new WalkontableCellCoords(h.row,b.col)}:{start:new WalkontableCellCoords(a.highlight.row,b.col),end:new WalkontableCellCoords(b.row,f.col)};break;case"SE-NW":"bottomRight"==e&&(j={start:new WalkontableCellCoords(g.row,b.col),end:new WalkontableCellCoords(b.row,f.col)})}break;case"NW-SE":switch(d){case"NE-SW":"topLeft"==e?j={start:b,end:h}:j.end=b;break;case"NW-SE":"topLeft"==e?j={start:b,end:g}:j.end=b;break;case"SE-NW":"topLeft"==e?j={start:b,end:f}:j.end=b;break;case"SW-NE":"topLeft"==e?j={start:b,end:i}:j.end=b}break;case"SW-NE":switch(d){case"NW-SE":j="bottomRight"==e?{start:new WalkontableCellCoords(b.row,f.col),end:new WalkontableCellCoords(h.row,b.col)}:{start:new WalkontableCellCoords(f.row,b.col),end:new WalkontableCellCoords(b.row,g.col)};break;case"SW-NE":j="topLeft"==e?{start:new WalkontableCellCoords(a.highlight.row,b.col),end:new WalkontableCellCoords(b.row,g.col)}:{start:new WalkontableCellCoords(b.row,f.col),end:new WalkontableCellCoords(f.row,b.col)};break;case"SE-NW":"bottomRight"==e?j={start:new WalkontableCellCoords(b.row,i.col),end:new WalkontableCellCoords(f.row,b.col)}:"topLeft"==e&&(j={start:h,end:b})}break;case"SE-NW":switch(d){case"NW-SE":case"NE-SW":case"SW-NE":"topLeft"==e&&(j.end=b);break;case"SE-NW":"topLeft"==e?j.end=b:j={start:b,end:f}}}return j},isDragged:function(){return this.dragged.length>0}},{},l),n("multipleSelectionHandles",o)},{_base:56,eventManager:40,"helpers/dom/element":44,plugins:55}],81:[function(a,b,c){"use strict";function d(){}function e(){var a=this,b=a.getSettings().observeChanges;b?(a.observer&&h.call(a),f.call(a),j.call(a)):b||h.call(a)}function f(){var a=this;a.observeChangesActive=!0,a.pauseObservingChanges=function(){a.observeChangesActive=!1},a.resumeObservingChanges=function(){a.observeChangesActive=!0},a.observedData=a.getData(),a.observer=o.observe(a.observedData,function(b){a.observeChangesActive&&(g.call(a,b),a.render()),a.runHooks("afterChangesObserved")})}function g(a){function b(a){var b;return b=d(a),b=c(b)}function c(a){var b=[];return a.filter(function(a){var c=e(a.path);if(-1!=["add","remove"].indexOf(a.op)&&!isNaN(c.col)){if(-1!=b.indexOf(c.col))return!1;b.push(c.col)}return!0})}function d(a){return a.filter(function(a){return!/[/]length/gi.test(a.path)})}function e(a){var b=a.match(/^\/(\d+)\/?(.*)?$/);return{row:parseInt(b[1],10),col:/^\d*$/.test(b[2])?parseInt(b[2],10):b[2]}}for(var f=this,g=b(a),h=0,i=g.length;i>h;h++){var j=g[h],k=e(j.path);switch(j.op){case"add":isNaN(k.col)?f.runHooks("afterCreateRow",k.row):f.runHooks("afterCreateCol",k.col);break;case"remove":isNaN(k.col)?f.runHooks("afterRemoveRow",k.row,1):f.runHooks("afterRemoveCol",k.col,1);break;case"replace":f.runHooks("afterChange",[k.row,k.col,null,j.value],"external")}}}function h(){var a=this;a.observer&&(i.call(a),k.call(a))}function i(){var a=this;o.unobserve(a.observedData,a.observer),delete a.observedData,delete a.observeChangesActive,delete a.pauseObservingChanges,delete a.resumeObservingChanges}function j(){var a=this;a.addHook("afterDestroy",h),a.addHook("afterCreateRow",l),a.addHook("afterRemoveRow",l),a.addHook("afterCreateCol",l),a.addHook("afterRemoveCol",l),a.addHook("afterChange",function(a,b){"loadData"!=b&&l.call(this)})}function k(){var a=this;a.removeHook("afterDestroy",h),a.removeHook("afterCreateRow",l),a.removeHook("afterRemoveRow",l),a.removeHook("afterCreateCol",l),a.removeHook("afterRemoveCol",l),a.removeHook("afterChange",l)}function l(){var a=this;a.pauseObservingChanges(),a.addHookOnce("afterChangesObserved",function(){a.resumeObservingChanges()})}Object.defineProperties(c,{ObserveChanges:{get:function(){return d}},__esModule:{value:!0}});var m,n,o=((m=a("plugins"),m&&m.__esModule&&m||{"default":m}).registerPlugin,(n=a("jsonpatch"),n&&n.__esModule&&n||{"default":n})["default"]);Handsontable.hooks.add("afterLoadData",e),Handsontable.hooks.add("afterUpdateSettings",e),Handsontable.hooks.register("afterChangesObserved")},{jsonpatch:"jsonpatch",plugins:55}],82:[function(a,b,c){"use strict";function d(a){var b,c=function(){window.localStorage[a+"__persistentStateKeys"]=JSON.stringify(b)},d=function(){var c=window.localStorage[a+"__persistentStateKeys"],d="string"==typeof c?JSON.parse(c):void 0;b=d?d:[]},e=function(){b=[],c()};d(),this.saveValue=function(d,e){window.localStorage[a+"_"+d]=JSON.stringify(e),-1==b.indexOf(d)&&(b.push(d),c())},this.loadValue=function(b,c){b="undefined"==typeof b?c:b;var d=window.localStorage[a+"_"+b];return"undefined"==typeof d?void 0:JSON.parse(d)},this.reset=function(b){window.localStorage.removeItem(a+"_"+b)},this.resetAll=function(){for(var c=0;ch;h++)for(var i=0;f>i;i++){var j=a.getDataAtCell(h,i),k=a.getCellMeta(h,i),l=k.search.callback||c,m=k.search.queryMethod||d,n=m(b,j);if(n){var o={row:h,col:i,data:j};g.push(o)}l&&l(a,h,i,j,n)}return g}},Handsontable.Search.DEFAULT_CALLBACK=function(a,b,c,d,e){a.getCellMeta(b,c).isSearchResult=e},Handsontable.Search.DEFAULT_QUERY_METHOD=function(a,b){return"undefined"!=typeof a&&null!=a&&a.toLowerCase&&0!==a.length?"undefined"==typeof b||null==b?!1:-1!=b.toString().toLowerCase().indexOf(a.toLowerCase()):!1},Handsontable.Search.DEFAULT_SEARCH_RESULT_CLASS="htSearchResult",Handsontable.Search.global=function(){var a=Handsontable.Search.DEFAULT_CALLBACK,b=Handsontable.Search.DEFAULT_QUERY_METHOD,c=Handsontable.Search.DEFAULT_SEARCH_RESULT_CLASS;return{getDefaultCallback:function(){return a},setDefaultCallback:function(b){a=b},getDefaultQueryMethod:function(){return b},setDefaultQueryMethod:function(a){b=a},getDefaultSearchResultClass:function(){return c},setDefaultSearchResultClass:function(a){c=a}}}(),Handsontable.SearchCellDecorator=function(a,b,c,d,e,f,g){var j=null!==g.search&&"object"==typeof g.search&&g.search.searchResultClass||Handsontable.Search.global.getDefaultSearchResultClass();g.isSearchResult?h(b,j):i(b,j)};var m=l("base");k("base",function(a,b,c,d,e,f,g){m.apply(this,arguments),Handsontable.SearchCellDecorator.apply(this,arguments)}),Handsontable.hooks.add("afterInit",d),Handsontable.hooks.add("afterUpdateSettings",d)},{"helpers/dom/element":44,renderers:86}],84:[function(a,b,c){"use strict";Object.defineProperties(c,{TouchScroll:{get:function(){return l}},__esModule:{value:!0}});var d,e,f,g=(d=a("helpers/dom/element"),d&&d.__esModule&&d||{"default":d}),h=g.addClass,i=g.removeClass,j=(e=a("_base"),e&&e.__esModule&&e||{"default":e})["default"],k=(f=a("plugins"),f&&f.__esModule&&f||{"default":f}).registerPlugin,l=function(a){var b=this;$traceurRuntime.superConstructor(m).call(this,a),this.hot.addHook("afterInit",function(){return b.afterInit()}),this.hot.addHook("afterUpdateSettings",function(){return b.onAfterUpdateSettings()}),this.scrollbars=[],this.clones=[]},m=l;$traceurRuntime.createClass(l,{afterInit:function(){this.registerEvents(),this.onAfterUpdateSettings()},onAfterUpdateSettings:function(){var a=this;this.hot.addHookOnce("afterRender",function(){var b=a.hot.view.wt.wtOverlays;a.scrollbars=[],a.scrollbars.push(b.topOverlay),b.bottomOverlay.clone&&a.scrollbars.push(b.bottomOverlay),a.scrollbars.push(b.leftOverlay),b.topLeftCornerOverlay&&a.scrollbars.push(b.topLeftCornerOverlay),b.bottomLeftCornerOverlay&&b.bottomLeftCornerOverlay.clone&&a.scrollbars.push(b.bottomLeftCornerOverlay),a.clones=[],b.topOverlay.needFullRender&&a.clones.push(b.topOverlay.clone.wtTable.holder.parentNode),b.bottomOverlay.needFullRender&&a.clones.push(b.bottomOverlay.clone.wtTable.holder.parentNode),b.leftOverlay.needFullRender&&a.clones.push(b.leftOverlay.clone.wtTable.holder.parentNode),b.topLeftCornerOverlay&&a.clones.push(b.topLeftCornerOverlay.clone.wtTable.holder.parentNode),b.bottomLeftCornerOverlay&&b.bottomLeftCornerOverlay.clone&&a.clones.push(b.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode)})},registerEvents:function(){var a=this;this.hot.addHook("beforeTouchScroll",function(){return a.onBeforeTouchScroll()}),this.hot.addHook("afterMomentumScroll",function(){return a.onAfterMomentumScroll()})},onBeforeTouchScroll:function(){Handsontable.freezeOverlays=!0;for(var a=0,b=this.clones.length;b>a;a++)h(this.clones[a],"hide-tween")},onAfterMomentumScroll:function(){Handsontable.freezeOverlays=!1;for(var a=this,b=0,c=this.clones.length;c>b;b++)i(this.clones[b],"hide-tween");for(var d=0,e=this.clones.length;e>d;d++)h(this.clones[d],"show-tween");setTimeout(function(){for(var b=0,c=a.clones.length;c>b;b++)i(a.clones[b],"show-tween")},400);for(var f=0,g=this.scrollbars.length;g>f;f++)this.scrollbars[f].refresh(),this.scrollbars[f].resetFixedPosition();this.hot.view.wt.wtOverlays.syncScrollWithMaster()}},{},j),k("touchScroll",l)},{_base:56,"helpers/dom/element":44,plugins:55}],85:[function(a,b,c){"use strict";function d(){var a=this,b="undefined"==typeof a.getSettings().undo||a.getSettings().undo;b?a.undoRedo||(a.undoRedo=new Handsontable.UndoRedo(a),g(a),a.addHook("beforeKeyDown",e),a.addHook("afterChange",f)):a.undoRedo&&(delete a.undoRedo,h(a),a.removeHook("beforeKeyDown",e),a.removeHook("afterChange",f))}function e(a){var b=this,c=(a.ctrlKey||a.metaKey)&&!a.altKey;c&&(89===a.keyCode||a.shiftKey&&90===a.keyCode?(b.undoRedo.redo(),n(a)):90===a.keyCode&&(b.undoRedo.undo(),n(a)))}function f(a,b){var c=this;return"loadData"==b?c.undoRedo.clear():void 0}function g(a){a.undo=function(){return a.undoRedo.undo()},a.redo=function(){return a.undoRedo.redo()},a.isUndoAvailable=function(){return a.undoRedo.isUndoAvailable()},a.isRedoAvailable=function(){return a.undoRedo.isRedoAvailable()},a.clearUndo=function(){return a.undoRedo.clear()}}function h(a){delete a.undo,delete a.redo,delete a.isUndoAvailable,delete a.isRedoAvailable,delete a.clearUndo}var i,j,k=(i=a("helpers/object"),i&&i.__esModule&&i||{"default":i}),l=k.inherit,m=k.deepClone,n=(j=a("helpers/dom/event"),j&&j.__esModule&&j||{"default":j}).stopImmediatePropagation;Handsontable.UndoRedo=function(a){var b=this;this.instance=a,this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,a.addHook("afterChange",function(a,c){if(a){var d=new Handsontable.UndoRedo.ChangeAction(a);b.done(d)}}),a.addHook("afterCreateRow",function(a,c,d){if(!d){var e=new Handsontable.UndoRedo.CreateRowAction(a,c);b.done(e)}}),a.addHook("beforeRemoveRow",function(a,c){var d=b.instance.getData();a=(d.length+a)%d.length;var e=d.slice(a,a+c),f=new Handsontable.UndoRedo.RemoveRowAction(a,e);b.done(f)}),a.addHook("afterCreateCol",function(a,c,d){if(!d){var e=new Handsontable.UndoRedo.CreateColumnAction(a,c);b.done(e)}}),a.addHook("beforeRemoveCol",function(c,d){var e=b.instance.getData();c=(b.instance.countCols()+c)%b.instance.countCols();for(var f=[],g=0,h=e.length;h>g;g++)f[g]=e[g].slice(c,c+d);var i;Array.isArray(a.getSettings().colHeaders)&&(i=a.getSettings().colHeaders.slice(c,c+f.length));var j=new Handsontable.UndoRedo.RemoveColumnAction(c,f,i);b.done(j)}),a.addHook("beforeCellAlignment",function(a,c,d,e){var f=new Handsontable.UndoRedo.CellAlignmentAction(a,c,d,e);b.done(f)})},Handsontable.UndoRedo.prototype.done=function(a){this.ignoreNewActions||(this.doneActions.push(a),this.undoneActions.length=0)},Handsontable.UndoRedo.prototype.undo=function(){if(this.isUndoAvailable()){var a=this.doneActions.pop();this.ignoreNewActions=!0;var b=this;a.undo(this.instance,function(){b.ignoreNewActions=!1,b.undoneActions.push(a)})}},Handsontable.UndoRedo.prototype.redo=function(){if(this.isRedoAvailable()){var a=this.undoneActions.pop();this.ignoreNewActions=!0;var b=this;a.redo(this.instance,function(){b.ignoreNewActions=!1,b.doneActions.push(a)})}},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(a){this.changes=a},l(Handsontable.UndoRedo.ChangeAction,Handsontable.UndoRedo.Action),Handsontable.UndoRedo.ChangeAction.prototype.undo=function(a,b){for(var c=m(this.changes),d=a.countEmptyRows(!0),e=a.countEmptyCols(!0),f=0,g=c.length;g>f;f++)c[f].splice(3,1);a.addHookOnce("afterChange",b),a.setDataAtRowProp(c,null,null,"undo");for(var f=0,g=c.length;g>f;f++)a.getSettings().minSpareRows&&c[f][0]+1+a.getSettings().minSpareRows===a.countRows()&&d==a.getSettings().minSpareRows&&(a.alter("remove_row",parseInt(c[f][0]+1,10),a.getSettings().minSpareRows),a.undoRedo.doneActions.pop()),a.getSettings().minSpareCols&&c[f][1]+1+a.getSettings().minSpareCols===a.countCols()&&e==a.getSettings().minSpareCols&&(a.alter("remove_col",parseInt(c[f][1]+1,10),a.getSettings().minSpareCols),a.undoRedo.doneActions.pop())},Handsontable.UndoRedo.ChangeAction.prototype.redo=function(a,b){for(var c=m(this.changes),d=0,e=c.length;e>d;d++)c[d].splice(2,1);a.addHookOnce("afterChange",b),a.setDataAtRowProp(c,null,null,"redo")},Handsontable.UndoRedo.CreateRowAction=function(a,b){this.index=a,this.amount=b},l(Handsontable.UndoRedo.CreateRowAction,Handsontable.UndoRedo.Action),Handsontable.UndoRedo.CreateRowAction.prototype.undo=function(a,b){var c=a.countRows(),d=a.getSettings().minSpareRows;this.index>=c&&this.index-de;e++)c=a.getSourceDataAtRow(e),d=[this.index,0],Array.prototype.push.apply(d,this.data[e]),Array.prototype.splice.apply(c,d);"undefined"!=typeof this.headers&&(d=[this.index,0],Array.prototype.push.apply(d,this.headers),Array.prototype.splice.apply(a.getSettings().colHeaders,d)),a.addHookOnce("afterRender",b),a.render()},Handsontable.UndoRedo.RemoveColumnAction.prototype.redo=function(a,b){a.addHookOnce("afterRemoveCol",b),a.alter("remove_col",this.index,this.amount)},Handsontable.hooks.add("afterInit",d),Handsontable.hooks.add("afterUpdateSettings",d)},{"helpers/dom/event":45,"helpers/object":49}],86:[function(a,b,c){"use strict";function d(a,b){var c;i[a]=b,c=h(a)+"Renderer",Handsontable.renderers[c]=b,Handsontable[c]=b}function e(a){if("function"==typeof a)return a;if("string"!=typeof a)throw Error('Only strings and functions can be passed as "renderer" parameter');if(!(a in i))throw Error('No editor registered under name "'+a+'"');return i[a]}function f(a){return a in i}Object.defineProperties(c,{registerRenderer:{get:function(){return d}},getRenderer:{get:function(){return e}},hasRenderer:{get:function(){return f}},__esModule:{value:!0}});var g,h=(g=a("helpers/string"),g&&g.__esModule&&g||{"default":g}).toUpperCaseFirst,i={};Handsontable.renderers=Handsontable.renderers||{},Handsontable.renderers.registerRenderer=d,Handsontable.renderers.getRenderer=e},{"helpers/string":51}],87:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g){g.className&&(b.className?b.className=b.className+" "+g.className:b.className=g.className),g.readOnly&&h(b,g.readOnlyCellClassName),g.valid===!1&&g.invalidCellClassName?h(b,g.invalidCellClassName):i(b,g.invalidCellClassName),g.wordWrap===!1&&g.noWordWrapClassName&&h(b,g.noWordWrapClassName),!f&&g.placeholder&&h(b,g.placeholderCellClassName)}Object.defineProperties(c,{cellDecorator:{get:function(){return d}},__esModule:{value:!0}});var e,f,g=(e=a("helpers/dom/element"),e&&e.__esModule&&e||{"default":e}),h=g.addClass,i=g.removeClass,j=(f=a("renderers"),f&&f.__esModule&&f||{"default":f}).registerRenderer;j("base",d),Handsontable.renderers.cellDecorator=d},{"helpers/dom/element":44,renderers:86}],88:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g){var h=(q.cloneNode(!0),r.cloneNode(!0));if(n("text")(a,b,c,d,e,f,g),b.appendChild(h),j(b,"htAutocomplete"),b.firstChild||b.appendChild(document.createTextNode(String.fromCharCode(160))),!a.acArrowListener){var i=l(a);a.acArrowListener=function(e){k(e.target,"htAutocompleteArrow")&&a.view.wt.getSetting("onCellDblClick",null,new p(c,d),b)},i.addEventListener(a.rootElement,"mousedown",a.acArrowListener),a.addHookOnce("afterDestroy",function(){i.destroy()})}}Object.defineProperties(c,{autocompleteRenderer:{get:function(){return d}},__esModule:{value:!0}});var e,f,g,h,i=(e=a("helpers/dom/element"),e&&e.__esModule&&e||{"default":e}),j=i.addClass,k=i.hasClass,l=(i.empty,(f=a("eventManager"),f&&f.__esModule&&f||{"default":f}).eventManager),m=(g=a("renderers"),g&&g.__esModule&&g||{"default":g}),n=m.getRenderer,o=m.registerRenderer,p=(h=a("3rdparty/walkontable/src/cell/coords"),h&&h.__esModule&&h||{"default":h}).WalkontableCellCoords,q=document.createElement("DIV");q.className="htAutocompleteWrapper";var r=document.createElement("DIV");r.className="htAutocompleteArrow",r.appendChild(document.createTextNode(String.fromCharCode(9660)));o("autocomplete",d)},{"3rdparty/walkontable/src/cell/coords":5,eventManager:40,"helpers/dom/element":44,renderers:86}],89:[function(a,b,c){"use strict";function d(a,b,c,d,h,i,j){function k(a){var b=[v.SPACE,v.ENTER,v.DELETE,v.BACKSPACE];-1===b.indexOf(a.keyCode)||z(a)||n(function(){y(a),a.preventDefault()}),(a.keyCode==v.SPACE||a.keyCode==v.ENTER)&&l(),(a.keyCode==v.DELETE||a.keyCode==v.BACKSPACE)&&l(!1)}function l(){var a=void 0!==arguments[0]?arguments[0]:null;n(function(b){for(var c=0,d=b.length;d>c;c++){if(q(b[c],B)&&null===a)return;m(b[c],a)}})}function m(a){var b=void 0!==arguments[1]?arguments[1]:null;null===b?a.checked=!a.checked:a.checked=b,t.fireEvent(a,"change")}function n(b){for(var c=a.getSelectedRange(),d=c.getTopLeftCorner(),e=c.getBottomRightCorner(),f=d.row;f<=e.row;f++)for(var g=d.col;g<=e.col;g++){var h=a.getCell(f,g),i=a.getCellMeta(f,g),j=h.querySelectorAll("input[type=checkbox]");j.length>0&&!i.readOnly&&b(j)}}var t=new s(a),u=e(),w=j.label,C=!1;if("undefined"==typeof j.checkedTemplate&&(j.checkedTemplate=!0),"undefined"==typeof j.uncheckedTemplate&&(j.uncheckedTemplate=!1),o(b),i===j.checkedTemplate||r(i,j.checkedTemplate)?u.checked=!0:i===j.uncheckedTemplate||r(i,j.uncheckedTemplate)?u.checked=!1:null===i?p(u,"noValue"):(u.style.display="none",p(u,B),C=!0),!C&&w){var D="";w.value?D="function"==typeof w.value?w.value.call(this,c,d,h,i):w.value:w.property&&(D=a.getDataAtRowProp(c,w.property));var E=f(D);"before"===w.position?E.appendChild(u):E.insertBefore(u,E.firstChild),u=E}b.appendChild(u),C&&b.appendChild(document.createTextNode("#bad-value#")),j.readOnly?t.addEventListener(u,"click",g):(t.addEventListener(u,"mousedown",x),t.addEventListener(u,"mouseup",x),t.addEventListener(u,"change",function(b){a.setDataAtRowProp(c,h,b.target.checked?j.checkedTemplate:j.uncheckedTemplate)})),A.has(a)||(A.set(a,!0),a.addHook("beforeKeyDown",k))}function e(){var a=document.createElement("input");return a.className="htCheckboxRendererInput",a.type="checkbox",a.setAttribute("autocomplete","off"),a.cloneNode(!1)}function f(a){var b=document.createElement("label");return b.className="htCheckboxRendererLabel",b.appendChild(document.createTextNode(a)),b.cloneNode(!0)}function g(a){a.preventDefault()}Object.defineProperties(c,{checkboxRenderer:{get:function(){return d}},__esModule:{value:!0}});var h,i,j,k,l,m,n=(h=a("helpers/dom/element"),h&&h.__esModule&&h||{"default":h}),o=n.empty,p=n.addClass,q=n.hasClass,r=(i=a("helpers/string"),i&&i.__esModule&&i||{"default":i}).equalsIgnoreCase,s=(j=a("eventManager"),j&&j.__esModule&&j||{"default":j}).EventManager,t=(k=a("renderers"),k&&k.__esModule&&k||{"default":k}),u=(t.getRenderer,t.registerRenderer),v=(l=a("helpers/unicode"),l&&l.__esModule&&l||{"default":l}).KEY_CODES,w=(m=a("helpers/dom/event"),m&&m.__esModule&&m||{"default":m}),x=w.stopPropagation,y=w.stopImmediatePropagation,z=w.isImmediatePropagationStopped,A=new WeakMap,B="htBadValue";u("checkbox",d)},{eventManager:40,"helpers/dom/element":44,"helpers/dom/event":45,"helpers/string":51,"helpers/unicode":52,renderers:86}],90:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,h){i("base").apply(this,arguments),g(b,f)}Object.defineProperties(c,{htmlRenderer:{get:function(){return d}},__esModule:{value:!0}});var e,f,g=(e=a("helpers/dom/element"),e&&e.__esModule&&e||{"default":e}).fastInnerHTML,h=(f=a("renderers"),f&&f.__esModule&&f||{"default":f}),i=h.getRenderer,j=h.registerRenderer;j("html",d)},{"helpers/dom/element":44,renderers:86}],91:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,g){n(f)&&("undefined"!=typeof g.language&&i.language(g.language),f=i(f).format(g.format||"0"),j(b,"htNumeric")),l("text")(a,b,c,d,e,f,g)}Object.defineProperties(c,{numericRenderer:{get:function(){return d}},__esModule:{value:!0}});var e,f,g,h,i=(e=a("numeral"),e&&e.__esModule&&e||{"default":e})["default"],j=(f=a("helpers/dom/element"),f&&f.__esModule&&f||{"default":f}).addClass,k=(g=a("renderers"),g&&g.__esModule&&g||{"default":g}),l=k.getRenderer,m=k.registerRenderer,n=(h=a("helpers/number"),h&&h.__esModule&&h||{"default":h}).isNumeric;m("numeric",d)},{"helpers/dom/element":44,"helpers/number":48,numeral:"numeral",renderers:86}],92:[function(a,b,c){"use strict";function d(a,b,c,d,e,f,h){i("text").apply(this,arguments),f=b.innerHTML;var j,k=h.hashLength||f.length,l=h.hashSymbol||"*";for(j="";j.split(l).length-13?("function"==typeof d&&(a.__proto__=d),a.prototype=l(h(d),f(b))):a.prototype=b,n(a,"prototype",{configurable:!1,writable:!1}),m(a,f(c))}function h(a){if("function"==typeof a){var b=a.prototype;if(j(b)===b||null===b)return a.prototype;throw new k("super prototype must be an Object or null")}if(null===a)return null;throw new k("Super expression must either be null or a function, not "+typeof a+".")}function i(a,b,d){null!==p(b)&&c(a,b,"constructor",d)}var j=Object,k=TypeError,l=j.create,m=$traceurRuntime.defineProperties,n=$traceurRuntime.defineProperty,o=$traceurRuntime.getOwnPropertyDescriptor,p=Object.getPrototypeOf,q=$traceurRuntime.toProperty,r=Object,s=r.getOwnPropertyNames,t=r.getOwnPropertySymbols;$traceurRuntime.createClass=g,$traceurRuntime.defaultSuperCall=i,$traceurRuntime.superCall=c,$traceurRuntime.superConstructor=b,$traceurRuntime.superGet=d,$traceurRuntime.superSet=e}()},{}],95:[function(a,b,c){"use strict";function d(a){var b=this;this.eventManager=u(a),this.instance=a,this.settings=a.getSettings();var c=a.rootElement.getAttribute("style");c&&a.rootElement.setAttribute("data-originalstyle",c),l(a.rootElement,"handsontable");var d=document.createElement("TABLE");l(d,"htCore"),a.getSettings().tableClassName&&l(d,a.getSettings().tableClassName),this.THEAD=document.createElement("THEAD"),d.appendChild(this.THEAD),this.TBODY=document.createElement("TBODY"),d.appendChild(this.TBODY),a.table=d,a.container.insertBefore(d,a.container.firstChild),this.eventManager.addEventListener(a.rootElement,"mousedown",function(a){b.isTextSelectionAllowed(a.target)||(f(),a.preventDefault(),window.focus())}),this.eventManager.addEventListener(document.documentElement,"keyup",function(b){a.selection.isInProgress()&&!b.shiftKey&&a.selection.finish()});var e;this.isMouseDown=function(){return e},this.eventManager.addEventListener(document.documentElement,"mouseup",function(b){a.selection.isInProgress()&&1===b.which&&a.selection.finish(),e=!1,t(document.activeElement)&&a.unlisten()}),this.eventManager.addEventListener(document.documentElement,"mousedown",function(c){var d=c.target,f=c.x||c.clientX,g=c.y||c.clientY;if(!e&&a.rootElement){if(d===a.view.wt.wtTable.holder){var h=p();if(document.elementFromPoint(f+h,g)!==a.view.wt.wtTable.holder||document.elementFromPoint(f,g+h)!==a.view.wt.wtTable.holder)return}else for(;d!==document.documentElement;){if(null===d){if(c.isTargetWebComponent)break;return}if(d===a.rootElement)return;d=d.parentNode}b.settings.outsideClickDeselects?a.deselectCell():a.destroyEditor()}}),this.eventManager.addEventListener(d,"selectstart",function(a){b.settings.fragmentSelection||a.preventDefault()});var f=function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty()},g=[new z({className:"current",border:{width:2,color:"#5292F7",cornerVisible:function(){return b.settings.fillHandle&&!b.isCellEdited()&&!a.selection.isMultiple()},multipleSelectionHandlesVisible:function(){return!b.isCellEdited()&&!a.selection.isMultiple()}}}),new z({className:"area",border:{width:1,color:"#89AFF9",cornerVisible:function(){return b.settings.fillHandle&&!b.isCellEdited()&&a.selection.isMultiple()},multipleSelectionHandlesVisible:function(){return!b.isCellEdited()&&a.selection.isMultiple()}}}),new z({className:"highlight",highlightRowClassName:b.settings.currentRowClassName,highlightColumnClassName:b.settings.currentColClassName}),new z({className:"fill",border:{width:1,color:"red"}})];g.current=g[0],g.area=g[1],g.highlight=g[2],g.fill=g[3];var h={debug:function(){return b.settings.debug},externalRowCalculator:this.instance.getPlugin("autoRowSize")&&this.instance.getPlugin("autoRowSize").isEnabled(),table:d,stretchH:this.settings.stretchH,data:a.getDataAtCell,totalRows:a.countRows,totalColumns:a.countCols,fixedColumnsLeft:function(){return b.settings.fixedColumnsLeft},fixedRowsTop:function(){return b.settings.fixedRowsTop},fixedRowsBottom:function(){return b.settings.fixedRowsBottom},minSpareRows:function(){return b.settings.minSpareRows},renderAllRows:b.settings.renderAllRows,rowHeaders:function(){var c=[];return a.hasRowHeaders()&&c.push(function(a,c){b.appendRowHeader(a,c)}),Handsontable.hooks.run(a,"afterGetRowHeaderRenderers",c),c},columnHeaders:function(){var c=[];return a.hasColHeaders()&&c.push(function(a,c){b.appendColHeader(a,c)}),Handsontable.hooks.run(a,"afterGetColumnHeaderRenderers",c),c},columnWidth:a.getColWidth,rowHeight:a.getRowHeight,cellRenderer:function(a,c,d){var e=b.instance.colToProp(c),f=b.instance.getCellMeta(a,c),g=b.instance.getCellRenderer(f),h=b.instance.getDataAtRowProp(a,e);g(b.instance,d,a,c,e,h,f),Handsontable.hooks.run(b.instance,"afterRenderer",d,a,c,e,h,f)},selections:g,hideBorderOnMouseDownOver:function(){return b.settings.fragmentSelection},onCellMouseDown:function(c,d,f,g){var h,i,j=f.parentNode,k=j.parentNode;if(a.listen(),b.activeWt=g,e=!0,Handsontable.hooks.run(a,"beforeOnCellMouseDown",c,d,f),a.selection.setSelectedHeaders(!1,!1),!x(c)){if(2===c.button&&a.selection.inInSelection(d));else c.shiftKey?d.row>=0&&d.col>=0&&a.selection.setRangeEnd(d):(d.row<0||d.col<0)&&(d.row>=0||d.col>=0)?(d.row<0&&(h=k.childNodes.length-Array.prototype.indexOf.call(k.childNodes,j)-1,i=a.getHeaderColspan(d.col,h),a.selection.setSelectedHeaders(!1,!0),a.selectCell(0,d.col,a.countRows()-1,d.col+Math.max(0,i-1))),d.col<0&&(a.selection.setSelectedHeaders(!0,!1),a.selectCell(d.row,0,d.row,a.countCols()-1))):(d.row=d.row<0?0:d.row,d.col=d.col<0?0:d.col,a.selection.setRangeStart(d));Handsontable.hooks.run(a,"afterOnCellMouseDown",c,d,f),b.activeWt=b.wt}},onCellMouseOver:function(c,d,f,g){b.activeWt=g,d.row>=0&&d.col>=0?e&&a.selection.setRangeEnd(d):e&&(d.row<0&&(a.selection.selectedHeader.cols?(a.selection.setRangeEnd(new y(a.countRows()-1,d.col)),a.selection.setSelectedHeaders(!1,!0)):a.selection.setRangeEnd(new y(d.row,d.col))),d.col<0&&(a.selection.selectedHeader.rows?(a.selection.setRangeEnd(new y(d.row,a.countCols()-1)),a.selection.setSelectedHeaders(!0,!1)):a.selection.setRangeEnd(new y(d.row,d.col)))),Handsontable.hooks.run(a,"afterOnCellMouseOver",c,d,f),b.activeWt=b.wt},onCellCornerMouseDown:function(b){b.preventDefault(),Handsontable.hooks.run(a,"afterOnCellCornerMouseDown",b)},beforeDraw:function(a){b.beforeRender(a)},onDraw:function(a){b.onDraw(a)},onScrollVertically:function(){a.runHooks("afterScrollVertically")},onScrollHorizontally:function(){a.runHooks("afterScrollHorizontally")},onBeforeDrawBorders:function(b,c){a.runHooks("beforeDrawBorders",b,c)},onBeforeTouchScroll:function(){a.runHooks("beforeTouchScroll")},onAfterMomentumScroll:function(){a.runHooks("afterMomentumScroll")},viewportRowCalculatorOverride:function(c){var d=a.countRows(),e=b.settings.viewportRowRenderingOffset;if("auto"===e&&b.settings.fixedRowsTop&&(e=10),"number"==typeof e&&(c.startRow=Math.max(c.startRow-e,0),c.endRow=Math.min(c.endRow+e,d-1)),"auto"===e){var f=c.startRow+c.endRow-c.startRow,g=Math.ceil(f/d*12);c.startRow=Math.max(c.startRow-g,0),c.endRow=Math.min(c.endRow+g,d-1)}a.runHooks("afterViewportRowCalculatorOverride",c)},viewportColumnCalculatorOverride:function(c){var d=a.countCols(),e=b.settings.viewportColumnRenderingOffset;if("auto"===e&&b.settings.fixedColumnsLeft&&(e=10),"number"==typeof e&&(c.startColumn=Math.max(c.startColumn-e,0),c.endColumn=Math.min(c.endColumn+e,d-1)),"auto"===e){var f=c.startColumn+c.endColumn-c.startColumn,g=Math.ceil(f/d*12);c.startRow=Math.max(c.startColumn-g,0),c.endColumn=Math.min(c.endColumn+g,d-1)}a.runHooks("afterViewportColumnCalculatorOverride",c)}};Handsontable.hooks.run(a,"beforeInitWalkontable",h),this.wt=new A(h),this.activeWt=this.wt,this.eventManager.addEventListener(b.wt.wtTable.spreader,"mousedown",function(a){a.target===b.wt.wtTable.spreader&&3===a.which&&w(a)}),this.eventManager.addEventListener(b.wt.wtTable.spreader,"contextmenu",function(a){a.target===b.wt.wtTable.spreader&&3===a.which&&w(a)}),this.eventManager.addEventListener(document.documentElement,"click",function(){b.settings.observeDOMVisibility&&b.wt.drawInterrupted&&(b.instance.forceFullRender=!0,b.render())})}Object.defineProperties(c,{TableView:{get:function(){return d}},__esModule:{value:!0}});var e,f,g,h,i,j,k=(e=a("helpers/dom/element"),e&&e.__esModule&&e||{"default":e}),l=k.addClass,m=k.empty,n=k.fastInnerHTML,o=k.fastInnerText,p=k.getScrollbarWidth,q=k.hasClass,r=k.isChildOf,s=k.isInput,t=k.isOutsideInput,u=(f=a("eventManager"),f&&f.__esModule&&f||{"default":f}).eventManager,v=(g=a("helpers/dom/event"),g&&g.__esModule&&g||{"default":g}),w=v.stopPropagation,x=v.isImmediatePropagationStopped,y=(h=a("3rdparty/walkontable/src/cell/coords"),h&&h.__esModule&&h||{"default":h}).WalkontableCellCoords,z=(i=a("3rdparty/walkontable/src/selection"),i&&i.__esModule&&i||{"default":i}).WalkontableSelection,A=(j=a("3rdparty/walkontable/src/core"),j&&j.__esModule&&j||{"default":j}).Walkontable;Handsontable.TableView=d,d.prototype.isTextSelectionAllowed=function(a){return s(a)?!0:this.settings.fragmentSelection&&r(a,this.TBODY)?!0:!1},d.prototype.isCellEdited=function(){var a=this.instance.getActiveEditor();return a&&a.isOpened()},d.prototype.beforeRender=function(a){a&&Handsontable.hooks.run(this.instance,"beforeRender",this.instance.forceFullRender)},d.prototype.onDraw=function(a){a&&Handsontable.hooks.run(this.instance,"afterRender",this.instance.forceFullRender)},d.prototype.render=function(){this.wt.draw(!this.instance.forceFullRender),this.instance.forceFullRender=!1,this.instance.renderCall=!1},d.prototype.getCellAtCoords=function(a,b){var c=this.wt.getCell(a,b);return 0>c?null:c},d.prototype.scrollViewport=function(a){this.wt.scrollViewport(a)},d.prototype.appendRowHeader=function(a,b){if(b.firstChild){var c=b.firstChild;if(!q(c,"relative"))return m(b),void this.appendRowHeader(a,b);this.updateCellHeader(c.querySelector(".rowHeader"),a,this.instance.getRowHeader)}else{var d=document.createElement("div"),e=document.createElement("span");d.className="relative",e.className="rowHeader",this.updateCellHeader(e,a,this.instance.getRowHeader),d.appendChild(e),b.appendChild(d)}Handsontable.hooks.run(this.instance,"afterGetRowHeader",a,b)},d.prototype.appendColHeader=function(a,b){if(b.firstChild){var c=b.firstChild;if(!q(c,"relative"))return m(b),void this.appendRowHeader(a,b);this.updateCellHeader(c.querySelector(".colHeader"),a,this.instance.getColHeader)}else{var d=document.createElement("div"),e=document.createElement("span");d.className="relative",e.className="colHeader",this.updateCellHeader(e,a,this.instance.getColHeader),d.appendChild(e),b.appendChild(d)}Handsontable.hooks.run(this.instance,"afterGetColHeader",a,b)},d.prototype.updateCellHeader=function(a,b,c){b>-1?n(a,c(b)):(o(a,String.fromCharCode(160)),l(a,"cornerHeader"))},d.prototype.maximumVisibleElementWidth=function(a){var b=this.wt.wtViewport.getWorkspaceWidth(),c=b-a;return c>0?c:0},d.prototype.maximumVisibleElementHeight=function(a){var b=this.wt.wtViewport.getWorkspaceHeight(),c=b-a;return c>0?c:0},d.prototype.mainViewIsActive=function(){return this.wt===this.activeWt},d.prototype.destroy=function(){this.wt.destroy(),this.eventManager.destroy()}},{"3rdparty/walkontable/src/cell/coords":5,"3rdparty/walkontable/src/core":7,"3rdparty/walkontable/src/selection":18,eventManager:40,"helpers/dom/element":44,"helpers/dom/event":45}],96:[function(a,b,c){"use strict";Object.defineProperties(c,{GhostTable:{get:function(){return n}},__esModule:{value:!0}});var d,e,f,g,h,i=(d=a("helpers/dom/element"),d&&d.__esModule&&d||{"default":d}),j=i.addClass,k=i.outerHeight,l=i.outerWidth,m=(e=a("helpers/array"),e&&e.__esModule&&e||{"default":e}).arrayEach,n=((f=a("helpers/object"),f&&f.__esModule&&f||{"default":f}).objectEach,(g=a("helpers/number"),g&&g.__esModule&&g||{"default":g}).rangeEach,(h=a("helpers/mixed"),h&&h.__esModule&&h||{"default":h}).stringify,function(a){this.hot=a,this.container=null,this.injected=!1,this.rows=[],this.columns=[],this.samples=null});$traceurRuntime.createClass(n,{addRow:function(a,b){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 c={row:a};this.rows.push(c),this.samples=b,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.table.tr.appendChild(this.createRow(a)),this.container.container.appendChild(this.table.fragment),c.table=this.table.table},addColumn:function(a,b){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 c={col:a};this.columns.push(c),this.samples=b,this.table=this.createTable(this.hot.table.className),null!==this.hot.getColHeader(a)&&this.hot.view.appendColHeader(a,this.table.th),this.table.tBody.appendChild(this.createCol(a)),this.container.container.appendChild(this.table.fragment),c.table=this.table.table},getHeights:function(a){this.injected||this.injectTable(),m(this.rows,function(b){a(b.row,k(b.table)-1)})},getWidths:function(a){this.injected||this.injectTable(),m(this.columns,function(b){a(b.col,l(b.table))})},createColGroupsCol:function(){var a=this,b=document,c=b.createDocumentFragment();return c.appendChild(this.createColElement(-1)),this.samples.forEach(function(b){m(b.strings,function(b){c.appendChild(a.createColElement(b.col))})}),c},createRow:function(a){var b=this,c=document,d=c.createDocumentFragment(),e=c.createElement("th");return null!==this.hot.getRowHeader(a)&&this.hot.view.appendRowHeader(a,e),d.appendChild(e),this.samples.forEach(function(e){m(e.strings,function(e){var f=e.col,g=b.hot.getCellMeta(a,f);g.col=f,g.row=a;var h=b.hot.getCellRenderer(g),i=c.createElement("td");h(b.hot,i,a,f,b.hot.colToProp(f),e.value,g),d.appendChild(i)})}),d},createCol:function(a){var b=this,c=document,d=c.createDocumentFragment();return this.samples.forEach(function(e){m(e.strings,function(e){var f=e.row,g=b.hot.getCellMeta(f,a);g.col=a,g.row=f;var h=b.hot.getCellRenderer(g),i=c.createElement("td"),j=c.createElement("tr");h(b.hot,i,f,a,b.hot.colToProp(f),e.value,g),j.appendChild(i),d.appendChild(j)})}),d},clean:function(){this.rows.length=0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()},injectTable:function(){var a=void 0!==arguments[0]?arguments[0]:null;this.injected||((a||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(a){var b=document,c=b.createElement("col");return c.style.width=this.hot.view.wt.wtTable.getStretchedColumnWidth(a)+"px",c},createTable:function(){var a=void 0!==arguments[0]?arguments[0]:"",b=document,c=b.createDocumentFragment(),d=b.createElement("table"),e=b.createElement("thead"),f=b.createElement("tbody"),g=b.createElement("colgroup"),h=b.createElement("tr"),i=b.createElement("th");return this.isVertical()&&d.appendChild(g),this.isHorizontal()&&(h.appendChild(i),e.appendChild(h),d.style.tableLayout="auto",d.style.width="auto"),d.appendChild(e),this.isVertical()&&f.appendChild(h),d.appendChild(f),j(d,a),c.appendChild(d),{fragment:c,table:d,tHead:e,tBody:f,colGroup:g,tr:h,th:i}},createContainer:function(){var a=void 0!==arguments[0]?arguments[0]:"",b=document,c=b.createDocumentFragment(),d=b.createElement("div");return a="htGhostTable htAutoSize "+a.trim(),j(d,a),c.appendChild(d),{fragment:c,container:d}},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=n},{"helpers/array":41,"helpers/dom/element":44,"helpers/mixed":47,"helpers/number":48,"helpers/object":49}],97:[function(a,b,c){"use strict";var d;Object.defineProperties(c,{SamplesGenerator:{get:function(){return m}},__esModule:{value:!0}});var e,f,g,h,i,j=(e=a("helpers/dom/element"),e&&e.__esModule&&e||{"default":e}),k=(j.addClass,j.outerHeight,j.outerWidth,(f=a("helpers/array"),f&&f.__esModule&&f||{"default":f}).arrayEach,(g=a("helpers/object"),g&&g.__esModule&&g||{"default":g}).objectEach,(h=a("helpers/number"),h&&h.__esModule&&h||{"default":h}).rangeEach),l=(i=a("helpers/mixed"),i&&i.__esModule&&i||{"default":i}).stringify,m=function(a){this.samples=null,this.dataFactory=a},n=m;$traceurRuntime.createClass(m,(d={},Object.defineProperty(d,"generateRowSamples",{value:function(a,b){return this.generateSamples("row",b,a)},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(d,"generateColumnSamples",{value:function(a,b){return this.generateSamples("col",b,a)},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(d,"generateSamples",{value:function(a,b,c){var d=this,e=new Map;return"number"==typeof c&&(c={from:c,to:c}),k(c.from,c.to,function(c){var f=d.generateSample(a,b,c);e.set(c,f)}),e},configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(d,"generateSample",{value:function(a,b,c){var d=this,e=new Map;return k(b.from,b.to,function(b){var f,g;if("row"===a)g=d.dataFactory(c,b);else{if("col"!==a)throw new Error("Unsupported sample type");g=d.dataFactory(b,c)}Array.isArray(g)||(g=l(g));var h=g.length;e.has(h)||e.set(h,{needed:n.SAMPLE_COUNT,strings:[]});var i=e.get(h);if(i.needed){var j="row"===a?"col":"row";i.strings.push((f={},Object.defineProperty(f,"value",{value:g,configurable:!0,enumerable:!0,writable:!0}),Object.defineProperty(f,j,{value:b,configurable:!0,enumerable:!0,writable:!0}),f)),i.needed--}}),e},configurable:!0,enumerable:!0,writable:!0}),d),{get SAMPLE_COUNT(){return 3}}),Handsontable.utils=Handsontable.utils||{},Handsontable.utils.SamplesGenerator=m},{"helpers/array":41,"helpers/dom/element":44,"helpers/mixed":47,"helpers/number":48,"helpers/object":49}],98:[function(a,b,c){"use strict";function d(a,b){var c=a,d="string"==typeof c?c.toLowerCase():null;return function(a){for(var e=!1,g=0,h=a.length;h>g;g++){if(c===a[g]){e=!0;break}if(d===f(a[g]).toLowerCase()){e=!0;break}}b(e)}}var e,f=(e=a("helpers/mixed"),e&&e.__esModule&&e||{"default":e}).stringify;Handsontable.AutocompleteValidator=function(a,b){this.strict&&this.source?"function"==typeof this.source?this.source(a,d(a,b)):d(a,b)(this.source):b(!0)}},{"helpers/mixed":47}],99:[function(a,b,c){"use strict";var d,e,f=(d=a("moment"),d&&d.__esModule&&d||{"default":d})["default"],g=(e=a("editors"),e&&e.__esModule&&e||{"default":e}).getEditor;Handsontable.DateValidator=function(a,b){var c=!0,d=g("date",this.instance);null===a&&(a="");var e=f(new Date(a)).isValid(),i=f(a,this.dateFormat||d.defaultDateFormat,!0).isValid();if(e||(c=!1),!e&&i&&(c=!0),e&&!i)if(this.correctFormat===!0){var j=h(a,this.dateFormat);this.instance.setDataAtCell(this.row,this.col,j,"dateValidator"),c=!0}else c=!1;b(c)};var h=function(a,b){var c=f(new Date(a)),d=c.format("YYYY"),e=f().format("YYYY");return d.substr(0,2)!==e.substr(0,2)?a.match(new RegExp(d))||c.year(d.replace(d.substr(0,2),e.substr(0,2))):d.length>4&&c.year((c.year()+"").substr(0,4)),c.format(b)}},{editors:28,moment:"moment"}],100:[function(a,b,c){"use strict";Handsontable.NumericValidator=function(a,b){null===a&&(a=""),b(/^-?\d*(\.|\,)?\d*$/.test(a))}},{}],SheetClip:[function(a,b,c){"use strict";!function(a){function b(a){return a.split('"').length-1}var d={parse:function(a){var c,d,e,f,g,h,i,j=[],k=0;for(e=a.split("\n"),e.length>1&&""===e[e.length-1]&&e.pop(),c=0,d=e.length;d>c;c+=1){for(e[c]=e[c].split(" "),f=0,g=e[c].length;g>f;f+=1)j[k]||(j[k]=[]),h&&0===f?(i=j[k].length-1,j[k][i]=j[k][i]+"\n"+e[c][0],h&&1&b(e[c][0])&&(h=!1,j[k][i]=j[k][i].substring(0,j[k][i].length-1).replace(/""/g,'"'))):f===g-1&&0===e[c][f].indexOf('"')&&1&b(e[c][f])?(j[k].push(e[c][f].substring(1).replace(/""/g,'"')),h=!0):(j[k].push(e[c][f].replace(/""/g,'"')),h=!1);h||(k+=1)}return j},stringify:function(a){var b,c,d,e,f,g="";for(b=0,c=a.length;c>b;b+=1){for(e=a[b].length,d=0;e>d;d+=1)d>0&&(g+=" "),f=a[b][d],g+="string"==typeof f?f.indexOf("\n")>-1?'"'+f.replace(/"/g,'""')+'"':f:null===f||void 0===f?"":f;g+="\n"}return g}};"undefined"!=typeof c?(c.parse=d.parse,c.stringify=d.stringify):a.SheetClip=d}(window)},{}],autoResize:[function(a,b,c){"use strict";function d(){var a,b={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},c=document.body,d=document.createTextNode(""),e=document.createElement("SPAN"),f=function(a,b,c){window.attachEvent?a.attachEvent("on"+b,c):a.addEventListener(b,c,!1)},g=function(a,b,c){window.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent("on"+b,c)},h=function(f){var g,h;f?/^[a-zA-Z \.,\\\/\|0-9]$/.test(f)||(f="."):f="",void 0!==d.textContent?d.textContent=a.value+f:d.data=a.value+f,e.style.fontSize=Handsontable.Dom.getComputedStyle(a).fontSize,e.style.fontFamily=Handsontable.Dom.getComputedStyle(a).fontFamily,e.style.whiteSpace="pre",c.appendChild(e),g=e.clientWidth+2,c.removeChild(e),a.style.height=b.minHeight+"px",b.minWidth>g?a.style.width=b.minWidth+"px":g>b.maxWidth?a.style.width=b.maxWidth+"px":a.style.width=g+"px",h=a.scrollHeight?a.scrollHeight-1:0,b.minHeight>h?a.style.height=b.minHeight+"px":b.maxHeight-1||"true"===a.contentEditable}var c=this,d=!1;if(a.metaKey?d=!0:a.ctrlKey&&-1===navigator.userAgent.indexOf("Mac")&&(d=!0),d){if(document.activeElement!==this.elTextarea&&(""!==this.getSelectionText()||b()))return;this.selectNodeText(this.elTextarea),setTimeout(function(){document.activeElement!==c.elTextarea&&c.selectNodeText(c.elTextarea)},0)}!d||67!==a.keyCode&&86!==a.keyCode&&88!==a.keyCode||(88===a.keyCode?setTimeout(function(){c.triggerCut(a)},0):86===a.keyCode&&setTimeout(function(){c.triggerPaste(a)},0))},e.prototype.selectNodeText=function(a){a&&a.select()},e.prototype.getSelectionText=function(){var a="";return window.getSelection?a=window.getSelection().toString():document.selection&&"Control"!==document.selection.type&&(a=document.selection.createRange().text),a},e.prototype.copyable=function(a){if("string"!=typeof a&&void 0===a.toString)throw new Error("copyable requires string parameter");this.elTextarea.value=a,this.selectNodeText(this.elTextarea)},e.prototype.onCut=function(a){this.cutCallbacks.push(a)},e.prototype.onPaste=function(a){this.pasteCallbacks.push(a)},e.prototype.removeCallback=function(a){var b,c;for(b=0,c=this.copyCallbacks.length;c>b;b++)if(this.copyCallbacks[b]===a)return this.copyCallbacks.splice(b,1),!0;for(b=0,c=this.cutCallbacks.length;c>b;b++)if(this.cutCallbacks[b]===a)return this.cutCallbacks.splice(b,1),!0;for(b=0,c=this.pasteCallbacks.length;c>b;b++)if(this.pasteCallbacks[b]===a)return this.pasteCallbacks.splice(b,1),!0;return!1},e.prototype.triggerCut=function(a){var b=this;b.cutCallbacks&&setTimeout(function(){for(var c=0,d=b.cutCallbacks.length;d>c;c++)b.cutCallbacks[c](a)},50)},e.prototype.triggerPaste=function(a,b){var c=this;c.pasteCallbacks&&setTimeout(function(){for(var d=b||c.elTextarea.value,e=0,f=c.pasteCallbacks.length;f>e;e++)c.pasteCallbacks[e](d,a)},50)},e.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),this.onKeyDownRef=null)},e.prototype.hasBeenDestroyed=function(){return!this.refCounter}},{}],es6collections:[function(a,b,c){"use strict";!function(a){function b(a,b){function d(a){return this&&this.constructor===d?(this._keys=[],this._values=[],this._itp=[],this.objectOnly=b,void(a&&c.call(this,a))):new d(a)}return b||t(a,"size",{get:q}),a.constructor=d,d.prototype=a,d}function c(a){this.add?a.forEach(this.add,this):a.forEach(function(a){this.set(a[0],a[1])},this)}function d(a){return this.has(a)&&(this._keys.splice(s,1),this._values.splice(s,1),this._itp.forEach(function(a){s-1}function e(a){return this.has(a)?this._values[s]:void 0}function f(a,b){if(this.objectOnly&&b!==Object(b))throw new TypeError("Invalid value used as weak collection key");if(b!=b||0===b)for(s=a.length;s--&&!u(a[s],b););else s=a.indexOf(b);return s>-1}function g(a){return f.call(this,this._values,a)}function h(a){return f.call(this,this._keys,a)}function i(a,b){return this.has(a)?this._values[s]=b:this._values[this._keys.push(a)-1]=b,this}function j(a){return this.has(a)||this._values.push(a),this}function k(){this._values.length=0}function l(){return p(this._itp,this._keys)}function m(){return p(this._itp,this._values)}function n(){return p(this._itp,this._keys,this._values)}function o(){return p(this._itp,this._values,this._values)}function p(a,b,c){var d=[0],e=!1;return a.push(d),{next:function(){var f,g=d[0];return!e&&gb;b++)if(s[b].obj===a)return s[b]}function f(a){for(var b=0,c=s.length;c>b;b++)s[b]===a&&s.splice(b,1)}function g(a,b){for(var c=0,d=a.observers.length;d>c;c++)if(a.observers[c].callback===b)return a.observers[c].observer}function h(a,b){for(var c=0,d=a.observers.length;d>c;c++)if(a.observers[c].observer===b)return a.observers.splice(c,1),void(a.observers.length||f(a))}function i(a,b){m(b),Object.observe?l(b,a):clearTimeout(b.next);var c=e(a);h(c,b)}function j(a,b){var c,f=[],h=a,i=e(a);if(i?c=g(i,b):(i=new t(a),s.push(i)),c)return c;if(Object.observe)c=function(e){l(c,a),k(c,a);for(var g=0,i=e.length;i>g;){if(("length"!==e[g].name||!w(e[g].object))&&"__Jasmine_been_here_before__"!==e[g].name){var j=e[g].type;switch(j){case"new":j="add";break;case"deleted":j="delete";break;case"updated":j="update"}r[j].call(e[g],f,d(h,e[g].object))}g++}f&&b&&b(f),c.patches=f,f=[]};else if(c={},i.value=JSON.parse(JSON.stringify(a)),b){c.callback=b,c.next=null;var j=this.intervals||[100,1e3,1e4,6e4],n=0,o=function(){m(c)},p=function(){clearTimeout(c.next),c.next=setTimeout(function(){o(),n=0,c.next=setTimeout(q,j[n++])},0)},q=function(){o(),n==j.length&&(n=j.length-1),c.next=setTimeout(q,j[n++])};"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))),c.next=setTimeout(q,j[n++])}return c.patches=f,c.object=a,i.observers.push(new u(b,c)),k(c,a)}function k(a,b){if(Object.observe){Object.observe(b,a);for(var c in b)if(b.hasOwnProperty(c)){var d=b[c];d&&"object"==typeof d&&k(a,d)}}return a}function l(a,b){if(Object.observe){Object.unobserve(b,a);for(var c in b)if(b.hasOwnProperty(c)){var d=b[c];d&&"object"==typeof d&&l(a,d)}}return a}function m(a){if(Object.observe)Object.deliverChangeRecords(a);else{for(var b,c=0,d=s.length;d>c;c++)if(s[c].obj===a.object){b=s[c];break}b&&n(b.value,a.object,a.patches,"")}var e=a.patches;return e.length>0&&(a.patches=[],a.callback&&a.callback(e)),e}function n(a,c,d,e){for(var f=v(c),g=v(a),h=!1,i=!1,j=g.length-1;j>=0;j--){var k=g[j],l=a[k];if(c.hasOwnProperty(k)){var m=c[k];l instanceof Object?n(l,m,d,e+"/"+b(k)):l!=m&&(h=!0,d.push({op:"replace",path:e+"/"+b(k),value:m}),a[k]=m)}else d.push({op:"remove",path:e+"/"+b(k)}),delete a[k],i=!0}if(i||f.length!=g.length)for(var j=0;je;){c=b[e];for(var g=c.path.split("/"),h=a,i=1,j=g.length;;)if(w(h)){var k=parseInt(g[i],10);if(i++,i>=j){d=q[c.op].call(c,h,k,a);break}h=h[k]}else{var l=g[i];if(-1!=l.indexOf("~")&&(l=l.replace(/~1/g,"/").replace(/~0/g,"~")),i++,i>=j){d=p[c.op].call(c,h,l,a);break}h=h[l]}e++}return d}var p={add:function(a,b){return a[b]=this.value,!0},remove:function(a,b){return delete a[b],!0},replace:function(a,b){return a[b]=this.value,!0},move:function(a,b,c){var d={op:"_get",path:this.from};return o(c,[d]),o(c,[{op:"remove",path:this.from}]),o(c,[{op:"add",path:this.path,value:d.value}]),!0},copy:function(a,b,c){var d={op:"_get",path:this.from};return o(c,[d]),o(c,[{op:"add",path:this.path,value:d.value}]),!0},test:function(a,b){return JSON.stringify(a[b])===JSON.stringify(this.value)},_get:function(a,b){this.value=a[b]}},q={add:function(a,b){return a.splice(b,0,this.value),!0},remove:function(a,b){return a.splice(b,1),!0},replace:function(a,b){return a[b]=this.value,!0},move:p.move,copy:p.copy,test:p.test,_get:p._get},r={add:function(a,c){var d={op:"add",path:c+b(this.name),value:this.object[this.name]};a.push(d)},"delete":function(a,c){var d={op:"remove",path:c+b(this.name)};a.push(d)},update:function(a,c){var d={op:"replace",path:c+b(this.name),value:this.object[this.name]};a.push(d)}},s=[];a.intervals;var t=function(){function a(a){this.observers=[],this.obj=a}return a}(),u=function(){function a(a,b){this.callback=a,this.observer=b}return a}();a.unobserve=i,a.observe=j,a.generate=m;var v;v=Object.keys?Object.keys:function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b};var w;w=Array.isArray?Array.isArray:function(a){return a.push&&"number"==typeof a.length},a.apply=o}(d||(d={})),"undefined"!=typeof c&&(c.apply=d.apply,c.observe=d.observe,c.unobserve=d.unobserve,c.generate=d.generate)},{}],moment:[function(b,c,d){!function(b,e){"object"==typeof d&&"undefined"!=typeof c?c.exports=e():"function"==typeof a&&a.amd?a(e):b.moment=e()}(this,function(){"use strict";function a(){return Jc.apply(null,arguments)}function d(a){Jc=a}function e(a){return"[object Array]"===Object.prototype.toString.call(a)}function f(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function g(a,b){var c,d=[];for(c=0;c0)for(c in Lc)d=Lc[c],e=b[d],"undefined"!=typeof e&&(a[d]=e);return a}function p(b){o(this,b),this._d=new Date(null!=b._d?b._d.getTime():NaN),Mc===!1&&(Mc=!0,a.updateOffset(this),Mc=!1)}function q(a){return a instanceof p||null!=a&&null!=a._isAMomentObject}function r(a){return 0>a?Math.ceil(a):Math.floor(a)}function s(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=r(b)),c}function t(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&s(a[d])!==s(b[d]))&&g++;return g+f}function u(){}function v(a){return a?a.toLowerCase().replace("_","-"):a}function w(a){for(var b,c,d,e,f=0;f0;){if(d=x(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&t(e,c,!0)>=b-1)break;b--}f++}return null}function x(a){var d=null;if(!Nc[a]&&"undefined"!=typeof c&&c&&c.exports)try{d=Kc._abbr,b("./locale/"+a),y(d)}catch(e){}return Nc[a]}function y(a,b){var c;return a&&(c="undefined"==typeof b?A(a):z(a,b),c&&(Kc=c)),Kc._abbr}function z(a,b){return null!==b?(b.abbr=a,Nc[a]=Nc[a]||new u,Nc[a].set(b),y(a),Nc[a]):(delete Nc[a],null)}function A(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return Kc;if(!e(a)){if(b=x(a))return b;a=[a]}return w(a)}function B(a,b){var c=a.toLowerCase();Oc[c]=Oc[c+"s"]=Oc[b]=a}function C(a){return"string"==typeof a?Oc[a]||Oc[a.toLowerCase()]:void 0}function D(a){var b,c,d={};for(c in a)h(a,c)&&(b=C(c),b&&(d[b]=a[c]));return d}function E(b,c){return function(d){return null!=d?(G(this,b,d),a.updateOffset(this,c),this):F(this,b)}}function F(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function G(a,b,c){return a._d["set"+(a._isUTC?"UTC":"")+b](c)}function H(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else if(a=C(a),"function"==typeof this[a])return this[a](b);return this}function I(a,b,c){var d=""+Math.abs(a),e=b-d.length,f=a>=0;return(f?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d}function J(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&(Sc[a]=e),b&&(Sc[b[0]]=function(){return I(e.apply(this,arguments),b[1],b[2])}),c&&(Sc[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function K(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function L(a){var b,c,d=a.match(Pc);for(b=0,c=d.length;c>b;b++)Sc[d[b]]?d[b]=Sc[d[b]]:d[b]=K(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function M(a,b){return a.isValid()?(b=N(b,a.localeData()),Rc[b]=Rc[b]||L(b),Rc[b](a)):a.localeData().invalidDate()}function N(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Qc.lastIndex=0;d>=0&&Qc.test(a);)a=a.replace(Qc,c),Qc.lastIndex=0,d-=1;return a}function O(a){return"function"==typeof a&&"[object Function]"===Object.prototype.toString.call(a)}function P(a,b,c){fd[a]=O(b)?b:function(a){return a&&c?c:b}}function Q(a,b){return h(fd,a)?fd[a](b._strict,b._locale):new RegExp(R(a))}function R(a){return a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function S(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),"number"==typeof b&&(d=function(a,c){c[b]=s(a)}),c=0;cd;d++){if(e=j([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}}function Z(a,b){var c;return"string"==typeof b&&(b=a.localeData().monthsParse(b),"number"!=typeof b)?a:(c=Math.min(a.date(),V(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a)}function $(b){return null!=b?(Z(this,b),a.updateOffset(this,!0),this):F(this,"Month")}function _(){return V(this.year(),this.month())}function aa(a){var b,c=a._a;return c&&-2===l(a).overflow&&(b=c[id]<0||c[id]>11?id:c[jd]<1||c[jd]>V(c[hd],c[id])?jd:c[kd]<0||c[kd]>24||24===c[kd]&&(0!==c[ld]||0!==c[md]||0!==c[nd])?kd:c[ld]<0||c[ld]>59?ld:c[md]<0||c[md]>59?md:c[nd]<0||c[nd]>999?nd:-1,l(a)._overflowDayOfYear&&(hd>b||b>jd)&&(b=jd),l(a).overflow=b),a}function ba(b){a.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function ca(a,b){var c=!0;return i(function(){return c&&(ba(a+"\n"+(new Error).stack),c=!1),b.apply(this,arguments)},b)}function da(a,b){qd[a]||(ba(b),qd[a]=!0)}function ea(a){var b,c,d=a._i,e=rd.exec(d);if(e){for(l(a).iso=!0,b=0,c=sd.length;c>b;b++)if(sd[b][1].exec(d)){a._f=sd[b][0];break}for(b=0,c=td.length;c>b;b++)if(td[b][1].exec(d)){a._f+=(e[6]||" ")+td[b][0];break}d.match(cd)&&(a._f+="Z"),xa(a)}else a._isValid=!1}function fa(b){var c=ud.exec(b._i);return null!==c?void(b._d=new Date(+c[1])):(ea(b),void(b._isValid===!1&&(delete b._isValid,a.createFromInputFallback(b))))}function ga(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function ha(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function ia(a){return ja(a)?366:365}function ja(a){return a%4===0&&a%100!==0||a%400===0}function ka(){return ja(this.year())}function la(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=Fa(a).add(f,"d"),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function ma(a){return la(a,this._week.dow,this._week.doy).week}function na(){return this._week.dow}function oa(){return this._week.doy}function pa(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function qa(a){var b=la(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}function ra(a,b,c,d,e){var f,g=6+e-d,h=ha(a,0,1+g),i=h.getUTCDay();return e>i&&(i+=7),c=null!=c?1*c:e,f=1+g+7*(b-1)-i+c,{year:f>0?a:a-1,dayOfYear:f>0?f:ia(a-1)+f}}function sa(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function ta(a,b,c){return null!=a?a:null!=b?b:c}function ua(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function va(a){var b,c,d,e,f=[];if(!a._d){for(d=ua(a),a._w&&null==a._a[jd]&&null==a._a[id]&&wa(a),a._dayOfYear&&(e=ta(a._a[hd],d[hd]),a._dayOfYear>ia(e)&&(l(a)._overflowDayOfYear=!0),c=ha(e,0,a._dayOfYear),a._a[id]=c.getUTCMonth(),a._a[jd]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=f[b]=d[b];for(;7>b;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];24===a._a[kd]&&0===a._a[ld]&&0===a._a[md]&&0===a._a[nd]&&(a._nextDay=!0,a._a[kd]=0),a._d=(a._useUTC?ha:ga).apply(null,f),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[kd]=24)}}function wa(a){var b,c,d,e,f,g,h;b=a._w,null!=b.GG||null!=b.W||null!=b.E?(f=1,g=4,c=ta(b.GG,a._a[hd],la(Fa(),1,4).year),d=ta(b.W,1),e=ta(b.E,1)):(f=a._locale._week.dow,g=a._locale._week.doy,c=ta(b.gg,a._a[hd],la(Fa(),f,g).year),d=ta(b.w,1),null!=b.d?(e=b.d,f>e&&++d):e=null!=b.e?b.e+f:f),h=ra(c,d,e,g,f),a._a[hd]=h.year,a._dayOfYear=h.dayOfYear}function xa(b){if(b._f===a.ISO_8601)return void ea(b);b._a=[],l(b).empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,j=0;for(e=N(b._f,b._locale).match(Pc)||[],c=0;c0&&l(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),j+=d.length),Sc[f]?(d?l(b).empty=!1:l(b).unusedTokens.push(f),U(f,d,b)):b._strict&&!d&&l(b).unusedTokens.push(f);l(b).charsLeftOver=i-j,h.length>0&&l(b).unusedInput.push(h),l(b).bigHour===!0&&b._a[kd]<=12&&b._a[kd]>0&&(l(b).bigHour=void 0),b._a[kd]=ya(b._locale,b._a[kd],b._meridiem),va(b),aa(b)}function ya(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function za(a){var b,c,d,e,f;if(0===a._f.length)return l(a).invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;ef)&&(d=f,c=b));i(a,c||b)}function Aa(a){if(!a._d){var b=D(a._i);a._a=[b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],va(a)}}function Ba(a){var b=new p(aa(Ca(a)));return b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b}function Ca(a){var b=a._i,c=a._f;return a._locale=a._locale||A(a._l),null===b||void 0===c&&""===b?n({nullInput:!0}):("string"==typeof b&&(a._i=b=a._locale.preparse(b)),q(b)?new p(aa(b)):(e(c)?za(a):c?xa(a):f(b)?a._d=b:Da(a),a))}function Da(b){var c=b._i;void 0===c?b._d=new Date:f(c)?b._d=new Date(+c):"string"==typeof c?fa(b):e(c)?(b._a=g(c.slice(0),function(a){return parseInt(a,10)}),va(b)):"object"==typeof c?Aa(b):"number"==typeof c?b._d=new Date(c):a.createFromInputFallback(b)}function Ea(a,b,c,d,e){var f={};return"boolean"==typeof c&&(d=c,c=void 0),f._isAMomentObject=!0,f._useUTC=f._isUTC=e,f._l=c,f._i=a,f._f=b,f._strict=d,Ba(f)}function Fa(a,b,c,d){return Ea(a,b,c,d,!1)}function Ga(a,b){var c,d;if(1===b.length&&e(b[0])&&(b=b[0]),!b.length)return Fa();for(c=b[0],d=1;da&&(a=-a,c="-"),c+I(~~(a/60),2)+b+I(~~a%60,2)})}function Ma(a){var b=(a||"").match(cd)||[],c=b[b.length-1]||[],d=(c+"").match(zd)||["-",0,0],e=+(60*d[1])+s(d[2]);return"+"===d[0]?e:-e}function Na(b,c){var d,e;return c._isUTC?(d=c.clone(),e=(q(b)||f(b)?+b:+Fa(b))-+d,d._d.setTime(+d._d+e),a.updateOffset(d,!1),d):Fa(b).local()}function Oa(a){return 15*-Math.round(a._d.getTimezoneOffset()/15)}function Pa(b,c){var d,e=this._offset||0;return null!=b?("string"==typeof b&&(b=Ma(b)),Math.abs(b)<16&&(b=60*b),!this._isUTC&&c&&(d=Oa(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,"m"),e!==b&&(!c||this._changeInProgress?db(this,$a(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Oa(this)}function Qa(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Ra(a){return this.utcOffset(0,a)}function Sa(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Oa(this),"m")),this}function Ta(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ma(this._i)),this}function Ua(a){return a=a?Fa(a).utcOffset():0,(this.utcOffset()-a)%60===0}function Va(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Wa(){if("undefined"!=typeof this._isDSTShifted)return this._isDSTShifted;var a={};if(o(a,this),a=Ca(a),a._a){var b=a._isUTC?j(a._a):Fa(a._a);this._isDSTShifted=this.isValid()&&t(a._a,b.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Xa(){return!this._isUTC}function Ya(){return this._isUTC}function Za(){return this._isUTC&&0===this._offset}function $a(a,b){var c,d,e,f=a,g=null;return Ka(a)?f={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(f={},b?f[b]=a:f.milliseconds=a):(g=Ad.exec(a))?(c="-"===g[1]?-1:1,f={y:0,d:s(g[jd])*c,h:s(g[kd])*c,m:s(g[ld])*c,s:s(g[md])*c,ms:s(g[nd])*c}):(g=Bd.exec(a))?(c="-"===g[1]?-1:1,f={y:_a(g[2],c),M:_a(g[3],c),d:_a(g[4],c),h:_a(g[5],c),m:_a(g[6],c),s:_a(g[7],c),w:_a(g[8],c)}):null==f?f={}:"object"==typeof f&&("from"in f||"to"in f)&&(e=bb(Fa(f.from),Fa(f.to)),f={},f.ms=e.milliseconds,f.M=e.months),d=new Ja(f),Ka(a)&&h(a,"_locale")&&(d._locale=a._locale),d}function _a(a,b){var c=a&&parseFloat(a.replace(",","."));return(isNaN(c)?0:c)*b}function ab(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function bb(a,b){var c;return b=Na(b,a),a.isBefore(b)?c=ab(a,b):(c=ab(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c}function cb(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(da(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=$a(c,d),db(this,e,a),this}}function db(b,c,d,e){var f=c._milliseconds,g=c._days,h=c._months;e=null==e?!0:e,f&&b._d.setTime(+b._d+f*d),g&&G(b,"Date",F(b,"Date")+g*d),h&&Z(b,F(b,"Month")+h*d),e&&a.updateOffset(b,g||h)}function eb(a,b){var c=a||Fa(),d=Na(c,this).startOf("day"),e=this.diff(d,"days",!0),f=-6>e?"sameElse":-1>e?"lastWeek":0>e?"lastDay":1>e?"sameDay":2>e?"nextDay":7>e?"nextWeek":"sameElse";return this.format(b&&b[f]||this.localeData().calendar(f,this,Fa(c)))}function fb(){return new p(this)}function gb(a,b){var c;return b=C("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=q(a)?a:Fa(a),+this>+a):(c=q(a)?+a:+Fa(a),c<+this.clone().startOf(b))}function hb(a,b){var c;return b=C("undefined"!=typeof b?b:"millisecond"),"millisecond"===b?(a=q(a)?a:Fa(a),+a>+this):(c=q(a)?+a:+Fa(a),+this.clone().endOf(b)b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)}function mb(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function nb(){var a=this.clone().utc();return 0b;b++)if(this._weekdaysParse[b]||(c=Fa([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b}function Rb(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=Mb(a,this.localeData()),this.add(a-b,"d")):b}function Sb(a){var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function Tb(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)}function Ub(a,b){J(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function Vb(a,b){return b._meridiemParse}function Wb(a){return"p"===(a+"").toLowerCase().charAt(0)}function Xb(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function Yb(a,b){b[nd]=s(1e3*("0."+a))}function Zb(){return this._isUTC?"UTC":""}function $b(){return this._isUTC?"Coordinated Universal Time":""}function _b(a){return Fa(1e3*a)}function ac(){return Fa.apply(null,arguments).parseZone()}function bc(a,b,c){var d=this._calendar[a];return"function"==typeof d?d.call(b,c):d}function cc(a){var b=this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];return b||!c?b:(this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a])}function dc(){return this._invalidDate}function ec(a){return this._ordinal.replace("%d",a)}function fc(a){return a}function gc(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)}function hc(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)}function ic(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function jc(a,b,c,d){var e=A(),f=j().set(d,b);return e[c](f,a)}function kc(a,b,c,d,e){if("number"==typeof a&&(b=a,a=void 0),a=a||"",null!=b)return jc(a,b,c,e);var f,g=[];for(f=0;d>f;f++)g[f]=jc(a,f,c,e);return g}function lc(a,b){return kc(a,b,"months",12,"month")}function mc(a,b){return kc(a,b,"monthsShort",12,"month")}function nc(a,b){return kc(a,b,"weekdays",7,"day")}function oc(a,b){return kc(a,b,"weekdaysShort",7,"day")}function pc(a,b){return kc(a,b,"weekdaysMin",7,"day")}function qc(){var a=this._data;return this._milliseconds=Yd(this._milliseconds),this._days=Yd(this._days),this._months=Yd(this._months),a.milliseconds=Yd(a.milliseconds),a.seconds=Yd(a.seconds),a.minutes=Yd(a.minutes),a.hours=Yd(a.hours),a.months=Yd(a.months),a.years=Yd(a.years),this}function rc(a,b,c,d){var e=$a(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()}function sc(a,b){return rc(this,a,b,1)}function tc(a,b){return rc(this,a,b,-1)}function uc(a){return 0>a?Math.floor(a):Math.ceil(a)}function vc(){var a,b,c,d,e,f=this._milliseconds,g=this._days,h=this._months,i=this._data;return f>=0&&g>=0&&h>=0||0>=f&&0>=g&&0>=h||(f+=864e5*uc(xc(h)+g),g=0,h=0),i.milliseconds=f%1e3,a=r(f/1e3),i.seconds=a%60,b=r(a/60),i.minutes=b%60,c=r(b/60),i.hours=c%24,g+=r(c/24),e=r(wc(g)),h+=e,g-=uc(xc(e)),d=r(h/12),h%=12,i.days=g,i.months=h,i.years=d,this}function wc(a){return 4800*a/146097}function xc(a){return 146097*a/4800}function yc(a){var b,c,d=this._milliseconds;if(a=C(a),"month"===a||"year"===a)return b=this._days+d/864e5,c=this._months+wc(b),"month"===a?c:c/12;switch(b=this._days+Math.round(xc(this._months)),a){case"week":return b/7+d/6048e5;case"day":return b+d/864e5;case"hour":return 24*b+d/36e5;case"minute":return 1440*b+d/6e4;case"second":return 86400*b+d/1e3;case"millisecond":return Math.floor(864e5*b)+d;default:throw new Error("Unknown unit "+a)}}function zc(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*s(this._months/12)}function Ac(a){return function(){return this.as(a)}}function Bc(a){return a=C(a),this[a+"s"]()}function Cc(a){return function(){return this._data[a]}}function Dc(){return r(this.days()/7)}function Ec(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function Fc(a,b,c){var d=$a(a).abs(),e=me(d.as("s")),f=me(d.as("m")),g=me(d.as("h")),h=me(d.as("d")),i=me(d.as("M")),j=me(d.as("y")),k=e0,k[4]=c,Ec.apply(null,k)}function Gc(a,b){return void 0===ne[a]?!1:void 0===b?ne[a]:(ne[a]=b,!0)}function Hc(a){var b=this.localeData(),c=Fc(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function Ic(){var a,b,c,d=oe(this._milliseconds)/1e3,e=oe(this._days),f=oe(this._months);a=r(d/60),b=r(a/60),d%=60,a%=60,c=r(f/12),f%=12;var g=c,h=f,i=e,j=b,k=a,l=d,m=this.asSeconds();return m?(0>m?"-":"")+"P"+(g?g+"Y":"")+(h?h+"M":"")+(i?i+"D":"")+(j||k||l?"T":"")+(j?j+"H":"")+(k?k+"M":"")+(l?l+"S":""):"P0D"}var Jc,Kc,Lc=a.momentProperties=[],Mc=!1,Nc={},Oc={},Pc=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Qc=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Rc={},Sc={},Tc=/\d/,Uc=/\d\d/,Vc=/\d{3}/,Wc=/\d{4}/,Xc=/[+-]?\d{6}/,Yc=/\d\d?/,Zc=/\d{1,3}/,$c=/\d{1,4}/,_c=/[+-]?\d{1,6}/,ad=/\d+/,bd=/[+-]?\d+/,cd=/Z|[+-]\d\d:?\d\d/gi,dd=/[+-]?\d+(\.\d{1,3})?/,ed=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,fd={},gd={},hd=0,id=1,jd=2,kd=3,ld=4,md=5,nd=6;J("M",["MM",2],"Mo",function(){return this.month()+1}),J("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)}),J("MMMM",0,0,function(a){return this.localeData().months(this,a)}),B("month","M"),P("M",Yc),P("MM",Yc,Uc),P("MMM",ed),P("MMMM",ed),S(["M","MM"],function(a,b){b[id]=s(a)-1}),S(["MMM","MMMM"],function(a,b,c,d){var e=c._locale.monthsParse(a,d,c._strict);null!=e?b[id]=e:l(c).invalidMonth=a});var od="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),pd="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),qd={};a.suppressDeprecationWarnings=!1;var rd=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,sd=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],td=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],ud=/^\/?Date\((\-?\d+)/i;a.createFromInputFallback=ca("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),J(0,["YY",2],0,function(){return this.year()%100}),J(0,["YYYY",4],0,"year"),J(0,["YYYYY",5],0,"year"),J(0,["YYYYYY",6,!0],0,"year"),B("year","y"),P("Y",bd),P("YY",Yc,Uc),P("YYYY",$c,Wc),P("YYYYY",_c,Xc),P("YYYYYY",_c,Xc),S(["YYYYY","YYYYYY"],hd),S("YYYY",function(b,c){c[hd]=2===b.length?a.parseTwoDigitYear(b):s(b)}),S("YY",function(b,c){c[hd]=a.parseTwoDigitYear(b)}),a.parseTwoDigitYear=function(a){return s(a)+(s(a)>68?1900:2e3)};var vd=E("FullYear",!1);J("w",["ww",2],"wo","week"),J("W",["WW",2],"Wo","isoWeek"),B("week","w"),B("isoWeek","W"),P("w",Yc),P("ww",Yc,Uc),P("W",Yc),P("WW",Yc,Uc),T(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=s(a)});var wd={dow:0,doy:6};J("DDD",["DDDD",3],"DDDo","dayOfYear"),B("dayOfYear","DDD"),P("DDD",Zc),P("DDDD",Vc),S(["DDD","DDDD"],function(a,b,c){c._dayOfYear=s(a)}),a.ISO_8601=function(){};var xd=ca("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var a=Fa.apply(null,arguments);return this>a?this:a}),yd=ca("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var a=Fa.apply(null,arguments);return a>this?this:a});La("Z",":"),La("ZZ",""),P("Z",cd),P("ZZ",cd),S(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=Ma(a)});var zd=/([\+\-]|\d\d)/gi;a.updateOffset=function(){};var Ad=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Bd=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;$a.fn=Ja.prototype;var Cd=cb(1,"add"),Dd=cb(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var Ed=ca("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});J(0,["gg",2],0,function(){return this.weekYear()%100}),J(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Fb("gggg","weekYear"),Fb("ggggg","weekYear"),Fb("GGGG","isoWeekYear"),Fb("GGGGG","isoWeekYear"),B("weekYear","gg"),B("isoWeekYear","GG"),P("G",bd),P("g",bd),P("GG",Yc,Uc),P("gg",Yc,Uc),P("GGGG",$c,Wc),P("gggg",$c,Wc),P("GGGGG",_c,Xc),P("ggggg",_c,Xc),T(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=s(a)}),T(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}),J("Q",0,0,"quarter"),B("quarter","Q"),P("Q",Tc),S("Q",function(a,b){b[id]=3*(s(a)-1)}),J("D",["DD",2],"Do","date"),B("date","D"),P("D",Yc),P("DD",Yc,Uc),P("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient}),S(["D","DD"],jd),S("Do",function(a,b){b[jd]=s(a.match(Yc)[0],10)});var Fd=E("Date",!0);J("d",0,"do","day"),J("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),J("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),J("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),J("e",0,0,"weekday"),J("E",0,0,"isoWeekday"),B("day","d"),B("weekday","e"),B("isoWeekday","E"),P("d",Yc),P("e",Yc),P("E",Yc),P("dd",ed),P("ddd",ed),P("dddd",ed),T(["dd","ddd","dddd"],function(a,b,c){var d=c._locale.weekdaysParse(a);null!=d?b.d=d:l(c).invalidWeekday=a}),T(["d","e","E"],function(a,b,c,d){b[d]=s(a)});var Gd="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Hd="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Id="Su_Mo_Tu_We_Th_Fr_Sa".split("_");J("H",["HH",2],0,"hour"),J("h",["hh",2],0,function(){return this.hours()%12||12}),Ub("a",!0),Ub("A",!1),B("hour","h"),P("a",Vb),P("A",Vb),P("H",Yc),P("h",Yc),P("HH",Yc,Uc), P("hh",Yc,Uc),S(["H","HH"],kd),S(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),S(["h","hh"],function(a,b,c){b[kd]=s(a),l(c).bigHour=!0});var Jd=/[ap]\.?m?\.?/i,Kd=E("Hours",!0);J("m",["mm",2],0,"minute"),B("minute","m"),P("m",Yc),P("mm",Yc,Uc),S(["m","mm"],ld);var Ld=E("Minutes",!1);J("s",["ss",2],0,"second"),B("second","s"),P("s",Yc),P("ss",Yc,Uc),S(["s","ss"],md);var Md=E("Seconds",!1);J("S",0,0,function(){return~~(this.millisecond()/100)}),J(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),J(0,["SSS",3],0,"millisecond"),J(0,["SSSS",4],0,function(){return 10*this.millisecond()}),J(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),J(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),J(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),J(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),J(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),B("millisecond","ms"),P("S",Zc,Tc),P("SS",Zc,Uc),P("SSS",Zc,Vc);var Nd;for(Nd="SSSS";Nd.length<=9;Nd+="S")P(Nd,ad);for(Nd="S";Nd.length<=9;Nd+="S")S(Nd,Yb);var Od=E("Milliseconds",!1);J("z",0,0,"zoneAbbr"),J("zz",0,0,"zoneName");var Pd=p.prototype;Pd.add=Cd,Pd.calendar=eb,Pd.clone=fb,Pd.diff=kb,Pd.endOf=wb,Pd.format=ob,Pd.from=pb,Pd.fromNow=qb,Pd.to=rb,Pd.toNow=sb,Pd.get=H,Pd.invalidAt=Eb,Pd.isAfter=gb,Pd.isBefore=hb,Pd.isBetween=ib,Pd.isSame=jb,Pd.isValid=Cb,Pd.lang=Ed,Pd.locale=tb,Pd.localeData=ub,Pd.max=yd,Pd.min=xd,Pd.parsingFlags=Db,Pd.set=H,Pd.startOf=vb,Pd.subtract=Dd,Pd.toArray=Ab,Pd.toObject=Bb,Pd.toDate=zb,Pd.toISOString=nb,Pd.toJSON=nb,Pd.toString=mb,Pd.unix=yb,Pd.valueOf=xb,Pd.year=vd,Pd.isLeapYear=ka,Pd.weekYear=Hb,Pd.isoWeekYear=Ib,Pd.quarter=Pd.quarters=Lb,Pd.month=$,Pd.daysInMonth=_,Pd.week=Pd.weeks=pa,Pd.isoWeek=Pd.isoWeeks=qa,Pd.weeksInYear=Kb,Pd.isoWeeksInYear=Jb,Pd.date=Fd,Pd.day=Pd.days=Rb,Pd.weekday=Sb,Pd.isoWeekday=Tb,Pd.dayOfYear=sa,Pd.hour=Pd.hours=Kd,Pd.minute=Pd.minutes=Ld,Pd.second=Pd.seconds=Md,Pd.millisecond=Pd.milliseconds=Od,Pd.utcOffset=Pa,Pd.utc=Ra,Pd.local=Sa,Pd.parseZone=Ta,Pd.hasAlignedHourOffset=Ua,Pd.isDST=Va,Pd.isDSTShifted=Wa,Pd.isLocal=Xa,Pd.isUtcOffset=Ya,Pd.isUtc=Za,Pd.isUTC=Za,Pd.zoneAbbr=Zb,Pd.zoneName=$b,Pd.dates=ca("dates accessor is deprecated. Use date instead.",Fd),Pd.months=ca("months accessor is deprecated. Use month instead",$),Pd.years=ca("years accessor is deprecated. Use year instead",vd),Pd.zone=ca("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Qa);var Qd=Pd,Rd={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Sd={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Td="Invalid date",Ud="%d",Vd=/\d{1,2}/,Wd={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Xd=u.prototype;Xd._calendar=Rd,Xd.calendar=bc,Xd._longDateFormat=Sd,Xd.longDateFormat=cc,Xd._invalidDate=Td,Xd.invalidDate=dc,Xd._ordinal=Ud,Xd.ordinal=ec,Xd._ordinalParse=Vd,Xd.preparse=fc,Xd.postformat=fc,Xd._relativeTime=Wd,Xd.relativeTime=gc,Xd.pastFuture=hc,Xd.set=ic,Xd.months=W,Xd._months=od,Xd.monthsShort=X,Xd._monthsShort=pd,Xd.monthsParse=Y,Xd.week=ma,Xd._week=wd,Xd.firstDayOfYear=oa,Xd.firstDayOfWeek=na,Xd.weekdays=Nb,Xd._weekdays=Gd,Xd.weekdaysMin=Pb,Xd._weekdaysMin=Id,Xd.weekdaysShort=Ob,Xd._weekdaysShort=Hd,Xd.weekdaysParse=Qb,Xd.isPM=Wb,Xd._meridiemParse=Jd,Xd.meridiem=Xb,y("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===s(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),a.lang=ca("moment.lang is deprecated. Use moment.locale instead.",y),a.langData=ca("moment.langData is deprecated. Use moment.localeData instead.",A);var Yd=Math.abs,Zd=Ac("ms"),$d=Ac("s"),_d=Ac("m"),ae=Ac("h"),be=Ac("d"),ce=Ac("w"),de=Ac("M"),ee=Ac("y"),fe=Cc("milliseconds"),ge=Cc("seconds"),he=Cc("minutes"),ie=Cc("hours"),je=Cc("days"),ke=Cc("months"),le=Cc("years"),me=Math.round,ne={s:45,m:45,h:22,d:26,M:11},oe=Math.abs,pe=Ja.prototype;pe.abs=qc,pe.add=sc,pe.subtract=tc,pe.as=yc,pe.asMilliseconds=Zd,pe.asSeconds=$d,pe.asMinutes=_d,pe.asHours=ae,pe.asDays=be,pe.asWeeks=ce,pe.asMonths=de,pe.asYears=ee,pe.valueOf=zc,pe._bubble=vc,pe.get=Bc,pe.milliseconds=fe,pe.seconds=ge,pe.minutes=he,pe.hours=ie,pe.days=je,pe.weeks=Dc,pe.months=ke,pe.years=le,pe.humanize=Hc,pe.toISOString=Ic,pe.toString=Ic,pe.toJSON=Ic,pe.locale=tb,pe.localeData=ub,pe.toIsoString=ca("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ic),pe.lang=Ed,J("X",0,0,"unix"),J("x",0,0,"valueOf"),P("x",bd),P("X",dd),S("X",function(a,b,c){c._d=new Date(1e3*parseFloat(a,10))}),S("x",function(a,b,c){c._d=new Date(s(a))}),a.version="2.10.6",d(Fa),a.fn=Qd,a.min=Ha,a.max=Ia,a.utc=j,a.unix=_b,a.months=lc,a.isDate=f,a.locale=y,a.invalid=n,a.duration=$a,a.isMoment=q,a.weekdays=nc,a.parseZone=ac,a.localeData=A,a.isDuration=Ka,a.monthsShort=mc,a.weekdaysMin=pc,a.defineLocale=z,a.weekdaysShort=oc,a.normalizeUnits=C,a.relativeTimeThreshold=Gc;var qe=a;return qe})},{}],numeral:[function(b,c,d){"use strict";(function(){function b(a){this._value=a}function d(a,b,c,d){var e,f,g=Math.pow(10,b);return f=(c(a*g)/g).toFixed(b),d&&(e=new RegExp("0{1,"+d+"}$"),f=f.replace(e,"")),f}function e(a,b,c){var d;return d=b.indexOf("$")>-1?g(a,b,c):b.indexOf("%")>-1?h(a,b,c):b.indexOf(":")>-1?i(a,b):k(a._value,b,c)}function f(a,b){var c,d,e,f,g,h=b,i=["KB","MB","GB","TB","PB","EB","ZB","YB"],k=!1;if(b.indexOf(":")>-1)a._value=j(b);else if(b===s)a._value=0;else{for("."!==q[r].delimiters.decimal&&(b=b.replace(/\./g,"").replace(q[r].delimiters.decimal,".")),c=new RegExp("[^a-zA-Z]"+q[r].abbreviations.thousand+"(?:\\)|(\\"+q[r].currency.symbol+")?(?:\\))?)?$"),d=new RegExp("[^a-zA-Z]"+q[r].abbreviations.million+"(?:\\)|(\\"+q[r].currency.symbol+")?(?:\\))?)?$"),e=new RegExp("[^a-zA-Z]"+q[r].abbreviations.billion+"(?:\\)|(\\"+q[r].currency.symbol+")?(?:\\))?)?$"),f=new RegExp("[^a-zA-Z]"+q[r].abbreviations.trillion+"(?:\\)|(\\"+q[r].currency.symbol+")?(?:\\))?)?$"),g=0;g<=i.length&&!(k=b.indexOf(i[g])>-1?Math.pow(1024,g+1):!1);g++);a._value=(k?k:1)*(h.match(c)?Math.pow(10,3):1)*(h.match(d)?Math.pow(10,6):1)*(h.match(e)?Math.pow(10,9):1)*(h.match(f)?Math.pow(10,12):1)*(b.indexOf("%")>-1?.01:1)*((b.split("-").length+Math.min(b.split("(").length-1,b.split(")").length-1))%2?1:-1)*Number(b.replace(/[^0-9\.]+/g,"")),a._value=k?Math.ceil(a._value):a._value}return a._value}function g(a,b,c){var d,e,f=b.indexOf("$"),g=b.indexOf("("),h=b.indexOf("-"),i="";return b.indexOf(" $")>-1?(i=" ",b=b.replace(" $","")):b.indexOf("$ ")>-1?(i=" ",b=b.replace("$ ","")):b=b.replace("$",""),e=k(a._value,b,c),1>=f?e.indexOf("(")>-1||e.indexOf("-")>-1?(e=e.split(""),d=1,(g>f||h>f)&&(d=0),e.splice(d,0,q[r].currency.symbol+i),e=e.join("")):e=q[r].currency.symbol+i+e:e.indexOf(")")>-1?(e=e.split(""),e.splice(-1,0,i+q[r].currency.symbol),e=e.join("")):e=e+i+q[r].currency.symbol,e}function h(a,b,c){var d,e="",f=100*a._value;return b.indexOf(" %")>-1?(e=" ",b=b.replace(" %","")):b=b.replace("%",""),d=k(f,b,c),d.indexOf(")")>-1?(d=d.split(""),d.splice(-1,0,e+"%"),d=d.join("")):d=d+e+"%",d}function i(a){var b=Math.floor(a._value/60/60),c=Math.floor((a._value-60*b*60)/60),d=Math.round(a._value-60*b*60-60*c);return b+":"+(10>c?"0"+c:c)+":"+(10>d?"0"+d:d)}function j(a){var b=a.split(":"),c=0;return 3===b.length?(c+=60*Number(b[0])*60,c+=60*Number(b[1]),c+=Number(b[2])):2===b.length&&(c+=60*Number(b[0]),c+=Number(b[1])),Number(c)}function k(a,b,c){var e,f,g,h,i,j,k=!1,l=!1,m=!1,n="",o=!1,p=!1,t=!1,u=!1,v=!1,w="",x="",y=Math.abs(a),z=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],A="",B=!1;if(0===a&&null!==s)return s;if(b.indexOf("(")>-1?(k=!0,b=b.slice(1,-1)):b.indexOf("+")>-1&&(l=!0,b=b.replace(/\+/g,"")),b.indexOf("a")>-1&&(o=b.indexOf("aK")>=0,p=b.indexOf("aM")>=0,t=b.indexOf("aB")>=0,u=b.indexOf("aT")>=0,v=o||p||t||u,b.indexOf(" a")>-1?(n=" ",b=b.replace(" a","")):b=b.replace("a",""),y>=Math.pow(10,12)&&!v||u?(n+=q[r].abbreviations.trillion,a/=Math.pow(10,12)):y=Math.pow(10,9)&&!v||t?(n+=q[r].abbreviations.billion,a/=Math.pow(10,9)):y=Math.pow(10,6)&&!v||p?(n+=q[r].abbreviations.million,a/=Math.pow(10,6)):(y=Math.pow(10,3)&&!v||o)&&(n+=q[r].abbreviations.thousand,a/=Math.pow(10,3))),b.indexOf("b")>-1)for(b.indexOf(" b")>-1?(w=" ",b=b.replace(" b","")):b=b.replace("b",""),g=0;g<=z.length;g++)if(e=Math.pow(1024,g),f=Math.pow(1024,g+1),a>=e&&f>a){w+=z[g],e>0&&(a/=e);break}return b.indexOf("o")>-1&&(b.indexOf(" o")>-1?(x=" ",b=b.replace(" o","")):b=b.replace("o",""),x+=q[r].ordinal(a)),b.indexOf("[.]")>-1&&(m=!0,b=b.replace("[.]",".")),h=a.toString().split(".")[0],i=b.split(".")[1],j=b.indexOf(","),i?(i.indexOf("[")>-1?(i=i.replace("]",""),i=i.split("["),A=d(a,i[0].length+i[1].length,c,i[1].length)):A=d(a,i.length,c),h=A.split(".")[0],A=A.split(".")[1].length?q[r].delimiters.decimal+A.split(".")[1]:"",m&&0===Number(A.slice(1))&&(A="")):h=d(a,null,c),h.indexOf("-")>-1&&(h=h.slice(1),B=!0),j>-1&&(h=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+q[r].delimiters.thousands)),0===b.indexOf(".")&&(h=""),(k&&B?"(":"")+(!k&&B?"-":"")+(!B&&l?"+":"")+h+A+(x?x:"")+(n?n:"")+(w?w:"")+(k&&B?")":"")}function l(a,b){q[a]=b}function m(a){var b=a.toString().split(".");return b.length<2?1:Math.pow(10,b[1].length)}function n(){var a=Array.prototype.slice.call(arguments);return a.reduce(function(a,b){var c=m(a),d=m(b);return c>d?c:d},-(1/0))}var o,p="1.5.3",q={},r="en",s=null,t="0,0",u="undefined"!=typeof c&&c.exports;o=function(a){return o.isNumeral(a)?a=a.value():0===a||"undefined"==typeof a?a=0:Number(a)||(a=o.fn.unformat(a)),new b(Number(a))},o.version=p,o.isNumeral=function(a){return a instanceof b},o.language=function(a,b){if(!a)return r;if(a&&!b){if(!q[a])throw new Error("Unknown language : "+a);r=a}return(b||!q[a])&&l(a,b),o},o.languageData=function(a){if(!a)return q[r];if(!q[a])throw new Error("Unknown language : "+a);return q[a]},o.language("en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(a){var b=a%10;return 1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th"},currency:{symbol:"$"}}),o.zeroFormat=function(a){s="string"==typeof a?a:null},o.defaultFormat=function(a){t="string"==typeof a?a:"0.0"},o.validate=function(a,b){var c,d,e,f,g,h,i,j;if("string"!=typeof a&&(a+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",a)),a=a.trim(),""===a)return!1;a=a.replace(/^[+-]?/,"");try{i=o.languageData(b)}catch(k){i=o.languageData(o.language())}return e=i.currency.symbol,g=i.abbreviations,c=i.delimiters.decimal,d="."===i.delimiters.thousands?"\\.":i.delimiters.thousands,j=a.match(/^[^\d\.\,]+/),null!==j&&(a=a.substr(1),j[0]!==e)?!1:(j=a.match(/[^\d]+$/),null!==j&&(a=a.slice(0,-1),j[0]!==g.thousand&&j[0]!==g.million&&j[0]!==g.billion&&j[0]!==g.trillion)?!1:a.match(/^\d+$/)?!0:(h=new RegExp(d+"{2}"),a.match(/[^\d.,]/g)?!1:(f=a.split(c),f.length>2?!1:f.length<2?!!f[0].match(/^\d+.*\d$/)&&!f[0].match(h):""===f[0]?!f[0].match(h)&&!!f[1].match(/^\d+$/):1===f[0].length?!!f[0].match(/^\d+$/)&&!f[0].match(h)&&!!f[1].match(/^\d+$/):!!f[0].match(/^\d+.*\d$/)&&!f[0].match(h)&&!!f[1].match(/^\d+$/))))},"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(a,b){if(null===this||"undefined"==typeof this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof a)throw new TypeError(a+" is not a function");var c,d,e=this.length>>>0,f=!1;for(1c;++c)this.hasOwnProperty(c)&&(f?d=a(d,this[c],c,this):(d=this[c],f=!0));if(!f)throw new TypeError("Reduce of empty array with no initial value");return d}),o.fn=b.prototype={clone:function(){return o(this)},format:function(a,b){return e(this,a?a:t,void 0!==b?b:Math.round)},unformat:function(a){return"[object Number]"===Object.prototype.toString.call(a)?a:f(this,a?a:t)},value:function(){return this._value},valueOf:function(){return this._value},set:function(a){return this._value=Number(a),this},add:function(a){function b(a,b,d,e){return a+c*b}var c=n.call(null,this._value,a);return this._value=[this._value,a].reduce(b,0)/c,this},subtract:function(a){function b(a,b,d,e){return a-c*b}var c=n.call(null,this._value,a);return this._value=[a].reduce(b,this._value*c)/c,this},multiply:function(a){function b(a,b,c,d){var e=n(a,b);return a*e*(b*e)/(e*e)}return this._value=[this._value,a].reduce(b,1),this},divide:function(a){function b(a,b,c,d){var e=n(a,b);return a*e/(b*e)}return this._value=[this._value,a].reduce(b),this},difference:function(a){return Math.abs(o(this._value).subtract(a).value())}},u&&(c.exports=o),"undefined"==typeof ender&&(this.numeral=o),"function"==typeof a&&a.amd&&a([],function(){return o})}).call(window)},{}],pikaday:[function(b,c,d){!function(e,f){"use strict";var g;if("object"==typeof d){try{g=b("moment")}catch(h){}c.exports=f(g)}else"function"==typeof a&&a.amd?a(function(a){var b="moment";try{g=a(b)}catch(c){}return f(g)}):e.Pikaday=f(e.moment)}(this,function(a){"use strict";var b="function"==typeof a,c=!!window.addEventListener,d=window.document,e=window.setTimeout,f=function(a,b,d,e){c?a.addEventListener(b,d,!!e):a.attachEvent("on"+b,d)},g=function(a,b,d,e){c?a.removeEventListener(b,d,!!e):a.detachEvent("on"+b,d)},h=function(a,b,c){var e;d.createEvent?(e=d.createEvent("HTMLEvents"),e.initEvent(b,!0,!1),e=t(e,c),a.dispatchEvent(e)):d.createEventObject&&(e=d.createEventObject(),e=t(e,c),a.fireEvent("on"+b,e))},i=function(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")},j=function(a,b){return-1!==(" "+a.className+" ").indexOf(" "+b+" ")},k=function(a,b){j(a,b)||(a.className=""===a.className?b:a.className+" "+b)},l=function(a,b){a.className=i((" "+a.className+" ").replace(" "+b+" "," "))},m=function(a){return/Array/.test(Object.prototype.toString.call(a))},n=function(a){return/Date/.test(Object.prototype.toString.call(a))&&!isNaN(a.getTime())},o=function(a){var b=a.getDay();return 0===b||6===b},p=function(a){return a%4===0&&a%100!==0||a%400===0},q=function(a,b){return[31,p(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]},r=function(a){n(a)&&a.setHours(0,0,0,0)},s=function(a,b){return a.getTime()===b.getTime()},t=function(a,b,c){var d,e;for(d in b)e=void 0!==a[d],e&&"object"==typeof b[d]&&null!==b[d]&&void 0===b[d].nodeName?n(b[d])?c&&(a[d]=new Date(b[d].getTime())):m(b[d])?c&&(a[d]=b[d].slice(0)):a[d]=t({},b[d],c):(c||!e)&&(a[d]=b[d]);return a},u=function(a){return a.month<0&&(a.year-=Math.ceil(Math.abs(a.month)/12),a.month+=12),a.month>11&&(a.year+=Math.floor(Math.abs(a.month)/12),a.month-=12),a},v={field:null,bound:void 0,position:"bottom left",reposition:!0,format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:!1,firstDay:0,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,onSelect:null,onOpen:null,onClose:null,onDraw:null},w=function(a,b,c){for(b+=a.firstDay;b>=7;)b-=7;return c?a.i18n.weekdaysShort[b]:a.i18n.weekdays[b]},x=function(a){if(a.isEmpty)return'';var b=[];return a.isDisabled&&b.push("is-disabled"),a.isToday&&b.push("is-today"),a.isSelected&&b.push("is-selected"),a.isInRange&&b.push("is-inrange"),a.isStartRange&&b.push("is-startrange"),a.isEndRange&&b.push("is-endrange"),'"},y=function(a,b,c){var d=new Date(c,0,1),e=Math.ceil(((new Date(c,b,a)-d)/864e5+d.getDay()+1)/7);return''+e+""},z=function(a,b){return""+(b?a.reverse():a).join("")+""},A=function(a){return""+a.join("")+""},B=function(a){var b,c=[];for(a.showWeekNumber&&c.push(""),b=0;7>b;b++)c.push(''+w(a,b,!0)+"");return""+(a.isRTL?c.reverse():c).join("")+""},C=function(a,b,c,d,e){var f,g,h,i,j,k=a._o,l=c===k.minYear,n=c===k.maxYear,o='
',p=!0,q=!0;for(h=[],f=0;12>f;f++)h.push('");for(i='
'+k.i18n.months[d]+'
",m(k.yearRange)?(f=k.yearRange[0],g=k.yearRange[1]+1):(f=c-k.yearRange,g=1+c+k.yearRange),h=[];g>f&&f<=k.maxYear;f++)f>=k.minYear&&h.push('");return j='
'+c+k.yearSuffix+'
",o+=k.showMonthAfterYear?j+i:i+j,l&&(0===d||k.minMonth>=d)&&(p=!1),n&&(11===d||k.maxMonth<=d)&&(q=!1),0===b&&(o+='"),b===a._o.numberOfMonths-1&&(o+='"),o+="
"},D=function(a,b){return''+B(a)+A(b)+"
"},E=function(g){var h=this,i=h.config(g);h._onMouseDown=function(a){if(h._v){a=a||window.event;var b=a.target||a.srcElement;if(b){if(!j(b.parentNode,"is-disabled")){if(j(b,"pika-button")&&!j(b,"is-empty"))return h.setDate(new Date(b.getAttribute("data-pika-year"),b.getAttribute("data-pika-month"),b.getAttribute("data-pika-day"))),void(i.bound&&e(function(){h.hide(),i.field&&i.field.blur()},100));j(b,"pika-prev")?h.prevMonth():j(b,"pika-next")&&h.nextMonth()}if(j(b,"pika-select"))h._c=!0;else{if(!a.preventDefault)return a.returnValue=!1,!1;a.preventDefault()}}}},h._onChange=function(a){a=a||window.event;var b=a.target||a.srcElement;b&&(j(b,"pika-select-month")?h.gotoMonth(b.value):j(b,"pika-select-year")&&h.gotoYear(b.value))},h._onInputChange=function(c){var d;c.firedBy!==h&&(b?(d=a(i.field.value,i.format),d=d&&d.isValid()?d.toDate():null):d=new Date(Date.parse(i.field.value)),n(d)&&h.setDate(d),h._v||h.show())},h._onInputFocus=function(){h.show()},h._onInputClick=function(){h.show()},h._onInputBlur=function(){var a=d.activeElement;do if(j(a,"pika-single"))return;while(a=a.parentNode);h._c||(h._b=e(function(){h.hide()},50)),h._c=!1},h._onClick=function(a){a=a||window.event;var b=a.target||a.srcElement,d=b;if(b){!c&&j(b,"pika-select")&&(b.onchange||(b.setAttribute("onchange","return;"),f(b,"change",h._onChange)));do if(j(d,"pika-single")||d===i.trigger)return;while(d=d.parentNode);h._v&&b!==i.trigger&&d!==i.trigger&&h.hide()}},h.el=d.createElement("div"),h.el.className="pika-single"+(i.isRTL?" is-rtl":"")+(i.theme?" "+i.theme:""),f(h.el,"ontouchend"in d?"touchend":"mousedown",h._onMouseDown,!0),f(h.el,"change",h._onChange),i.field&&(i.container?i.container.appendChild(h.el):i.bound?d.body.appendChild(h.el):i.field.parentNode.insertBefore(h.el,i.field.nextSibling),f(i.field,"change",h._onInputChange),i.defaultDate||(b&&i.field.value?i.defaultDate=a(i.field.value,i.format).toDate():i.defaultDate=new Date(Date.parse(i.field.value)),i.setDefaultDate=!0));var k=i.defaultDate;n(k)?i.setDefaultDate?h.setDate(k,!0):h.gotoDate(k):h.gotoDate(new Date),i.bound?(this.hide(),h.el.className+=" is-bound",f(i.trigger,"click",h._onInputClick),f(i.trigger,"focus",h._onInputFocus),f(i.trigger,"blur",h._onInputBlur)):this.show()};return E.prototype={config:function(a){this._o||(this._o=t({},v,!0));var b=t(this._o,a,!0);b.isRTL=!!b.isRTL,b.field=b.field&&b.field.nodeName?b.field:null,b.theme="string"==typeof b.theme&&b.theme?b.theme:null,b.bound=!!(void 0!==b.bound?b.field&&b.bound:b.field),b.trigger=b.trigger&&b.trigger.nodeName?b.trigger:b.field,b.disableWeekends=!!b.disableWeekends,b.disableDayFn="function"==typeof b.disableDayFn?b.disableDayFn:null;var c=parseInt(b.numberOfMonths,10)||1;if(b.numberOfMonths=c>4?4:c,n(b.minDate)||(b.minDate=!1),n(b.maxDate)||(b.maxDate=!1),b.minDate&&b.maxDate&&b.maxDate100&&(b.yearRange=100);return b},toString:function(c){return n(this._d)?b?a(this._d).format(c||this._o.format):this._d.toDateString():""},getMoment:function(){return b?a(this._d):null},setMoment:function(c,d){b&&a.isMoment(c)&&this.setDate(c.toDate(),d)},getDate:function(){return n(this._d)?new Date(this._d.getTime()):null},setDate:function(a,b){if(!a)return this._d=null,this._o.field&&(this._o.field.value="",h(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof a&&(a=new Date(Date.parse(a))),n(a)){var c=this._o.minDate,d=this._o.maxDate;n(c)&&c>a?a=c:n(d)&&a>d&&(a=d),this._d=new Date(a.getTime()),r(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),h(this._o.field,"change",{firedBy:this})),b||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(a){var b=!0;if(n(a)){if(this.calendars){var c=new Date(this.calendars[0].year,this.calendars[0].month,1),d=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),e=a.getTime();d.setMonth(d.getMonth()+1),d.setDate(d.getDate()-1),b=e=d&&(this._y=d,!isNaN(g)&&this._m>g&&(this._m=g));for(var i=0;i'+C(this,i,this.calendars[i].year,this.calendars[i].month,this.calendars[0].year)+this.render(this.calendars[i].year,this.calendars[i].month)+"";if(this.el.innerHTML=h,b.bound&&"hidden"!==b.field.type&&e(function(){b.trigger.focus()},1),"function"==typeof this._o.onDraw){var j=this;e(function(){j._o.onDraw.call(j)},0)}}},adjustPosition:function(){var a,b,c,e,f,g,h,i,j,k;if(!this._o.container){if(this.el.style.position="absolute",a=this._o.trigger,b=a,c=this.el.offsetWidth,e=this.el.offsetHeight,f=window.innerWidth||d.documentElement.clientWidth,g=window.innerHeight||d.documentElement.clientHeight,h=window.pageYOffset||d.body.scrollTop||d.documentElement.scrollTop,"function"==typeof a.getBoundingClientRect)k=a.getBoundingClientRect(),i=k.left+window.pageXOffset,j=k.bottom+window.pageYOffset;else for(i=b.offsetLeft,j=b.offsetTop+b.offsetHeight;b=b.offsetParent;)i+=b.offsetLeft,j+=b.offsetTop;(this._o.reposition&&i+c>f||this._o.position.indexOf("right")>-1&&i-c+a.offsetWidth>0)&&(i=i-c+a.offsetWidth),(this._o.reposition&&j+e>g+h||this._o.position.indexOf("top")>-1&&j-e-a.offsetHeight>0)&&(j=j-e-a.offsetHeight),this.el.style.left=i+"px",this.el.style.top=j+"px"}},render:function(a,b){var c=this._o,d=new Date,e=q(a,b),f=new Date(a,b,1).getDay(),g=[],h=[];r(d),c.firstDay>0&&(f-=c.firstDay,0>f&&(f+=7));for(var i=e+f,j=i;j>7;)j-=7;i+=7-j;for(var k=0,l=0;i>k;k++){var m,p=new Date(a,b,1+(k-f)),t=n(this._d)?s(p,this._d):!1,u=s(p,d),v=f>k||k>=e+f,w=c.startRange&&s(c.startRange,p),A=c.endRange&&s(c.endRange,p),B=c.startRange&&c.endRange&&c.startRangec.maxDate||c.disableWeekends&&o(p)||c.disableDayFn&&c.disableDayFn(p),m={day:1+(k-f),month:b,year:a,isSelected:t,isToday:u,isDisabled:C,isEmpty:v,isStartRange:w,isEndRange:A,isInRange:B};h.push(x(m)),7===++l&&(c.showWeekNumber&&h.unshift(y(k-f,b,a)),g.push(z(h,c.isRTL)),h=[],l=0)}return D(c,g)},isVisible:function(){return this._v},show:function(){this._v||(l(this.el,"is-hidden"),this._v=!0,this.draw(),this._o.bound&&(f(d,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var a=this._v;a!==!1&&(this._o.bound&&g(d,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",k(this.el,"is-hidden"),this._v=!1,void 0!==a&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){this.hide(),g(this.el,"mousedown",this._onMouseDown,!0),g(this.el,"change",this._onChange),this._o.field&&(g(this._o.field,"change",this._onInputChange),this._o.bound&&(g(this._o.trigger,"click",this._onInputClick),g(this._o.trigger,"focus",this._onInputFocus),g(this._o.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},E})},{moment:"moment"}],zeroclipboard:[function(b,c,d){!function(b,d){"use strict";var e,f,g,h=b,i=h.document,j=h.navigator,k=h.setTimeout,l=h.clearTimeout,m=h.setInterval,n=h.clearInterval,o=h.getComputedStyle,p=h.encodeURIComponent,q=h.ActiveXObject,r=h.Error,s=h.Number.parseInt||h.parseInt,t=h.Number.parseFloat||h.parseFloat,u=h.Number.isNaN||h.isNaN,v=h.Date.now,w=h.Object.keys,x=h.Object.defineProperty,y=h.Object.prototype.hasOwnProperty,z=h.Array.prototype.slice,A=function(){var a=function(a){return a};if("function"==typeof h.wrap&&"function"==typeof h.unwrap)try{var b=i.createElement("div"),c=h.unwrap(b);1===b.nodeType&&c&&1===c.nodeType&&(a=h.unwrap)}catch(d){}return a}(),B=function(a){return z.call(a,0)},C=function(){var a,b,c,e,f,g,h=B(arguments),i=h[0]||{};for(a=1,b=h.length;b>a;a++)if(null!=(c=h[a]))for(e in c)y.call(c,e)&&(f=i[e],g=c[e],i!==g&&g!==d&&(i[e]=g));return i},D=function(a){var b,c,d,e;if("object"!=typeof a||null==a||"number"==typeof a.nodeType)b=a;else if("number"==typeof a.length)for(b=[],c=0,d=a.length;d>c;c++)y.call(a,c)&&(b[c]=D(a[c]));else{b={};for(e in a)y.call(a,e)&&(b[e]=D(a[e]))}return b},E=function(a,b){for(var c={},d=0,e=b.length;e>d;d++)b[d]in a&&(c[b[d]]=a[b[d]]);return c},F=function(a,b){var c={};for(var d in a)-1===b.indexOf(d)&&(c[d]=a[d]);return c},G=function(a){if(a)for(var b in a)y.call(a,b)&&delete a[b];return a},H=function(a,b){if(a&&1===a.nodeType&&a.ownerDocument&&b&&(1===b.nodeType&&b.ownerDocument&&b.ownerDocument===a.ownerDocument||9===b.nodeType&&!b.ownerDocument&&b===a.ownerDocument))do{if(a===b)return!0;a=a.parentNode}while(a);return!1},I=function(a){var b;return"string"==typeof a&&a&&(b=a.split("#")[0].split("?")[0],b=a.slice(0,a.lastIndexOf("/")+1)),b},J=function(a){var b,c;return"string"==typeof a&&a&&(c=a.match(/^(?:|[^:@]*@|.+\)@(?=http[s]?|file)|.+?\s+(?: at |@)(?:[^:\(]+ )*[\(]?)((?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/),c&&c[1]?b=c[1]:(c=a.match(/\)@((?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/),c&&c[1]&&(b=c[1]))),b},K=function(){var a,b;try{throw new r}catch(c){b=c}return b&&(a=b.sourceURL||b.fileName||J(b.stack)),a},L=function(){var a,b,c;if(i.currentScript&&(a=i.currentScript.src))return a;if(b=i.getElementsByTagName("script"),1===b.length)return b[0].src||d;if("readyState"in b[0])for(c=b.length;c--;)if("interactive"===b[c].readyState&&(a=b[c].src))return a;return"loading"===i.readyState&&(a=b[b.length-1].src)?a:(a=K())?a:d},M=function(){var a,b,c,e=i.getElementsByTagName("script");for(a=e.length;a--;){if(!(c=e[a].src)){b=null;break}if(c=I(c),null==b)b=c;else if(b!==c){b=null;break}}return b||d},N=function(){var a=I(L())||M()||"";return a+"ZeroClipboard.swf"},O=function(){return null==b.opener&&(!!b.top&&b!=b.top||!!b.parent&&b!=b.parent)}(),P={bridge:null,version:"0.0.0",pluginType:"unknown",disabled:null,outdated:null,sandboxed:null,unavailable:null,degraded:null,deactivated:null,overdue:null,ready:null},Q="11.0.0",R={},S={},T=null,U=0,V=0,W={ready:"Flash communication is established",error:{"flash-disabled":"Flash is disabled or not installed. May also be attempting to run Flash in a sandboxed iframe, which is impossible.","flash-outdated":"Flash is too outdated to support ZeroClipboard","flash-sandboxed":"Attempting to run Flash in a sandboxed iframe, which is impossible","flash-unavailable":"Flash is unable to communicate bidirectionally with JavaScript","flash-degraded":"Flash is unable to preserve data fidelity when communicating with JavaScript","flash-deactivated":"Flash is too outdated for your browser and/or is configured as click-to-activate.\nThis may also mean that the ZeroClipboard SWF object could not be loaded, so please check your `swfPath` configuration and/or network connectivity.\nMay also be attempting to run Flash in a sandboxed iframe, which is impossible.","flash-overdue":"Flash communication was established but NOT within the acceptable time limit","version-mismatch":"ZeroClipboard JS version number does not match ZeroClipboard SWF version number","clipboard-error":"At least one error was thrown while ZeroClipboard was attempting to inject your data into the clipboard","config-mismatch":"ZeroClipboard configuration does not match Flash's reality","swf-not-found":"The ZeroClipboard SWF object could not be loaded, so please check your `swfPath` configuration and/or network connectivity"}},X=["flash-unavailable","flash-degraded","flash-overdue","version-mismatch","config-mismatch","clipboard-error"],Y=["flash-disabled","flash-outdated","flash-sandboxed","flash-unavailable","flash-degraded","flash-deactivated","flash-overdue"],Z=new RegExp("^flash-("+Y.map(function(a){return a.replace(/^flash-/,"")}).join("|")+")$"),$=new RegExp("^flash-("+Y.slice(1).map(function(a){return a.replace(/^flash-/,"")}).join("|")+")$"),_={swfPath:N(),trustedDomains:b.location.host?[b.location.host]:[],cacheBust:!0,forceEnhancedClipboard:!1,flashLoadTimeout:3e4,autoActivate:!0,bubbleEvents:!0,containerId:"global-zeroclipboard-html-bridge",containerClass:"global-zeroclipboard-container",swfObjectId:"global-zeroclipboard-flash-bridge",hoverClass:"zeroclipboard-is-hover",activeClass:"zeroclipboard-is-active",forceHandCursor:!1,title:null,zIndex:999999999},aa=function(a){if("object"==typeof a&&null!==a)for(var b in a)if(y.call(a,b))if(/^(?:forceHandCursor|title|zIndex|bubbleEvents)$/.test(b))_[b]=a[b];else if(null==P.bridge)if("containerId"===b||"swfObjectId"===b){if(!pa(a[b]))throw new Error("The specified `"+b+"` value is not valid as an HTML4 Element ID"); _[b]=a[b]}else _[b]=a[b];{if("string"!=typeof a||!a)return D(_);if(y.call(_,a))return _[a]}},ba=function(){return Va(),{browser:E(j,["userAgent","platform","appName"]),flash:F(P,["bridge"]),zeroclipboard:{version:Xa.version,config:Xa.config()}}},ca=function(){return!!(P.disabled||P.outdated||P.sandboxed||P.unavailable||P.degraded||P.deactivated)},da=function(a,b){var c,f,g,h={};if("string"==typeof a&&a)g=a.toLowerCase().split(/\s+/);else if("object"==typeof a&&a&&"undefined"==typeof b)for(c in a)y.call(a,c)&&"string"==typeof c&&c&&"function"==typeof a[c]&&Xa.on(c,a[c]);if(g&&g.length){for(c=0,f=g.length;f>c;c++)a=g[c].replace(/^on/,""),h[a]=!0,R[a]||(R[a]=[]),R[a].push(b);if(h.ready&&P.ready&&Xa.emit({type:"ready"}),h.error){for(c=0,f=Y.length;f>c;c++)if(P[Y[c].replace(/^flash-/,"")]===!0){Xa.emit({type:"error",name:Y[c]});break}e!==d&&Xa.version!==e&&Xa.emit({type:"error",name:"version-mismatch",jsVersion:Xa.version,swfVersion:e})}}return Xa},ea=function(a,b){var c,d,e,f,g;if(0===arguments.length)f=w(R);else if("string"==typeof a&&a)f=a.split(/\s+/);else if("object"==typeof a&&a&&"undefined"==typeof b)for(c in a)y.call(a,c)&&"string"==typeof c&&c&&"function"==typeof a[c]&&Xa.off(c,a[c]);if(f&&f.length)for(c=0,d=f.length;d>c;c++)if(a=f[c].toLowerCase().replace(/^on/,""),g=R[a],g&&g.length)if(b)for(e=g.indexOf(b);-1!==e;)g.splice(e,1),e=g.indexOf(b,e);else g.length=0;return Xa},fa=function(a){var b;return b="string"==typeof a&&a?D(R[a])||null:D(R)},ga=function(a){var b,c,d;return a=qa(a),a&&!xa(a)?"ready"===a.type&&P.overdue===!0?Xa.emit({type:"error",name:"flash-overdue"}):(b=C({},a),va.call(this,b),"copy"===a.type&&(d=Fa(S),c=d.data,T=d.formatMap),c):void 0},ha=function(){var a=P.sandboxed;if(Va(),"boolean"!=typeof P.ready&&(P.ready=!1),P.sandboxed!==a&&P.sandboxed===!0)P.ready=!1,Xa.emit({type:"error",name:"flash-sandboxed"});else if(!Xa.isFlashUnusable()&&null===P.bridge){var b=_.flashLoadTimeout;"number"==typeof b&&b>=0&&(U=k(function(){"boolean"!=typeof P.deactivated&&(P.deactivated=!0),P.deactivated===!0&&Xa.emit({type:"error",name:"flash-deactivated"})},b)),P.overdue=!1,Da()}},ia=function(){Xa.clearData(),Xa.blur(),Xa.emit("destroy"),Ea(),Xa.off()},ja=function(a,b){var c;if("object"==typeof a&&a&&"undefined"==typeof b)c=a,Xa.clearData();else{if("string"!=typeof a||!a)return;c={},c[a]=b}for(var d in c)"string"==typeof d&&d&&y.call(c,d)&&"string"==typeof c[d]&&c[d]&&(S[d]=c[d])},ka=function(a){"undefined"==typeof a?(G(S),T=null):"string"==typeof a&&y.call(S,a)&&delete S[a]},la=function(a){return"undefined"==typeof a?D(S):"string"==typeof a&&y.call(S,a)?S[a]:void 0},ma=function(a){if(a&&1===a.nodeType){f&&(Na(f,_.activeClass),f!==a&&Na(f,_.hoverClass)),f=a,Ma(a,_.hoverClass);var b=a.getAttribute("title")||_.title;if("string"==typeof b&&b){var c=Ca(P.bridge);c&&c.setAttribute("title",b)}var d=_.forceHandCursor===!0||"pointer"===Oa(a,"cursor");Ta(d),Sa()}},na=function(){var a=Ca(P.bridge);a&&(a.removeAttribute("title"),a.style.left="0px",a.style.top="-9999px",a.style.width="1px",a.style.height="1px"),f&&(Na(f,_.hoverClass),Na(f,_.activeClass),f=null)},oa=function(){return f||null},pa=function(a){return"string"==typeof a&&a&&/^[A-Za-z][A-Za-z0-9_:\-\.]*$/.test(a)},qa=function(a){var b;if("string"==typeof a&&a?(b=a,a={}):"object"==typeof a&&a&&"string"==typeof a.type&&a.type&&(b=a.type),b){b=b.toLowerCase(),!a.target&&(/^(copy|aftercopy|_click)$/.test(b)||"error"===b&&"clipboard-error"===a.name)&&(a.target=g),C(a,{type:b,target:a.target||f||null,relatedTarget:a.relatedTarget||null,currentTarget:P&&P.bridge||null,timeStamp:a.timeStamp||v()||null});var c=W[a.type];return"error"===a.type&&a.name&&c&&(c=c[a.name]),c&&(a.message=c),"ready"===a.type&&C(a,{target:null,version:P.version}),"error"===a.type&&(Z.test(a.name)&&C(a,{target:null,minimumVersion:Q}),$.test(a.name)&&C(a,{version:P.version})),"copy"===a.type&&(a.clipboardData={setData:Xa.setData,clearData:Xa.clearData}),"aftercopy"===a.type&&(a=Ga(a,T)),a.target&&!a.relatedTarget&&(a.relatedTarget=ra(a.target)),sa(a)}},ra=function(a){var b=a&&a.getAttribute&&a.getAttribute("data-clipboard-target");return b?i.getElementById(b):null},sa=function(a){if(a&&/^_(?:click|mouse(?:over|out|down|up|move))$/.test(a.type)){var b=a.target,c="_mouseover"===a.type&&a.relatedTarget?a.relatedTarget:d,e="_mouseout"===a.type&&a.relatedTarget?a.relatedTarget:d,f=Pa(b),g=h.screenLeft||h.screenX||0,j=h.screenTop||h.screenY||0,k=i.body.scrollLeft+i.documentElement.scrollLeft,l=i.body.scrollTop+i.documentElement.scrollTop,m=f.left+("number"==typeof a._stageX?a._stageX:0),n=f.top+("number"==typeof a._stageY?a._stageY:0),o=m-k,p=n-l,q=g+o,r=j+p,s="number"==typeof a.movementX?a.movementX:0,t="number"==typeof a.movementY?a.movementY:0;delete a._stageX,delete a._stageY,C(a,{srcElement:b,fromElement:c,toElement:e,screenX:q,screenY:r,pageX:m,pageY:n,clientX:o,clientY:p,x:o,y:p,movementX:s,movementY:t,offsetX:0,offsetY:0,layerX:0,layerY:0})}return a},ta=function(a){var b=a&&"string"==typeof a.type&&a.type||"";return!/^(?:(?:before)?copy|destroy)$/.test(b)},ua=function(a,b,c,d){d?k(function(){a.apply(b,c)},0):a.apply(b,c)},va=function(a){if("object"==typeof a&&a&&a.type){var b=ta(a),c=R["*"]||[],d=R[a.type]||[],e=c.concat(d);if(e&&e.length){var f,g,i,j,k,l=this;for(f=0,g=e.length;g>f;f++)i=e[f],j=l,"string"==typeof i&&"function"==typeof h[i]&&(i=h[i]),"object"==typeof i&&i&&"function"==typeof i.handleEvent&&(j=i,i=i.handleEvent),"function"==typeof i&&(k=C({},a),ua(i,j,[k],b))}return this}},wa=function(a){var b=null;return(O===!1||a&&"error"===a.type&&a.name&&-1!==X.indexOf(a.name))&&(b=!1),b},xa=function(a){var b=a.target||f||null,c="swf"===a._source;switch(delete a._source,a.type){case"error":var d="flash-sandboxed"===a.name||wa(a);"boolean"==typeof d&&(P.sandboxed=d),-1!==Y.indexOf(a.name)?C(P,{disabled:"flash-disabled"===a.name,outdated:"flash-outdated"===a.name,unavailable:"flash-unavailable"===a.name,degraded:"flash-degraded"===a.name,deactivated:"flash-deactivated"===a.name,overdue:"flash-overdue"===a.name,ready:!1}):"version-mismatch"===a.name&&(e=a.swfVersion,C(P,{disabled:!1,outdated:!1,unavailable:!1,degraded:!1,deactivated:!1,overdue:!1,ready:!1})),Ra();break;case"ready":e=a.swfVersion;var h=P.deactivated===!0;C(P,{disabled:!1,outdated:!1,sandboxed:!1,unavailable:!1,degraded:!1,deactivated:!1,overdue:h,ready:!h}),Ra();break;case"beforecopy":g=b;break;case"copy":var i,j,k=a.relatedTarget;!S["text/html"]&&!S["text/plain"]&&k&&(j=k.value||k.outerHTML||k.innerHTML)&&(i=k.value||k.textContent||k.innerText)?(a.clipboardData.clearData(),a.clipboardData.setData("text/plain",i),j!==i&&a.clipboardData.setData("text/html",j)):!S["text/plain"]&&a.target&&(i=a.target.getAttribute("data-clipboard-text"))&&(a.clipboardData.clearData(),a.clipboardData.setData("text/plain",i));break;case"aftercopy":ya(a),Xa.clearData(),b&&b!==La()&&b.focus&&b.focus();break;case"_mouseover":Xa.focus(b),_.bubbleEvents===!0&&c&&(b&&b!==a.relatedTarget&&!H(a.relatedTarget,b)&&za(C({},a,{type:"mouseenter",bubbles:!1,cancelable:!1})),za(C({},a,{type:"mouseover"})));break;case"_mouseout":Xa.blur(),_.bubbleEvents===!0&&c&&(b&&b!==a.relatedTarget&&!H(a.relatedTarget,b)&&za(C({},a,{type:"mouseleave",bubbles:!1,cancelable:!1})),za(C({},a,{type:"mouseout"})));break;case"_mousedown":Ma(b,_.activeClass),_.bubbleEvents===!0&&c&&za(C({},a,{type:a.type.slice(1)}));break;case"_mouseup":Na(b,_.activeClass),_.bubbleEvents===!0&&c&&za(C({},a,{type:a.type.slice(1)}));break;case"_click":g=null,_.bubbleEvents===!0&&c&&za(C({},a,{type:a.type.slice(1)}));break;case"_mousemove":_.bubbleEvents===!0&&c&&za(C({},a,{type:a.type.slice(1)}))}return/^_(?:click|mouse(?:over|out|down|up|move))$/.test(a.type)?!0:void 0},ya=function(a){if(a.errors&&a.errors.length>0){var b=D(a);C(b,{type:"error",name:"clipboard-error"}),delete b.success,k(function(){Xa.emit(b)},0)}},za=function(a){if(a&&"string"==typeof a.type&&a){var b,c=a.target||null,d=c&&c.ownerDocument||i,e={view:d.defaultView||h,canBubble:!0,cancelable:!0,detail:"click"===a.type?1:0,button:"number"==typeof a.which?a.which-1:"number"==typeof a.button?a.button:d.createEvent?0:1},f=C(e,a);c&&d.createEvent&&c.dispatchEvent&&(f=[f.type,f.canBubble,f.cancelable,f.view,f.detail,f.screenX,f.screenY,f.clientX,f.clientY,f.ctrlKey,f.altKey,f.shiftKey,f.metaKey,f.button,f.relatedTarget],b=d.createEvent("MouseEvents"),b.initMouseEvent&&(b.initMouseEvent.apply(b,f),b._source="js",c.dispatchEvent(b)))}},Aa=function(){var a=_.flashLoadTimeout;if("number"==typeof a&&a>=0){var b=Math.min(1e3,a/10),c=_.swfObjectId+"_fallbackContent";V=m(function(){var a=i.getElementById(c);Qa(a)&&(Ra(),P.deactivated=null,Xa.emit({type:"error",name:"swf-not-found"}))},b)}},Ba=function(){var a=i.createElement("div");return a.id=_.containerId,a.className=_.containerClass,a.style.position="absolute",a.style.left="0px",a.style.top="-9999px",a.style.width="1px",a.style.height="1px",a.style.zIndex=""+Ua(_.zIndex),a},Ca=function(a){for(var b=a&&a.parentNode;b&&"OBJECT"===b.nodeName&&b.parentNode;)b=b.parentNode;return b||null},Da=function(){var a,b=P.bridge,c=Ca(b);if(!b){var d=Ka(h.location.host,_),e="never"===d?"none":"all",f=Ia(C({jsVersion:Xa.version},_)),g=_.swfPath+Ha(_.swfPath,_);c=Ba();var j=i.createElement("div");c.appendChild(j),i.body.appendChild(c);var k=i.createElement("div"),l="activex"===P.pluginType;k.innerHTML='"+(l?'':"")+'
 
',b=k.firstChild,k=null,A(b).ZeroClipboard=Xa,c.replaceChild(b,j),Aa()}return b||(b=i[_.swfObjectId],b&&(a=b.length)&&(b=b[a-1]),!b&&c&&(b=c.firstChild)),P.bridge=b||null,b},Ea=function(){var a=P.bridge;if(a){var b=Ca(a);b&&("activex"===P.pluginType&&"readyState"in a?(a.style.display="none",function c(){if(4===a.readyState){for(var d in a)"function"==typeof a[d]&&(a[d]=null);a.parentNode&&a.parentNode.removeChild(a),b.parentNode&&b.parentNode.removeChild(b)}else k(c,10)}()):(a.parentNode&&a.parentNode.removeChild(a),b.parentNode&&b.parentNode.removeChild(b))),Ra(),P.ready=null,P.bridge=null,P.deactivated=null,e=d}},Fa=function(a){var b={},c={};if("object"==typeof a&&a){for(var d in a)if(d&&y.call(a,d)&&"string"==typeof a[d]&&a[d])switch(d.toLowerCase()){case"text/plain":case"text":case"air:text":case"flash:text":b.text=a[d],c.text=d;break;case"text/html":case"html":case"air:html":case"flash:html":b.html=a[d],c.html=d;break;case"application/rtf":case"text/rtf":case"rtf":case"richtext":case"air:rtf":case"flash:rtf":b.rtf=a[d],c.rtf=d}return{data:b,formatMap:c}}},Ga=function(a,b){if("object"!=typeof a||!a||"object"!=typeof b||!b)return a;var c={};for(var d in a)if(y.call(a,d))if("errors"===d){c[d]=a[d]?a[d].slice():[];for(var e=0,f=c[d].length;f>e;e++)c[d][e].format=b[c[d][e].format]}else if("success"!==d&&"data"!==d)c[d]=a[d];else{c[d]={};var g=a[d];for(var h in g)h&&y.call(g,h)&&y.call(b,h)&&(c[d][b[h]]=g[h])}return c},Ha=function(a,b){var c=null==b||b&&b.cacheBust===!0;return c?(-1===a.indexOf("?")?"?":"&")+"noCache="+v():""},Ia=function(a){var b,c,d,e,f="",g=[];if(a.trustedDomains&&("string"==typeof a.trustedDomains?e=[a.trustedDomains]:"object"==typeof a.trustedDomains&&"length"in a.trustedDomains&&(e=a.trustedDomains)),e&&e.length)for(b=0,c=e.length;c>b;b++)if(y.call(e,b)&&e[b]&&"string"==typeof e[b]){if(d=Ja(e[b]),!d)continue;if("*"===d){g.length=0,g.push(d);break}g.push.apply(g,[d,"//"+d,h.location.protocol+"//"+d])}return g.length&&(f+="trustedOrigins="+p(g.join(","))),a.forceEnhancedClipboard===!0&&(f+=(f?"&":"")+"forceEnhancedClipboard=true"),"string"==typeof a.swfObjectId&&a.swfObjectId&&(f+=(f?"&":"")+"swfObjectId="+p(a.swfObjectId)),"string"==typeof a.jsVersion&&a.jsVersion&&(f+=(f?"&":"")+"jsVersion="+p(a.jsVersion)),f},Ja=function(a){if(null==a||""===a)return null;if(a=a.replace(/^\s+|\s+$/g,""),""===a)return null;var b=a.indexOf("//");a=-1===b?a:a.slice(b+2);var c=a.indexOf("/");return a=-1===c?a:-1===b||0===c?null:a.slice(0,c),a&&".swf"===a.slice(-4).toLowerCase()?null:a||null},Ka=function(){var a=function(a){var b,c,d,e=[];if("string"==typeof a&&(a=[a]),"object"!=typeof a||!a||"number"!=typeof a.length)return e;for(b=0,c=a.length;c>b;b++)if(y.call(a,b)&&(d=Ja(a[b]))){if("*"===d){e.length=0,e.push("*");break}-1===e.indexOf(d)&&e.push(d)}return e};return function(b,c){var d=Ja(c.swfPath);null===d&&(d=b);var e=a(c.trustedDomains),f=e.length;if(f>0){if(1===f&&"*"===e[0])return"always";if(-1!==e.indexOf(b))return 1===f&&b===d?"sameDomain":"always"}return"never"}}(),La=function(){try{return i.activeElement}catch(a){return null}},Ma=function(a,b){var c,d,e,f=[];if("string"==typeof b&&b&&(f=b.split(/\s+/)),a&&1===a.nodeType&&f.length>0)if(a.classList)for(c=0,d=f.length;d>c;c++)a.classList.add(f[c]);else if(a.hasOwnProperty("className")){for(e=" "+a.className+" ",c=0,d=f.length;d>c;c++)-1===e.indexOf(" "+f[c]+" ")&&(e+=f[c]+" ");a.className=e.replace(/^\s+|\s+$/g,"")}return a},Na=function(a,b){var c,d,e,f=[];if("string"==typeof b&&b&&(f=b.split(/\s+/)),a&&1===a.nodeType&&f.length>0)if(a.classList&&a.classList.length>0)for(c=0,d=f.length;d>c;c++)a.classList.remove(f[c]);else if(a.className){for(e=(" "+a.className+" ").replace(/[\r\n\t]/g," "),c=0,d=f.length;d>c;c++)e=e.replace(" "+f[c]+" "," ");a.className=e.replace(/^\s+|\s+$/g,"")}return a},Oa=function(a,b){var c=o(a,null).getPropertyValue(b);return"cursor"!==b||c&&"auto"!==c||"A"!==a.nodeName?c:"pointer"},Pa=function(a){var b={left:0,top:0,width:0,height:0};if(a.getBoundingClientRect){var c=a.getBoundingClientRect(),d=h.pageXOffset,e=h.pageYOffset,f=i.documentElement.clientLeft||0,g=i.documentElement.clientTop||0,j=0,k=0;if("relative"===Oa(i.body,"position")){var l=i.body.getBoundingClientRect(),m=i.documentElement.getBoundingClientRect();j=l.left-m.left||0,k=l.top-m.top||0}b.left=c.left+d-f-j,b.top=c.top+e-g-k,b.width="width"in c?c.width:c.right-c.left,b.height="height"in c?c.height:c.bottom-c.top}return b},Qa=function(a){if(!a)return!1;var b=o(a,null),c=t(b.height)>0,d=t(b.width)>0,e=t(b.top)>=0,f=t(b.left)>=0,g=c&&d&&e&&f,h=g?null:Pa(a),i="none"!==b.display&&"collapse"!==b.visibility&&(g||!!h&&(c||h.height>0)&&(d||h.width>0)&&(e||h.top>=0)&&(f||h.left>=0));return i},Ra=function(){l(U),U=0,n(V),V=0},Sa=function(){var a;if(f&&(a=Ca(P.bridge))){var b=Pa(f);C(a.style,{width:b.width+"px",height:b.height+"px",top:b.top+"px",left:b.left+"px",zIndex:""+Ua(_.zIndex)})}},Ta=function(a){P.ready===!0&&(P.bridge&&"function"==typeof P.bridge.setHandCursor?P.bridge.setHandCursor(a):P.ready=!1)},Ua=function(a){if(/^(?:auto|inherit)$/.test(a))return a;var b;return"number"!=typeof a||u(a)?"string"==typeof a&&(b=Ua(s(a,10))):b=a,"number"==typeof b?b:"auto"},Va=function(a){var c,d,e,f=P.sandboxed,g=null;if(a=a===!0,O===!1)g=!1;else{try{d=b.frameElement||null}catch(h){e={name:h.name,message:h.message}}if(d&&1===d.nodeType&&"IFRAME"===d.nodeName)try{g=d.hasAttribute("sandbox")}catch(h){g=null}else{try{c=document.domain||null}catch(h){c=null}(null===c||e&&"SecurityError"===e.name&&/(^|[\s\(\[@])sandbox(es|ed|ing|[\s\.,!\)\]@]|$)/.test(e.message.toLowerCase()))&&(g=!0)}}return P.sandboxed=g,f===g||a||Wa(q),g},Wa=function(a){function b(a){var b=a.match(/[\d]+/g);return b.length=3,b.join(".")}function c(a){return!!a&&(a=a.toLowerCase())&&(/^(pepflashplayer\.dll|libpepflashplayer\.so|pepperflashplayer\.plugin)$/.test(a)||"chrome.plugin"===a.slice(-13))}function d(a){a&&(h=!0,a.version&&(l=b(a.version)),!l&&a.description&&(l=b(a.description)),a.filename&&(k=c(a.filename)))}var e,f,g,h=!1,i=!1,k=!1,l="";if(j.plugins&&j.plugins.length)e=j.plugins["Shockwave Flash"],d(e),j.plugins["Shockwave Flash 2.0"]&&(h=!0,l="2.0.0.11");else if(j.mimeTypes&&j.mimeTypes.length)g=j.mimeTypes["application/x-shockwave-flash"],e=g&&g.enabledPlugin,d(e);else if("undefined"!=typeof a){i=!0;try{f=new a("ShockwaveFlash.ShockwaveFlash.7"),h=!0,l=b(f.GetVariable("$version"))}catch(m){try{f=new a("ShockwaveFlash.ShockwaveFlash.6"),h=!0,l="6.0.21"}catch(n){try{f=new a("ShockwaveFlash.ShockwaveFlash"),h=!0,l=b(f.GetVariable("$version"))}catch(o){i=!1}}}}P.disabled=h!==!0,P.outdated=l&&t(l)c;c++)a=g[c].replace(/^on/,""),h[a]=!0,j[a]||(j[a]=[]),j[a].push(b);if(h.ready&&P.ready&&this.emit({type:"ready",client:this}),h.error){for(c=0,f=Y.length;f>c;c++)if(P[Y[c].replace(/^flash-/,"")]){this.emit({type:"error",name:Y[c],client:this});break}e!==d&&Xa.version!==e&&this.emit({type:"error",name:"version-mismatch",jsVersion:Xa.version,swfVersion:e})}}return this},db=function(a,b){var c,d,e,f,g,h=Za[this.id],i=h&&h.handlers;if(!i)return this;if(0===arguments.length)f=w(i);else if("string"==typeof a&&a)f=a.split(/\s+/);else if("object"==typeof a&&a&&"undefined"==typeof b)for(c in a)y.call(a,c)&&"string"==typeof c&&c&&"function"==typeof a[c]&&this.off(c,a[c]);if(f&&f.length)for(c=0,d=f.length;d>c;c++)if(a=f[c].toLowerCase().replace(/^on/,""),g=i[a],g&&g.length)if(b)for(e=g.indexOf(b);-1!==e;)g.splice(e,1),e=g.indexOf(b,e);else g.length=0;return this},eb=function(a){var b=null,c=Za[this.id]&&Za[this.id].handlers;return c&&(b="string"==typeof a&&a?c[a]?c[a].slice(0):[]:D(c)),b},fb=function(a){if(kb.call(this,a)){"object"==typeof a&&a&&"string"==typeof a.type&&a.type&&(a=C({},a));var b=C({},qa(a),{client:this});lb.call(this,b)}return this},gb=function(a){if(!Za[this.id])throw new Error("Attempted to clip element(s) to a destroyed ZeroClipboard client instance");a=mb(a);for(var b=0;b0,e=!a.target||d&&-1!==c.indexOf(a.target),f=a.relatedTarget&&d&&-1!==c.indexOf(a.relatedTarget),g=a.client&&a.client===this;return b&&(e||f||g)?!0:!1},lb=function(a){var b=Za[this.id];if("object"==typeof a&&a&&a.type&&b){var c=ta(a),d=b&&b.handlers["*"]||[],e=b&&b.handlers[a.type]||[],f=d.concat(e);if(f&&f.length){var g,i,j,k,l,m=this;for(g=0,i=f.length;i>g;g++)j=f[g],k=m,"string"==typeof j&&"function"==typeof h[j]&&(j=h[j]),"object"==typeof j&&j&&"function"==typeof j.handleEvent&&(k=j,j=j.handleEvent),"function"==typeof j&&(l=C({},a),ua(j,k,[l],c))}}},mb=function(a){return"string"==typeof a&&(a=[]),"number"!=typeof a.length?[a]:a},nb=function(a){if(a&&1===a.nodeType){var b=function(a){(a||(a=h.event))&&("js"!==a._source&&(a.stopImmediatePropagation(),a.preventDefault()),delete a._source)},c=function(c){(c||(c=h.event))&&(b(c),Xa.focus(a))};a.addEventListener("mouseover",c,!1),a.addEventListener("mouseout",b,!1),a.addEventListener("mouseenter",b,!1),a.addEventListener("mouseleave",b,!1),a.addEventListener("mousemove",b,!1),ab[a.zcClippingId]={mouseover:c,mouseout:b,mouseenter:b,mouseleave:b,mousemove:b}}},ob=function(a){if(a&&1===a.nodeType){var b=ab[a.zcClippingId];if("object"==typeof b&&b){for(var c,d,e=["move","leave","enter","out","over"],f=0,g=e.length;g>f;f++)c="mouse"+e[f],d=b[c],"function"==typeof d&&a.removeEventListener(c,d,!1);delete ab[a.zcClippingId]}}};Xa._createClient=function(){bb.apply(this,B(arguments))},Xa.prototype.on=function(){return cb.apply(this,B(arguments))},Xa.prototype.off=function(){return db.apply(this,B(arguments))},Xa.prototype.handlers=function(){return eb.apply(this,B(arguments))},Xa.prototype.emit=function(){return fb.apply(this,B(arguments))},Xa.prototype.clip=function(){return gb.apply(this,B(arguments))},Xa.prototype.unclip=function(){return hb.apply(this,B(arguments))},Xa.prototype.elements=function(){return ib.apply(this,B(arguments))},Xa.prototype.destroy=function(){return jb.apply(this,B(arguments))},Xa.prototype.setText=function(a){if(!Za[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Xa.setData("text/plain",a),this},Xa.prototype.setHtml=function(a){if(!Za[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Xa.setData("text/html",a),this},Xa.prototype.setRichText=function(a){if(!Za[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Xa.setData("application/rtf",a),this},Xa.prototype.setData=function(){if(!Za[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Xa.setData.apply(this,B(arguments)),this},Xa.prototype.clearData=function(){if(!Za[this.id])throw new Error("Attempted to clear pending clipboard data from a destroyed ZeroClipboard client instance");return Xa.clearData.apply(this,B(arguments)),this},Xa.prototype.getData=function(){if(!Za[this.id])throw new Error("Attempted to get pending clipboard data from a destroyed ZeroClipboard client instance");return Xa.getData.apply(this,B(arguments))},"function"==typeof a&&a.amd?a(function(){return Xa}):"object"==typeof c&&c&&"object"==typeof c.exports&&c.exports?c.exports=Xa:b.ZeroClipboard=Xa}(function(){return this||window}())},{}]},{},[23,57,59,58,60,81,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,82,83,84,85,98,99,100,88,89,90,91,92,93,30,34,31,32,39,33,35,36,37,38])("zeroclipboard")});