晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
Server : Apache System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64 User : rainic ( 1014) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/akaindir/www/crm/layouts/v7/lib/jquery/handsontable/ |
Upload File : |
/*!
* Handsontable 0.15.1
* Handsontable is a JavaScript library for editable tables with basic copy-paste compatibility with Excel and Google Docs
*
* Copyright (c) 2012-2014 Marcin Warpechowski
* Copyright 2015 Handsoncode sp. z o.o. <hello@handsontable.com>
* Licensed under the MIT license.
* http://handsontable.com/
*
* Date: Thu Jun 25 2015 14:04:28 GMT+0200 (CEST)
*/
window.Handsontable={version:"0.15.1",buildDate:"Thu Jun 25 2015 14:04:28 GMT+0200 (CEST)"},function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Handsontable=e()}}(function(){var e;return function(e,t,n){return function o(e,t,n){function r(a,l){if(!t[a]){if(!e[a]){var u="function"==typeof require&&require;if(!l&&u)return u(a,!0);if(i)return i(a,!0);if(s[a]&&"undefined"!=typeof window[s[a]])return window[s[a]];var d=new Error("Cannot find module '"+a+"'");throw d.code="MODULE_NOT_FOUND",d}var c=t[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return r(n?n:t)},c,c.exports,o,e,t,n)}return t[a].exports}for(var i="function"==typeof require&&require,s=JSON.parse('{"zeroclipboard":"ZeroClipboard","moment":"moment","pikaday":"Pikaday"}')||{},a=0;a<n.length;a++)r(n[a]);return r}(e,t,n),function(){return Handsontable}}({1:[function(e,t,n){"use strict";window.jQuery&&!function(e,t,n){t.fn.handsontable=function(e){var t,o,r,i,s,a=this.first(),l=a.data("handsontable");if("string"!=typeof e)return s=e||{},l?l.updateSettings(s):(l=new n.Core(a[0],s),a.data("handsontable",l),l.init()),a;if(r=[],arguments.length>1)for(t=1,o=arguments.length;o>t;t++)r.push(arguments[t]);if(l){if("undefined"==typeof l[e])throw new Error("Handsontable do not provide action: "+e);i=l[e].apply(l,r),"destroy"===e&&a.removeData()}return i}}(window,jQuery,Handsontable)},{}],2:[function(e,t,n){"use strict";function o(e,t){var n,o=function(){this.selectionHandles={topLeft:document.createElement("DIV"),topLeftHitArea:document.createElement("DIV"),bottomRight:document.createElement("DIV"),bottomRightHitArea:document.createElement("DIV")};var e=10,t=40;this.selectionHandles.topLeft.className="topLeftSelectionHandle",this.selectionHandles.topLeftHitArea.className="topLeftSelectionHandle-HitArea",this.selectionHandles.bottomRight.className="bottomRightSelectionHandle",this.selectionHandles.bottomRightHitArea.className="bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={topLeft:this.selectionHandles.topLeft.style,topLeftHitArea:this.selectionHandles.topLeftHitArea.style,bottomRight:this.selectionHandles.bottomRight.style,bottomRightHitArea:this.selectionHandles.bottomRightHitArea.style};var n={position:"absolute",height:t+"px",width:t+"px","border-radius":parseInt(t/1.5,10)+"px"};for(var o in n)n.hasOwnProperty(o)&&(this.selectionHandles.styles.bottomRightHitArea[o]=n[o],this.selectionHandles.styles.topLeftHitArea[o]=n[o]);var r={position:"absolute",height:e+"px",width:e+"px","border-radius":parseInt(e/1.5,10)+"px",background:"#F5F5FF",border:"1px solid #4285c8"};for(var o in r)r.hasOwnProperty(o)&&(this.selectionHandles.styles.bottomRight[o]=r[o],this.selectionHandles.styles.topLeft[o]=r[o]);this.main.appendChild(this.selectionHandles.topLeft),this.main.appendChild(this.selectionHandles.bottomRight),this.main.appendChild(this.selectionHandles.topLeftHitArea),this.main.appendChild(this.selectionHandles.bottomRightHitArea)};if(t){var r=l(e);this.instance=e,this.settings=t,this.main=document.createElement("div"),n=this.main.style,n.position="absolute",n.top=0,n.left=0;for(var i=["top","left","bottom","right","corner"],s=0;5>s;s++){var a=i[s],u=document.createElement("DIV");u.className="wtBorder "+(this.settings.className||""),this.settings[a]&&this.settings[a].hide&&(u.className+=" hidden"),n=u.style,n.backgroundColor=this.settings[a]&&this.settings[a].color?this.settings[a].color:t.border.color,n.height=this.settings[a]&&this.settings[a].width?this.settings[a].width+"px":t.border.width+"px",n.width=this.settings[a]&&this.settings[a].width?this.settings[a].width+"px":t.border.width+"px",this.main.appendChild(u)}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.cornerDefaultStyle={width:"5px",height:"5px",borderWidth:"2px",borderStyle:"solid",borderColor:"#FFF"},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&&o.call(this),this.disappear(),e.wtTable.bordersHolder||(e.wtTable.bordersHolder=document.createElement("div"),e.wtTable.bordersHolder.className="htBorders",e.wtTable.spreader.appendChild(e.wtTable.bordersHolder)),e.wtTable.bordersHolder.insertBefore(this.main,e.wtTable.bordersHolder.firstChild);var d=!1;r.addEventListener(document.body,"mousedown",function(){d=!0}),r.addEventListener(document.body,"mouseup",function(){d=!1});for(var c=0,h=this.main.childNodes.length;h>c;c++)r.addEventListener(this.main.childNodes[c],"mouseenter",function(t){if(d&&e.getSetting("hideBorderOnMouseDownOver")){t.preventDefault(),t.stopImmediatePropagation();var n=this.getBoundingClientRect();this.style.display="none";var o=function(e){return e.clientY<Math.floor(n.top)?!0:e.clientY>Math.ceil(n.top+n.height)?!0:e.clientX<Math.floor(n.left)?!0:e.clientX>Math.ceil(n.left+n.width)?!0:void 0},i=function(e){o(e)&&(r.removeEventListener(document.body,"mousemove",i),this.style.display="block")};r.addEventListener(document.body,"mousemove",i)}})}}Object.defineProperties(n,{WalkontableBorder:{get:function(){return o}},__esModule:{value:!0}});var r,i,s,a=(r=e("./../../../dom.js"),r&&r.__esModule&&r||{"default":r}),l=(i=e("./../../../eventManager.js"),i&&i.__esModule&&i||{"default":i}).eventManager,u=(s=e("./cell/coords.js"),s&&s.__esModule&&s||{"default":s}).WalkontableCellCoords;o.prototype.appear=function(e){if(!this.disabled){var t,n,o,r,i,s,l,d,c,h,f,p,g,m,w,v,y,b,C,R=this.instance,S=function(){return!this.instance.selections.area.cellRange||w==this.instance.selections.area.cellRange.to.row&&v==this.instance.selections.area.cellRange.to.col?!1:!0},E=function(e,t,n,o){var r=parseInt(this.selectionHandles.styles.topLeft.width,10),i=parseInt(this.selectionHandles.styles.topLeftHitArea.width,10);this.selectionHandles.styles.topLeft.top=parseInt(e-r,10)+"px",this.selectionHandles.styles.topLeft.left=parseInt(t-r,10)+"px",this.selectionHandles.styles.topLeftHitArea.top=parseInt(e-i/4*3,10)+"px",this.selectionHandles.styles.topLeftHitArea.left=parseInt(t-i/4*3,10)+"px",this.selectionHandles.styles.bottomRight.top=parseInt(e+o,10)+"px",this.selectionHandles.styles.bottomRight.left=parseInt(t+n,10)+"px",this.selectionHandles.styles.bottomRightHitArea.top=parseInt(e+o-i/4,10)+"px",this.selectionHandles.styles.bottomRightHitArea.left=parseInt(t+n-i/4,10)+"px",this.settings.border.multipleSelectionHandlesVisible&&this.settings.border.multipleSelectionHandlesVisible()?(this.selectionHandles.styles.topLeft.display="block",this.selectionHandles.styles.topLeftHitArea.display="block",S.call(this)?(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"),g==this.instance.wtSettings.getSetting("fixedRowsTop")||m==this.instance.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="")};for(b=R.cloneOverlay instanceof WalkontableTopOverlay||R.cloneOverlay instanceof WalkontableCornerOverlay?R.getSetting("fixedRowsTop"):R.wtTable.getRenderedRowsCount(),y=0;b>y;y++)if(C=R.wtTable.rowFilter.renderedToSource(y),C>=e[0]&&C<=e[2]){g=C;break}for(y=b-1;y>=0;y--)if(C=R.wtTable.rowFilter.renderedToSource(y),C>=e[0]&&C<=e[2]){w=C;break}for(b=R.wtTable.getRenderedColumnsCount(),y=0;b>y;y++)if(C=R.wtTable.columnFilter.renderedToSource(y),C>=e[1]&&C<=e[3]){m=C;break}for(y=b-1;y>=0;y--)if(C=R.wtTable.columnFilter.renderedToSource(y),C>=e[1]&&C<=e[3]){v=C;break}if(void 0===g||void 0===m)return void this.disappear();t=g!==w||m!==v,n=R.wtTable.getCell(new u(g,m)),o=t?R.wtTable.getCell(new u(w,v)):n,r=a.offset(n),i=t?a.offset(o):r,s=a.offset(R.wtTable.TABLE),d=r.top,f=i.top+a.outerHeight(o)-d,h=r.left,p=i.left+a.outerWidth(o)-h,l=d-s.top-1,c=h-s.left-1;var T=a.getComputedStyle(n);parseInt(T.borderTopWidth,10)>0&&(l+=1,f=f>0?f-1:0),parseInt(T.borderLeftWidth,10)>0&&(c+=1,p=p>0?p-1:0),this.topStyle.top=l+"px",this.topStyle.left=c+"px",this.topStyle.width=p+"px",this.topStyle.display="block",this.leftStyle.top=l+"px",this.leftStyle.left=c+"px",this.leftStyle.height=f+"px",this.leftStyle.display="block";var _=Math.floor(this.settings.border.width/2);if(this.bottomStyle.top=l+f-_+"px",this.bottomStyle.left=c+"px",this.bottomStyle.width=p+"px",this.bottomStyle.display="block",this.rightStyle.top=l+"px",this.rightStyle.left=c+p-_+"px",this.rightStyle.height=f+1+"px",this.rightStyle.display="block",Handsontable.mobileBrowser||!this.hasSetting(this.settings.border.cornerVisible)||S.call(this))this.cornerStyle.display="none";else if(this.cornerStyle.top=l+f-4+"px",this.cornerStyle.left=c+p-4+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="block",v===this.instance.getSetting("totalColumns")-1){var k=a.getTrimmingContainer(R.wtTable.TABLE),H=o.offsetLeft+a.outerWidth(o)>=a.innerWidth(k);H&&(this.cornerStyle.left=Math.floor(c+p-3-parseInt(this.cornerDefaultStyle.width)/2)+"px",this.cornerStyle.borderRightWidth=0)}Handsontable.mobileBrowser&&E.call(this,l,c,p,f)}},o.prototype.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")},o.prototype.hasSetting=function(e){return"function"==typeof e?e():!!e},window.WalkontableBorder=o},{"./../../../dom.js":27,"./../../../eventManager.js":41,"./cell/coords.js":5}],3:[function(e,t,n){"use strict";Object.defineProperties(n,{WalkontableViewportColumnsCalculator:{get:function(){return r}},__esModule:{value:!0}});var o=new WeakMap,r=function(e,t,n,r,i,s,a){o.set(this,{viewportWidth:e,scrollOffset:t,totalColumns:n,columnWidthFn:r,overrideFn:i,onlyFullyVisible:s}),this.count=0,this.startColumn=null,this.endColumn=null,this.startPosition=null,this.stretchAllRatio=0,this.stretchLastWidth=0,this.stretch=a,this.totalTargetWidth=0,this.needVerifyLastColumnWidth=!0,this.stretchAllColumnsWidth=[],this.calculate()},i=r;$traceurRuntime.createClass(r,{calculate:function(){for(var e,t=0,n=!0,r=[],i=o.get(this),s=i.onlyFullyVisible,a=i.overrideFn,l=i.scrollOffset,u=i.totalColumns,d=i.viewportWidth,c=0;u>c;c++)if(e=this._getColumnWidth(c),l>=t&&!s&&(this.startColumn=c),t>=l&&l+d>=t+e&&(null==this.startColumn&&(this.startColumn=c),this.endColumn=c),r.push(t),t+=e,s||(this.endColumn=c),t>=l+d){n=!1;break}if(this.endColumn===u-1&&n)for(this.startColumn=this.endColumn;this.startColumn>0;){var h=r[this.endColumn]+e-r[this.startColumn-1];if((d>=h||!s)&&this.startColumn--,h>d)break}null!==this.startColumn&&a&&a(this),this.startPosition=r[this.startColumn],void 0==this.startPosition&&(this.startPosition=null),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)},refreshStretching:function(e){if("none"!==this.stretch){for(var t,n,r=0,i=o.get(this),s=i.totalColumns,a=0;s>a;a++)t=this._getColumnWidth(a),r+=t;this.totalTargetWidth=e,n=r-e,"all"===this.stretch&&0>n?(this.stretchAllRatio=e/r,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0):"last"===this.stretch&&e!==1/0&&(this.stretchLastWidth=-n+this._getColumnWidth(s-1))}},getStretchedColumnWidth:function(e,t){var n=null;return"all"===this.stretch&&0!==this.stretchAllRatio?n=this._getStretchedAllColumnWidth(e,t):"last"===this.stretch&&0!==this.stretchLastWidth&&(n=this._getStretchedLastColumnWidth(e)),n},_getStretchedAllColumnWidth:function(e,t){var n=0,r=o.get(this),i=r.totalColumns;if(this.stretchAllColumnsWidth[e]||(this.stretchAllColumnsWidth[e]=Math.round(t*this.stretchAllRatio)),this.stretchAllColumnsWidth.length===i&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(var s=0;s<this.stretchAllColumnsWidth.length;s++)n+=this.stretchAllColumnsWidth[s];n!==this.totalTargetWidth&&(this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length-1]+=this.totalTargetWidth-n)}return this.stretchAllColumnsWidth[e]},_getStretchedLastColumnWidth:function(e){var t=o.get(this),n=t.totalColumns;return e===n-1?this.stretchLastWidth:null},_getColumnWidth:function(e){var t=o.get(this).columnWidthFn(e);return void 0===t&&(t=i.DEFAULT_WIDTH),t}},{get DEFAULT_WIDTH(){return 50}}),window.WalkontableViewportColumnsCalculator=r},{}],4:[function(e,t,n){"use strict";Object.defineProperties(n,{WalkontableViewportRowsCalculator:{get:function(){return r}},__esModule:{value:!0}});var o=new WeakMap,r=function(e,t,n,r,i,s){o.set(this,{viewportHeight:e,scrollOffset:t,totalRows:n,rowHeightFn:r,overrideFn:i,onlyFullyVisible:s}),this.count=0,this.startRow=null,this.endRow=null,this.startPosition=null,this.calculate()},i=r;$traceurRuntime.createClass(r,{calculate:function(){for(var e=0,t=!0,n=[],r=o.get(this),s=r.onlyFullyVisible,a=r.overrideFn,l=r.rowHeightFn,u=r.scrollOffset,d=r.totalRows,c=r.viewportHeight,h=0;d>h;h++){var f=l(h);if(void 0===f&&(f=i.DEFAULT_HEIGHT),u>=e&&!s&&(this.startRow=h),e>=u&&u+c>=e+f&&(null===this.startRow&&(this.startRow=h),this.endRow=h),n.push(e),e+=f,s||(this.endRow=h),e>=u+c){t=!1;break}}if(this.endRow===d-1&&t)for(this.startRow=this.endRow;this.startRow>0;){var p=n[this.endRow]+f-n[this.startRow-1];if((c>=p||!s)&&this.startRow--,p>=c)break}null!==this.startRow&&a&&a(this),this.startPosition=n[this.startRow],void 0==this.startPosition&&(this.startPosition=null),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}},{get DEFAULT_HEIGHT(){return 23}}),window.WalkontableViewportRowsCalculator=r},{}],5:[function(e,t,n){"use strict";Object.defineProperties(n,{WalkontableCellCoords:{get:function(){return o}},__esModule:{value:!0}});var o=function(e,t){"undefined"!=typeof e&&"undefined"!=typeof t?(this.row=e,this.col=t):(this.row=null,this.col=null)};$traceurRuntime.createClass(o,{isValid:function(e){return this.row<0||this.col<0?!1:this.row>=e.getSetting("totalRows")||this.col>=e.getSetting("totalColumns")?!1:!0},isEqual:function(e){return e===this?!0:this.row===e.row&&this.col===e.col},isSouthEastOf:function(e){return this.row>=e.row&&this.col>=e.col},isNorthWestOf:function(e){return this.row<=e.row&&this.col<=e.col},isSouthWestOf:function(e){return this.row>=e.row&&this.col<=e.col},isNorthEastOf:function(e){return this.row<=e.row&&this.col>=e.col}},{}),window.WalkontableCellCoords=o},{}],6:[function(e,t,n){"use strict";Object.defineProperties(n,{WalkontableCellRange:{get:function(){return i}},__esModule:{value:!0}});var o,r=(o=e("./../cell/coords.js"),o&&o.__esModule&&o||{"default":o}).WalkontableCellCoords,i=function(e,t,n){this.highlight=e,this.from=t,this.to=n},s=i;$traceurRuntime.createClass(i,{isValid:function(e){return this.from.isValid(e)&&this.to.isValid(e)},isSingle:function(){return this.from.row===this.to.row&&this.from.col===this.to.col},getHeight:function(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1},getWidth:function(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1},includes:function(e){var t=this.getTopLeftCorner(),n=this.getBottomRightCorner();return e.row<0&&(e.row=0),e.col<0&&(e.col=0),t.row<=e.row&&n.row>=e.row&&t.col<=e.col&&n.col>=e.col},includesRange:function(e){return this.includes(e.getTopLeftCorner())&&this.includes(e.getBottomRightCorner())},isEqual:function(e){return Math.min(this.from.row,this.to.row)==Math.min(e.from.row,e.to.row)&&Math.max(this.from.row,this.to.row)==Math.max(e.from.row,e.to.row)&&Math.min(this.from.col,this.to.col)==Math.min(e.from.col,e.to.col)&&Math.max(this.from.col,this.to.col)==Math.max(e.from.col,e.to.col)},overlaps:function(e){return e.isSouthEastOf(this.getTopLeftCorner())&&e.isNorthWestOf(this.getBottomRightCorner())},isSouthEastOf:function(e){return this.getTopLeftCorner().isSouthEastOf(e)||this.getBottomRightCorner().isSouthEastOf(e)},isNorthWestOf:function(e){return this.getTopLeftCorner().isNorthWestOf(e)||this.getBottomRightCorner().isNorthWestOf(e)},expand:function(e){var t=this.getTopLeftCorner(),n=this.getBottomRightCorner();return e.row<t.row||e.col<t.col||e.row>n.row||e.col>n.col?(this.from=new r(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=new r(Math.max(n.row,e.row),Math.max(n.col,e.col)),!0):!1},expandByRange:function(e){if(this.includesRange(e)||!this.overlaps(e))return!1;var t=this.getTopLeftCorner(),n=this.getBottomRightCorner(),o=(this.getTopRightCorner(),this.getBottomLeftCorner(),e.getTopLeftCorner()),i=e.getBottomRightCorner(),a=Math.min(t.row,o.row),l=Math.min(t.col,o.col),u=Math.max(n.row,i.row),d=Math.max(n.col,i.col),c=new r(a,l),h=new r(u,d),f=new s(c,c,h).isCorner(this.from,e),p=e.isEqual(new s(c,c,h));return f&&!p&&(this.from.col>c.col&&(c.col=d,h.col=l),this.from.row>c.row&&(c.row=u,h.row=a)),this.from=c,this.to=h,!0},getDirection:function(){return this.from.isNorthWestOf(this.to)?"NW-SE":this.from.isNorthEastOf(this.to)?"NE-SW":this.from.isSouthEastOf(this.to)?"SE-NW":this.from.isSouthWestOf(this.to)?"SW-NE":void 0},setDirection:function(e){switch(e){case"NW-SE":this.from=this.getTopLeftCorner(),this.to=this.getBottomRightCorner();break;case"NE-SW":this.from=this.getTopRightCorner(),this.to=this.getBottomLeftCorner();break;case"SE-NW":this.from=this.getBottomRightCorner(),this.to=this.getTopLeftCorner();break;case"SW-NE":this.from=this.getBottomLeftCorner(),this.to=this.getTopRightCorner()}},getTopLeftCorner:function(){return new r(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))},getBottomRightCorner:function(){return new r(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))},getTopRightCorner:function(){return new r(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))},getBottomLeftCorner:function(){return new r(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))},isCorner:function(e,t){return t&&t.includes(e)&&(this.getTopLeftCorner().isEqual(new r(t.from.row,t.from.col))||this.getTopRightCorner().isEqual(new r(t.from.row,t.to.col))||this.getBottomLeftCorner().isEqual(new r(t.to.row,t.from.col))||this.getBottomRightCorner().isEqual(new r(t.to.row,t.to.col)))?!0:e.isEqual(this.getTopLeftCorner())||e.isEqual(this.getTopRightCorner())||e.isEqual(this.getBottomLeftCorner())||e.isEqual(this.getBottomRightCorner())},getOppositeCorner:function(e,t){if(!(e instanceof r))return!1;if(t&&t.includes(e)){if(this.getTopLeftCorner().isEqual(new r(t.from.row,t.from.col)))return this.getBottomRightCorner();if(this.getTopRightCorner().isEqual(new r(t.from.row,t.to.col)))return this.getBottomLeftCorner();if(this.getBottomLeftCorner().isEqual(new r(t.to.row,t.from.col)))return this.getTopRightCorner();if(this.getBottomRightCorner().isEqual(new r(t.to.row,t.to.col)))return this.getTopLeftCorner()}return e.isEqual(this.getBottomRightCorner())?this.getTopLeftCorner():e.isEqual(this.getTopLeftCorner())?this.getBottomRightCorner():e.isEqual(this.getTopRightCorner())?this.getBottomLeftCorner():e.isEqual(this.getBottomLeftCorner())?this.getTopRightCorner():void 0},getBordersSharedWith:function(e){if(!this.includesRange(e))return[];var t={top:Math.min(this.from.row,this.to.row),bottom:Math.max(this.from.row,this.to.row),left:Math.min(this.from.col,this.to.col),right:Math.max(this.from.col,this.to.col)},n={top:Math.min(e.from.row,e.to.row),bottom:Math.max(e.from.row,e.to.row),left:Math.min(e.from.col,e.to.col),right:Math.max(e.from.col,e.to.col)},o=[];return t.top==n.top&&o.push("top"),t.right==n.right&&o.push("right"),t.bottom==n.bottom&&o.push("bottom"),t.left==n.left&&o.push("left"),o},getInner:function(){for(var e=this.getTopLeftCorner(),t=this.getBottomRightCorner(),n=[],o=e.row;o<=t.row;o++)for(var i=e.col;i<=t.col;i++)this.from.row===o&&this.from.col===i||this.to.row===o&&this.to.col===i||n.push(new r(o,i));return n},getAll:function(){for(var e=this.getTopLeftCorner(),t=this.getBottomRightCorner(),n=[],o=e.row;o<=t.row;o++)for(var i=e.col;i<=t.col;i++)e.row===o&&e.col===i?n.push(e):t.row===o&&t.col===i?n.push(t):n.push(new r(o,i));return n},forAll:function(e){for(var t=this.getTopLeftCorner(),n=this.getBottomRightCorner(),o=t.row;o<=n.row;o++)for(var r=t.col;r<=n.col;r++){var i=e(o,r);if(i===!1)return}}},{}),window.WalkontableCellRange=i},{"./../cell/coords.js":5}],7:[function(e,t,n){"use strict";Object.defineProperties(n,{Walkontable:{get:function(){return y}},__esModule:{value:!0}});var o,r,i,s,a,l,u,d,c=(o=e("./../../../dom.js"),o&&o.__esModule&&o||{"default":o}),h=(r=e("./../../../helpers.js"),r&&r.__esModule&&r||{"default":r}).randomString,f=(i=e("./event.js"),i&&i.__esModule&&i||{"default":i}).WalkontableEvent,p=(s=e("./overlays.js"),s&&s.__esModule&&s||{"default":s}).WalkontableOverlays,g=(a=e("./scroll.js"),a&&a.__esModule&&a||{"default":a}).WalkontableScroll,m=(l=e("./settings.js"),l&&l.__esModule&&l||{"default":l}).WalkontableSettings,w=(u=e("./table.js"),u&&u.__esModule&&u||{"default":u}).WalkontableTable,v=(d=e("./viewport.js"),d&&d.__esModule&&d||{"default":d}).WalkontableViewport,y=function(e){var t=[];if(this.guid="wt_"+h(),e.cloneSource?(this.cloneSource=e.cloneSource,this.cloneOverlay=e.cloneOverlay,this.wtSettings=e.cloneSource.wtSettings,this.wtTable=new w(this,e.table,e.wtRootElement),this.wtScroll=new g(this),this.wtViewport=e.cloneSource.wtViewport,this.wtEvent=new f(this),this.selections=this.cloneSource.selections):(this.wtSettings=new m(this,e),this.wtTable=new w(this,e.table),this.wtScroll=new g(this),this.wtViewport=new v(this),this.wtEvent=new f(this),this.selections=this.getSetting("selections"),this.wtOverlays=new p(this)),this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(var n=0,o=this.wtTable.THEAD.childNodes[0].childNodes.length;o>n;n++)t.push(this.wtTable.THEAD.childNodes[0].childNodes[n].innerHTML);this.getSetting("columnHeaders").length||this.update("columnHeaders",[function(e,n){c.fastInnerText(n,t[e])}])}this.drawn=!1,this.drawInterrupted=!1};$traceurRuntime.createClass(y,{draw:function(){var e=void 0!==arguments[0]?arguments[0]:!1;return this.drawInterrupted=!1,e||c.isVisible(this.wtTable.TABLE)?this.wtTable.draw(e):this.drawInterrupted=!0,this},getCell:function(e){var t=void 0!==arguments[1]?arguments[1]:!1;if(!t)return this.wtTable.getCell(e);var n=this.wtSettings.getSetting("fixedRowsTop"),o=this.wtSettings.getSetting("fixedColumnsLeft");return e.row<n&&e.col<o?this.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell(e):e.row<n?this.wtOverlays.topOverlay.clone.wtTable.getCell(e):e.col<o?this.wtOverlays.leftOverlay.clone.wtTable.getCell(e):this.wtTable.getCell(e)},update:function(e,t){return this.wtSettings.update(e,t)},scrollVertical:function(e){return this.wtOverlays.topOverlay.scrollTo(e),this.getSetting("onScrollVertically"),this},scrollHorizontal:function(e){return this.wtOverlays.leftOverlay.scrollTo(e),this.getSetting("onScrollHorizontally"),this},scrollViewport:function(e){return this.wtScroll.scrollViewport(e),this},getViewport:function(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]},getOverlayName:function(){return this.cloneOverlay?this.cloneOverlay.type:"master"},getSetting:function(e,t,n,o,r){return this.wtSettings.getSetting(e,t,n,o,r)},hasSetting:function(e){return this.wtSettings.has(e)},destroy:function(){this.wtOverlays.destroy(),this.wtEvent&&this.wtEvent.destroy()}},{}),window.Walkontable=y},{"./../../../dom.js":27,"./../../../helpers.js":42,"./event.js":8,"./overlays.js":16,"./scroll.js":17,"./settings.js":19,"./table.js":20,"./viewport.js":22}],8:[function(e,t,n){"use strict";function o(e){var t=this,n=a(e);this.instance=e;var o=[null,null];this.dblClickTimeout=[null,null];var r,i,l=function(e){var n=t.parentCell(e.realTarget);s.hasClass(e.realTarget,"corner")?t.instance.getSetting("onCellCornerMouseDown",e,e.realTarget):n.TD&&t.instance.hasSetting("onCellMouseDown")&&t.instance.getSetting("onCellMouseDown",e,n.coords,n.TD,t.instance),2!==e.button&&n.TD&&(o[0]=n.TD,clearTimeout(t.dblClickTimeout[0]),t.dblClickTimeout[0]=setTimeout(function(){o[0]=null},1e3))},u=function(e){t.instance.touchMoving=!0},d=function(e){n.addEventListener(this,"touchmove",u),t.checkIfTouchMove=setTimeout(function(){return t.instance.touchMoving===!0?(t.instance.touchMoving=void 0,void n.removeEventListener("touchmove",u,!1)):void l(e)},30)},c=function(e){var n,o;t.instance.hasSetting("onCellMouseOver")&&(n=t.instance.wtTable.TABLE,o=s.closest(e.realTarget,["TD","TH"],n),o&&o!==i&&s.isChildOf(o,n)&&(i=o,t.instance.getSetting("onCellMouseOver",e,t.instance.wtTable.getCoords(o),o,t.instance)))},h=function(e){if(2!==e.button){var n=t.parentCell(e.realTarget);n.TD===o[0]&&n.TD===o[1]?(s.hasClass(e.realTarget,"corner")?t.instance.getSetting("onCellCornerDblClick",e,n.coords,n.TD,t.instance):t.instance.getSetting("onCellDblClick",e,n.coords,n.TD,t.instance),o[0]=null,o[1]=null):n.TD===o[0]&&(o[1]=n.TD,clearTimeout(t.dblClickTimeout[1]),t.dblClickTimeout[1]=setTimeout(function(){o[1]=null},500))}},f=function(e){clearTimeout(r),e.preventDefault(),h(e)};if(n.addEventListener(this.instance.wtTable.holder,"mousedown",l),n.addEventListener(this.instance.wtTable.TABLE,"mouseover",c),n.addEventListener(this.instance.wtTable.holder,"mouseup",h),this.instance.wtTable.holder.parentNode.parentNode&&Handsontable.mobileBrowser&&!t.instance.wtTable.isWorkingOnClone()){var p="."+this.instance.wtTable.holder.parentNode.className.split(" ").join(".");n.addEventListener(this.instance.wtTable.holder,"touchstart",function(e){t.instance.touchApplied=!0,s.isChildOf(e.target,p)&&d.call(e.target,e)}),n.addEventListener(this.instance.wtTable.holder,"touchend",function(e){t.instance.touchApplied=!1,s.isChildOf(e.target,p)&&f.call(e.target,e)}),t.instance.momentumScrolling||(t.instance.momentumScrolling={}),n.addEventListener(this.instance.wtTable.holder,"scroll",function(e){clearTimeout(t.instance.momentumScrolling._timeout),t.instance.momentumScrolling.ongoing||t.instance.getSetting("onBeforeTouchScroll"),t.instance.momentumScrolling.ongoing=!0,t.instance.momentumScrolling._timeout=setTimeout(function(){t.instance.touchApplied||(t.instance.momentumScrolling.ongoing=!1,t.instance.getSetting("onAfterMomentumScroll"))},200)})}n.addEventListener(window,"resize",function(){"none"!==t.instance.getSetting("stretchH")&&t.instance.draw()}),this.destroy=function(){clearTimeout(this.dblClickTimeout[0]),clearTimeout(this.dblClickTimeout[1]),n.clear()}}Object.defineProperties(n,{WalkontableEvent:{get:function(){return o}},__esModule:{value:!0}});var r,i,s=(r=e("./../../../dom.js"),r&&r.__esModule&&r||{"default":r}),a=(i=e("./../../../eventManager.js"),i&&i.__esModule&&i||{"default":i}).eventManager;o.prototype.parentCell=function(e){var t={},n=this.instance.wtTable.TABLE,o=s.closest(e,["TD","TH"],n);return o&&s.isChildOf(o,n)?(t.coords=this.instance.wtTable.getCoords(o),t.TD=o):s.hasClass(e,"wtBorder")&&s.hasClass(e,"current")?(t.coords=this.instance.selections.current.cellRange.highlight,t.TD=this.instance.wtTable.getCell(t.coords)):s.hasClass(e,"wtBorder")&&s.hasClass(e,"area")&&this.instance.selections.area.cellRange&&(t.coords=this.instance.selections.area.cellRange.to,t.TD=this.instance.wtTable.getCell(t.coords)),t},window.WalkontableEvent=o},{"./../../../dom.js":27,"./../../../eventManager.js":41}],9:[function(e,t,n){"use strict";Object.defineProperties(n,{WalkontableColumnFilter:{get:function(){return o}},__esModule:{value:!0}});var o=function(e,t,n){this.offset=e,this.total=t,this.countTH=n};$traceurRuntime.createClass(o,{offsetted:function(e){return e+this.offset},unOffsetted:function(e){return e-this.offset},renderedToSource:function(e){return this.offsetted(e)},sourceToRendered:function(e){return this.unOffsetted(e)},offsettedTH:function(e){return e-this.countTH},unOffsettedTH:function(e){return e+this.countTH},visibleRowHeadedColumnToSourceColumn:function(e){return this.renderedToSource(this.offsettedTH(e))},sourceColumnToVisibleRowHeadedColumn:function(e){return this.unOffsettedTH(this.sourceToRendered(e))}},{}),window.WalkontableColumnFilter=o},{}],10:[function(e,t,n){"use strict";Object.defineProperties(n,{WalkontableRowFilter:{get:function(){return o}},__esModule:{value:!0}});var o=function(e,t,n){this.offset=e,this.total=t,this.countTH=n};$traceurRuntime.createClass(o,{offsetted:function(e){return e+this.offset},unOffsetted:function(e){return e-this.offset},renderedToSource:function(e){return this.offsetted(e)},sourceToRendered:function(e){return this.unOffsetted(e)},offsettedTH:function(e){return e-this.countTH},unOffsettedTH:function(e){return e+this.countTH},visibleColHeadedRowToSourceRow:function(e){return this.renderedToSource(this.offsettedTH(e))},sourceRowToVisibleColHeadedRow:function(e){return this.unOffsettedTH(this.sourceToRendered(e))}},{}),window.WalkontableRowFilter=o},{}],11:[function(e,t,n){"use strict";Object.defineProperties(n,{WalkontableOverlay:{get:function(){return u}},__esModule:{value:!0}});var o,r,i,s=(o=e("./../../../../dom.js"),o&&o.__esModule&&o||{"default":o}),a=(r=e("./../../../../helpers.js"),r&&r.__esModule&&r||{"default":r}).defineGetter,l=(i=e("./../../../../eventManager.js"),i&&i.__esModule&&i||{"default":i}).eventManager,u=function(e){a(this,"wot",e,{writable:!1}),this.instance=this.wot,this.type="",this.TABLE=this.wot.wtTable.TABLE,this.hider=this.wot.wtTable.hider,this.spreader=this.wot.wtTable.spreader,this.holder=this.wot.wtTable.holder,this.wtRootElement=this.wot.wtTable.wtRootElement,this.trimmingContainer=s.getTrimmingContainer(this.hider.parentNode.parentNode),this.mainTableScrollableElement=s.getScrollableElement(this.wot.wtTable.TABLE),this.needFullRender=this.shouldBeRendered(),this.isElementSizesAdjusted=!1},d=u;$traceurRuntime.createClass(u,{shouldBeRendered:function(){return!0},makeClone:function(e){if(-1===d.CLONE_TYPES.indexOf(e))throw new Error('Clone type "'+e+'" is not supported.');var t=document.createElement("DIV"),n=document.createElement("TABLE");return t.className="ht_clone_"+e+" handsontable",t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.overflow="hidden",n.className=this.wot.wtTable.TABLE.className,t.appendChild(n),this.type=e,this.wot.wtTable.wtRootElement.parentNode.appendChild(t),new Walkontable({cloneSource:this.wot,cloneOverlay:this,table:n})},refresh:function(){var e=void 0!==arguments[0]?arguments[0]:!1,t=this.shouldBeRendered();this.clone&&(this.needFullRender||t)&&this.clone.draw(e),this.needFullRender=t},destroy:function(){l(this.clone).clear()}},{get CLONE_TOP(){return"top"},get CLONE_LEFT(){return"left"},get CLONE_CORNER(){return"corner"},get CLONE_DEBUG(){return"debug"},get CLONE_TYPES(){return[d.CLONE_TOP,d.CLONE_LEFT,d.CLONE_CORNER,d.CLONE_DEBUG]}}),window.WalkontableOverlay=u;
},{"./../../../../dom.js":27,"./../../../../eventManager.js":41,"./../../../../helpers.js":42}],12:[function(e,t,n){"use strict";Object.defineProperties(n,{WalkontableCornerOverlay:{get:function(){return a}},__esModule:{value:!0}});var o,r,i=(o=e("./../../../../dom.js"),o&&o.__esModule&&o||{"default":o}),s=(r=e("./_base.js"),r&&r.__esModule&&r||{"default":r}).WalkontableOverlay,a=function(e){$traceurRuntime.superConstructor(l).call(this,e),this.clone=this.makeClone(s.CLONE_CORNER)},l=a;$traceurRuntime.createClass(a,{shouldBeRendered:function(){return(this.wot.getSetting("fixedRowsTop")||this.wot.getSetting("columnHeaders").length)&&(this.wot.getSetting("fixedColumnsLeft")||this.wot.getSetting("rowHeaders").length)?!0:!1},resetFixedPosition:function(){if(this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=i.outerHeight(this.clone.wtTable.TABLE),n=i.outerWidth(this.clone.wtTable.TABLE);if(this.trimmingContainer===window){var o,r,s=this.wot.wtTable.hider.getBoundingClientRect(),a=Math.ceil(s.top),l=Math.ceil(s.left),u=Math.ceil(s.bottom),d=Math.ceil(s.right);o=0>l&&d-e.offsetWidth>0?-l+"px":"0",r=0>a&&u-e.offsetHeight>0?-a+"px":"0",i.setOverlayPosition(e,o,r)}e.style.height=(0===t?t:t+4)+"px",e.style.width=(0===n?n:n+4)+"px"}}},{},s),window.WalkontableCornerOverlay=a},{"./../../../../dom.js":27,"./_base.js":11}],13:[function(e,t,n){"use strict";Object.defineProperties(n,{WalkontableDebugOverlay:{get:function(){return a}},__esModule:{value:!0}});var o,r,i=(o=e("./../../../../dom.js"),o&&o.__esModule&&o||{"default":o}),s=(r=e("./_base.js"),r&&r.__esModule&&r||{"default":r}).WalkontableOverlay,a=function(e){$traceurRuntime.superConstructor(l).call(this,e),this.clone=this.makeClone(s.CLONE_DEBUG),this.clone.wtTable.holder.style.opacity=.4,this.clone.wtTable.holder.style.textShadow="0 0 2px #ff0000",i.addClass(this.clone.wtTable.holder.parentNode,"wtDebugVisible")},l=a;$traceurRuntime.createClass(a,{},{},s),window.WalkontableDebugOverlay=a},{"./../../../../dom.js":27,"./_base.js":11}],14:[function(e,t,n){"use strict";Object.defineProperties(n,{WalkontableLeftOverlay:{get:function(){return a}},__esModule:{value:!0}});var o,r,i=(o=e("./../../../../dom.js"),o&&o.__esModule&&o||{"default":o}),s=(r=e("./_base.js"),r&&r.__esModule&&r||{"default":r}).WalkontableOverlay,a=function(e){$traceurRuntime.superConstructor(l).call(this,e),this.clone=this.makeClone(s.CLONE_LEFT)},l=a;$traceurRuntime.createClass(a,{shouldBeRendered:function(){return this.wot.getSetting("fixedColumnsLeft")||this.wot.getSetting("rowHeaders").length?!0:!1},resetFixedPosition:function(){if(this.needFullRender&&this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=0;if(this.trimmingContainer===window){var n,o,r=this.wot.wtTable.hider.getBoundingClientRect(),s=Math.ceil(r.left),a=Math.ceil(r.right);o=this.wot.wtTable.hider.style.top,o=""===o?0:o,n=0>s&&a-e.offsetWidth>0?-s:0,t=n,n+="px",i.setOverlayPosition(e,n,o)}else t=this.getScrollPosition();this.adjustHeaderBordersPosition(t)}},setScrollPosition:function(e){this.mainTableScrollableElement===window?window.scrollTo(e,i.getWindowScrollTop()):this.mainTableScrollableElement.scrollLeft=e},onScroll:function(){this.wot.getSetting("onScrollHorizontally")},sumCellSizes:function(e,t){for(var n=0,o=this.wot.wtSettings.defaultColumnWidth;t>e;)n+=this.wot.wtTable.getStretchedColumnWidth(e)||o,e++;return n},adjustElementsSize:function(){var e=void 0!==arguments[0]?arguments[0]:!1;(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildsSize(),e||(this.isElementSizesAdjusted=!0))},adjustRootElementSize:function(){var e,t=this.wot.wtTable.holder,n=t.clientHeight!==t.offsetHeight?i.getScrollbarWidth():0,o=this.clone.wtTable.holder.parentNode,r=o.style;this.trimmingContainer!==window&&(r.height=this.wot.wtViewport.getWorkspaceHeight()-n+"px"),this.clone.wtTable.holder.style.height=r.height,e=i.outerWidth(this.clone.wtTable.TABLE),r.width=(0===e?e:e+4)+"px"},adjustRootChildsSize:function(){var e=i.getScrollbarWidth();this.clone.wtTable.hider.style.height=this.hider.style.height,this.clone.wtTable.holder.style.height=this.clone.wtTable.holder.parentNode.style.height,0===e&&(e=30),this.clone.wtTable.holder.style.width=parseInt(this.clone.wtTable.holder.parentNode.style.width,10)+e+"px"},applyToDOM:function(){var e=this.wot.getSetting("totalColumns");if(this.isElementSizesAdjusted||this.adjustElementsSize(),"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition)this.spreader.style.left=this.wot.wtViewport.columnsRenderCalculator.startPosition+"px";else{if(0!==e)throw new Error("Incorrect value of the columnsRenderCalculator");this.spreader.style.left="0"}this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()},syncOverlayOffset:function(){"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.top=this.wot.wtViewport.rowsRenderCalculator.startPosition+"px":this.clone.wtTable.spreader.style.top=""},scrollTo:function(e,t){var n=this.getTableParentOffset(),o=this.wot.cloneSource?this.wot.cloneSource:this.wot,r=o.wtTable.holder,s=0;t&&r.offsetWidth!==r.clientWidth&&(s=i.getScrollbarWidth()),t?(n+=this.sumCellSizes(0,e+1),n-=this.wot.wtViewport.getViewportWidth()):n+=this.sumCellSizes(this.wot.getSetting("fixedColumnsLeft"),e),n+=s,this.setScrollPosition(n)},getTableParentOffset:function(){return this.trimmingContainer===window?this.wot.wtTable.holderOffset.left:0},getScrollPosition:function(){return i.getScrollLeft(this.mainTableScrollableElement)},adjustHeaderBordersPosition:function(e){if(0===this.wot.getSetting("fixedColumnsLeft")&&this.wot.getSetting("rowHeaders").length>0){var t=this.wot.wtTable.holder.parentNode,n=i.hasClass(t,"innerBorderLeft");e?i.addClass(t,"innerBorderLeft"):i.removeClass(t,"innerBorderLeft"),(!n&&e||n&&!e)&&this.wot.wtOverlays.adjustElementsSize()}}},{},s),window.WalkontableLeftOverlay=a},{"./../../../../dom.js":27,"./_base.js":11}],15:[function(e,t,n){"use strict";Object.defineProperties(n,{WalkontableTopOverlay:{get:function(){return a}},__esModule:{value:!0}});var o,r,i=(o=e("./../../../../dom.js"),o&&o.__esModule&&o||{"default":o}),s=(r=e("./_base.js"),r&&r.__esModule&&r||{"default":r}).WalkontableOverlay,a=function(e){$traceurRuntime.superConstructor(l).call(this,e),this.clone=this.makeClone(s.CLONE_TOP)},l=a;$traceurRuntime.createClass(a,{shouldBeRendered:function(){return this.wot.getSetting("fixedRowsTop")||this.wot.getSetting("columnHeaders").length?!0:!1},resetFixedPosition:function(){if(this.needFullRender&&this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=0;if(this.wot.wtOverlays.leftOverlay.trimmingContainer===window){var n,o,r=this.wot.wtTable.hider.getBoundingClientRect(),s=Math.ceil(r.top),a=Math.ceil(r.bottom);n=this.wot.wtTable.hider.style.left,n=""===n?0:n,o=0>s&&a-e.offsetHeight>0?-s:0,t=o,o+="px",i.setOverlayPosition(e,n,o)}else t=this.getScrollPosition();this.adjustHeaderBordersPosition(t)}},setScrollPosition:function(e){this.mainTableScrollableElement===window?window.scrollTo(i.getWindowScrollLeft(),e):this.mainTableScrollableElement.scrollTop=e},onScroll:function(){this.wot.getSetting("onScrollVertically")},sumCellSizes:function(e,t){for(var n=0,o=this.wot.wtSettings.settings.defaultRowHeight;t>e;)n+=this.wot.wtTable.getRowHeight(e)||o,e++;return n},adjustElementsSize:function(){var e=void 0!==arguments[0]?arguments[0]:!1;(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildsSize(),e||(this.isElementSizesAdjusted=!0))},adjustRootElementSize:function(){var e,t=this.wot.wtTable.holder,n=t.clientWidth!==t.offsetWidth?i.getScrollbarWidth():0,o=this.clone.wtTable.holder.parentNode,r=o.style;this.trimmingContainer!==window&&(r.width=this.wot.wtViewport.getWorkspaceWidth()-n+"px"),this.clone.wtTable.holder.style.width=r.width,e=i.outerHeight(this.clone.wtTable.TABLE),r.height=(0===e?e:e+4)+"px"},adjustRootChildsSize:function(){var e=i.getScrollbarWidth();this.clone.wtTable.hider.style.width=this.hider.style.width,this.clone.wtTable.holder.style.width=this.clone.wtTable.holder.parentNode.style.width,0===e&&(e=30),this.clone.wtTable.holder.style.height=parseInt(this.clone.wtTable.holder.parentNode.style.height,10)+e+"px"},applyToDOM:function(){var e=this.wot.getSetting("totalRows");if(this.isElementSizesAdjusted||this.adjustElementsSize(),"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=this.wot.wtViewport.rowsRenderCalculator.startPosition+"px";else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()},syncOverlayOffset:function(){"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.left=this.wot.wtViewport.columnsRenderCalculator.startPosition+"px":this.clone.wtTable.spreader.style.left=""},scrollTo:function(e,t){var n=this.getTableParentOffset(),o=this.wot.cloneSource?this.wot.cloneSource:this.wot,r=o.wtTable.holder,s=0;t&&r.offsetHeight!==r.clientHeight&&(s=i.getScrollbarWidth()),t?(n+=this.sumCellSizes(0,e+1),n-=this.wot.wtViewport.getViewportHeight(),n+=1):n+=this.sumCellSizes(this.wot.getSetting("fixedRowsTop"),e),n+=s,this.setScrollPosition(n)},getTableParentOffset:function(){return this.mainTableScrollableElement===window?this.wot.wtTable.holderOffset.top:0},getScrollPosition:function(){return i.getScrollTop(this.mainTableScrollableElement)},adjustHeaderBordersPosition:function(e){if(0===this.wot.getSetting("fixedRowsTop")&&this.wot.getSetting("columnHeaders").length>0){var t=this.wot.wtTable.holder.parentNode,n=i.hasClass(t,"innerBorderTop");e?i.addClass(t,"innerBorderTop"):i.removeClass(t,"innerBorderTop"),(!n&&e||n&&!e)&&this.wot.wtOverlays.adjustElementsSize()}if(0===this.wot.getSetting("rowHeaders").length){var o=this.clone.wtTable.THEAD.querySelector("th:nth-of-type(2)");o&&(o.style["border-left-width"]=0)}}},{},s),window.WalkontableTopOverlay=a},{"./../../../../dom.js":27,"./_base.js":11}],16:[function(e,t,n){"use strict";Object.defineProperties(n,{WalkontableOverlays:{get:function(){return g}},__esModule:{value:!0}});var o,r,i,s,a,l,u=(o=e("./../../../dom.js"),o&&o.__esModule&&o||{"default":o}),d=(r=e("./../../../eventManager.js"),r&&r.__esModule&&r||{"default":r}).EventManager,c=(i=e("./overlay/corner.js"),i&&i.__esModule&&i||{"default":i}).WalkontableCornerOverlay,h=(s=e("./overlay/debug.js"),s&&s.__esModule&&s||{"default":s}).WalkontableDebugOverlay,f=(a=e("./overlay/left.js"),a&&a.__esModule&&a||{"default":a}).WalkontableLeftOverlay,p=(l=e("./overlay/top.js"),l&&l.__esModule&&l||{"default":l}).WalkontableTopOverlay,g=function(e){this.wot=e,this.instance=this.wot,this.eventManager=new d(this.wot),this.wot.update("scrollbarWidth",u.getScrollbarWidth()),this.wot.update("scrollbarHeight",u.getScrollbarWidth()),this.mainTableScrollableElement=u.getScrollableElement(this.wot.wtTable.TABLE),this.topOverlay=new p(this.wot),this.leftOverlay=new f(this.wot),this.topOverlay.needFullRender&&this.leftOverlay.needFullRender&&(this.topLeftCornerOverlay=new c(this.wot)),this.wot.getSetting("debug")&&(this.debug=new h(this.wot)),this.destroyed=!1,this.keyPressed=!1,this.spreaderLastSize={width:null,height:null},this.overlayScrollPositions={master:{top:0,left:0},top:{top:null,left:0},left:{top:0,left:null}},this.registerListeners()};$traceurRuntime.createClass(g,{refreshAll:function(){if(this.wot.drawn){if(!this.wot.wtTable.holder.parentNode)return void this.destroy();this.wot.draw(!0),this.topOverlay.onScroll(),this.leftOverlay.onScroll()}},registerListeners:function(){var e=this;this.eventManager.addEventListener(document.documentElement,"keydown",function(){return e.onKeyDown()}),this.eventManager.addEventListener(document.documentElement,"keyup",function(){return e.onKeyUp()}),this.eventManager.addEventListener(this.mainTableScrollableElement,"scroll",function(t){return e.onTableScroll(t)}),this.topOverlay.needFullRender&&(this.eventManager.addEventListener(this.topOverlay.clone.wtTable.holder,"scroll",function(t){return e.onTableScroll(t)}),this.eventManager.addEventListener(this.topOverlay.clone.wtTable.holder,"wheel",function(t){return e.onTableScroll(t)})),this.leftOverlay.needFullRender&&(this.eventManager.addEventListener(this.leftOverlay.clone.wtTable.holder,"scroll",function(t){return e.onTableScroll(t)}),this.eventManager.addEventListener(this.leftOverlay.clone.wtTable.holder,"wheel",function(t){return e.onTableScroll(t)})),this.topOverlay.trimmingContainer!==window&&this.leftOverlay.trimmingContainer!==window&&this.eventManager.addEventListener(window,"wheel",function(t){var n,o=t.wheelDeltaY||t.deltaY,r=t.wheelDeltaX||t.deltaX;e.topOverlay.clone.wtTable.holder.contains(t.target)?n="top":e.leftOverlay.clone.wtTable.holder.contains(t.target)&&(n="left"),"top"==n&&0!==o?t.preventDefault():"left"==n&&0!==r&&t.preventDefault()})},onTableScroll:function(e){Handsontable.mobileBrowser||(!this.keyPressed||this.mainTableScrollableElement===window||e.target.contains(this.mainTableScrollableElement))&&("scroll"===e.type?this.syncScrollPositions(e):this.translateMouseWheelToScroll(e))},onKeyDown:function(){this.keyPressed=!0},onKeyUp:function(){this.keyPressed=!1},translateMouseWheelToScroll:function(e){for(var t,n=this.topOverlay.clone.wtTable.holder,o=this.leftOverlay.clone.wtTable.holder,r={type:"wheel"},i=e.target,s=e.wheelDeltaY||-1*e.deltaY,a=e.wheelDeltaX||-1*e.deltaX;i!=document&&null!=i;){if(i.className.indexOf("wtHolder")>-1){t=i;break}i=i.parentNode}return r.target=t,t==n?this.syncScrollPositions(r,-.2*s):t==o&&this.syncScrollPositions(r,-.2*a),!1},syncScrollPositions:function(e){var t=void 0!==arguments[1]?arguments[1]:null;if(!this.destroyed){if(0===arguments.length)return void this.syncScrollWithMaster();var n,o,r=this.mainTableScrollableElement,i=e.target,s=0,a=!1;this.topOverlay.needFullRender&&(n=this.topOverlay.clone.wtTable.holder),this.leftOverlay.needFullRender&&(o=this.leftOverlay.clone.wtTable.holder),i===document&&(i=window),i===r?(s=u.getScrollLeft(i),this.overlayScrollPositions.master.left!==s&&(this.overlayScrollPositions.master.left=s,a=!0,n&&(n.scrollLeft=s)),s=u.getScrollTop(i),this.overlayScrollPositions.master.top!==s&&(this.overlayScrollPositions.master.top=s,a=!0,o&&(o.scrollTop=s))):i===n?(s=u.getScrollLeft(i),this.overlayScrollPositions.top.left!==s&&(this.overlayScrollPositions.top.left=s,a=!0,r.scrollLeft=s),null!==t&&(a=!0,r.scrollTop+=t)):i===o&&(s=u.getScrollTop(i),this.overlayScrollPositions.left.top!==s&&(this.overlayScrollPositions.left.top=s,a=!0,r.scrollTop=s),null!==t&&(a=!0,r.scrollLeft+=t)),!this.keyPressed&&a&&"scroll"===e.type&&this.refreshAll()}},syncScrollWithMaster:function(){var e=this.topOverlay.mainTableScrollableElement;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=e.scrollLeft),this.leftOverlay.needFullRender&&(this.leftOverlay.clone.wtTable.holder.scrollTop=e.scrollTop)},destroy:function(){this.eventManager.clear(),this.topOverlay.destroy(),this.leftOverlay.destroy(),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.destroy(),this.debug&&this.debug.destroy(),this.destroyed=!0},refresh:function(){var e=void 0!==arguments[0]?arguments[0]:!1;if(this.topOverlay.isElementSizesAdjusted&&this.leftOverlay.isElementSizesAdjusted){var t=this.wot.wtTable.wtRootElement.parentNode||this.wot.wtTable.wtRootElement,n=t.clientWidth,o=t.clientHeight;(n!==this.spreaderLastSize.width||o!==this.spreaderLastSize.height)&&(this.spreaderLastSize.width=n,this.spreaderLastSize.height=o,this.adjustElementsSize())}this.leftOverlay.refresh(e),this.topOverlay.refresh(e),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.refresh(e),this.debug&&this.debug.refresh(e)},adjustElementsSize:function(){var e=void 0!==arguments[0]?arguments[0]:!1,t=this.wot.getSetting("totalColumns"),n=this.wot.getSetting("totalRows"),o=this.wot.wtViewport.getRowHeaderWidth(),r=this.wot.wtViewport.getColumnHeaderHeight(),i=this.wot.wtTable.hider.style;i.width=o+this.leftOverlay.sumCellSizes(0,t)+"px",i.height=r+this.topOverlay.sumCellSizes(0,n)+1+"px",this.topOverlay.adjustElementsSize(e),this.leftOverlay.adjustElementsSize(e)},applyToDOM:function(){this.topOverlay.isElementSizesAdjusted&&this.leftOverlay.isElementSizesAdjusted||this.adjustElementsSize(),this.topOverlay.applyToDOM(),this.leftOverlay.applyToDOM()}},{}),window.WalkontableOverlays=g},{"./../../../dom.js":27,"./../../../eventManager.js":41,"./overlay/corner.js":12,"./overlay/debug.js":13,"./overlay/left.js":14,"./overlay/top.js":15}],17:[function(e,t,n){"use strict";Object.defineProperties(n,{WalkontableScroll:{get:function(){return o}},__esModule:{value:!0}});var o=function(e){this.wot=e,this.instance=e};$traceurRuntime.createClass(o,{scrollViewport:function(e){if(this.wot.drawn){var t=this.wot.getSetting("totalRows"),n=this.wot.getSetting("totalColumns");if(e.row<0||e.row>t-1)throw new Error("row "+e.row+" does not exist");if(e.col<0||e.col>n-1)throw new Error("column "+e.col+" does not exist");e.row>this.instance.wtTable.getLastVisibleRow()?this.wot.wtOverlays.topOverlay.scrollTo(e.row,!0):e.row>=this.instance.getSetting("fixedRowsTop")&&e.row<this.instance.wtTable.getFirstVisibleRow()&&this.wot.wtOverlays.topOverlay.scrollTo(e.row),e.col>this.instance.wtTable.getLastVisibleColumn()?this.wot.wtOverlays.leftOverlay.scrollTo(e.col,!0):e.col>=this.instance.getSetting("fixedColumnsLeft")&&e.col<this.instance.wtTable.getFirstVisibleColumn()&&this.wot.wtOverlays.leftOverlay.scrollTo(e.col)}}},{}),window.WalkontableScroll=o},{}],18:[function(e,t,n){"use strict";Object.defineProperties(n,{WalkontableSelection:{get:function(){return c}},__esModule:{value:!0}});var o,r,i,s,a=(o=e("./../../../dom.js"),o&&o.__esModule&&o||{"default":o}),l=(r=e("./border.js"),r&&r.__esModule&&r||{"default":r}).WalkontableBorder,u=(i=e("./cell/coords.js"),i&&i.__esModule&&i||{"default":i}).WalkontableCellCoords,d=(s=e("./cell/range.js"),s&&s.__esModule&&s||{"default":s}).WalkontableCellRange,c=function(e,t){this.settings=e,this.cellRange=t||null,this.instanceBorders={}};$traceurRuntime.createClass(c,{getBorder:function(e){return this.instanceBorders[e.guid]?this.instanceBorders[e.guid]:void(this.instanceBorders[e.guid]=new l(e,this.settings))},isEmpty:function(){return null===this.cellRange},add:function(e){this.isEmpty()?this.cellRange=new d(e,e,e):this.cellRange.expand(e)},replace:function(e,t){if(!this.isEmpty()){if(this.cellRange.from.isEqual(e))return this.cellRange.from=t,!0;if(this.cellRange.to.isEqual(e))return this.cellRange.to=t,!0}return!1},clear:function(){this.cellRange=null},getCorners:function(){var e=this.cellRange.getTopLeftCorner(),t=this.cellRange.getBottomRightCorner();return[e.row,e.col,t.row,t.col]},addClassAtCoords:function(e,t,n,o){var r=e.wtTable.getCell(new u(t,n));"object"==typeof r&&a.addClass(r,o)},draw:function(e){if(this.isEmpty()){if(this.settings.border){var t=this.getBorder(e);t&&t.disappear()}}else{for(var n,o,r,i=e.wtTable.getRenderedRowsCount(),s=e.wtTable.getRenderedColumnsCount(),l=this.getCorners(),u=0;s>u;u++)o=e.wtTable.columnFilter.renderedToSource(u),o>=l[1]&&o<=l[3]&&(r=e.wtTable.getColumnHeader(o),r&&this.settings.highlightColumnClassName&&a.addClass(r,this.settings.highlightColumnClassName));for(var d=0;i>d;d++){n=e.wtTable.rowFilter.renderedToSource(d),n>=l[0]&&n<=l[2]&&(r=e.wtTable.getRowHeader(n),r&&this.settings.highlightRowClassName&&a.addClass(r,this.settings.highlightRowClassName));for(var c=0;s>c;c++)o=e.wtTable.columnFilter.renderedToSource(c),n>=l[0]&&n<=l[2]&&o>=l[1]&&o<=l[3]?this.settings.className&&this.addClassAtCoords(e,n,o,this.settings.className):n>=l[0]&&n<=l[2]?this.settings.highlightRowClassName&&this.addClassAtCoords(e,n,o,this.settings.highlightRowClassName):o>=l[1]&&o<=l[3]&&this.settings.highlightColumnClassName&&this.addClassAtCoords(e,n,o,this.settings.highlightColumnClassName)}if(e.getSetting("onBeforeDrawBorders",l,this.settings.className),this.settings.border){var h=this.getBorder(e);h&&h.appear(l)}}}},{}),window.WalkontableSelection=c},{"./../../../dom.js":27,"./border.js":2,"./cell/coords.js":5,"./cell/range.js":6}],19:[function(e,t,n){"use strict";Object.defineProperties(n,{WalkontableSettings:{get:function(){return i}},__esModule:{value:!0}});var o,r=(o=e("./../../../dom.js"),o&&o.__esModule&&o||{"default":o}),i=function(e,t){var n=this;this.wot=e,this.instance=e,this.defaults={table:void 0,debug:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,data:void 0,fixedColumnsLeft:0,fixedRowsTop:0,rowHeaders:function(){return[]},columnHeaders:function(){return[]},totalRows:void 0,totalColumns:void 0,cellRenderer:function(e,t,o){var i=n.getSetting("data",e,t);r.fastInnerText(o,void 0===i||null===i?"":i)},columnWidth:function(e){},rowHeight:function(e){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown:null,onCellMouseOver:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeDrawBorders:null,onScrollVertically:null,onScrollHorizontally:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,scrollbarWidth:10,scrollbarHeight:10,renderAllRows:!1,groups:!1},this.settings={};for(var o in this.defaults)if(this.defaults.hasOwnProperty(o))if(void 0!==t[o])this.settings[o]=t[o];else{if(void 0===this.defaults[o])throw new Error('A required setting "'+o+'" was not provided');this.settings[o]=this.defaults[o]}};$traceurRuntime.createClass(i,{update:function(e,t){if(void 0===t)for(var n in e)e.hasOwnProperty(n)&&(this.settings[n]=e[n]);else this.settings[e]=t;return this.wot},getSetting:function(e,t,n,o,r){return"function"==typeof this.settings[e]?this.settings[e](t,n,o,r):void 0!==t&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]},has:function(e){return!!this.settings[e]}},{}),window.WalkontableSettings=i},{"./../../../dom.js":27}],20:[function(e,t,n){"use strict";function o(e,t){this.instance=e,this.TABLE=t,p.removeTextNodes(this.TABLE);var n=this.TABLE.parentNode;if(!n||1!==n.nodeType||!p.hasClass(n,"wtHolder")){var o=document.createElement("DIV");o.className="wtSpreader",n&&n.insertBefore(o,this.TABLE),o.appendChild(this.TABLE)}if(this.spreader=this.TABLE.parentNode,this.spreader.style.position="relative",n=this.spreader.parentNode,!n||1!==n.nodeType||!p.hasClass(n,"wtHolder")){var r=document.createElement("DIV");r.className="wtHider",n&&n.insertBefore(r,this.spreader),r.appendChild(this.spreader)}if(this.hider=this.spreader.parentNode,n=this.hider.parentNode,!n||1!==n.nodeType||!p.hasClass(n,"wtHolder")){var i=document.createElement("DIV");i.style.position="relative",i.className="wtHolder",n&&n.insertBefore(i,this.hider),e.cloneSource||(i.parentNode.className+="ht_master handsontable"),i.appendChild(this.hider)}if(this.holder=this.hider.parentNode,this.wtRootElement=this.holder.parentNode,this.alignOverlaysWithTrimmingContainer(),this.TBODY=this.TABLE.getElementsByTagName("TBODY")[0],this.TBODY||(this.TBODY=document.createElement("TBODY"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.getElementsByTagName("THEAD")[0],this.THEAD||(this.THEAD=document.createElement("THEAD"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.getElementsByTagName("COLGROUP")[0],this.COLGROUP||(this.COLGROUP=document.createElement("COLGROUP"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD)),this.instance.getSetting("columnHeaders").length&&!this.THEAD.childNodes.length){var s=document.createElement("TR");this.THEAD.appendChild(s)}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}Object.defineProperties(n,{WalkontableTable:{get:function(){return o}},__esModule:{value:!0}});var r,i,s,a,l,u,d,c,h,f,p=(r=e("./../../../dom.js"),r&&r.__esModule&&r||{"default":r}),g=(i=e("./cell/coords.js"),i&&i.__esModule&&i||{"default":i}).WalkontableCellCoords,m=((s=e("./cell/range.js"),s&&s.__esModule&&s||{"default":s}).WalkontableCellRange,(a=e("./filter/column.js"),a&&a.__esModule&&a||{"default":a}).WalkontableColumnFilter),w=(l=e("./overlay/corner.js"),l&&l.__esModule&&l||{"default":l}).WalkontableCornerOverlay,v=(u=e("./overlay/debug.js"),u&&u.__esModule&&u||{"default":u}).WalkontableDebugOverlay,y=(d=e("./overlay/left.js"),d&&d.__esModule&&d||{"default":d}).WalkontableLeftOverlay,b=(c=e("./filter/row.js"),c&&c.__esModule&&c||{"default":c}).WalkontableRowFilter,C=(h=e("./tableRenderer.js"),h&&h.__esModule&&h||{"default":h}).WalkontableTableRenderer,R=(f=e("./overlay/top.js"),f&&f.__esModule&&f||{"default":f}).WalkontableTopOverlay;o.prototype.alignOverlaysWithTrimmingContainer=function(){var e=p.getTrimmingContainer(this.wtRootElement);this.isWorkingOnClone()||(this.holder.parentNode.style.position="relative",e!==window?(this.holder.style.width=p.getStyle(e,"width"),this.holder.style.height=p.getStyle(e,"height"),this.holder.style.overflow=""):(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible"))},o.prototype.isWorkingOnClone=function(){return!!this.instance.cloneSource},o.prototype.draw=function(e){if(this.isWorkingOnClone()||(this.holderOffset=p.offset(this.holder),e=this.instance.wtViewport.createRenderCalculators(e)),e)this.isWorkingOnClone()||this.instance.wtViewport.createVisibleCalculators(),this.instance.wtOverlays&&this.instance.wtOverlays.refresh(!0);else{this.isWorkingOnClone()?this.tableOffset=this.instance.cloneSource.wtTable.tableOffset:this.tableOffset=p.offset(this.TABLE);var t;t=this.instance.cloneOverlay instanceof v||this.instance.cloneOverlay instanceof R||this.instance.cloneOverlay instanceof w?0:this.instance.wtViewport.rowsRenderCalculator.startRow;var n;n=this.instance.cloneOverlay instanceof v||this.instance.cloneOverlay instanceof y||this.instance.cloneOverlay instanceof w?0:this.instance.wtViewport.columnsRenderCalculator.startColumn,this.rowFilter=new b(t,this.instance.getSetting("totalRows"),this.instance.getSetting("columnHeaders").length),this.columnFilter=new m(n,this.instance.getSetting("totalColumns"),this.instance.getSetting("rowHeaders").length),this._doDraw(),this.alignOverlaysWithTrimmingContainer()}return this.refreshSelections(e),this.isWorkingOnClone()||(this.instance.wtOverlays.topOverlay.resetFixedPosition(),this.instance.wtOverlays.leftOverlay.resetFixedPosition(),this.instance.wtOverlays.topLeftCornerOverlay&&this.instance.wtOverlays.topLeftCornerOverlay.resetFixedPosition()),this.instance.drawn=!0,this},o.prototype._doDraw=function(){var e=new C(this);e.render()},o.prototype.removeClassFromCells=function(e){for(var t=this.TABLE.querySelectorAll("."+e),n=0,o=t.length;o>n;n++)p.removeClass(t[n],e)},o.prototype.refreshSelections=function(e){var t,n;if(this.instance.selections){if(n=this.instance.selections.length,e)for(t=0;n>t;t++)this.instance.selections[t].settings.className&&this.removeClassFromCells(this.instance.selections[t].settings.className),this.instance.selections[t].settings.highlightRowClassName&&this.removeClassFromCells(this.instance.selections[t].settings.highlightRowClassName),this.instance.selections[t].settings.highlightColumnClassName&&this.removeClassFromCells(this.instance.selections[t].settings.highlightColumnClassName);for(t=0;n>t;t++)this.instance.selections[t].draw(this.instance,e)}},o.prototype.getCell=function(e){if(this.isRowBeforeRenderedRows(e.row))return-1;if(this.isRowAfterRenderedRows(e.row))return-2;var t=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e.row)];return t?t.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e.col)]:void 0},o.prototype.getColumnHeader=function(e,t){t||(t=0);var n=this.THEAD.childNodes[t];return n?n.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]:void 0},o.prototype.getRowHeader=function(e){if(0===this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0))return null;var t=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)];return t?t.childNodes[0]:void 0},o.prototype.getCoords=function(e){var t=e.parentNode,n=p.index(t);return n=t.parentNode===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(n):this.rowFilter.renderedToSource(n),new g(n,this.columnFilter.visibleRowHeadedColumnToSourceColumn(e.cellIndex))},o.prototype.getTrForRow=function(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]},o.prototype.getFirstRenderedRow=function(){return this.instance.wtViewport.rowsRenderCalculator.startRow},o.prototype.getFirstVisibleRow=function(){return this.instance.wtViewport.rowsVisibleCalculator.startRow},o.prototype.getFirstRenderedColumn=function(){return this.instance.wtViewport.columnsRenderCalculator.startColumn},o.prototype.getFirstVisibleColumn=function(){return this.instance.wtViewport.columnsVisibleCalculator.startColumn},o.prototype.getLastRenderedRow=function(){return this.instance.wtViewport.rowsRenderCalculator.endRow},o.prototype.getLastVisibleRow=function(){return this.instance.wtViewport.rowsVisibleCalculator.endRow},o.prototype.getLastRenderedColumn=function(){return this.instance.wtViewport.columnsRenderCalculator.endColumn},o.prototype.getLastVisibleColumn=function(){return this.instance.wtViewport.columnsVisibleCalculator.endColumn},o.prototype.isRowBeforeRenderedRows=function(e){return this.rowFilter.sourceToRendered(e)<0&&e>=0},o.prototype.isRowAfterViewport=function(e){return e>this.getLastVisibleRow()},o.prototype.isRowAfterRenderedRows=function(e){return e>this.getLastRenderedRow()},o.prototype.isColumnBeforeViewport=function(e){return this.columnFilter.sourceToRendered(e)<0&&e>=0},o.prototype.isColumnAfterViewport=function(e){return e>this.getLastVisibleColumn()},o.prototype.isLastRowFullyVisible=function(){return this.getLastVisibleRow()===this.getLastRenderedRow()},o.prototype.isLastColumnFullyVisible=function(){return this.getLastVisibleColumn()===this.getLastRenderedColumn},o.prototype.getRenderedColumnsCount=function(){return this.instance.cloneOverlay instanceof v?this.instance.getSetting("totalColumns"):this.instance.cloneOverlay instanceof y||this.instance.cloneOverlay instanceof w?this.instance.getSetting("fixedColumnsLeft"):this.instance.wtViewport.columnsRenderCalculator.count},o.prototype.getRenderedRowsCount=function(){return this.instance.cloneOverlay instanceof v?this.instance.getSetting("totalRows"):this.instance.cloneOverlay instanceof R||this.instance.cloneOverlay instanceof w?this.instance.getSetting("fixedRowsTop"):this.instance.wtViewport.rowsRenderCalculator.count},o.prototype.getVisibleRowsCount=function(){return this.instance.wtViewport.rowsVisibleCalculator.count},o.prototype.allRowsInViewport=function(){return this.instance.getSetting("totalRows")==this.getVisibleRowsCount()},o.prototype.getRowHeight=function(e){var t=this.instance.wtSettings.settings.rowHeight(e),n=this.instance.wtViewport.oversizedRows[e];return void 0!==n&&(t=t?Math.max(t,n):n),t},o.prototype.getColumnHeaderHeight=function(e){var t=this.instance.wtSettings.settings.defaultRowHeight,n=this.instance.wtViewport.oversizedColumnHeaders[e];return void 0!==n&&(t=t?Math.max(t,n):n),t},o.prototype.getVisibleColumnsCount=function(){return this.instance.wtViewport.columnsVisibleCalculator.count},o.prototype.allColumnsInViewport=function(){return this.instance.getSetting("totalColumns")==this.getVisibleColumnsCount()},o.prototype.getColumnWidth=function(e){var t=this.instance.wtSettings.settings.columnWidth;"function"==typeof t?t=t(e):"object"==typeof t&&(t=t[e]);var n=this.instance.wtViewport.oversizedCols[e];return void 0!==n&&(t=t?Math.max(t,n):n),
t},o.prototype.getStretchedColumnWidth=function(e){var t,n=this.getColumnWidth(e)||this.instance.wtSettings.settings.defaultColumnWidth,o=this.instance.wtViewport.columnsRenderCalculator;return o&&(t=o.getStretchedColumnWidth(e,n),t&&(n=t)),n},window.WalkontableTable=o},{"./../../../dom.js":27,"./cell/coords.js":5,"./cell/range.js":6,"./filter/column.js":9,"./filter/row.js":10,"./overlay/corner.js":12,"./overlay/debug.js":13,"./overlay/left.js":14,"./overlay/top.js":15,"./tableRenderer.js":21}],21:[function(e,t,n){"use strict";function o(e,t){var n=document.createElement("TH");return t.insertBefore(n,e),t.removeChild(e),n}function r(e,t){var n=document.createElement("TD");return t.insertBefore(n,e),t.removeChild(e),n}Object.defineProperties(n,{WalkontableTableRenderer:{get:function(){return l}},__esModule:{value:!0}});var i,s=(i=e("./../../../dom.js"),i&&i.__esModule&&i||{"default":i}),a={},l=function(e){this.wtTable=e,this.wot=e.instance,this.instance=e.instance,this.rowFilter=e.rowFilter,this.columnFilter=e.columnFilter,this.TABLE=e.TABLE,this.THEAD=e.THEAD,this.TBODY=e.TBODY,this.COLGROUP=e.COLGROUP,this.rowHeaders=[],this.rowHeaderCount=0,this.columnHeaders=[],this.columnHeaderCount=0,this.fixedRowsTop=0};$traceurRuntime.createClass(l,{render:function(){this.wtTable.isWorkingOnClone()||this.wot.getSetting("beforeDraw",!0),this.rowHeaders=this.wot.getSetting("rowHeaders"),this.rowHeaderCount=this.rowHeaders.length,this.fixedRowsTop=this.wot.getSetting("fixedRowsTop"),this.columnHeaders=this.wot.getSetting("columnHeaders"),this.columnHeaderCount=this.columnHeaders.length;var e,t=this.wtTable.getRenderedColumnsCount(),n=this.wtTable.getRenderedRowsCount(),o=this.wot.getSetting("totalColumns"),r=this.wot.getSetting("totalRows"),i=!1;if(o>0&&(this.adjustAvailableNodes(),i=!0,this.renderColGroups(),this.renderColumnHeaders(),this.renderRows(r,n,t),this.wtTable.isWorkingOnClone()?this.adjustColumnHeaderHeights():(e=this.wot.wtViewport.getWorkspaceWidth(),this.wot.wtViewport.containerWidth=null),this.adjustColumnWidths(t)),i||this.adjustAvailableNodes(),this.removeRedundantRows(n),!this.wtTable.isWorkingOnClone()){if(this.markOversizedRows(),this.wot.wtViewport.createVisibleCalculators(),this.wot.wtOverlays.refresh(!1),this.wot.wtOverlays.applyToDOM(),e!==this.wot.wtViewport.getWorkspaceWidth()){this.wot.wtViewport.containerWidth=null;for(var s=this.wtTable.getFirstRenderedColumn(),a=this.wtTable.getLastRenderedColumn(),l=s;a>l;l++){var u=this.wtTable.getStretchedColumnWidth(l),d=this.columnFilter.sourceToRendered(l);this.COLGROUP.childNodes[d+this.rowHeaderCount].style.width=u+"px"}}this.wot.getSetting("onDraw",!0)}},removeRedundantRows:function(e){for(;this.wtTable.tbodyChildrenLength>e;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength--},renderRows:function(e,t,n){for(var o,r,i=0,s=this.rowFilter.renderedToSource(i),a=this.wtTable.isWorkingOnClone();e>s&&s>=0;){if(i>1e3)throw new Error("Security brake: Too much TRs. Please define height for your table, which will enforce scrollbars.");if(void 0!==t&&i===t)break;if(r=this.getOrCreateTrForRow(i,r),this.renderRowHeaders(s,r),this.adjustColumns(r,n+this.rowHeaderCount),o=this.renderCells(s,r,n),a||this.resetOversizedRow(s),r.firstChild){var l=this.wot.wtTable.getRowHeight(s);l?r.firstChild.style.height=l+"px":r.firstChild.style.height=""}i++,s=this.rowFilter.renderedToSource(i)}},resetOversizedRow:function(e){this.wot.wtViewport.oversizedRows&&this.wot.wtViewport.oversizedRows[e]&&(this.wot.wtViewport.oversizedRows[e]=void 0)},markOversizedRows:function(){var e,t,n,o,r,i=this.instance.wtTable.TBODY.childNodes.length,a=i*this.instance.wtSettings.settings.defaultRowHeight,l=s.innerHeight(this.instance.wtTable.TBODY)-1;if(a!==l)for(;i;)i--,n=this.instance.wtTable.rowFilter.renderedToSource(i),e=this.instance.wtTable.getRowHeight(n),o=this.instance.wtTable.getTrForRow(n),r=o.querySelector("th"),t=r?s.innerHeight(r):s.innerHeight(o)-1,(!e&&this.instance.wtSettings.settings.defaultRowHeight<t||t>e)&&(this.instance.wtViewport.oversizedRows[n]=t)},adjustColumnHeaderHeights:function(){for(var e=this.wot.getSetting("columnHeaders"),t=this.wot.wtTable.THEAD.childNodes,n=this.wot.wtViewport.oversizedColumnHeaders,o=0,r=e.length;r>o;o++)if(n[o]){if(0===t[o].childNodes.length)return;t[o].childNodes[0].style.height=n[o]+"px"}},markIfOversizedColumnHeader:function(e){var t,n,o,r,i=this.wot.getSetting("columnHeaders").length,a=this.wot.wtSettings.settings.defaultRowHeight;for(t=this.wot.wtTable.columnFilter.renderedToSource(e);i;)i--,n=this.wot.wtTable.getColumnHeaderHeight(i),o=this.wot.wtTable.getColumnHeader(t,i),o&&(r=s.innerHeight(o),(!n&&r>a||r>n)&&(this.wot.wtViewport.oversizedColumnHeaders[i]=r))},renderCells:function(e,t,n){for(var o,i,a=0;n>a;a++)i=this.columnFilter.renderedToSource(a),o=0===a?t.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(i)]:o.nextSibling,"TH"==o.nodeName&&(o=r(o,t)),s.hasClass(o,"hide")||(o.className=""),o.removeAttribute("style"),this.wot.wtSettings.settings.cellRenderer(e,i,o);return o},adjustColumnWidths:function(e){var t=0,n=this.wot.cloneSource?this.wot.cloneSource:this.wot,o=n.wtTable.holder;o.offsetHeight<o.scrollHeight&&(t=s.getScrollbarWidth()),this.wot.wtViewport.columnsRenderCalculator.refreshStretching(this.wot.wtViewport.getViewportWidth()-t);for(var r=0;e>r;r++){var i=this.wtTable.getStretchedColumnWidth(this.columnFilter.renderedToSource(r));this.COLGROUP.childNodes[r+this.rowHeaderCount].style.width=i+"px"}},appendToTbody:function(e){this.TBODY.appendChild(e),this.wtTable.tbodyChildrenLength++},getOrCreateTrForRow:function(e,t){var n;return e>=this.wtTable.tbodyChildrenLength?(n=this.createRow(),this.appendToTbody(n)):n=0===e?this.TBODY.firstChild:t.nextSibling,n},createRow:function(){for(var e=document.createElement("TR"),t=0;t<this.rowHeaderCount;t++)e.appendChild(document.createElement("TH"));return e},renderRowHeader:function(e,t,n){n.className="",n.removeAttribute("style"),this.rowHeaders[t](e,n,t)},renderRowHeaders:function(e,t){for(var n=t.firstChild,r=0;r<this.rowHeaderCount;r++)n?"TD"==n.nodeName&&(n=o(n,t)):(n=document.createElement("TH"),t.appendChild(n)),this.renderRowHeader(e,r,n),n=n.nextSibling},adjustAvailableNodes:function(){this.adjustColGroups(),this.adjustThead()},renderColumnHeaders:function(){var e=this.wot.getOverlayName();if(this.columnHeaderCount){for(var t=this.wtTable.getRenderedColumnsCount(),n=0;n<this.columnHeaderCount;n++)for(var o=this.getTrForColumnHeaders(n),r=-1*this.rowHeaderCount;t>r;r++){var i=this.columnFilter.renderedToSource(r);this.renderColumnHeader(n,i,o.childNodes[r+this.rowHeaderCount]),a[e]||this.wtTable.isWorkingOnClone()||this.markIfOversizedColumnHeader(r)}a[e]=!0}},adjustColGroups:function(){for(var e=this.wtTable.getRenderedColumnsCount();this.wtTable.colgroupChildrenLength<e+this.rowHeaderCount;)this.COLGROUP.appendChild(document.createElement("COL")),this.wtTable.colgroupChildrenLength++;for(;this.wtTable.colgroupChildrenLength>e+this.rowHeaderCount;)this.COLGROUP.removeChild(this.COLGROUP.lastChild),this.wtTable.colgroupChildrenLength--},adjustThead:function(){var e=this.wtTable.getRenderedColumnsCount(),t=this.THEAD.firstChild;if(this.columnHeaders.length){for(var n=0,o=this.columnHeaders.length;o>n;n++){for(t=this.THEAD.childNodes[n],t||(t=document.createElement("TR"),this.THEAD.appendChild(t)),this.theadChildrenLength=t.childNodes.length;this.theadChildrenLength<e+this.rowHeaderCount;)t.appendChild(document.createElement("TH")),this.theadChildrenLength++;for(;this.theadChildrenLength>e+this.rowHeaderCount;)t.removeChild(t.lastChild),this.theadChildrenLength--}var r=this.THEAD.childNodes.length;if(r>this.columnHeaders.length)for(var i=this.columnHeaders.length;r>i;i++)this.THEAD.removeChild(this.THEAD.lastChild)}else t&&s.empty(t)},getTrForColumnHeaders:function(e){return this.THEAD.childNodes[e]},renderColumnHeader:function(e,t,n){return n.className="",n.removeAttribute("style"),this.columnHeaders[e](t,n,e)},renderColGroups:function(){for(var e=0;e<this.wtTable.colgroupChildrenLength;e++)e<this.rowHeaderCount?s.addClass(this.COLGROUP.childNodes[e],"rowHeader"):s.removeClass(this.COLGROUP.childNodes[e],"rowHeader")},adjustColumns:function(e,t){for(var n=e.childNodes.length;t>n;){var o=document.createElement("TD");e.appendChild(o),n++}for(;n>t;)e.removeChild(e.lastChild),n--},removeRedundantColumns:function(e){for(;this.wtTable.tbodyChildrenLength>e;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength--}},{}),window.WalkontableTableRenderer=l},{"./../../../dom.js":27}],22:[function(e,t,n){"use strict";Object.defineProperties(n,{WalkontableViewport:{get:function(){return c}},__esModule:{value:!0}});var o,r,i,s,a=(o=e("./../../../dom.js"),o&&o.__esModule&&o||{"default":o}),l=(r=e("./../../../eventManager.js"),r&&r.__esModule&&r||{"default":r}).eventManager,u=(i=e("./calculator/viewportColumns.js"),i&&i.__esModule&&i||{"default":i}).WalkontableViewportColumnsCalculator,d=(s=e("./calculator/viewportRows.js"),s&&s.__esModule&&s||{"default":s}).WalkontableViewportRowsCalculator,c=function(e){var t=this;this.wot=e,this.instance=this.wot,this.oversizedRows=[],this.oversizedCols=[],this.oversizedColumnHeaders=[],this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null;var n=l(e);n.addEventListener(window,"resize",function(){t.clientHeight=t.getWorkspaceHeight()})};$traceurRuntime.createClass(c,{getWorkspaceHeight:function(){var e,t=this.instance.wtOverlays.topOverlay.trimmingContainer,n=0;return t===window?n=document.documentElement.clientHeight:(e=a.outerHeight(t),n=e>0&&t.clientHeight>0?t.clientHeight:1/0),n},getWorkspaceWidth:function(){var e,t,n=this.instance.getSetting("totalColumns"),o=this.instance.wtOverlays.leftOverlay.trimmingContainer,r=this.instance.getSetting("stretchH"),i=document.documentElement.offsetWidth;return e=Handsontable.freezeOverlays?Math.min(i-this.getWorkspaceOffset().left,i):Math.min(this.getContainerFillWidth(),i-this.getWorkspaceOffset().left,i),o===window&&n>0&&this.sumColumnWidths(0,n-1)>e?document.documentElement.clientWidth:o!==window&&(t=a.getStyle(this.instance.wtOverlays.leftOverlay.trimmingContainer,"overflow"),"scroll"==t||"hidden"==t||"auto"==t)?Math.max(e,o.clientWidth):"none"!==r&&r?e:Math.max(e,a.outerWidth(this.instance.wtTable.TABLE))},hasVerticalScroll:function(){return this.getWorkspaceActualHeight()>this.getWorkspaceHeight()},hasHorizontalScroll:function(){return this.getWorkspaceActualWidth()>this.getWorkspaceWidth()},sumColumnWidths:function(e,t){for(var n=0,o=this.instance.wtSettings.defaultColumnWidth;t>e;)n+=this.wot.wtTable.getColumnWidth(e)||o,e++;return n},getContainerFillWidth:function(){if(this.containerWidth)return this.containerWidth;var e,t,n=this.instance.wtTable.holder;return t=document.createElement("DIV"),t.style.width="100%",t.style.height="1px",n.appendChild(t),e=t.offsetWidth,this.containerWidth=e,n.removeChild(t),e},getWorkspaceOffset:function(){return a.offset(this.wot.wtTable.TABLE)},getWorkspaceActualHeight:function(){return a.outerHeight(this.wot.wtTable.TABLE)},getWorkspaceActualWidth:function(){return a.outerWidth(this.wot.wtTable.TABLE)||a.outerWidth(this.wot.wtTable.TBODY)||a.outerWidth(this.wot.wtTable.THEAD)},getColumnHeaderHeight:function(){return isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=a.outerHeight(this.wot.wtTable.THEAD)),this.columnHeaderHeight},getViewportHeight:function(){var e,t=this.getWorkspaceHeight();return t===1/0?t:(e=this.getColumnHeaderHeight(),e>0&&(t-=e),t)},getRowHeaderWidth:function(){if(this.wot.cloneSource)return this.wot.cloneSource.wtViewport.getRowHeaderWidth();if(isNaN(this.rowHeaderWidth)){var e=this.instance.getSetting("rowHeaders");if(e.length){var t=this.instance.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(var n=0,o=e.length;o>n;n++)t?(this.rowHeaderWidth+=a.outerWidth(t),t=t.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0}return this.rowHeaderWidth},getViewportWidth:function(){var e,t=this.getWorkspaceWidth();return t===1/0?t:(e=this.getRowHeaderWidth(),e>0?t-e:t)},createRowsCalculator:function(){var e,t,n,o=void 0!==arguments[0]?arguments[0]:!1,r=this;if(this.rowHeaderWidth=NaN,e=this.wot.wtSettings.settings.renderAllRows?1/0:this.getViewportHeight(),t=a.getScrollTop(this.wot.wtOverlays.mainTableScrollableElement)-this.wot.wtOverlays.topOverlay.getTableParentOffset(),0>t&&(t=0),n=this.wot.getSetting("fixedRowsTop")){var i=this.wot.wtOverlays.topOverlay.sumCellSizes(0,n);t+=i,e-=i}return new d(e,t,this.wot.getSetting("totalRows"),function(e){return r.wot.wtTable.getRowHeight(e)},o?null:this.wot.wtSettings.settings.viewportRowCalculatorOverride,o)},createColumnsCalculator:function(){var e,t,n=void 0!==arguments[0]?arguments[0]:!1,o=this,r=this.getViewportWidth();if(this.columnHeaderHeight=NaN,e=this.wot.wtOverlays.leftOverlay.getScrollPosition()-this.wot.wtOverlays.topOverlay.getTableParentOffset(),0>e&&(e=0),t=this.wot.getSetting("fixedColumnsLeft")){var i=this.wot.wtOverlays.leftOverlay.sumCellSizes(0,t);e+=i,r-=i}return this.wot.wtTable.holder.clientWidth!==this.wot.wtTable.holder.offsetWidth&&(r-=a.getScrollbarWidth()),new u(r,e,this.wot.getSetting("totalColumns"),function(e){return o.wot.wtTable.getColumnWidth(e)},n?null:this.wot.wtSettings.settings.viewportColumnCalculatorOverride,n,this.wot.getSetting("stretchH"))},createRenderCalculators:function(){var e=void 0!==arguments[0]?arguments[0]:!1;if(e){var t=this.createRowsCalculator(!0),n=this.createColumnsCalculator(!0);this.areAllProposedVisibleRowsAlreadyRendered(t)&&this.areAllProposedVisibleColumnsAlreadyRendered(n)||(e=!1)}return e||(this.rowsRenderCalculator=this.createRowsCalculator(),this.columnsRenderCalculator=this.createColumnsCalculator()),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,e},createVisibleCalculators:function(){this.rowsVisibleCalculator=this.createRowsCalculator(!0),this.columnsVisibleCalculator=this.createColumnsCalculator(!0)},areAllProposedVisibleRowsAlreadyRendered:function(e){return this.rowsVisibleCalculator?e.startRow<this.rowsRenderCalculator.startRow||e.startRow===this.rowsRenderCalculator.startRow&&e.startRow>0?!1:e.endRow>this.rowsRenderCalculator.endRow||e.endRow===this.rowsRenderCalculator.endRow&&e.endRow<this.wot.getSetting("totalRows")-1?!1:!0:!1},areAllProposedVisibleColumnsAlreadyRendered:function(e){return this.columnsVisibleCalculator?e.startColumn<this.columnsRenderCalculator.startColumn||e.startColumn===this.columnsRenderCalculator.startColumn&&e.startColumn>0?!1:e.endColumn>this.columnsRenderCalculator.endColumn||e.endColumn===this.columnsRenderCalculator.endColumn&&e.endColumn<this.wot.getSetting("totalColumns")-1?!1:!0:!1}},{}),window.WalkontableViewport=c},{"./../../../dom.js":27,"./../../../eventManager.js":41,"./calculator/viewportColumns.js":3,"./calculator/viewportRows.js":4}],23:[function(e,t,n){"use strict";var o,r,i,s,a,l,u,d,c,h,f,p,g=Handsontable.version,m=Handsontable.buildDate;window.Handsontable=function v(e,t){var n=new v.Core(e,t||{});return n.init(),n},Handsontable.version=g,Handsontable.buildDate=m,o=e("./shims/array.filter.js"),o&&o.__esModule&&o||{"default":o},r=e("./shims/array.indexOf.js"),r&&r.__esModule&&r||{"default":r},i=e("./shims/array.isArray.js"),i&&i.__esModule&&i||{"default":i},s=e("./shims/classes.js"),s&&s.__esModule&&s||{"default":s},a=e("./shims/object.keys.js"),a&&a.__esModule&&a||{"default":a},l=e("./shims/string.trim.js"),l&&l.__esModule&&l||{"default":l},u=e("./shims/weakmap.js"),u&&u.__esModule&&u||{"default":u},Handsontable.plugins={};var w=(d=e("./pluginHooks.js"),d&&d.__esModule&&d||{"default":d}).Hooks;Handsontable.hooks||(Handsontable.hooks=new w),c=e("./core.js"),c&&c.__esModule&&c||{"default":c},h=e("./renderers/_cellDecorator.js"),h&&h.__esModule&&h||{"default":h},f=e("./cellTypes.js"),f&&f.__esModule&&f||{"default":f},p=e("./../plugins/jqueryHandsontable.js"),p&&p.__esModule&&p||{"default":p}},{"./../plugins/jqueryHandsontable.js":1,"./cellTypes.js":24,"./core.js":25,"./pluginHooks.js":44,"./renderers/_cellDecorator.js":71,"./shims/array.filter.js":78,"./shims/array.indexOf.js":79,"./shims/array.isArray.js":80,"./shims/classes.js":81,"./shims/object.keys.js":82,"./shims/string.trim.js":83,"./shims/weakmap.js":84}],24:[function(e,t,n){"use strict";var o,r,i,s,a,l,u,d,c,h,f,p,g,m,w,v,y,b,C,R,S,E,T=(o=e("./helpers.js"),o&&o.__esModule&&o||{"default":o}),_=(r=e("./editors.js"),r&&r.__esModule&&r||{"default":r}).getEditorConstructor,k=(i=e("./renderers.js"),i&&i.__esModule&&i||{"default":i}).getRenderer;(s=e("./editors/autocompleteEditor.js"),s&&s.__esModule&&s||{"default":s}).AutocompleteEditor,(a=e("./editors/checkboxEditor.js"),a&&a.__esModule&&a||{"default":a}).CheckboxEditor,(l=e("./editors/dateEditor.js"),l&&l.__esModule&&l||{"default":l}).DateEditor,(u=e("./editors/dropdownEditor.js"),u&&u.__esModule&&u||{"default":u}).DropdownEditor,(d=e("./editors/handsontableEditor.js"),d&&d.__esModule&&d||{"default":d}).HandsontableEditor,(c=e("./editors/mobileTextEditor.js"),c&&c.__esModule&&c||{"default":c}).MobileTextEditor,(h=e("./editors/numericEditor.js"),h&&h.__esModule&&h||{"default":h}).NumericEditor,(f=e("./editors/passwordEditor.js"),f&&f.__esModule&&f||{"default":f}).PasswordEditor,(p=e("./editors/selectEditor.js"),p&&p.__esModule&&p||{"default":p}).SelectEditor,(g=e("./editors/textEditor.js"),g&&g.__esModule&&g||{"default":g}).TextEditor,(m=e("./renderers/autocompleteRenderer.js"),m&&m.__esModule&&m||{"default":m}).AutocompleteRenderer,(w=e("./renderers/checkboxRenderer.js"),w&&w.__esModule&&w||{"default":w}).CheckboxRenderer,(v=e("./renderers/htmlRenderer.js"),v&&v.__esModule&&v||{"default":v}).HtmlRenderer,(y=e("./renderers/numericRenderer.js"),y&&y.__esModule&&y||{"default":y}).NumericRenderer,(b=e("./renderers/passwordRenderer.js"),b&&b.__esModule&&b||{"default":b}).PasswordRenderer,(C=e("./renderers/textRenderer.js"),C&&C.__esModule&&C||{"default":C}).TextRenderer,(R=e("./validators/autocompleteValidator.js"),R&&R.__esModule&&R||{"default":R}).AutocompleteValidator,(S=e("./validators/dateValidator.js"),S&&S.__esModule&&S||{"default":S}).DateValidator,(E=e("./validators/numericValidator.js"),E&&E.__esModule&&E||{"default":E}).NumericValidator;Handsontable.mobileBrowser=T.isMobileBrowser(),Handsontable.AutocompleteCell={editor:_("autocomplete"),renderer:k("autocomplete"),validator:Handsontable.AutocompleteValidator},Handsontable.CheckboxCell={editor:_("checkbox"),renderer:k("checkbox")},Handsontable.TextCell={editor:_(Handsontable.mobileBrowser?"mobile":"text"),renderer:k("text")},Handsontable.NumericCell={editor:_("numeric"),renderer:k("numeric"),validator:Handsontable.NumericValidator,dataType:"number"},Handsontable.DateCell={editor:_("date"),validator:Handsontable.DateValidator,renderer:k("autocomplete")},Handsontable.HandsontableCell={editor:_("handsontable"),renderer:k("autocomplete")},Handsontable.PasswordCell={editor:_("password"),renderer:k("password"),copyable:!1},Handsontable.DropdownCell={editor:_("dropdown"),renderer:k("autocomplete"),validator:Handsontable.AutocompleteValidator},Handsontable.cellTypes={text:Handsontable.TextCell,date:Handsontable.DateCell,numeric:Handsontable.NumericCell,checkbox:Handsontable.CheckboxCell,autocomplete:Handsontable.AutocompleteCell,handsontable:Handsontable.HandsontableCell,password:Handsontable.PasswordCell,dropdown:Handsontable.DropdownCell},Handsontable.cellLookup={validator:{numeric:Handsontable.NumericValidator,autocomplete:Handsontable.AutocompleteValidator}}},{"./editors.js":29,"./editors/autocompleteEditor.js":31,"./editors/checkboxEditor.js":32,"./editors/dateEditor.js":33,"./editors/dropdownEditor.js":34,"./editors/handsontableEditor.js":35,"./editors/mobileTextEditor.js":36,"./editors/numericEditor.js":37,"./editors/passwordEditor.js":38,"./editors/selectEditor.js":39,"./editors/textEditor.js":40,"./helpers.js":42,"./renderers.js":70,"./renderers/autocompleteRenderer.js":72,"./renderers/checkboxRenderer.js":73,"./renderers/htmlRenderer.js":74,"./renderers/numericRenderer.js":75,"./renderers/passwordRenderer.js":76,"./renderers/textRenderer.js":77,"./validators/autocompleteValidator.js":86,"./validators/dateValidator.js":87,"./validators/numericValidator.js":88}],25:[function(e,t,n){"use strict";var o,r,i,s,a,l,u,d,c,h,f,p,g=(o=e("./dom.js"),o&&o.__esModule&&o||{"default":o}),m=(r=e("./helpers.js"),r&&r.__esModule&&r||{"default":r}),w=(i=e("numeral"),i&&i.__esModule&&i||{"default":i})["default"],v=(s=e("./dataMap.js"),s&&s.__esModule&&s||{"default":s}).DataMap,y=(a=e("./editorManager.js"),a&&a.__esModule&&a||{"default":a}).EditorManager,b=(l=e("./eventManager.js"),l&&l.__esModule&&l||{"default":l}).eventManager,C=(u=e("./plugins.js"),u&&u.__esModule&&u||{"default":u}).getPlugin,R=(d=e("./renderers.js"),d&&d.__esModule&&d||{"default":d}).getRenderer,S=(c=e("./tableView.js"),c&&c.__esModule&&c||{"default":c}).TableView,E=(h=e("./3rdparty/walkontable/src/cell/coords.js"),h&&h.__esModule&&h||{"default":h}).WalkontableCellCoords,T=(f=e("./3rdparty/walkontable/src/cell/range.js"),f&&f.__esModule&&f||{"default":f}).WalkontableCellRange;(p=e("./3rdparty/walkontable/src/selection.js"),p&&p.__esModule&&p||{"default":p}).WalkontableSelection;Handsontable.activeGuid=null,Handsontable.Core=function(e,t){function n(){var e=!1;return{validatorsInQueue:0,addValidatorToQueue:function(){this.validatorsInQueue++,e=!1},removeValidatorFormQueue:function(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty:function(){},checkIfQueueIsEmpty:function(){0==this.validatorsInQueue&&0==e&&(e=!0,this.onQueueEmpty())}}}function o(e,t,o){function r(){var n;e.length&&(n=Handsontable.hooks.run(k,"beforeChange",e,t),"function"==typeof n?console.warn("Your beforeChange callback returns a function. It's not supported since Handsontable 0.12.1 (and the returned function will not be executed)."):n===!1&&e.splice(0,e.length)),o()}var i=new n;i.onQueueEmpty=r;for(var s=e.length-1;s>=0;s--)if(null===e[s])e.splice(s,1);else{var a=e[s][0],l=c.propToCol(e[s][1]),u=k.runHooks("modifyCol",l),d=k.getCellMeta(a,u);if("numeric"===d.type&&"string"==typeof e[s][3]&&e[s][3].length>0&&(/^-?[\d\s]*(\.|\,)?\d*$/.test(e[s][3])||d.format)){var h=e[s][3].length;"undefined"==typeof d.language?w.language("en"):e[s][3].indexOf(".")===h-3&&-1===e[s][3].indexOf(",")?w.language("en"):w.language(d.language),w.validate(e[s][3])&&(e[s][3]=w().unformat(e[s][3]))}k.getCellValidator(d)&&(i.addValidatorToQueue(),k.validateCell(e[s][3],d,function(t,n){return function(o){if("boolean"!=typeof o)throw new Error("Validation error: result is not boolean");o===!1&&n.allowInvalid===!1&&(e.splice(t,1),n.valid=!0,--t),i.removeValidatorFormQueue()}}(s,d),t))}i.checkIfQueueIsEmpty()}function r(e,t){var n=e.length-1;if(!(0>n)){for(;n>=0;n--)if(null!==e[n]){if(null!=e[n][2]||null!=e[n][3]){if(d.settings.allowInsertRow)for(;e[n][0]>k.countRows()-1;)c.createRow();if("array"===k.dataType&&d.settings.allowInsertColumn)for(;c.propToCol(e[n][1])>k.countCols()-1;)c.createCol();c.set(e[n][0],e[n][1],e[n][3])}}else e.splice(n,1);k.forceFullRender=!0,h.adjustRowsAndCols(),Handsontable.hooks.run(k,"beforeChangeRender",e,t),f.refreshBorders(null,!0),Handsontable.hooks.run(k,"afterChange",e,t||"edit")}}function i(e,t,n){return"object"==typeof e?e:[[e,t,n]]}function s(e){if(e.hasOwnProperty("type")){var t,n={};if("object"==typeof e.type)t=e.type;else if("string"==typeof e.type&&(t=Handsontable.cellTypes[e.type],void 0===t))throw new Error('You declared cell type "'+e.type+'" as a string that is not mapped to a known object. Cell type must be an object or a string mapped to an object in Handsontable.cellTypes');for(var o in t)t.hasOwnProperty(o)&&!e.hasOwnProperty(o)&&(n[o]=t[o]);return n}}function a(e){return Handsontable.hooks.run(k,"modifyRow",e)}function l(e){return Handsontable.hooks.run(k,"modifyCol",e)}function u(){throw new Error("This method cannot be called because this Handsontable instance has been destroyed")}var d,c,h,f,p,k=this,H=function(){},M=b(k);m.extend(H.prototype,_.prototype),m.extend(H.prototype,t),m.extend(H.prototype,s(t)),this.rootElement=e,this.isHotTableEnv=g.isChildOfWebComponentTable(this.rootElement),Handsontable.eventManager.isHotTableEnv=this.isHotTableEnv,this.container=document.createElement("DIV"),e.insertBefore(this.container,e.firstChild),this.guid="ht_"+m.randomString(),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid),d={cellSettings:[],columnSettings:[],columnsSettingConflicts:["data","width"],settings:new H,selRange:null,isPopulated:null,scrollable:null,firstRun:!0},h={alter:function(e,t,n,o,r){var i;switch(n=n||1,e){case"insert_row":if(k.getSettings().maxRows===k.countRows())return;i=c.createRow(t,n),i&&(f.isSelected()&&d.selRange.from.row>=t?(d.selRange.from.row=d.selRange.from.row+i,f.transformEnd(i,0)):f.refreshBorders());break;case"insert_col":if(i=c.createCol(t,n)){if(Array.isArray(k.getSettings().colHeaders)){var s=[t,0];s.length+=i,Array.prototype.splice.apply(k.getSettings().colHeaders,s)}f.isSelected()&&d.selRange.from.col>=t?(d.selRange.from.col=d.selRange.from.col+i,f.transformEnd(0,i)):f.refreshBorders()}break;case"remove_row":t=k.runHooks("modifyCol",t),c.removeRow(t,n),d.cellSettings.splice(t,n);var a=k.getSettings().fixedRowsTop;a>=t+1&&(k.getSettings().fixedRowsTop-=Math.min(n,a-t)),h.adjustRowsAndCols(),f.refreshBorders();break;case"remove_col":c.removeCol(t,n);for(var l=0,u=c.getAll().length;u>l;l++)l in d.cellSettings&&d.cellSettings[l].splice(t,n);var p=k.getSettings().fixedColumnsLeft;p>=t+1&&(k.getSettings().fixedColumnsLeft-=Math.min(n,p-t)),Array.isArray(k.getSettings().colHeaders)&&("undefined"==typeof t&&(t=-1),k.getSettings().colHeaders.splice(t,n)),h.adjustRowsAndCols(),f.refreshBorders();break;default:throw new Error('There is no such action "'+e+'"')}r||h.adjustRowsAndCols()},adjustRowsAndCols:function(){if(d.settings.minRows){var e=k.countRows();if(e<d.settings.minRows)for(var t=0,n=d.settings.minRows;n-e>t;t++)c.createRow(k.countRows(),1,!0)}if(d.settings.minSpareRows){var o=k.countEmptyRows(!0);if(o<d.settings.minSpareRows)for(;o<d.settings.minSpareRows&&k.countRows()<d.settings.maxRows;o++)c.createRow(k.countRows(),1,!0)}var r;if((d.settings.minCols||d.settings.minSpareCols)&&(r=k.countEmptyCols(!0)),d.settings.minCols&&!d.settings.columns&&k.countCols()<d.settings.minCols)for(;k.countCols()<d.settings.minCols;r++)c.createCol(k.countCols(),1,!0);if(d.settings.minSpareCols&&!d.settings.columns&&"array"===k.dataType&&r<d.settings.minSpareCols)for(;r<d.settings.minSpareCols&&k.countCols()<d.settings.maxCols;r++)c.createCol(k.countCols(),1,!0);var i=k.countRows(),s=k.countCols();if((0===i||0===s)&&f.deselect(),f.isSelected()){var a=!1,l=d.selRange.from.row,u=d.selRange.from.col,h=d.selRange.to.row,p=d.selRange.to.col;l>i-1?(l=i-1,a=!0,h>l&&(h=l)):h>i-1&&(h=i-1,a=!0,l>h&&(l=h)),u>s-1?(u=s-1,a=!0,p>u&&(p=u)):p>s-1&&(p=s-1,a=!0,u>p&&(u=p)),a&&k.selectCell(l,u,h,p)}k.view&&k.view.wt.wtOverlays.adjustElementsSize()},populateFromArray:function(e,t,n,o,r,i,s){var a,l,u,c,h=[],f={};if(l=t.length,0===l)return!1;var p,g,w,v;switch(r){case"shift_down":for(p=n?n.col-e.col+1:0,g=n?n.row-e.row+1:0,t=m.translateRowsToColumns(t),u=0,c=t.length,w=Math.max(c,p);w>u;u++)if(c>u){for(a=0,l=t[u].length;g-l>a;a++)t[u].push(t[u][a%l]);t[u].unshift(e.col+u,e.row,0),k.spliceCol.apply(k,t[u])}else t[u%c][0]=e.col+u,k.spliceCol.apply(k,t[u%c]);break;case"shift_right":for(p=n?n.col-e.col+1:0,g=n?n.row-e.row+1:0,a=0,l=t.length,v=Math.max(l,g);v>a;a++)if(l>a){for(u=0,c=t[a].length;p-c>u;u++)t[a].push(t[a][u%c]);t[a].unshift(e.row+a,e.col,0),k.spliceRow.apply(k,t[a])}else t[a%l][0]=e.row+a,k.spliceRow.apply(k,t[a%l]);break;case"overwrite":default:f.row=e.row,f.col=e.col;var y={row:0,col:0},b={row:n&&e?n.row-e.row+1:1,col:n&&e?n.col-e.col+1:1},C=!0;for(-1!==["up","left"].indexOf(i)?y={row:Math.ceil(b.row/l)||1,col:Math.ceil(b.col/t[0].length)||1}:-1!==["down","right"].indexOf(i)&&(y={row:1,col:1}),a=0;l>a&&!(n&&f.row>n.row||!d.settings.allowInsertRow&&f.row>k.countRows()-1||f.row>=d.settings.maxRows);a++){for(f.col=e.col,c=t[a]?t[a].length:0,u=0;c>u&&!(n&&f.col>n.col||!d.settings.allowInsertColumn&&f.col>k.countCols()-1||f.col>=d.settings.maxCols);u++){if(!k.getCellMeta(f.row,f.col).readOnly){var R,S,E,T=t[a][u],_=k.getDataAtCell(f.row,f.col),H={row:a,col:u};"autofill"===o&&(R=k.runHooks("beforeAutofillInsidePopulate",H,i,t,s,y,b),R&&(y="undefined"!=typeof R.iterators?R.iterators:y,T="undefined"!=typeof R.value?R.value:T)),null!==T&&"object"==typeof T?null===_||"object"!=typeof _?C=!1:(E=Handsontable.helper.duckSchema(_[0]||_),S=Handsontable.helper.duckSchema(T[0]||T),Handsontable.helper.isObjectEquals(E,S)?T=Handsontable.helper.deepClone(T):C=!1):null!==_&&"object"==typeof _&&(C=!1),C&&h.push([f.row,f.col,T]),C=!0}f.col++,n&&u===c-1&&(u=-1,-1!==["down","right"].indexOf(i)?y.col++:-1!==["up","left"].indexOf(i)&&y.col>1&&y.col--)}f.row++,y.col=1,n&&a===l-1&&(a=-1,-1!==["down","right"].indexOf(i)?y.row++:-1!==["up","left"].indexOf(i)&&y.row>1&&y.row--)}k.setDataAtCell(h,null,null,o||"populateFromArray")}}},this.selection=f={inProgress:!1,selectedHeader:{cols:!1,rows:!1},setSelectedHeaders:function(e,t){k.selection.selectedHeader.rows=e,k.selection.selectedHeader.cols=t},begin:function(){k.selection.inProgress=!0},finish:function(){var e=k.getSelected();Handsontable.hooks.run(k,"afterSelectionEnd",e[0],e[1],e[2],e[3]),Handsontable.hooks.run(k,"afterSelectionEndByProp",e[0],k.colToProp(e[1]),e[2],k.colToProp(e[3])),k.selection.inProgress=!1},isInProgress:function(){return k.selection.inProgress},setRangeStart:function(e,t){Handsontable.hooks.run(k,"beforeSetRangeStart",e),d.selRange=new T(e,e,e),f.setRangeEnd(e,null,t)},setRangeEnd:function(e,t,n){if(null!==d.selRange){var o;Handsontable.hooks.run(k,"beforeSetRangeEnd",e),k.selection.begin(),d.selRange.to=new E(e.row,e.col),d.settings.multiSelect||(d.selRange.from=e),k.view.wt.selections.current.clear(),o=k.getCellMeta(d.selRange.highlight.row,d.selRange.highlight.col).disableVisualSelection,"string"==typeof o&&(o=[o]),(o===!1||Array.isArray(o)&&-1===o.indexOf("current"))&&k.view.wt.selections.current.add(d.selRange.highlight),k.view.wt.selections.area.clear(),(o===!1||Array.isArray(o)&&-1===o.indexOf("area"))&&f.isMultiple()&&(k.view.wt.selections.area.add(d.selRange.from),k.view.wt.selections.area.add(d.selRange.to)),(d.settings.currentRowClassName||d.settings.currentColClassName)&&(k.view.wt.selections.highlight.clear(),k.view.wt.selections.highlight.add(d.selRange.from),k.view.wt.selections.highlight.add(d.selRange.to)),Handsontable.hooks.run(k,"afterSelection",d.selRange.from.row,d.selRange.from.col,d.selRange.to.row,d.selRange.to.col),Handsontable.hooks.run(k,"afterSelectionByProp",d.selRange.from.row,c.colToProp(d.selRange.from.col),d.selRange.to.row,c.colToProp(d.selRange.to.col)),t!==!1&&k.view.mainViewIsActive()&&(d.selRange.from&&!f.isMultiple()?k.view.scrollViewport(d.selRange.from):k.view.scrollViewport(e)),f.refreshBorders(null,n)}},refreshBorders:function(e,t){t||p.destroyEditor(e),k.view.render(),f.isSelected()&&!t&&p.prepareEditor()},isMultiple:function(){var e=!(d.selRange.to.col===d.selRange.from.col&&d.selRange.to.row===d.selRange.from.row),t=Handsontable.hooks.run(k,"afterIsMultipleSelection",e);return e?t:void 0},transformStart:function(e,t,n,o){var r,i,s,a=new E(e,t),l=0,u=0;k.runHooks("modifyTransformStart",a),r=k.countRows(),i=k.countCols(),d.selRange.highlight.row+e>r-1?n&&d.settings.minSpareRows>0?(k.alter("insert_row",r),r=k.countRows()):d.settings.autoWrapCol&&(a.row=1-r,a.col=d.selRange.highlight.col+a.col==i-1?1-i:1):d.settings.autoWrapCol&&d.selRange.highlight.row+a.row<0&&d.selRange.highlight.col+a.col>=0&&(a.row=r-1,
a.col=d.selRange.highlight.col+a.col==0?i-1:-1),d.selRange.highlight.col+a.col>i-1?n&&d.settings.minSpareCols>0?(k.alter("insert_col",i),i=k.countCols()):d.settings.autoWrapRow&&(a.row=d.selRange.highlight.row+a.row==r-1?1-r:1,a.col=1-i):d.settings.autoWrapRow&&d.selRange.highlight.col+a.col<0&&d.selRange.highlight.row+a.row>=0&&(a.row=d.selRange.highlight.row+a.row==0?r-1:-1,a.col=i-1),s=new E(d.selRange.highlight.row+a.row,d.selRange.highlight.col+a.col),s.row<0?(l=-1,s.row=0):s.row>0&&s.row>=r&&(l=1,s.row=r-1),s.col<0?(u=-1,s.col=0):s.col>0&&s.col>=i&&(u=1,s.col=i-1),k.runHooks("afterModifyTransformStart",s,l,u),f.setRangeStart(s,o)},transformEnd:function(e,t){var n,o,r,i=new E(e,t),s=0,a=0;k.runHooks("modifyTransformEnd",i),n=k.countRows(),o=k.countCols(),r=new E(d.selRange.to.row+i.row,d.selRange.to.col+i.col),r.row<0?(s=-1,r.row=0):r.row>0&&r.row>=n&&(s=1,r.row=n-1),r.col<0?(a=-1,r.col=0):r.col>0&&r.col>=o&&(a=1,r.col=o-1),k.runHooks("afterModifyTransformEnd",r,s,a),f.setRangeEnd(r,!0)},isSelected:function(){return null!==d.selRange},inInSelection:function(e){return f.isSelected()?d.selRange.includes(e):!1},deselect:function(){f.isSelected()&&(k.selection.inProgress=!1,d.selRange=null,k.view.wt.selections.current.clear(),k.view.wt.selections.area.clear(),(d.settings.currentRowClassName||d.settings.currentColClassName)&&k.view.wt.selections.highlight.clear(),p.destroyEditor(),f.refreshBorders(),Handsontable.hooks.run(k,"afterDeselect"))},selectAll:function(){d.settings.multiSelect&&(f.setRangeStart(new E(0,0)),f.setRangeEnd(new E(k.countRows()-1,k.countCols()-1),!1))},empty:function(){if(f.isSelected()){var e,t,n=d.selRange.getTopLeftCorner(),o=d.selRange.getBottomRightCorner(),r=[];for(e=n.row;e<=o.row;e++)for(t=n.col;t<=o.col;t++)k.getCellMeta(e,t).readOnly||r.push([e,t,""]);k.setDataAtCell(r)}}},this.init=function(){Handsontable.hooks.run(k,"beforeInit"),Handsontable.mobileBrowser&&g.addClass(k.rootElement,"mobile"),this.updateSettings(d.settings,!0),this.view=new S(this),p=new y(k,d,f,c),this.forceFullRender=!0,this.view.render(),"object"==typeof d.firstRun&&(Handsontable.hooks.run(k,"afterChange",d.firstRun[0],d.firstRun[1]),d.firstRun=!1),Handsontable.hooks.run(k,"afterInit")},this.validateCell=function(e,t,n,o){function r(e){var o=t.col,r=t.row,i=k.getCell(r,o,!0);i&&k.view.wt.wtSettings.settings.cellRenderer(r,o,i),n(e)}var i=k.getCellValidator(t);"[object RegExp]"===Object.prototype.toString.call(i)&&(i=function(e){return function(t,n){n(e.test(t))}}(i)),"function"==typeof i?(e=Handsontable.hooks.run(k,"beforeValidate",e,t.row,t.prop,o),k._registerTimeout(setTimeout(function(){i.call(t,e,function(n){n=Handsontable.hooks.run(k,"afterValidate",n,e,t.row,t.prop,o),t.valid=n,r(n),Handsontable.hooks.run(k,"postAfterValidate",n,e,t.row,t.prop,o)})},0))):(t.valid=!0,r(t.valid))},this.setDataAtCell=function(e,t,n,s){var a,l,u,d=i(e,t,n),h=[];for(a=0,l=d.length;l>a;a++){if("object"!=typeof d[a])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof d[a][1])throw new Error("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");u=c.colToProp(d[a][1]),h.push([d[a][0],u,c.get(d[a][0],u),d[a][2]])}s||"object"!=typeof e||(s=t),o(h,s,function(){r(h,s)})},this.setDataAtRowProp=function(e,t,n,s){var a,l,u=i(e,t,n),d=[];for(a=0,l=u.length;l>a;a++)d.push([u[a][0],u[a][1],c.get(u[a][0],u[a][1]),u[a][2]]);s||"object"!=typeof e||(s=t),o(d,s,function(){r(d,s)})},this.listen=function(){Handsontable.activeGuid=k.guid,document.activeElement&&document.activeElement!==document.body?document.activeElement.blur():document.activeElement||document.body.focus()},this.unlisten=function(){Handsontable.activeGuid=null},this.isListening=function(){return Handsontable.activeGuid===k.guid},this.destroyEditor=function(e){f.refreshBorders(e)},this.populateFromArray=function(e,t,n,o,r,i,s,a,l){var u;if("object"!=typeof n||"object"!=typeof n[0])throw new Error("populateFromArray parameter `input` must be an array of arrays");return u="number"==typeof o?new E(o,r):null,h.populateFromArray(new E(e,t),n,u,i,s,a,l)},this.spliceCol=function(e,t,n){return c.spliceCol.apply(c,arguments)},this.spliceRow=function(e,t,n){return c.spliceRow.apply(c,arguments)},this.getSelected=function(){return f.isSelected()?[d.selRange.from.row,d.selRange.from.col,d.selRange.to.row,d.selRange.to.col]:void 0},this.getSelectedRange=function(){return f.isSelected()?d.selRange:void 0},this.render=function(){k.view&&(k.forceFullRender=!0,f.refreshBorders(null,!0))},this.loadData=function(e){function t(){d.cellSettings.length=0}if("object"==typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error("loadData only accepts array of objects or array of arrays ("+typeof e+" given)");e=[];for(var n,o=0,r=d.settings.startRows;r>o;o++){n=[];for(var i=0,s=d.settings.startCols;s>i;i++)n.push(null);e.push(n)}}d.isPopulated=!1,H.prototype.data=e,Array.isArray(d.settings.dataSchema)||Array.isArray(e[0])?k.dataType="array":"function"==typeof d.settings.dataSchema?k.dataType="function":k.dataType="object",c=new v(k,d,H),t(),h.adjustRowsAndCols(),Handsontable.hooks.run(k,"afterLoadData"),d.firstRun?d.firstRun=[null,"loadData"]:(Handsontable.hooks.run(k,"afterChange",null,"loadData"),k.render()),d.isPopulated=!0},this.getData=function(e,t,n,o){return"undefined"==typeof e?c.getAll():c.getRange(new E(e,t),new E(n,o),c.DESTINATION_RENDERER)},this.getCopyableData=function(e,t,n,o){return c.getCopyableText(new E(e,t),new E(n,o))},this.getSchema=function(){return c.getSchema()},this.updateSettings=function(e,t){var n,o;if("undefined"!=typeof e.rows)throw new Error("'rows' setting is no longer supported. do you mean startRows, minRows or maxRows?");if("undefined"!=typeof e.cols)throw new Error("'cols' setting is no longer supported. do you mean startCols, minCols or maxCols?");for(n in e)"data"!==n&&(Handsontable.hooks.getRegistered().indexOf(n)>-1?("function"==typeof e[n]||Array.isArray(e[n]))&&k.addHook(n,e[n]):!t&&e.hasOwnProperty(n)&&(H.prototype[n]=e[n]));if(void 0===e.data&&void 0===d.settings.data?k.loadData(null):void 0!==e.data?k.loadData(e.data):void 0!==e.columns&&c.createMap(),o=k.countCols(),d.cellSettings.length=0,o>0){var r,i;for(n=0;o>n;n++)d.columnSettings[n]=m.columnFactory(H,d.columnsSettingConflicts),r=d.columnSettings[n].prototype,H.prototype.columns&&(i=H.prototype.columns[n],m.extend(r,i),m.extend(r,s(i)))}if("undefined"!=typeof e.cell)for(n in e.cell)if(e.cell.hasOwnProperty(n)){var a=e.cell[n];k.setCellMetaObject(a.row,a.col,a)}if(Handsontable.hooks.run(k,"afterCellMetaReset"),"undefined"!=typeof e.className&&(H.prototype.className&&g.removeClass(k.rootElement,H.prototype.className),e.className&&g.addClass(k.rootElement,e.className)),"undefined"!=typeof e.height){var l=e.height;"function"==typeof l&&(l=l()),k.rootElement.style.height=l+"px"}if("undefined"!=typeof e.width){var u=e.width;"function"==typeof u&&(u=u()),k.rootElement.style.width=u+"px"}l&&(k.rootElement.style.overflow="hidden"),t||Handsontable.hooks.run(k,"afterUpdateSettings"),h.adjustRowsAndCols(),k.view&&!d.firstRun&&(k.forceFullRender=!0,f.refreshBorders(null,!0))},this.getValue=function(){var e=k.getSelected();if(H.prototype.getValue){if("function"==typeof H.prototype.getValue)return H.prototype.getValue.call(k);if(e)return k.getData()[e[0]][H.prototype.getValue]}else if(e)return k.getDataAtCell(e[0],e[1])},this.getSettings=function(){return d.settings},this.clear=function(){f.selectAll(),f.empty()},this.alter=function(e,t,n,o,r){h.alter(e,t,n,o,r)},this.getCell=function(e,t,n){return k.view.getCellAtCoords(new E(e,t),n)},this.getCoords=function(e){return this.view.wt.wtTable.getCoords.call(this.view.wt.wtTable,e)},this.colToProp=function(e){return c.colToProp(e)},this.propToCol=function(e){return c.propToCol(e)},this.getDataAtCell=function(e,t){return c.get(e,c.colToProp(t))},this.getDataAtRowProp=function(e,t){return c.get(e,t)},this.getDataAtCol=function(e){var t=[];return t.concat.apply(t,c.getRange(new E(0,e),new E(d.settings.data.length-1,e),c.DESTINATION_RENDERER))},this.getDataAtProp=function(e){var t,n=[];return t=c.getRange(new E(0,c.propToCol(e)),new E(d.settings.data.length-1,c.propToCol(e)),c.DESTINATION_RENDERER),n.concat.apply(n,t)},this.getSourceDataAtCol=function(e){for(var t=[],n=d.settings.data,o=0;o<n.length;o++)t.push(n[o][e]);return t},this.getSourceDataAtRow=function(e){return d.settings.data[e]},this.getDataAtRow=function(e){var t=c.getRange(new E(e,0),new E(e,this.countCols()-1),c.DESTINATION_RENDERER);return t[0]},this.removeCellMeta=function(e,t,n){var o=k.getCellMeta(e,t);void 0!=o[n]&&delete d.cellSettings[e][t][n]},this.setCellMetaObject=function(e,t,n){if("object"==typeof n)for(var o in n)if(n.hasOwnProperty(o)){var r=n[o];this.setCellMeta(e,t,o,r)}},this.setCellMeta=function(e,t,n,o){d.cellSettings[e]||(d.cellSettings[e]=[]),d.cellSettings[e][t]||(d.cellSettings[e][t]=new d.columnSettings[t]),d.cellSettings[e][t][n]=o,Handsontable.hooks.run(k,"afterSetCellMeta",e,t,n,o)},this.getCellMeta=function(e,t){var n,o=c.colToProp(t);if(e=a(e),t=l(t),d.columnSettings[t]||(d.columnSettings[t]=m.columnFactory(H,d.columnsSettingConflicts)),d.cellSettings[e]||(d.cellSettings[e]=[]),d.cellSettings[e][t]||(d.cellSettings[e][t]=new d.columnSettings[t]),n=d.cellSettings[e][t],n.row=e,n.col=t,n.prop=o,n.instance=k,Handsontable.hooks.run(k,"beforeGetCellMeta",e,t,n),m.extend(n,s(n)),n.cells){var r=n.cells.call(n,e,t,o);r&&(m.extend(n,r),m.extend(n,s(r)))}return Handsontable.hooks.run(k,"afterGetCellMeta",e,t,n),n},this.isColumnModificationAllowed=function(){return!("object"===k.dataType||k.getSettings().columns)};var O=m.cellMethodLookupFactory("renderer");this.getCellRenderer=function(e,t){var n=O.call(this,e,t);return R(n)},this.getCellEditor=m.cellMethodLookupFactory("editor"),this.getCellValidator=m.cellMethodLookupFactory("validator"),this.validateCells=function(e){var t=new n;t.onQueueEmpty=e;for(var o=k.countRows()-1;o>=0;){for(var r=k.countCols()-1;r>=0;)t.addValidatorToQueue(),k.validateCell(k.getDataAtCell(o,r),k.getCellMeta(o,r),function(){t.removeValidatorFormQueue()},"validateCells"),r--;o--}t.checkIfQueueIsEmpty()},this.getRowHeader=function(e){if(void 0===e){for(var t=[],n=0,o=k.countRows();o>n;n++)t.push(k.getRowHeader(n));return t}return Array.isArray(d.settings.rowHeaders)&&void 0!==d.settings.rowHeaders[e]?d.settings.rowHeaders[e]:"function"==typeof d.settings.rowHeaders?d.settings.rowHeaders(e):d.settings.rowHeaders&&"string"!=typeof d.settings.rowHeaders&&"number"!=typeof d.settings.rowHeaders?e+1:d.settings.rowHeaders},this.hasRowHeaders=function(){return!!d.settings.rowHeaders},this.hasColHeaders=function(){if(void 0!==d.settings.colHeaders&&null!==d.settings.colHeaders)return!!d.settings.colHeaders;for(var e=0,t=k.countCols();t>e;e++)if(k.getColHeader(e))return!0;return!1},this.getColHeader=function(e){if(void 0===e){for(var t=[],n=0,o=k.countCols();o>n;n++)t.push(k.getColHeader(n));return t}var r=e;return e=Handsontable.hooks.run(k,"modifyCol",e),d.settings.columns&&d.settings.columns[e]&&d.settings.columns[e].title?d.settings.columns[e].title:Array.isArray(d.settings.colHeaders)&&void 0!==d.settings.colHeaders[e]?d.settings.colHeaders[e]:"function"==typeof d.settings.colHeaders?d.settings.colHeaders(e):d.settings.colHeaders&&"string"!=typeof d.settings.colHeaders&&"number"!=typeof d.settings.colHeaders?m.spreadsheetColumnLabel(r):d.settings.colHeaders},this._getColWidthFromSettings=function(e){var t=k.getCellMeta(0,e),n=t.width;if((void 0===n||n===d.settings.width)&&(n=t.colWidths),void 0!==n&&null!==n){switch(typeof n){case"object":n=n[e];break;case"function":n=n(e)}"string"==typeof n&&(n=parseInt(n,10))}return n},this.getColWidth=function(e){var t=k._getColWidthFromSettings(e);return t||(t=50),t=Handsontable.hooks.run(k,"modifyColWidth",t,e)},this._getRowHeightFromSettings=function(e){var t=d.settings.rowHeights;if(void 0!==t&&null!==t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getRowHeight=function(e){var t=k._getRowHeightFromSettings(e);return t=Handsontable.hooks.run(k,"modifyRowHeight",t,e)},this.countRows=function(){return d.settings.data.length},this.countCols=function(){return"object"===k.dataType||"function"===k.dataType?d.settings.columns&&d.settings.columns.length?d.settings.columns.length:c.colToPropCache.length:"array"===k.dataType?d.settings.columns&&d.settings.columns.length?d.settings.columns.length:d.settings.data&&d.settings.data[0]&&d.settings.data[0].length?d.settings.data[0].length:0:void 0},this.rowOffset=function(){return k.view.wt.wtTable.getFirstRenderedRow()},this.colOffset=function(){return k.view.wt.wtTable.getFirstRenderedColumn()},this.countRenderedRows=function(){return k.view.wt.drawn?k.view.wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return k.view.wt.drawn?k.view.wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return k.view.wt.drawn?k.view.wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return k.view.wt.drawn?k.view.wt.wtTable.getVisibleColumnsCount():-1},this.countEmptyRows=function(e){for(var t,n=k.countRows()-1,o=0;n>=0;){if(t=Handsontable.hooks.run(this,"modifyRow",n),k.isEmptyRow(t))o++;else if(e)break;n--}return o},this.countEmptyCols=function(e){if(k.countRows()<1)return 0;for(var t=k.countCols()-1,n=0;t>=0;){if(k.isEmptyCol(t))n++;else if(e)break;t--}return n},this.isEmptyRow=function(e){return d.settings.isEmptyRow.call(k,e)},this.isEmptyCol=function(e){return d.settings.isEmptyCol.call(k,e)},this.selectCell=function(e,t,n,o,r,i){var s;if(i="undefined"==typeof i||i===!0,"number"!=typeof e||0>e||e>=k.countRows())return!1;if("number"!=typeof t||0>t||t>=k.countCols())return!1;if("undefined"!=typeof n){if("number"!=typeof n||0>n||n>=k.countRows())return!1;if("number"!=typeof o||0>o||o>=k.countCols())return!1}return s=new E(e,t),d.selRange=new T(s,s,s),document.activeElement&&document.activeElement!==document.documentElement&&document.activeElement!==document.body&&document.activeElement.blur(),i&&k.listen(),"undefined"==typeof n?f.setRangeEnd(d.selRange.from,r):f.setRangeEnd(new E(n,o),r),k.selection.finish(),!0},this.selectCellByProp=function(e,t,n,o,r){return arguments[1]=c.propToCol(arguments[1]),"undefined"!=typeof arguments[3]&&(arguments[3]=c.propToCol(arguments[3])),k.selectCell.apply(k,arguments)},this.deselectCell=function(){f.deselect()},this.destroy=function(){k._clearTimeouts(),k.view&&k.view.destroy(),g.empty(k.rootElement),M.clear(),Handsontable.hooks.run(k,"afterDestroy"),Handsontable.hooks.destroy(k);for(var e in k)k.hasOwnProperty(e)&&("function"==typeof k[e]?"runHooks"!==e&&(k[e]=u):"guid"!==e&&(k[e]=null));d=null,c=null,h=null,f=null,p=null,k=null,H=null},this.getActiveEditor=function(){return p.getActiveEditor()},this.getPlugin=function(e){return C(this,e)},this.getInstance=function(){return k},this.addHook=function(e,t){Handsontable.hooks.add(e,t,k)},this.addHookOnce=function(e,t){Handsontable.hooks.once(e,t,k)},this.removeHook=function(e,t){Handsontable.hooks.remove(e,t,k)},this.runHooks=function(e,t,n,o,r,i,s){return Handsontable.hooks.run(k,e,t,n,o,r,i,s)},this.timeouts=[],this._registerTimeout=function(e){this.timeouts.push(e)},this._clearTimeouts=function(){for(var e=0,t=this.timeouts.length;t>e;e++)clearTimeout(this.timeouts[e])},this.version=Handsontable.version};var _=function(){};_.prototype={data:void 0,dataSchema:void 0,width:void 0,height:void 0,startRows:5,startCols:5,rowHeaders:null,colHeaders:null,colWidths:void 0,columns:void 0,cells:void 0,cell:[],comments:!1,customBorders:!1,minRows:0,minCols:0,maxRows:1/0,maxCols:1/0,minSpareRows:0,minSpareCols:0,allowInsertRow:!0,allowInsertColumn:!0,allowRemoveRow:!0,allowRemoveColumn:!0,multiSelect:!0,fillHandle:!0,fixedRowsTop:0,fixedColumnsLeft:0,outsideClickDeselects:!0,enterBeginsEditing:!0,enterMoves:{row:1,col:0},tabMoves:{row:0,col:1},autoWrapRow:!1,autoWrapCol:!1,copyRowsLimit:1e3,copyColsLimit:1e3,pasteMode:"overwrite",persistentState:!1,currentRowClassName:void 0,currentColClassName:void 0,stretchH:"none",isEmptyRow:function(e){var t,n,o,r;for(t=0,n=this.countCols();n>t;t++)if(o=this.getDataAtCell(e,t),""!==o&&null!==o&&"undefined"!=typeof o)return"object"==typeof o?(r=this.getCellMeta(e,t),m.isObjectEquals(this.getSchema()[r.prop],o)):!1;return!0},isEmptyCol:function(e){var t,n,o;for(t=0,n=this.countRows();n>t;t++)if(o=this.getDataAtCell(t,e),""!==o&&null!==o&&"undefined"!=typeof o)return!1;return!0},observeDOMVisibility:!0,allowInvalid:!0,invalidCellClassName:"htInvalid",placeholder:!1,placeholderCellClassName:"htPlaceholder",readOnlyCellClassName:"htDimmed",renderer:void 0,commentedCellClassName:"htCommentCell",fragmentSelection:!1,readOnly:!1,search:!1,type:"text",copyable:!0,editor:void 0,autoComplete:void 0,debug:!1,wordWrap:!0,noWordWrapClassName:"htNoWrap",contextMenu:void 0,undo:void 0,columnSorting:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,mergeCells:!1,viewportRowRenderingOffset:10,viewportColumnRenderingOffset:10,groups:void 0,validator:void 0,disableVisualSelection:!1,sortIndicator:!1,manualColumnFreeze:void 0,trimWhitespace:!0,settings:void 0,source:void 0,title:void 0,checkedTemplate:void 0,uncheckedTemplate:void 0,format:void 0,className:void 0},Handsontable.DefaultSettings=_},{"./3rdparty/walkontable/src/cell/coords.js":5,"./3rdparty/walkontable/src/cell/range.js":6,"./3rdparty/walkontable/src/selection.js":18,"./dataMap.js":26,"./dom.js":27,"./editorManager.js":28,"./eventManager.js":41,"./helpers.js":42,"./plugins.js":45,"./renderers.js":70,"./tableView.js":85,numeral:"numeral"}],26:[function(e,t,n){"use strict";function o(e,t,n){this.instance=e,this.priv=t,this.GridSettings=n,this.dataSource=this.instance.getSettings().data,this.dataSource[0]?this.duckSchema=this.recursiveDuckSchema(this.dataSource[0]):this.duckSchema={},this.createMap()}Object.defineProperties(n,{DataMap:{get:function(){return o}},__esModule:{value:!0}});var r,i,s,a=(r=e("./helpers.js"),r&&r.__esModule&&r||{"default":r}),l=(i=e("./multiMap.js"),i&&i.__esModule&&i||{"default":i}).MultiMap,u=(s=e("SheetClip"),s&&s.__esModule&&s||{"default":s})["default"];Handsontable.DataMap=o,o.prototype.DESTINATION_RENDERER=1,o.prototype.DESTINATION_CLIPBOARD_GENERATOR=2,o.prototype.recursiveDuckSchema=function(e){return Handsontable.helper.duckSchema(e)},o.prototype.recursiveDuckColumns=function(e,t,n){var o,r;if("undefined"==typeof t&&(t=0,n=""),"object"==typeof e&&!Array.isArray(e))for(r in e)e.hasOwnProperty(r)&&(null===e[r]?(o=n+r,this.colToPropCache.push(o),this.propToColCache.set(o,t),t++):t=this.recursiveDuckColumns(e[r],t,r+"."));return t},o.prototype.createMap=function(){var e,t,n=this.getSchema();if("undefined"==typeof n)throw new Error("trying to create `columns` definition but you didnt' provide `schema` nor `data`");this.colToPropCache=[],this.propToColCache=new l;var o=this.instance.getSettings().columns;if(o)for(e=0,t=o.length;t>e;e++)"undefined"!=typeof o[e].data&&(this.colToPropCache[e]=o[e].data,this.propToColCache.set(o[e].data,e));else this.recursiveDuckColumns(n)},o.prototype.colToProp=function(e){return e=Handsontable.hooks.run(this.instance,"modifyCol",e),this.colToPropCache&&"undefined"!=typeof this.colToPropCache[e]?this.colToPropCache[e]:e},o.prototype.propToCol=function(e){var t;return t="undefined"!=typeof this.propToColCache.get(e)?this.propToColCache.get(e):e,t=Handsontable.hooks.run(this.instance,"modifyCol",t)},o.prototype.getSchema=function(){var e=this.instance.getSettings().dataSchema;return e?"function"==typeof e?e():e:this.duckSchema},o.prototype.createRow=function(e,t,n){var o,r,i=this.instance.countCols(),s=0;t||(t=1),("number"!=typeof e||e>=this.instance.countRows())&&(e=this.instance.countRows()),r=e;for(var l=this.instance.getSettings().maxRows;t>s&&this.instance.countRows()<l;){if("array"===this.instance.dataType){o=[];for(var u=0;i>u;u++)o.push(null)}else"function"===this.instance.dataType?o=this.instance.getSettings().dataSchema(e):(o={},a.deepExtend(o,this.getSchema()));e===this.instance.countRows()?this.dataSource.push(o):this.dataSource.splice(e,0,o),s++,r++}return Handsontable.hooks.run(this.instance,"afterCreateRow",e,s,n),this.instance.forceFullRender=!0,s},o.prototype.createCol=function(e,t,n){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 o,r,i=this.instance.countRows(),s=this.dataSource,l=0;t||(t=1),r=e;for(var u=this.instance.getSettings().maxCols;t>l&&this.instance.countCols()<u;){if(o=a.columnFactory(this.GridSettings,this.priv.columnsSettingConflicts),"number"!=typeof e||e>=this.instance.countCols()){for(var d=0;i>d;d++)"undefined"==typeof s[d]&&(s[d]=[]),s[d].push(null);this.priv.columnSettings.push(o)}else{for(var d=0;i>d;d++)s[d].splice(r,0,null);this.priv.columnSettings.splice(r,0,o)}l++,r++}return Handsontable.hooks.run(this.instance,"afterCreateCol",e,l,n),this.instance.forceFullRender=!0,l},o.prototype.removeRow=function(e,t){t||(t=1),"number"!=typeof e&&(e=-t),e=(this.instance.countRows()+e)%this.instance.countRows();var n=this.physicalRowsToLogical(e,t),o=Handsontable.hooks.run(this.instance,"beforeRemoveRow",e,t);if(o!==!1){var r=this.dataSource,i=r.filter(function(e,t){return-1==n.indexOf(t)});r.length=0,Array.prototype.push.apply(r,i),Handsontable.hooks.run(this.instance,"afterRemoveRow",e,t),this.instance.forceFullRender=!0}},o.prototype.removeCol=function(e,t){if("object"===this.instance.dataType||this.instance.getSettings().columns)throw new Error("cannot remove column with object data source or columns option specified");t||(t=1),"number"!=typeof e&&(e=-t),e=(this.instance.countCols()+e)%this.instance.countCols();var n=Handsontable.hooks.run(this.instance,"beforeRemoveCol",e,t);if(n!==!1){for(var o=this.dataSource,r=0,i=this.instance.countRows();i>r;r++)o[r].splice(e,t);this.priv.columnSettings.splice(e,t),Handsontable.hooks.run(this.instance,"afterRemoveCol",e,t),this.instance.forceFullRender=!0}},o.prototype.spliceCol=function(e,t,n){var o=4<=arguments.length?[].slice.call(arguments,3):[],r=this.instance.getDataAtCol(e),i=r.slice(t,t+n),s=r.slice(t+n);a.extendArray(o,s);for(var l=0;n>l;)o.push(null),l++;return a.to2dArray(o),this.instance.populateFromArray(t,e,o,null,null,"spliceCol"),i},o.prototype.spliceRow=function(e,t,n){var o=4<=arguments.length?[].slice.call(arguments,3):[],r=this.instance.getSourceDataAtRow(e),i=r.slice(t,t+n),s=r.slice(t+n);a.extendArray(o,s);for(var l=0;n>l;)o.push(null),l++;return this.instance.populateFromArray(e,t,[o],null,null,"spliceRow"),i},o.prototype.get=function(e,t){if(e=Handsontable.hooks.run(this.instance,"modifyRow",e),"string"==typeof t&&t.indexOf(".")>-1){var n=t.split("."),o=this.dataSource[e];if(!o)return null;for(var r=0,i=n.length;i>r;r++)if(o=o[n[r]],"undefined"==typeof o)return null;return o}return"function"==typeof t?t(this.dataSource.slice(e,e+1)[0]):this.dataSource[e]?this.dataSource[e][t]:null};var d=a.cellMethodLookupFactory("copyable",!1);o.prototype.getCopyable=function(e,t){return d.call(this.instance,e,this.propToCol(t))?this.get(e,t):""},o.prototype.set=function(e,t,n,o){if(e=Handsontable.hooks.run(this.instance,"modifyRow",e,o||"datamapGet"),"string"==typeof t&&t.indexOf(".")>-1){for(var r=t.split("."),i=this.dataSource[e],s=0,a=r.length-1;a>s;s++)"undefined"==typeof i[r[s]]&&(i[r[s]]={}),i=i[r[s]];i[r[s]]=n}else"function"==typeof t?t(this.dataSource.slice(e,e+1)[0],n):this.dataSource[e][t]=n},o.prototype.physicalRowsToLogical=function(e,t){for(var n,o=this.instance.countRows(),r=(o+e)%o,i=[],s=t;o>r&&s;)n=Handsontable.hooks.run(this.instance,"modifyRow",r),i.push(n),s--,r++;return i},o.prototype.clear=function(){for(var e=0;e<this.instance.countRows();e++)for(var t=0;t<this.instance.countCols();t++)this.set(e,this.colToProp(t),"")},o.prototype.getAll=function(){return this.dataSource},o.prototype.getRange=function(e,t,n){var o,r,i,s,a,l=[],u=n===this.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get;for(r=Math.max(e.row,t.row),s=Math.max(e.col,t.col),o=Math.min(e.row,t.row);r>=o;o++){for(a=[],i=Math.min(e.col,t.col);s>=i;i++)a.push(u.call(this,o,this.colToProp(i)));l.push(a)}return l},o.prototype.getText=function(e,t){return u.stringify(this.getRange(e,t,this.DESTINATION_RENDERER))},o.prototype.getCopyableText=function(e,t){return u.stringify(this.getRange(e,t,this.DESTINATION_CLIPBOARD_GENERATOR))}},{"./helpers.js":42,"./multiMap.js":43,SheetClip:"SheetClip"}],27:[function(e,t,n){"use strict";function o(e){null!=e&&null==e.isImmediatePropagationEnabled&&(e.stopImmediatePropagation=function(){this.isImmediatePropagationEnabled=!1,this.cancelBubble=!0},e.isImmediatePropagationEnabled=!0,e.isImmediatePropagationStopped=function(){return!this.isImmediatePropagationEnabled})}function r(e,t,n){for(;null!=e&&e!==n;){if(e.nodeType===Node.ELEMENT_NODE&&(t.indexOf(e.nodeName)>-1||t.indexOf(e)>-1))return e;e=e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.host:e.parentNode}return null}function i(e,t){var n=e.parentNode,o=[];for("string"==typeof t?o=Array.prototype.slice.call(document.querySelectorAll(t),0):o.push(t);null!=n;){if(o.indexOf(n)>-1)return!0;n=n.parentNode}return!1}function s(e){function t(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName===o.toUpperCase()}var n,o="hot-table",r=!1;for(n=a(e);null!=n;){if(t(n)){r=!0;break}if(n.host&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(r=t(n.host))break;n=n.host}n=n.parentNode}return r}function a(e){return"undefined"!=typeof Polymer&&"function"==typeof wrap?wrap(e):e}function l(e){return"undefined"!=typeof Polymer&&"function"==typeof unwrap?unwrap(e):e}function u(){var e=document.createElement("div");return e.createShadowRoot&&e.createShadowRoot.toString().match(/\[native code\]/)?!0:!1}function d(e){var t=0;if(e.previousSibling)for(;e=e.previousSibling;)++t;return t}function c(e){var t=0,n=[];if(!e||!e.length)return n;for(;e[t];)n.push(e[t]),t++;return n}function h(e,t){return X(e,t)}function f(e,t){return K(e,t)}function p(e,t){return q(e,t)}function g(e,t){if(3===e.nodeType)t.removeChild(e);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(e.nodeName)>-1)for(var n=e.childNodes,o=n.length-1;o>=0;o--)g(n[o],e)}function m(e){for(var t;t=e.lastChild;)e.removeChild(t)}function w(e,t){ne.test(t)?e.innerHTML=t:v(e,t)}function v(e,t){var n=e.firstChild;n&&3===n.nodeType&&null===n.nextSibling?oe?n.textContent=t:n.data=t:(m(e),e.appendChild(document.createTextNode(t)))}function y(e){for(var t=e;l(t)!==document.documentElement;){if(null===t)return!1;if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(t.host){if(t.host.impl)return y(t.host.impl);if(t.host)return y(t.host);throw new Error("Lost in Web Components world")}return!1}if("none"===t.style.display)return!1;t=t.parentNode}return!0}function b(e){var t,n,o,r,i;if(r=document.documentElement,N()&&e.firstChild&&"CAPTION"===e.firstChild.nodeName)return i=e.getBoundingClientRect(),{top:i.top+(window.pageYOffset||r.scrollTop)-(r.clientTop||0),left:i.left+(window.pageXOffset||r.scrollLeft)-(r.clientLeft||0)};for(t=e.offsetLeft,n=e.offsetTop,o=e;(e=e.offsetParent)&&e!==document.body;)t+=e.offsetLeft,n+=e.offsetTop,o=e;return o&&"fixed"===o.style.position&&(t+=window.pageXOffset||r.scrollLeft,n+=window.pageYOffset||r.scrollTop),{left:t,top:n}}function C(){var e=window.scrollY;return void 0==e&&(e=document.documentElement.scrollTop),e}function R(){var e=window.scrollX;return void 0==e&&(e=document.documentElement.scrollLeft),e}function S(e){return e===window?C(e):e.scrollTop}function E(e){return e===window?R(e):e.scrollLeft}function T(e){for(var t,n,o,r=e.parentNode,i=["auto","scroll"],s="",a="",l="",u="";r&&r.style&&document.body!==r;){if(t=r.style.overflow,n=r.style.overflowX,o=r.style.overflowY,"scroll"==t||"scroll"==n||"scroll"==o)return r;if(window.getComputedStyle&&(s=window.getComputedStyle(r),a=s.getPropertyValue("overflow"),l=s.getPropertyValue("overflow-y"),u=s.getPropertyValue("overflow-x"),"scroll"===a||"scroll"===u||"scroll"===l))return r;if(r.clientHeight<=r.scrollHeight&&(-1!==i.indexOf(o)||-1!==i.indexOf(t)||-1!==i.indexOf(a)||-1!==i.indexOf(l)))return r;if(r.clientWidth<=r.scrollWidth&&(-1!==i.indexOf(n)||-1!==i.indexOf(t)||-1!==i.indexOf(a)||-1!==i.indexOf(u)))return r;r=r.parentNode}return window}function _(e){for(var t=e.parentNode;t&&t.style&&document.body!==t;){if("visible"!==t.style.overflow&&""!==t.style.overflow)return t;if(window.getComputedStyle){var n=window.getComputedStyle(t);if("visible"!==n.getPropertyValue("overflow")&&""!==n.getPropertyValue("overflow"))return t}t=t.parentNode}return window}function k(e,t){if(e){if(e!==window){var n,o=e.style[t];return""!==o&&void 0!==o?o:(n=H(e),""!==n[t]&&void 0!==n[t]?n[t]:void 0)}if("width"===t)return window.innerWidth+"px";if("height"===t)return window.innerHeight+"px"}}function H(e){return e.currentStyle||document.defaultView.getComputedStyle(e)}function M(e){return e.offsetWidth}function O(e){return N()&&e.firstChild&&"CAPTION"===e.firstChild.nodeName?e.offsetHeight+e.firstChild.offsetHeight:e.offsetHeight}function D(e){return e.clientHeight||e.innerHeight}function x(e){return e.clientWidth||e.innerWidth}function A(e,t,n){window.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function j(e,t,n){window.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)}function P(){var e=document.createElement("TABLE");e.style.borderSpacing=0,e.style.borderWidth=0,e.style.padding=0;var t=document.createElement("TBODY");e.appendChild(t),t.appendChild(document.createElement("TR")),t.firstChild.appendChild(document.createElement("TD")),t.firstChild.firstChild.innerHTML="<tr><td>t<br>t</td></tr>";var n=document.createElement("CAPTION");n.innerHTML="c<br>c<br>c<br>c",n.style.padding=0,n.style.margin=0,e.insertBefore(n,t),document.body.appendChild(e),ee=e.offsetHeight<2*e.lastChild.offsetHeight,document.body.removeChild(e)}function N(){return void 0===ee&&P(),ee}function L(e){if(e.selectionStart)return e.selectionStart;if(document.selection){e.focus();var t=document.selection.createRange();if(null==t)return 0;var n=e.createTextRange(),o=n.duplicate();return n.moveToBookmark(t.getBookmark()),o.setEndPoint("EndToStart",n),o.text.length}return 0}function W(e){if(e.selectionEnd)return e.selectionEnd;if(document.selection){var t=document.selection.createRange();if(null==t)return 0;var n=e.createTextRange();return n.text.indexOf(t.text)+t.text.length}}function I(e,t,n){if(void 0===n&&(n=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,n)}catch(o){var r=e.parentNode,i=r.style.display;r.style.display="block",e.setSelectionRange(t,n),r.style.display=i}}else if(e.createTextRange){var s=e.createTextRange();s.collapse(!0),s.moveEnd("character",n),s.moveStart("character",t),s.select()}}function B(){var e=document.createElement("p");e.style.width="100%",e.style.height="200px";var t=document.createElement("div");t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(e),(document.body||document.documentElement).appendChild(t);var n=e.offsetWidth;t.style.overflow="scroll";var o=e.offsetWidth;return n==o&&(o=t.clientWidth),(document.body||document.documentElement).removeChild(t),n-o}function V(){return void 0===te&&(te=B()),te}function F(){return F}function Y(){return ie}function G(){return se}function z(e,t,n){re||ie?(e.style.top=n,e.style.left=t):se?e.style["-webkit-transform"]="translate3d("+t+","+n+",0)":e.style.transform="translate3d("+t+","+n+",0)";
}function U(e){var t;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:e.style["-webkit-transform"]&&""!==(t=e.style["-webkit-transform"])?["-webkit-transform",t]:-1}function $(e){e.transform&&""!==e.transform?e.transform="":e["-webkit-transform"]&&""!==e["-webkit-transform"]&&(e["-webkit-transform"]="")}Object.defineProperties(n,{enableImmediatePropagation:{get:function(){return o}},closest:{get:function(){return r}},isChildOf:{get:function(){return i}},isChildOfWebComponentTable:{get:function(){return s}},polymerWrap:{get:function(){return a}},polymerUnwrap:{get:function(){return l}},isWebComponentSupportedNatively:{get:function(){return u}},index:{get:function(){return d}},hasClass:{get:function(){return h}},addClass:{get:function(){return f}},removeClass:{get:function(){return p}},removeTextNodes:{get:function(){return g}},empty:{get:function(){return m}},HTML_CHARACTERS:{get:function(){return ne}},fastInnerHTML:{get:function(){return w}},fastInnerText:{get:function(){return v}},isVisible:{get:function(){return y}},offset:{get:function(){return b}},getWindowScrollTop:{get:function(){return C}},getWindowScrollLeft:{get:function(){return R}},getScrollTop:{get:function(){return S}},getScrollLeft:{get:function(){return E}},getScrollableElement:{get:function(){return T}},getTrimmingContainer:{get:function(){return _}},getStyle:{get:function(){return k}},getComputedStyle:{get:function(){return H}},outerWidth:{get:function(){return M}},outerHeight:{get:function(){return O}},innerHeight:{get:function(){return D}},innerWidth:{get:function(){return x}},addEvent:{get:function(){return A}},removeEvent:{get:function(){return j}},hasCaptionProblem:{get:function(){return N}},getCaretPosition:{get:function(){return L}},getSelectionEndPosition:{get:function(){return W}},setCaretPosition:{get:function(){return I}},getScrollbarWidth:{get:function(){return V}},isIE8:{get:function(){return F}},isIE9:{get:function(){return Y}},isSafari:{get:function(){return G}},setOverlayPosition:{get:function(){return z}},getCssTransform:{get:function(){return U}},resetCssTransform:{get:function(){return $}},__esModule:{value:!0}});var X,K,q,Z=document.documentElement.classList?!0:!1;if(Z){var J=function(){var e=document.createElement("div");return e.classList.add("test","test2"),e.classList.contains("test2")}();X=function(e,t){return""===t?!1:e.classList.contains(t)},K=function(e,t){var n=0;if("string"==typeof t&&(t=t.split(" ")),t=c(t),J)e.classList.add.apply(e.classList,t);else for(;t&&t[n];)e.classList.add(t[n]),n++},q=function(e,t){var n=0;if("string"==typeof t&&(t=t.split(" ")),t=c(t),J)e.classList.remove.apply(e.classList,t);else for(;t&&t[n];)e.classList.remove(t[n]),n++}}else{var Q=function(e){return new RegExp("(\\s|^)"+e+"(\\s|$)")};X=function(e,t){return e.className.match(Q(t))?!0:!1},K=function(e,t){var n=0,o=e.className;if("string"==typeof t&&(t=t.split(" ")),""===o)o=t.join(" ");else for(;t&&t[n];)Q(t[n]).test(o)||(o+=" "+t[n]),n++;e.className=o},q=function(e,t){var n=0,o=e.className;for("string"==typeof t&&(t=t.split(" "));t&&t[n];)o=o.replace(Q(t[n])," ").trim(),n++;e.className!==o&&(e.className=o)}}var ee,te,ne=/(<(.*)>|&(.*);)/,oe=document.createTextNode("test").textContent?!0:!1,re=!document.createTextNode("test").textContent,ie=!!document.documentMode,se=/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor);window.Handsontable=window.Handsontable||{},Handsontable.Dom={addClass:f,addEvent:A,closest:r,empty:m,enableImmediatePropagation:o,fastInnerHTML:w,fastInnerText:v,getCaretPosition:L,getComputedStyle:H,getCssTransform:U,getScrollableElement:T,getScrollbarWidth:V,getScrollLeft:E,getScrollTop:S,getStyle:k,getSelectionEndPosition:W,getTrimmingContainer:_,getWindowScrollLeft:R,getWindowScrollTop:C,hasCaptionProblem:N,hasClass:h,HTML_CHARACTERS:ne,index:d,innerHeight:D,innerWidth:x,isChildOf:i,isChildOfWebComponentTable:s,isIE8:F,isIE9:Y,isSafari:G,isVisible:y,isWebComponentSupportedNatively:u,offset:b,outerHeight:O,outerWidth:M,polymerUnwrap:l,polymerWrap:a,removeClass:p,removeEvent:j,removeTextNodes:g,resetCssTransform:$,setCaretPosition:I,setOverlayPosition:z}},{}],28:[function(e,t,n){"use strict";function o(e,t,n){function o(e){var o="function"==typeof t.settings.enterMoves?t.settings.enterMoves(event):t.settings.enterMoves;e?n.transformStart(-o.row,-o.col):n.transformStart(o.row,o.col,!0)}function r(e){e?n.transformEnd(-1,0):n.transformStart(-1,0)}function i(e){e?n.transformEnd(1,0):n.transformStart(1,0)}function s(e){e?n.transformEnd(0,1):n.transformStart(0,1)}function a(e){e?n.transformEnd(0,-1):n.transformStart(0,-1)}function l(l){var h,f;if(e.isListening()&&(Handsontable.hooks.run(e,"beforeKeyDown",l),!v&&(c.enableImmediatePropagation(l),!l.isImmediatePropagationStopped()&&(t.lastKeyCode=l.keyCode,n.isSelected())))){if(h=(l.ctrlKey||l.metaKey)&&!l.altKey,g&&!g.isWaiting()&&!d.isMetaKey(l.keyCode)&&!h&&!m.isEditorOpened())return void m.openEditor("",l);switch(f=l.shiftKey?n.setRangeEnd:n.setRangeStart,l.keyCode){case w.A:!m.isEditorOpened()&&h&&(n.selectAll(),l.preventDefault(),d.stopPropagation(l));break;case w.ARROW_UP:m.isEditorOpened()&&!g.isWaiting()&&m.closeEditorAndSaveChanges(h),r(l.shiftKey),l.preventDefault(),d.stopPropagation(l);break;case w.ARROW_DOWN:m.isEditorOpened()&&!g.isWaiting()&&m.closeEditorAndSaveChanges(h),i(l.shiftKey),l.preventDefault(),d.stopPropagation(l);break;case w.ARROW_RIGHT:m.isEditorOpened()&&!g.isWaiting()&&m.closeEditorAndSaveChanges(h),s(l.shiftKey),l.preventDefault(),d.stopPropagation(l);break;case w.ARROW_LEFT:m.isEditorOpened()&&!g.isWaiting()&&m.closeEditorAndSaveChanges(h),a(l.shiftKey),l.preventDefault(),d.stopPropagation(l);break;case w.TAB:var p="function"==typeof t.settings.tabMoves?t.settings.tabMoves(l):t.settings.tabMoves;l.shiftKey?n.transformStart(-p.row,-p.col):n.transformStart(p.row,p.col,!0),l.preventDefault(),d.stopPropagation(l);break;case w.BACKSPACE:case w.DELETE:n.empty(l),m.prepareEditor(),l.preventDefault();break;case w.F2:m.openEditor(null,l),l.preventDefault();break;case w.ENTER:m.isEditorOpened()?(g&&g.state!==Handsontable.EditorState.WAITING&&m.closeEditorAndSaveChanges(h),o(l.shiftKey)):e.getSettings().enterBeginsEditing?m.openEditor(null,l):o(l.shiftKey),l.preventDefault(),l.stopImmediatePropagation();break;case w.ESCAPE:m.isEditorOpened()&&m.closeEditorAndRestoreOriginalValue(h),l.preventDefault();break;case w.HOME:f(l.ctrlKey||l.metaKey?new u(0,t.selRange.from.col):new u(t.selRange.from.row,0)),l.preventDefault(),d.stopPropagation(l);break;case w.END:f(l.ctrlKey||l.metaKey?new u(e.countRows()-1,t.selRange.from.col):new u(t.selRange.from.row,e.countCols()-1)),l.preventDefault(),d.stopPropagation(l);break;case w.PAGE_UP:n.transformStart(-e.countVisibleRows(),0),l.preventDefault(),d.stopPropagation(l);break;case w.PAGE_DOWN:n.transformStart(e.countVisibleRows(),0),l.preventDefault(),d.stopPropagation(l)}}}function f(){function t(e,t,n){"TD"==n.nodeName&&m.openEditor()}e.addHook("afterDocumentKeyDown",l),p.addEventListener(document.documentElement,"keydown",function(t){e.runHooks("afterDocumentKeyDown",t)}),e.view.wt.update("onCellDblClick",t),e.addHook("afterDestroy",function(){v=!0})}var p,g,m=this,w=d.keyCode,v=!1;p=h(e),this.destroyEditor=function(e){this.closeEditor(e)},this.getActiveEditor=function(){return g},this.prepareEditor=function(){var n,o,r,i,s,a,l;return g&&g.isWaiting()?void this.closeEditor(!1,!1,function(e){e&&m.prepareEditor()}):(n=t.selRange.highlight.row,o=t.selRange.highlight.col,r=e.colToProp(o),i=e.getCell(n,o),s=e.getDataAtCell(n,o),a=e.getCellMeta(n,o),l=e.getCellEditor(a),void(l?(g=Handsontable.editors.getEditor(l,e),g.prepare(n,o,r,i,s,a)):g=void 0))},this.isEditorOpened=function(){return g&&g.isOpened()},this.openEditor=function(e,t){g&&!g.cellProperties.readOnly?g.beginEditing(e,t):g&&g.cellProperties.readOnly&&t&&t.keyCode===d.keyCode.ENTER&&o()},this.closeEditor=function(e,t,n){g?g.finishEditing(e,t,n):n&&n(!1)},this.closeEditorAndSaveChanges=function(e){return this.closeEditor(!1,e)},this.closeEditorAndRestoreOriginalValue=function(e){return this.closeEditor(!0,e)},f()}Object.defineProperties(n,{EditorManager:{get:function(){return o}},__esModule:{value:!0}});var r,i,s,a,l,u=(r=e("./3rdparty/walkontable/src/cell/coords.js"),r&&r.__esModule&&r||{"default":r}).WalkontableCellCoords,d=(i=e("./helpers.js"),i&&i.__esModule&&i||{"default":i}),c=(s=e("./dom.js"),s&&s.__esModule&&s||{"default":s}),h=((a=e("./editors.js"),a&&a.__esModule&&a||{"default":a}).getEditor,(l=e("./eventManager.js"),l&&l.__esModule&&l||{"default":l}).eventManager);Handsontable.EditorManager=o},{"./3rdparty/walkontable/src/cell/coords.js":5,"./dom.js":27,"./editors.js":29,"./eventManager.js":41,"./helpers.js":42}],29:[function(e,t,n){"use strict";function o(e){var t,n;n={},t=e,this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in n||(n[e.guid]=new t(e)),n[e.guid]}}function r(e,t){var n=new o(t);"string"==typeof e&&(d[e]=n,Handsontable.editors[u.toUpperCaseFirst(e)+"Editor"]=t),c.set(t,n)}function i(e,t){var n;if("function"==typeof e)c.get(e)||r(null,e),n=c.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter ');n=d[e]}if(!n)throw Error('No editor registered under name "'+e+'"');return n.getInstance(t)}function s(e){var t;if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter ');if(t=d[e],!t)throw Error('No editor registered under name "'+e+'"');return t.getConstructor()}function a(e){return d[e]?!0:!1}Object.defineProperties(n,{registerEditor:{get:function(){return r}},getEditor:{get:function(){return i}},hasEditor:{get:function(){return a}},getEditorConstructor:{get:function(){return s}},__esModule:{value:!0}});var l,u=(l=e("./helpers.js"),l&&l.__esModule&&l||{"default":l}),d={},c=new WeakMap;Handsontable.editors=Handsontable.editors||{},Handsontable.editors.registerEditor=r,Handsontable.editors.getEditor=i},{"./helpers.js":42}],30:[function(e,t,n){"use strict";function o(e){this.instance=e,this.state=Handsontable.EditorState.VIRGIN,this._opened=!1,this._closeCallback=null,this.init()}Object.defineProperties(n,{BaseEditor:{get:function(){return o}},__esModule:{value:!0}});var r,i,s=(r=e("./../helpers.js"),r&&r.__esModule&&r||{"default":r}),a=(i=e("./../3rdparty/walkontable/src/cell/coords.js"),i&&i.__esModule&&i||{"default":i}).WalkontableCellCoords;Handsontable.editors=Handsontable.editors||{},Handsontable.editors.BaseEditor=o,Handsontable.EditorState={VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"},o.prototype._fireCallbacks=function(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)},o.prototype.init=function(){},o.prototype.getValue=function(){throw Error("Editor getValue() method unimplemented")},o.prototype.setValue=function(e){throw Error("Editor setValue() method unimplemented")},o.prototype.open=function(){throw Error("Editor open() method unimplemented")},o.prototype.close=function(){throw Error("Editor close() method unimplemented")},o.prototype.prepare=function(e,t,n,o,r,i){this.TD=o,this.row=e,this.col=t,this.prop=n,this.originalValue=r,this.cellProperties=i,this.state=Handsontable.EditorState.VIRGIN},o.prototype.extend=function(){function e(){n.apply(this,arguments)}function t(e,t){function n(){}return n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e,e}var n=this.constructor;return t(e,n)},o.prototype.saveValue=function(e,t){var n,o;t?(n=this.instance.getSelected(),n[0]>n[2]&&(o=n[0],n[0]=n[2],n[2]=o),n[1]>n[3]&&(o=n[1],n[1]=n[3],n[3]=o),this.instance.populateFromArray(n[0],n[1],e,n[2],n[3],"edit")):this.instance.populateFromArray(this.row,this.col,e,null,null,"edit")},o.prototype.beginEditing=function(e,t){this.state==Handsontable.EditorState.VIRGIN&&(this.instance.view.scrollViewport(new a(this.row,this.col)),this.instance.view.render(),this.state=Handsontable.EditorState.EDITING,e="string"==typeof e?e:this.originalValue,this.setValue(s.stringify(e)),this.open(t),this._opened=!0,this.focus(),this.instance.view.render())},o.prototype.finishEditing=function(e,t,n){var o,r=this;if(n){var i=this._closeCallback;this._closeCallback=function(e){i&&i(e),n(e)}}if(!this.isWaiting()){if(this.state==Handsontable.EditorState.VIRGIN)return void this.instance._registerTimeout(setTimeout(function(){r._fireCallbacks(!0)},0));if(this.state==Handsontable.EditorState.EDITING){if(e)return this.cancelChanges(),void this.instance.view.render();o=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(o,t),this.instance.getCellValidator(this.cellProperties)?this.instance.addHookOnce("postAfterValidate",function(e){r.state=Handsontable.EditorState.FINISHED,r.discardEditor(e)}):(this.state=Handsontable.EditorState.FINISHED,this.discardEditor(!0))}}},o.prototype.cancelChanges=function(){this.state=Handsontable.EditorState.FINISHED,this.discardEditor()},o.prototype.discardEditor=function(e){this.state===Handsontable.EditorState.FINISHED&&(e===!1&&this.cellProperties.allowInvalid!==!0?(this.instance.selectCell(this.row,this.col),this.focus(),this.state=Handsontable.EditorState.EDITING,this._fireCallbacks(!1)):(this.close(),this._opened=!1,this.state=Handsontable.EditorState.VIRGIN,this._fireCallbacks(!0)))},o.prototype.isOpened=function(){return this._opened},o.prototype.isWaiting=function(){return this.state===Handsontable.EditorState.WAITING}},{"./../3rdparty/walkontable/src/cell/coords.js":5,"./../helpers.js":42}],31:[function(e,t,n){"use strict";function o(e){p=!1;var t=this.getActiveEditor(),n=l.keyCode;if(l.isPrintableChar(e.keyCode)||e.keyCode===n.BACKSPACE||e.keyCode===n.DELETE||e.keyCode===n.INSERT){var o=0;if(e.keyCode===n.C&&(e.ctrlKey||e.metaKey))return;t.isOpened()||(o+=10),t.instance._registerTimeout(setTimeout(function(){t.queryChoices(t.TEXTAREA.value),p=!0},o))}}Object.defineProperties(n,{AutocompleteEditor:{get:function(){return f}},__esModule:{value:!0}});var r,i,s,a,l=(r=e("./../helpers.js"),r&&r.__esModule&&r||{"default":r}),u=(i=e("./../dom.js"),i&&i.__esModule&&i||{"default":i}),d=(s=e("./../editors.js"),s&&s.__esModule&&s||{"default":s}),c=(d.getEditorConstructor,d.registerEditor),h=(a=e("./handsontableEditor.js"),a&&a.__esModule&&a||{"default":a}).HandsontableEditor,f=h.prototype.extend();f.prototype.init=function(){h.prototype.init.apply(this,arguments),this.query=null,this.choices=[]},f.prototype.createElements=function(){h.prototype.createElements.apply(this,arguments),u.addClass(this.htContainer,"autocompleteEditor"),u.addClass(this.htContainer,-1!==window.navigator.platform.indexOf("Mac")?"htMacScroll":"")};var p=!1;f.prototype.prepare=function(){this.instance.addHook("beforeKeyDown",o),h.prototype.prepare.apply(this,arguments)},f.prototype.open=function(){h.prototype.open.apply(this,arguments);var e=this.htEditor.getInstance(),t=this;this.TEXTAREA.style.visibility="visible",this.focus(),e.updateSettings({colWidths:[u.outerWidth(this.TEXTAREA)-2],width:u.outerWidth(this.TEXTAREA)+u.getScrollbarWidth()+2,afterRenderer:function(e,n,o,r,i){var s,a,l=this.getCellMeta(n,o).filteringCaseSensitive===!0,i=Handsontable.helper.stringify(i);i&&(s=l?i.indexOf(this.query):i.toLowerCase().indexOf(t.query.toLowerCase()),-1!=s&&(a=i.substr(s,t.query.length),e.innerHTML=i.replace(a,"<strong>"+a+"</strong>")))}}),this.htEditor.view.wt.wtTable.holder.parentNode.style["padding-right"]=u.getScrollbarWidth()+2+"px",p&&(p=!1),t.instance._registerTimeout(setTimeout(function(){t.queryChoices(t.TEXTAREA.value)},0))},f.prototype.close=function(){h.prototype.close.apply(this,arguments)},f.prototype.queryChoices=function(e){if(this.query=e,"function"==typeof this.cellProperties.source){var t=this;this.cellProperties.source(e,function(e){t.updateChoicesList(e)})}else if(Array.isArray(this.cellProperties.source)){var n;if(e&&this.cellProperties.filter!==!1){var o=this.cellProperties.filteringCaseSensitive===!0,r=e.toLowerCase();n=this.cellProperties.source.filter(function(t){return o?-1!=t.indexOf(e):-1!=t.toLowerCase().indexOf(r)})}else n=this.cellProperties.source;this.updateChoicesList(n)}else this.updateChoicesList([])},f.prototype.updateChoicesList=function(e){var t,n=u.getCaretPosition(this.TEXTAREA),o=u.getSelectionEndPosition(this.TEXTAREA),r=f.sortByRelevance(this.getValue(),e,this.cellProperties.filteringCaseSensitive);if(0!=this.cellProperties.filter){for(var i=[],s=0,a=r.length;a>s;s++)i.push(e[r[s]]);t=0,e=i}else t=r[0];this.choices=e,this.htEditor.loadData(l.pivot([e])),this.updateDropdownHeight(),this.cellProperties.strict===!0&&this.highlightBestMatchingChoice(t),this.instance.listen(),this.TEXTAREA.focus(),u.setCaretPosition(this.TEXTAREA,n,n!=o?o:void 0)},f.prototype.updateDropdownHeight=function(){this.htEditor.updateSettings({height:this.getDropdownHeight()}),this.htEditor.view.wt.wtTable.alignOverlaysWithTrimmingContainer()},f.prototype.finishEditing=function(e){e||this.instance.removeHook("beforeKeyDown",o),h.prototype.finishEditing.apply(this,arguments)},f.prototype.highlightBestMatchingChoice=function(e){"number"==typeof e?this.htEditor.selectCell(e,0):this.htEditor.deselectCell()},f.sortByRelevance=function(e,t,n){var o,r,i,s,a,l=[],u=e.length,d=[];if(0===u){for(s=0,a=t.length;a>s;s++)d.push(s);return d}for(s=0,a=t.length;a>s;s++)o=Handsontable.helper.stringify(t[s]),r=n?o.indexOf(e):o.toLowerCase().indexOf(e.toLowerCase()),-1!=r&&(i=o.length-r-u,l.push({baseIndex:s,index:r,charsLeft:i,value:o}));for(l.sort(function(e,t){return-1===t.index?-1:-1===e.index?1:e.index<t.index?-1:t.index<e.index?1:e.index===t.index?e.charsLeft<t.charsLeft?-1:e.charsLeft>t.charsLeft?1:0:void 0}),s=0,a=l.length;a>s;s++)d.push(l[s].baseIndex);return d},f.prototype.getDropdownHeight=function(){var e=this.htEditor.getInstance().getRowHeight(0)||23;return this.choices.length>=10?10*e:this.choices.length*e+8},c("autocomplete",f)},{"./../dom.js":27,"./../editors.js":29,"./../helpers.js":42,"./handsontableEditor.js":35}],32:[function(e,t,n){"use strict";Object.defineProperties(n,{CheckboxEditor:{get:function(){return u}},__esModule:{value:!0}});var o,r,i,s=(o=e("./../editors.js"),o&&o.__esModule&&o||{"default":o}).registerEditor,a=(r=e("./_baseEditor.js"),r&&r.__esModule&&r||{"default":r}).BaseEditor,l=(i=e("./../dom.js"),i&&i.__esModule&&i||{"default":i}),u=function(){$traceurRuntime.superConstructor(d).apply(this,arguments)},d=u;$traceurRuntime.createClass(u,{beginEditing:function(){var e=this.TD.querySelector('input[type="checkbox"]');l.hasClass(e,"htBadValue")||e.click()},finishEditing:function(){},init:function(){},open:function(){},close:function(){},getValue:function(){},setValue:function(){},focus:function(){}},{},a),s("checkbox",u)},{"./../dom.js":27,"./../editors.js":29,"./_baseEditor.js":30}],33:[function(e,t,n){"use strict";Object.defineProperties(n,{DateEditor:{get:function(){return v}},__esModule:{value:!0}});var o,r,i,s,a,l,u,d=(o=e("./../helpers.js"),o&&o.__esModule&&o||{"default":o}),c=(r=e("./../dom.js"),r&&r.__esModule&&r||{"default":r}),h=(i=e("./../editors.js"),i&&i.__esModule&&i||{"default":i}),f=(h.getEditor,h.registerEditor),p=(s=e("./textEditor.js"),s&&s.__esModule&&s||{"default":s}).TextEditor,g=(a=e("./../eventManager.js"),a&&a.__esModule&&a||{"default":a}).eventManager,m=(l=e("moment"),l&&l.__esModule&&l||{"default":l})["default"],w=(u=e("pikaday"),u&&u.__esModule&&u||{"default":u})["default"],v=function(e){this.$datePicker=null,this.datePicker=null,this.datePickerStyle=null,this.defaultDateFormat="DD/MM/YYYY",this.isCellEdited=!1,this.parentDestroyed=!1,$traceurRuntime.superGet(this,y.prototype,"constructor").call(this,e)},y=v;$traceurRuntime.createClass(v,{init:function(){var e=this;if("function"!=typeof m)throw new Error("You need to include moment.js to your project.");if("function"!=typeof w)throw new Error("You need to include Pikaday to your project.");$traceurRuntime.superGet(this,y.prototype,"init").call(this),this.instance.addHook("afterDestroy",function(){e.parentDestroyed=!0,e.destroyElements()})},createElements:function(){var e=this;$traceurRuntime.superGet(this,y.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,c.addClass(this.datePicker,"htDatepickerHolder"),document.body.appendChild(this.datePicker);var t=this.TEXTAREA,n={format:this.defaultDateFormat,field:t,trigger:t,container:this.datePicker,reposition:!1,bound:!1,onSelect:function(t){isNaN(t.getTime())||(t=m(t).format(e.cellProperties.dateFormat||e.defaultDateFormat)),e.setValue(t),e.hideDatepicker()},onClose:function(){e.parentDestroyed||e.finishEditing(!1)}};this.$datePicker=new w(n);var o=g(this);o.addEventListener(this.datePicker,"mousedown",function(e){d.stopPropagation(e)}),this.hideDatepicker()},destroyElements:function(){this.$datePicker.destroy()},prepare:function(e,t,n,o,r,i){this._opened=!1,$traceurRuntime.superGet(this,y.prototype,"prepare").call(this,e,t,n,o,r,i)},open:function(){var e=void 0!==arguments[0]?arguments[0]:null;$traceurRuntime.superGet(this,y.prototype,"open").call(this),this.showDatepicker(e)},close:function(){var e=this;this._opened=!1,this.instance._registerTimeout(setTimeout(function(){e.instance.selection.refreshBorders()},0)),$traceurRuntime.superGet(this,y.prototype,"close").call(this)},finishEditing:function(){var e=void 0!==arguments[0]?arguments[0]:!1,t=void 0!==arguments[1]?arguments[1]:!1;if(e){var n=this.originalValue;void 0!==n&&this.setValue(n)}this.hideDatepicker(),$traceurRuntime.superGet(this,y.prototype,"finishEditing").call(this,e,t)},showDatepicker:function(e){var t,n=this.TD.getBoundingClientRect(),o=this.cellProperties.dateFormat||this.defaultDateFormat,r=this.$datePicker.config(),i=this.instance.view.isMouseDown(),s=e?d.isMetaKey(e.keyCode):!1;this.datePickerStyle.top=window.pageYOffset+n.top+c.outerHeight(this.TD)+"px",this.datePickerStyle.left=window.pageXOffset+n.left+"px",this.$datePicker._onInputFocus=function(){},r.format=o,this.originalValue?(t=this.originalValue,m(t,o,!0).isValid()&&this.$datePicker.setMoment(m(t,o),!0),s||i||this.setValue("")):this.cellProperties.defaultDate?(t=this.cellProperties.defaultDate,r.defaultDate=t,m(t,o,!0).isValid()&&this.$datePicker.setMoment(m(t,o),!0),s||i||this.setValue("")):this.$datePicker.gotoToday(),this.datePickerStyle.display="block",this.$datePicker.show()},hideDatepicker:function(){this.datePickerStyle.display="none",this.$datePicker.hide()}},{},p),f("date",v)},{"./../dom.js":27,"./../editors.js":29,"./../eventManager.js":41,"./../helpers.js":42,"./textEditor.js":40,moment:"moment",pikaday:"pikaday"}],34:[function(e,t,n){"use strict";Object.defineProperties(n,{DropdownEditor:{get:function(){return l}},__esModule:{value:!0}});var o,r,i=(o=e("./../editors.js"),o&&o.__esModule&&o||{"default":o}),s=(i.getEditor,i.registerEditor),a=(r=e("./autocompleteEditor.js"),r&&r.__esModule&&r||{"default":r}).AutocompleteEditor,l=function(){$traceurRuntime.superConstructor(u).apply(this,arguments)},u=l;$traceurRuntime.createClass(l,{prepare:function(e,t,n,o,r,i){$traceurRuntime.superGet(this,u.prototype,"prepare").call(this,e,t,n,o,r,i),this.cellProperties.filter=!1,this.cellProperties.strict=!0}},{},a),s("dropdown",l)},{"./../editors.js":29,"./autocompleteEditor.js":31}],35:[function(e,t,n){"use strict";Object.defineProperties(n,{HandsontableEditor:{get:function(){return h}},__esModule:{value:!0}});var o,r,i,s,a=(o=e("./../helpers.js"),o&&o.__esModule&&o||{"default":o}),l=(r=e("./../dom.js"),r&&r.__esModule&&r||{"default":r}),u=(i=e("./../editors.js"),i&&i.__esModule&&i||{"default":i}),d=(u.getEditor,u.registerEditor),c=(s=e("./textEditor.js"),s&&s.__esModule&&s||{"default":s}).TextEditor,h=c.prototype.extend();h.prototype.createElements=function(){c.prototype.createElements.apply(this,arguments);var e=document.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.htEditor=new Handsontable(e),this.assignHooks()},h.prototype.prepare=function(e,t,n,o,r,i){c.prototype.prepare.apply(this,arguments);var s=this,l={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,cells:function(){return{readOnly:!0}},fillHandle:!1,afterOnCellMouseDown:function(){var e=this.getValue();void 0!==e&&s.setValue(e),s.instance.destroyEditor()}};this.cellProperties.handsontable&&a.extend(l,i.handsontable),this.htEditor&&this.htEditor.destroy(),this.htEditor=new Handsontable(this.htContainer,l)};var f=function(e){if(null!=e&&null==e.isImmediatePropagationEnabled&&(e.stopImmediatePropagation=function(){this.isImmediatePropagationEnabled=!1,this.cancelBubble=!0},e.isImmediatePropagationEnabled=!0,e.isImmediatePropagationStopped=function(){return!this.isImmediatePropagationEnabled}),!e.isImmediatePropagationStopped()){var t,n=this.getActiveEditor(),o=n.htEditor.getInstance();if(e.keyCode==a.keyCode.ARROW_DOWN)if(o.getSelected()){var r=o.getSelected()[0],i=o.countRows()-1;t=Math.min(i,r+1)}else t=0;else if(e.keyCode==a.keyCode.ARROW_UP&&o.getSelected()){var r=o.getSelected()[0];t=r-1}void 0!==t&&(0>t?o.deselectCell():o.selectCell(t,0),e.preventDefault(),e.stopImmediatePropagation(),n.instance.listen(),n.TEXTAREA.focus())}};h.prototype.open=function(){this.instance.addHook("beforeKeyDown",f),c.prototype.open.apply(this,arguments),this.htEditor.render(),this.cellProperties.strict?(this.htEditor.selectCell(0,0),this.TEXTAREA.style.visibility="hidden"):(this.htEditor.deselectCell(),this.TEXTAREA.style.visibility="visible"),l.setCaretPosition(this.TEXTAREA,0,this.TEXTAREA.value.length)},h.prototype.close=function(){this.instance.removeHook("beforeKeyDown",f),this.instance.listen(),c.prototype.close.apply(this,arguments)},h.prototype.focus=function(){this.instance.listen(),c.prototype.focus.apply(this,arguments)},h.prototype.beginEditing=function(e){var t=this.instance.getSettings().onBeginEditing;t&&t()===!1||c.prototype.beginEditing.apply(this,arguments)},h.prototype.finishEditing=function(e,t){if(this.htEditor.isListening()&&this.instance.listen(),this.htEditor.getSelected()){var n=this.htEditor.getInstance().getValue();void 0!==n&&this.setValue(n)}return c.prototype.finishEditing.apply(this,arguments)},h.prototype.assignHooks=function(){var e=this;this.instance.addHook("afterDestroy",function(){e.htEditor&&e.htEditor.destroy()})},d("handsontable",h)},{"./../dom.js":27,"./../editors.js":29,"./../helpers.js":42,"./textEditor.js":40}],36:[function(e,t,n){"use strict";Object.defineProperties(n,{MobileTextEditor:{get:function(){return p}},__esModule:{value:!0}});var o,r,i,s,a,l=(o=e("./../helpers.js"),o&&o.__esModule&&o||{"default":o}),u=(r=e("./../dom.js"),r&&r.__esModule&&r||{"default":r}),d=(i=e("./../editors.js"),i&&i.__esModule&&i||{"default":i}),c=(d.getEditor,d.registerEditor),h=(s=e("./_baseEditor.js"),s&&s.__esModule&&s||{"default":s}).BaseEditor,f=(a=e("./../eventManager.js"),a&&a.__esModule&&a||{"default":a}).eventManager,p=h.prototype.extend(),g={},m=function(){this.controls={},this.controls.leftButton=document.createElement("DIV"),this.controls.leftButton.className="leftButton",this.controls.rightButton=document.createElement("DIV"),this.controls.rightButton.className="rightButton",this.controls.upButton=document.createElement("DIV"),this.controls.upButton.className="upButton",this.controls.downButton=document.createElement("DIV"),this.controls.downButton.className="downButton";for(var e in this.controls)this.controls.hasOwnProperty(e)&&this.positionControls.appendChild(this.controls[e])};p.prototype.valueChanged=function(){return this.initValue!=this.getValue()},p.prototype.init=function(){var e=this;this.eventManager=f(this.instance),this.createElements(),this.bindEvents(),this.instance.addHook("afterDestroy",function(){e.destroy()})},p.prototype.getValue=function(){return this.TEXTAREA.value},p.prototype.setValue=function(e){this.initValue=e,this.TEXTAREA.value=e},p.prototype.createElements=function(){this.editorContainer=document.createElement("DIV"),this.editorContainer.className="htMobileEditorContainer",this.cellPointer=document.createElement("DIV"),this.cellPointer.className="cellPointer",this.moveHandle=document.createElement("DIV"),this.moveHandle.className="moveHandle",this.inputPane=document.createElement("DIV"),this.inputPane.className="inputs",this.positionControls=document.createElement("DIV"),this.positionControls.className="positionControls",this.TEXTAREA=document.createElement("TEXTAREA"),u.addClass(this.TEXTAREA,"handsontableInput"),this.inputPane.appendChild(this.TEXTAREA),this.editorContainer.appendChild(this.cellPointer),this.editorContainer.appendChild(this.moveHandle),this.editorContainer.appendChild(this.inputPane),this.editorContainer.appendChild(this.positionControls),m.call(this),document.body.appendChild(this.editorContainer)},p.prototype.onBeforeKeyDown=function(e){var t=this,n=t.getActiveEditor();if(u.enableImmediatePropagation(e),e.target===n.TEXTAREA&&!e.isImmediatePropagationStopped()){var o=l.keyCode;switch(e.keyCode){case o.ENTER:n.close(),e.preventDefault();break;case o.BACKSPACE:e.stopImmediatePropagation()}}},p.prototype.open=function(){this.instance.addHook("beforeKeyDown",this.onBeforeKeyDown),u.addClass(this.editorContainer,"active"),u.removeClass(this.cellPointer,"hidden"),this.updateEditorPosition()},p.prototype.focus=function(){this.TEXTAREA.focus(),u.setCaretPosition(this.TEXTAREA,this.TEXTAREA.value.length)},p.prototype.close=function(){this.TEXTAREA.blur(),this.instance.removeHook("beforeKeyDown",this.onBeforeKeyDown),u.removeClass(this.editorContainer,"active")},p.prototype.scrollToView=function(){var e=this.instance.getSelectedRange().highlight;this.instance.view.scrollViewport(e)},p.prototype.hideCellPointer=function(){u.hasClass(this.cellPointer,"hidden")||u.addClass(this.cellPointer,"hidden")},p.prototype.updateEditorPosition=function(e,t){if(e&&t)e=parseInt(e,10),t=parseInt(t,10),this.editorContainer.style.top=t+"px",this.editorContainer.style.left=e+"px";else{var n=this.instance.getSelected(),o=this.instance.getCell(n[0],n[1]);if(g.cellPointer||(g.cellPointer={height:u.outerHeight(this.cellPointer),width:u.outerWidth(this.cellPointer)}),g.editorContainer||(g.editorContainer={width:u.outerWidth(this.editorContainer)}),void 0!==o){var r=this.instance.view.wt.wtOverlays.leftOverlay.trimmingContainer==window?0:u.getScrollLeft(this.instance.view.wt.wtOverlays.leftOverlay.holder),i=this.instance.view.wt.wtOverlays.topOverlay.trimmingContainer==window?0:u.getScrollTop(this.instance.view.wt.wtOverlays.topOverlay.holder),s=u.offset(o),a=u.outerWidth(o),l={x:r,y:i};this.editorContainer.style.top=parseInt(s.top+u.outerHeight(o)-l.y+g.cellPointer.height,10)+"px",this.editorContainer.style.left=parseInt(window.innerWidth/2-g.editorContainer.width/2,10)+"px",s.left+a/2>parseInt(this.editorContainer.style.left,10)+g.editorContainer.width?this.editorContainer.style.left=window.innerWidth-g.editorContainer.width+"px":s.left+a/2<parseInt(this.editorContainer.style.left,10)+20&&(this.editorContainer.style.left="0px"),this.cellPointer.style.left=parseInt(s.left-g.cellPointer.width/2-u.offset(this.editorContainer).left+a/2-l.x,10)+"px"}}},p.prototype.updateEditorData=function(){var e=this.instance.getSelected(),t=this.instance.getDataAtCell(e[0],e[1]);this.row=e[0],this.col=e[1],this.setValue(t),this.updateEditorPosition()},p.prototype.prepareAndSave=function(){var e;return this.valueChanged()?(e=this.instance.getSettings().trimWhitespace?[[String.prototype.trim.call(this.getValue())]]:[[this.getValue()]],void this.saveValue(e)):!0},p.prototype.bindEvents=function(){
var e=this;this.eventManager.addEventListener(this.controls.leftButton,"touchend",function(t){e.prepareAndSave(),e.instance.selection.transformStart(0,-1,null,!0),e.updateEditorData(),t.preventDefault()}),this.eventManager.addEventListener(this.controls.rightButton,"touchend",function(t){e.prepareAndSave(),e.instance.selection.transformStart(0,1,null,!0),e.updateEditorData(),t.preventDefault()}),this.eventManager.addEventListener(this.controls.upButton,"touchend",function(t){e.prepareAndSave(),e.instance.selection.transformStart(-1,0,null,!0),e.updateEditorData(),t.preventDefault()}),this.eventManager.addEventListener(this.controls.downButton,"touchend",function(t){e.prepareAndSave(),e.instance.selection.transformStart(1,0,null,!0),e.updateEditorData(),t.preventDefault()}),this.eventManager.addEventListener(this.moveHandle,"touchstart",function(t){if(1==t.touches.length){var n=t.touches[0],o={x:e.editorContainer.offsetLeft,y:e.editorContainer.offsetTop},r={x:n.pageX-o.x,y:n.pageY-o.y};e.eventManager.addEventListener(this,"touchmove",function(t){var n=t.touches[0];e.updateEditorPosition(n.pageX-r.x,n.pageY-r.y),e.hideCellPointer(),t.preventDefault()})}}),this.eventManager.addEventListener(document.body,"touchend",function(t){u.isChildOf(t.target,e.editorContainer)||u.isChildOf(t.target,e.instance.rootElement)||e.close()}),this.eventManager.addEventListener(this.instance.view.wt.wtOverlays.leftOverlay.holder,"scroll",function(t){e.instance.view.wt.wtOverlays.leftOverlay.trimmingContainer!=window&&e.hideCellPointer()}),this.eventManager.addEventListener(this.instance.view.wt.wtOverlays.topOverlay.holder,"scroll",function(t){e.instance.view.wt.wtOverlays.topOverlay.trimmingContainer!=window&&e.hideCellPointer()})},p.prototype.destroy=function(){this.eventManager.clear(),this.editorContainer.parentNode.removeChild(this.editorContainer)},c("mobile",p)},{"./../dom.js":27,"./../editors.js":29,"./../eventManager.js":41,"./../helpers.js":42,"./_baseEditor.js":30}],37:[function(e,t,n){"use strict";Object.defineProperties(n,{NumericEditor:{get:function(){return d}},__esModule:{value:!0}});var o,r,i,s=(o=e("numeral"),o&&o.__esModule&&o||{"default":o})["default"],a=(r=e("./../editors.js"),r&&r.__esModule&&r||{"default":r}),l=(a.getEditor,a.registerEditor),u=(i=e("./textEditor.js"),i&&i.__esModule&&i||{"default":i}).TextEditor,d=function(){$traceurRuntime.superConstructor(c).apply(this,arguments)},c=d;$traceurRuntime.createClass(d,{beginEditing:function(e){if("undefined"==typeof e&&this.originalValue){"undefined"!=typeof this.cellProperties.language&&s.language(this.cellProperties.language);var t=s.languageData().delimiters.decimal;e=(""+this.originalValue).replace(".",t)}$traceurRuntime.superGet(this,c.prototype,"beginEditing").call(this,e)}},{},u),l("numeric",d)},{"./../editors.js":29,"./textEditor.js":40,numeral:"numeral"}],38:[function(e,t,n){"use strict";Object.defineProperties(n,{PasswordEditor:{get:function(){return d}},__esModule:{value:!0}});var o,r,i,s=(o=e("./../dom.js"),o&&o.__esModule&&o||{"default":o}),a=(r=e("./../editors.js"),r&&r.__esModule&&r||{"default":r}),l=(a.getEditor,a.registerEditor),u=(i=e("./textEditor.js"),i&&i.__esModule&&i||{"default":i}).TextEditor,d=function(){$traceurRuntime.superConstructor(c).apply(this,arguments)},c=d;$traceurRuntime.createClass(d,{createElements:function(){$traceurRuntime.superGet(this,c.prototype,"createElements").call(this),this.TEXTAREA=document.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,s.empty(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}},{},u),l("password",d)},{"./../dom.js":27,"./../editors.js":29,"./textEditor.js":40}],39:[function(e,t,n){"use strict";Object.defineProperties(n,{SelectEditor:{get:function(){return h}},__esModule:{value:!0}});var o,r,i,s,a=(o=e("./../dom.js"),o&&o.__esModule&&o||{"default":o}),l=(r=e("./../helpers.js"),r&&r.__esModule&&r||{"default":r}),u=(i=e("./../editors.js"),i&&i.__esModule&&i||{"default":i}),d=(u.getEditor,u.registerEditor),c=(s=e("./_baseEditor.js"),s&&s.__esModule&&s||{"default":s}).BaseEditor,h=c.prototype.extend();h.prototype.init=function(){this.select=document.createElement("SELECT"),a.addClass(this.select,"htSelectEditor"),this.select.style.display="none",this.instance.rootElement.appendChild(this.select)},h.prototype.prepare=function(){c.prototype.prepare.apply(this,arguments);var e,t=this.cellProperties.selectOptions;e="function"==typeof t?this.prepareOptions(t(this.row,this.col,this.prop)):this.prepareOptions(t),a.empty(this.select);for(var n in e)if(e.hasOwnProperty(n)){var o=document.createElement("OPTION");o.value=n,a.fastInnerHTML(o,e[n]),this.select.appendChild(o)}},h.prototype.prepareOptions=function(e){var t={};if(Array.isArray(e))for(var n=0,o=e.length;o>n;n++)t[e[n]]=e[n];else"object"==typeof e&&(t=e);return t},h.prototype.getValue=function(){return this.select.value},h.prototype.setValue=function(e){this.select.value=e};var f=function(e){var t=this,n=t.getActiveEditor();switch(null!=e&&null==e.isImmediatePropagationEnabled&&(e.stopImmediatePropagation=function(){this.isImmediatePropagationEnabled=!1},e.isImmediatePropagationEnabled=!0,e.isImmediatePropagationStopped=function(){return!this.isImmediatePropagationEnabled}),e.keyCode){case l.keyCode.ARROW_UP:var o=n.select.selectedIndex-1;o>=0&&(n.select[o].selected=!0),e.stopImmediatePropagation(),e.preventDefault();break;case l.keyCode.ARROW_DOWN:var r=n.select.selectedIndex+1;r<=n.select.length-1&&(n.select[r].selected=!0),e.stopImmediatePropagation(),e.preventDefault()}};h.prototype.checkEditorSection=function(){return this.row<this.instance.getSettings().fixedRowsTop?this.col<this.instance.getSettings().fixedColumnsLeft?"corner":"top":this.col<this.instance.getSettings().fixedColumnsLeft?"left":void 0},h.prototype.open=function(){var e,t=a.outerWidth(this.TD),n=a.outerHeight(this.TD),o=a.offset(this.instance.rootElement),r=a.offset(this.TD),i=this.checkEditorSection();switch(i){case"top":e=a.getCssTransform(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);break;case"left":e=a.getCssTransform(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);break;case"corner":e=a.getCssTransform(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode)}var s=this.select.style;e&&-1!=e?s[e[0]]=e[1]:a.resetCssTransform(this.select),s.height=n+"px",s.minWidth=t+"px",s.top=r.top-o.top+"px",s.left=r.left-o.left+"px",s.margin="0px",s.display="",this.instance.addHook("beforeKeyDown",f)},h.prototype.close=function(){this.select.style.display="none",this.instance.removeHook("beforeKeyDown",f)},h.prototype.focus=function(){this.select.focus()},d("select",h)},{"./../dom.js":27,"./../editors.js":29,"./../helpers.js":42,"./_baseEditor.js":30}],40:[function(e,t,n){"use strict";Object.defineProperties(n,{TextEditor:{get:function(){return m}},__esModule:{value:!0}});var o,r,i,s,a,l,u=(o=e("./../dom.js"),o&&o.__esModule&&o||{"default":o}),d=(r=e("./../helpers.js"),r&&r.__esModule&&r||{"default":r}),c=(i=e("autoResize"),i&&i.__esModule&&i||{"default":i})["default"],h=(s=e("./_baseEditor.js"),s&&s.__esModule&&s||{"default":s}).BaseEditor,f=(a=e("./../eventManager.js"),a&&a.__esModule&&a||{"default":a}).eventManager,p=(l=e("./../editors.js"),l&&l.__esModule&&l||{"default":l}),g=(p.getEditor,p.registerEditor),m=h.prototype.extend();m.prototype.init=function(){var e=this;this.createElements(),this.eventManager=f(this),this.bindEvents(),this.autoResize=c(),this.instance.addHook("afterDestroy",function(){e.destroy()})},m.prototype.getValue=function(){return this.TEXTAREA.value},m.prototype.setValue=function(e){this.TEXTAREA.value=e};var w=function(e){var t,n,o=this,r=o.getActiveEditor();if(t=d.keyCode,n=(e.ctrlKey||e.metaKey)&&!e.altKey,u.enableImmediatePropagation(e),e.target===r.TEXTAREA&&!e.isImmediatePropagationStopped()){if(17===e.keyCode||224===e.keyCode||91===e.keyCode||93===e.keyCode)return void e.stopImmediatePropagation();switch(e.keyCode){case t.ARROW_RIGHT:case t.ARROW_LEFT:case t.ARROW_UP:case t.ARROW_DOWN:r.isWaiting()||e.stopImmediatePropagation();break;case t.ENTER:var i=r.instance.getSelected(),s=!(i[0]===i[2]&&i[1]===i[3]);if(n&&!s||e.altKey){if(r.isOpened()){var a=u.getCaretPosition(r.TEXTAREA),l=r.getValue(),c=l.slice(0,a)+"\n"+l.slice(a);r.setValue(c),u.setCaretPosition(r.TEXTAREA,a+1)}else r.beginEditing(r.originalValue+"\n");e.stopImmediatePropagation()}e.preventDefault();break;case t.A:case t.X:case t.C:case t.V:n&&e.stopImmediatePropagation();break;case t.BACKSPACE:case t.DELETE:case t.HOME:case t.END:e.stopImmediatePropagation()}r.autoResize.resize(String.fromCharCode(e.keyCode))}};m.prototype.open=function(){this.refreshDimensions(),this.instance.addHook("beforeKeyDown",w)},m.prototype.close=function(){this.textareaParentStyle.display="none",this.autoResize.unObserve(),document.activeElement===this.TEXTAREA&&this.instance.listen(),this.instance.removeHook("beforeKeyDown",w)},m.prototype.focus=function(){this.TEXTAREA.focus(),u.setCaretPosition(this.TEXTAREA,this.TEXTAREA.value.length)},m.prototype.createElements=function(){this.TEXTAREA=document.createElement("TEXTAREA"),u.addClass(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.TEXTAREA_PARENT=document.createElement("DIV"),u.addClass(this.TEXTAREA_PARENT,"handsontableInputHolder"),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.textareaParentStyle.top=0,this.textareaParentStyle.left=0,this.textareaParentStyle.display="none",this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.instance.rootElement.appendChild(this.TEXTAREA_PARENT);var e=this;this.instance._registerTimeout(setTimeout(function(){e.refreshDimensions()},0))},m.prototype.checkEditorSection=function(){return this.row<this.instance.getSettings().fixedRowsTop?this.col<this.instance.getSettings().fixedColumnsLeft?"corner":"top":this.col<this.instance.getSettings().fixedColumnsLeft?"left":void 0},m.prototype.getEditedCell=function(){var e,t=this.checkEditorSection();switch(t){case"top":e=this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=101;break;case"corner":e=this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=103;break;case"left":e=this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.textareaParentStyle.zIndex=102;break;default:e=this.instance.getCell(this.row,this.col),this.textareaParentStyle.zIndex=""}return-1!=e&&-2!=e?e:void 0},m.prototype.refreshDimensions=function(){if(this.state===Handsontable.EditorState.EDITING&&(this.TD=this.getEditedCell(),this.TD)){var e,t=u.offset(this.TD),n=u.offset(this.instance.rootElement),o=u.getScrollableElement(this.TD),r=t.top-n.top-1-(o.scrollTop||0),i=t.left-n.left-1-(o.scrollLeft||0),s=this.instance.getSettings(),a=s.rowHeaders?1:0,l=s.colHeaders?1:0,d=this.checkEditorSection(),c=this.TD.style.backgroundColor;switch(d){case"top":e=u.getCssTransform(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);break;case"left":e=u.getCssTransform(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);break;case"corner":e=u.getCssTransform(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode)}0>r&&(r=0),0>i&&(i=0),l&&0===this.instance.getSelected()[0]&&(r+=1),a&&0===this.instance.getSelected()[1]&&(i+=1),e&&-1!=e?this.textareaParentStyle[e[0]]=e[1]:u.resetCssTransform(this.textareaParentStyle),this.textareaParentStyle.top=r+"px",this.textareaParentStyle.left=i+"px";var h=this.TD.offsetTop-this.instance.view.wt.wtOverlays.topOverlay.getScrollPosition(),f=this.TD.offsetLeft-this.instance.view.wt.wtOverlays.leftOverlay.getScrollPosition(),p=u.innerWidth(this.TD)-8,g=this.instance.view.maximumVisibleElementWidth(f)-10,m=this.TD.scrollHeight+1,w=this.instance.view.maximumVisibleElementHeight(h)-2;parseInt(this.TD.style.borderTopWidth,10)>0&&(m-=1),parseInt(this.TD.style.borderLeftWidth,10)>0&&a>0&&(p-=1),this.TEXTAREA.style.fontSize=u.getComputedStyle(this.TD).fontSize,this.TEXTAREA.style.fontFamily=u.getComputedStyle(this.TD).fontFamily,this.TEXTAREA.style.backgroundColor="",this.TEXTAREA.style.backgroundColor=c?c:u.getComputedStyle(this.TEXTAREA).backgroundColor,this.autoResize.init(this.TEXTAREA,{minHeight:Math.min(m,w),maxHeight:w,minWidth:Math.min(p,g),maxWidth:g},!0),this.textareaParentStyle.display="block"}},m.prototype.bindEvents=function(){var e=this;this.eventManager.addEventListener(this.TEXTAREA,"cut",function(e){d.stopPropagation(e)}),this.eventManager.addEventListener(this.TEXTAREA,"paste",function(e){d.stopPropagation(e)}),this.instance.addHook("afterScrollVertically",function(){e.refreshDimensions()}),this.instance.addHook("afterColumnResize",function(){e.refreshDimensions(),e.focus()}),this.instance.addHook("afterRowResize",function(){e.refreshDimensions(),e.focus()}),this.instance.addHook("afterDestroy",function(){e.eventManager.clear()})},m.prototype.destroy=function(){this.eventManager.clear()},g("text",m)},{"./../dom.js":27,"./../editors.js":29,"./../eventManager.js":41,"./../helpers.js":42,"./_baseEditor.js":30,autoResize:"autoResize"}],41:[function(e,t,n){"use strict";function o(e,t){var n,o,r,i,a,l="HOT-TABLE";if(t.isTargetWebComponent=!1,t.realTarget=t.target,!Handsontable.eventManager.isHotTableEnv)return t;for(t=s.polymerWrap(t),a=t.path?t.path.length:0;a--;){if(t.path[a].nodeName===l)n=!0;else if(n&&t.path[a].shadowRoot){i=t.path[a];break}0!==a||i||(i=t.path[a])}return i||(i=t.target),t.isTargetWebComponent=!0,s.isWebComponentSupportedNatively()?t.realTarget=t.srcElement||t.toElement:(e instanceof Handsontable.Core||e instanceof Walkontable)&&(e instanceof Handsontable.Core?o=e.view.wt.wtTable.TABLE:e instanceof Walkontable&&(o=e.wtTable.TABLE.parentNode.parentNode),r=s.closest(t.target,[l],o),r?t.realTarget=o.querySelector(l)||t.target:t.realTarget=t.target),Object.defineProperty(t,"target",{get:function(){return s.polymerWrap(i)},enumerable:!0,configurable:!0}),t}function r(e){return new a(e)}Object.defineProperties(n,{EventManager:{get:function(){return a}},eventManager:{get:function(){return r}},__esModule:{value:!0}});var i,s=(i=e("./dom.js"),i&&i.__esModule&&i||{"default":i}),a=function(){var e=void 0!==arguments[0]?arguments[0]:null;this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])};$traceurRuntime.createClass(a,{addEventListener:function(e,t,n){function r(e){void 0==e.target&&void 0!=e.srcElement&&(e.definePoperty?e.definePoperty("target",{value:e.srcElement}):e.target=e.srcElement),void 0==e.preventDefault&&(e.definePoperty?e.definePoperty("preventDefault",{value:function(){this.returnValue=!1}}):e.preventDefault=function(){this.returnValue=!1}),e=o(s,e),n.call(this,e)}var i=this,s=this.context;return this.context.eventListeners.push({element:e,event:t,callback:n,callbackProxy:r}),window.addEventListener?e.addEventListener(t,r,!1):e.attachEvent("on"+t,r),Handsontable.countEventManagerListeners++,function(){i.removeEventListener(e,t,n)}},removeEventListener:function(e,t,n){for(var o,r=this.context.eventListeners.length;r--;)if(o=this.context.eventListeners[r],o.event==t&&o.element==e){if(n&&n!=o.callback)continue;this.context.eventListeners.splice(r,1),o.element.removeEventListener?o.element.removeEventListener(o.event,o.callbackProxy,!1):o.element.detachEvent("on"+o.event,o.callbackProxy),Handsontable.countEventManagerListeners--}},clearEvents:function(){for(var e=this.context.eventListeners.length;e--;){var t=this.context.eventListeners[e];t&&this.removeEventListener(t.element,t.event,t.callback)}},clear:function(){this.clearEvents()},fireEvent:function(e,t){var n,o={bubbles:!0,cancelable:"mousemove"!==t,view:window,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};document.createEvent?(n=document.createEvent("MouseEvents"),n.initMouseEvent(t,o.bubbles,o.cancelable,o.view,o.detail,o.screenX,o.screenY,o.clientX,o.clientY,o.ctrlKey,o.altKey,o.shiftKey,o.metaKey,o.button,o.relatedTarget||document.body.parentNode)):n=document.createEventObject(),e.dispatchEvent?e.dispatchEvent(n):e.fireEvent("on"+t,n)}},{}),window.Handsontable=window.Handsontable||{},Handsontable.countEventManagerListeners=0,Handsontable.eventManager=r},{"./dom.js":27}],42:[function(e,t,n){"use strict";function o(e){return 32==e||e>=48&&57>=e||e>=96&&111>=e||e>=186&&192>=e||e>=219&&222>=e||e>=226||e>=65&&90>=e}function r(e){var t=[V.ARROW_DOWN,V.ARROW_UP,V.ARROW_LEFT,V.ARROW_RIGHT,V.HOME,V.END,V.DELETE,V.BACKSPACE,V.F1,V.F2,V.F3,V.F4,V.F5,V.F6,V.F7,V.F8,V.F9,V.F10,V.F11,V.F12,V.TAB,V.PAGE_DOWN,V.PAGE_UP,V.ENTER,V.ESCAPE,V.SHIFT,V.CAPS_LOCK,V.ALT];return-1!=t.indexOf(e)}function i(e){return-1!=[V.CONTROL_LEFT,224,V.COMMAND_LEFT,V.COMMAND_RIGHT].indexOf(e)}function s(e){switch(typeof e){case"string":case"number":return e+"";case"object":return null===e?"":e.toString();case"undefined":return"";default:return e.toString()}}function a(e){return e[0].toUpperCase()+e.substr(1)}function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=[],o=e.length;o--;){var r=s(e[o]).toLowerCase();-1===n.indexOf(r)&&n.push(r)}return 1===n.length}function u(e){var t;if(Array.isArray(e))t=[];else{t={};for(var n in e)e.hasOwnProperty(n)&&(e[n]&&"object"==typeof e[n]&&!Array.isArray(e[n])?t[n]=u(e[n]):Array.isArray(e[n])?e[n].length&&"object"==typeof e[n][0]&&!Array.isArray(e[n][0])?t[n]=[u(e[n][0])]:t[n]=[]:t[n]=null)}return t}function d(e){for(var t,n=e+1,o="";n>0;)t=(n-1)%26,o=String.fromCharCode(65+t)+o,n=parseInt((n-t)/26,10);return o}function c(e,t){e="number"==typeof e?e:100,t="number"==typeof t?t:4;var n,o,r=[];for(n=0;e>n;n++){var i=[];for(o=0;t>o;o++)i.push(d(o)+(n+1));r.push(i)}return r}function h(e,t){e="number"==typeof e?e:100,t="number"==typeof t?t:4;var n,o,r=[];for(n=0;e>n;n++){var i={};for(o=0;t>o;o++)i["prop"+o]=d(o)+(n+1);r.push(i)}return r}function f(e){var t=typeof e;return"number"==t?!isNaN(e)&&isFinite(e):"string"==t?e.length?1==e.length?/\d/.test(e):/^\s*[+-]?\s*(?:(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?)|(?:0x[a-f\d]+))\s*$/i.test(e):!1:"object"==t?!(!e||"number"!=typeof e.valueOf()||e instanceof Date):!1}function p(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()+e()}function g(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e}function m(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}function w(e,t){for(var n in t)t.hasOwnProperty(n)&&(t[n]&&"object"==typeof t[n]?(e[n]||(Array.isArray(t[n])?e[n]=[]:e[n]={}),w(e[n],t[n])):e[n]=t[n])}function v(e){return"object"==typeof e?JSON.parse(JSON.stringify(e)):e}function y(e,t){return JSON.stringify(e)===JSON.stringify(t)}function b(e){var t;if("object"==typeof e.__proto__)t=e.__proto__;else{var n,o=e.constructor;"function"==typeof e.constructor&&(n=o,delete e.constructor&&(o=e.constructor,e.constructor=n)),t=o?o.prototype:null}return t}function C(e,t){function n(){}g(n,e);for(var o=0,r=t.length;r>o;o++)n.prototype[t[o]]=void 0;return n}function R(e){var t,n,o,r,i=[],s=0;for(t=0,n=e.length;n>t;t++)for(o=0,r=e[t].length;r>o;o++)o==s&&(i.push([]),s++),i[o].push(e[t][o]);return i}function S(e){for(var t=0,n=e.length;n>t;)e[t]=[e[t]],t++}function E(e,t){for(var n=0,o=t.length;o>n;)e.push(t[n]),n++}function T(e){var t=["INPUT","SELECT","TEXTAREA"];return t.indexOf(e.nodeName)>-1||"true"===e.contentEditable}function _(e){return T(e)&&-1==e.className.indexOf("handsontableInput")&&-1==e.className.indexOf("copyPaste")}function k(e){return"[object Object]"==Object.prototype.toString.call(e)}function H(e){var t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;for(var n=e.length,o=e[0].length,r=0;n>r;r++)for(var i=0;o>i;i++)t[i]||(t[i]=[]),t[i][r]=e[r][i];return t}function M(e,t){return function(){return e.apply(t,arguments)}}function O(e,t){function n(e){var t=Handsontable.cellTypes[e];if("undefined"==typeof t)throw new Error('You declared cell type "'+e+'" as a string that is not mapped to a known object. Cell type must be an object or a string mapped to an object in Handsontable.cellTypes');return t}return t="undefined"==typeof t?!0:t,function(o,r){return function i(o){if(o){if(o.hasOwnProperty(e)&&void 0!==o[e])return o[e];if(o.hasOwnProperty("type")&&o.type){var r;if("string"!=typeof o.type)throw new Error("Cell type must be a string ");if(r=n(o.type),r.hasOwnProperty(e))return r[e];if(t)return}return i(b(o))}}("number"==typeof o?this.getCellMeta(o,r):o)}}function D(e){return e||(e=navigator.userAgent),/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)}function x(){return"ontouchstart"in window}function A(e){"function"==typeof e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function j(e){if(e.pageX)return e.pageX;var t=B.getWindowScrollLeft(),n=e.clientX+t;return n}function P(e){if(e.pageY)return e.pageY;var t=B.getWindowScrollTop(),n=e.clientY+t;return n}function N(e,t,n,o){o.value=n,o.writable=o.writable===!1?!1:!0,o.enumerable=o.enumerable===!1?!1:!0,o.configurable=o.configurable===!1?!1:!0,Object.defineProperty(e,t,o)}function L(e){return G.call(window,e)}function W(e){z.call(window,e)}Object.defineProperties(n,{isPrintableChar:{get:function(){return o}},isMetaKey:{get:function(){return r}},isCtrlKey:{get:function(){return i}},stringify:{get:function(){return s}},toUpperCaseFirst:{get:function(){return a}},equalsIgnoreCase:{get:function(){return l}},duckSchema:{get:function(){return u}},spreadsheetColumnLabel:{get:function(){return d}},createSpreadsheetData:{get:function(){return c}},createSpreadsheetObjectData:{get:function(){return h}},isNumeric:{get:function(){return f}},randomString:{get:function(){return p}},inherit:{get:function(){return g}},extend:{get:function(){return m}},deepExtend:{get:function(){return w}},deepClone:{get:function(){return v}},isObjectEquals:{get:function(){return y}},getPrototypeOf:{get:function(){return b}},columnFactory:{get:function(){return C}},translateRowsToColumns:{get:function(){return R}},to2dArray:{get:function(){return S}},extendArray:{get:function(){return E}},isInput:{get:function(){return T}},isOutsideInput:{get:function(){return _}},keyCode:{get:function(){return V}},isObject:{get:function(){return k}},pivot:{get:function(){return H}},proxy:{get:function(){return M}},cellMethodLookupFactory:{get:function(){return O}},isMobileBrowser:{get:function(){return D}},isTouchSupported:{get:function(){return x}},stopPropagation:{get:function(){return A}},pageX:{get:function(){return j}},pageY:{get:function(){return P}},defineGetter:{get:function(){return N}},requestAnimationFrame:{get:function(){return L}},cancelAnimationFrame:{get:function(){return W}},__esModule:{value:!0}});for(var I,B=(I=e("./dom.js"),I&&I.__esModule&&I||{"default":I}),V={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},F=0,Y=["ms","moz","webkit","o"],G=window.requestAnimationFrame,z=window.cancelAnimationFrame,U=0;U<Y.length&&!G;++U)G=window[Y[U]+"RequestAnimationFrame"],z=window[Y[U]+"CancelAnimationFrame"]||window[Y[U]+"CancelRequestAnimationFrame"];G||(G=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-F)),o=window.setTimeout(function(){e(t+n)},n);return F=t+n,o}),z||(z=function(e){clearTimeout(e)}),window.Handsontable=window.Handsontable||{},Handsontable.helper={cancelAnimationFrame:W,cellMethodLookupFactory:O,columnFactory:C,createSpreadsheetData:c,createSpreadsheetObjectData:h,deepClone:v,deepExtend:w,defineGetter:N,duckSchema:u,equalsIgnoreCase:l,extend:m,extendArray:E,getPrototypeOf:b,inherit:g,isCtrlKey:i,isInput:T,isMetaKey:r,isMobileBrowser:D,isNumeric:f,isObject:k,isObjectEquals:y,isOutsideInput:_,isPrintableChar:o,isTouchSupported:x,keyCode:V,pageX:j,pageY:P,pivot:H,proxy:M,randomString:p,requestAnimationFrame:L,spreadsheetColumnLabel:d,stopPropagation:A,stringify:s,to2dArray:S,toUpperCaseFirst:a,translateRowsToColumns:R}},{"./dom.js":27}],43:[function(e,t,n){"use strict";function o(){function e(e){return null!==e&&!n(e)&&("string"==typeof e||"number"==typeof e)}function t(e){return null!==e&&("object"==typeof e||"function"==typeof e)}function n(e){return e!==e}var o={arrayMap:[],weakMap:new WeakMap};return{get:function(n){return e(n)?o.arrayMap[n]:t(n)?o.weakMap.get(n):void 0},set:function(n,r){if(e(n))o.arrayMap[n]=r;else{if(!t(n))throw new Error("Invalid key type");o.weakMap.set(n,r)}},"delete":function(n){e(n)?delete o.arrayMap[n]:t(n)&&o.weakMap["delete"](n)}}}Object.defineProperties(n,{MultiMap:{get:function(){return o}},__esModule:{value:!0}}),window.MultiMap=o},{}],44:[function(e,t,n){"use strict";Object.defineProperties(n,{Hooks:{get:function(){return i}},__esModule:{value:!0}});var o,r=["afterCellMetaReset","afterChange","afterChangesObserved","afterColumnMove","afterColumnResize","afterContextMenuDefaultOptions","afterContextMenuHide","afterContextMenuShow","afterCopyLimit","afterCreateCol","afterCreateRow","afterDeselect","afterDestroy","afterDocumentKeyDown","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterIsMultipleSelectionCheck","afterLoadData","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnCellMouseDown","afterOnCellMouseOver","afterRemoveCol","afterRemoveRow","afterRender","afterRenderer","afterRowMove","afterRowResize","afterScrollHorizontally","afterScrollVertically","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","afterSetCellMeta","afterUpdateSettings","afterValidate","beforeAutofill","beforeCellAlignment","beforeChange","beforeChangeRender","beforeDrawBorders","beforeGetCellMeta","beforeInit","beforeInitWalkontable","beforeKeyDown","beforeOnCellMouseDown","beforeRemoveCol","beforeRemoveRow","beforeRender","beforeSetRangeEnd","beforeTouchScroll","beforeValidate","modifyCol","modifyColWidth","modifyRow","modifyRowHeight","persistentStateLoad","persistentStateReset","persistentStateSave"],i=((o=e("./eventManager.js"),o&&o.__esModule&&o||{"default":o}).EventManager,function(){this.globalBucket=this.createEmptyBucket()});$traceurRuntime.createClass(i,{createEmptyBucket:function(){for(var e=Object.create(null),t=0,n=r.length;n>t;t++)e[r[t]]=[];return e},getBucket:function(){var e=void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket},add:function(e,t){var n=void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))for(var o=0,r=t.length;r>o;o++)this.add(e,t[o]);else{var i=this.getBucket(n);"undefined"==typeof i[e]&&(this.register(e),i[e]=[]),t.skip=!1,-1===i[e].indexOf(t)&&i[e].push(t)}return this},once:function(e,t){var n=void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))for(var o=0,r=t.length;r>o;o++)t[o].runOnce=!0,this.add(e,t[o],n);else t.runOnce=!0,this.add(e,t,n)},remove:function(e,t){var n=void 0!==arguments[2]?arguments[2]:null,o=this.getBucket(n);return"undefined"!=typeof o[e]&&o[e].indexOf(t)>=0?(t.skip=!0,!0):!1},run:function(e,t,n,o,r,i,s,a){for(var l=this.globalBucket[t],u=l?l.length:0,d=0;u>d;d++)if(!l[d].skip){var c=l[d].call(e,n,o,r,i,s,a);void 0!==c&&(n=c),l[d].runOnce&&this.remove(t,l[d])}for(var h=this.getBucket(e)[t],f=h?h.length:0,p=0;f>p;p++)if(!h[p].skip){var g=h[p].call(e,n,o,r,i,s,a);void 0!==g&&(n=g),h[p].runOnce&&this.remove(t,h[p],e)}return n},destroy:function(){var e=void 0!==arguments[0]?arguments[0]:null,t=this.getBucket(e);for(var n in t)for(var o=0,r=t[n].length;r>o;o++)this.remove(n,t[n],e)},register:function(e){this.isRegistered(e)||r.push(e)},deregister:function(e){this.isRegistered(e)&&r.splice(r.indexOf(e),1)},isRegistered:function(e){return r.indexOf(e)>=0},getRegistered:function(){return r}},{})},{"./eventManager.js":41}],45:[function(e,t,n){"use strict";function o(e,t){Handsontable.hooks.add("beforeInit",function(){var n;e=e.toLowerCase(),i.has(this)||i.set(this,{}),n=i.get(this),n[e]||(n[e]=new t(this))}),Handsontable.hooks.add("afterDestroy",function(){var e,t;if(i.has(this)){t=i.get(this);for(e in t)t.hasOwnProperty(e)&&t[e].destroy();i["delete"](this)}})}function r(e,t){if("string"!=typeof t)throw Error('Only strings can be passed as "plugin" parameter');var n=t.toLowerCase();if(!i.has(e)||!i.get(e)[n])throw Error('No plugin registered under name "'+t+'"');return i.get(e)[n]}Object.defineProperties(n,{registerPlugin:{get:function(){return o}},getPlugin:{get:function(){return r}},__esModule:{value:!0}});var i=new WeakMap},{}],46:[function(e,t,n){"use strict";Object.defineProperties(n,{"default":{get:function(){return s}},__esModule:{value:!0}});var o,r=(o=e("./../helpers.js"),o&&o.__esModule&&o||{"default":o}).defineGetter,i=function(e){r(this,"hot",e,{writable:!1})};$traceurRuntime.createClass(i,{destroy:function(){delete this.hot}},{});var s=i},{"./../helpers.js":42}],47:[function(e,t,n){"use strict";function o(){function e(e){var t=document,n=this;n.table=t.createElement("table"),n.theadTh=t.createElement("th"),n.table.appendChild(t.createElement("thead")).appendChild(t.createElement("tr")).appendChild(n.theadTh),n.tableStyle=n.table.style,n.tableStyle.tableLayout="auto",n.tableStyle.width="auto",n.tbody=t.createElement("tbody"),n.table.appendChild(n.tbody),n.container=t.createElement("div"),n.container.className=e.rootElement.className+" hidden",n.containerStyle=n.container.style,n.container.appendChild(n.table)}var t=this,n=5;this.beforeInit=function(){var e=this;e.autoColumnWidths=[],e.getSettings().autoColumnSize!==!1?e.autoColumnSizeTmp||(e.autoColumnSizeTmp={table:null,tableStyle:null,theadTh:null,tbody:null,container:null,containerStyle:null,determineBeforeNextRender:!0},e.addHook("beforeRender",u.determineIfChanged),e.addHook("modifyColWidth",u.modifyColWidth),e.addHook("afterDestroy",u.afterDestroy),e.determineColumnWidth=t.determineColumnWidth):e.autoColumnSizeTmp&&(e.removeHook("beforeRender",u.determineIfChanged),e.removeHook("modifyColWidth",u.modifyColWidth),e.removeHook("afterDestroy",u.afterDestroy),delete e.determineColumnWidth,t.afterDestroy.call(e))},this.determineIfChanged=function(e){e&&u.determineColumnsWidth.apply(this,arguments)},this.determineColumnWidth=function(t){var o=this,r=o.autoColumnSizeTmp;r.container||e.call(r,o),r.container.className=o.rootElement.className+" htAutoColumnSize",r.table.className=o.table.className;for(var i=o.countRows(),s={},u=0;i>u;u++){var d=o.getDataAtCell(u,t);Array.isArray(d)||(d=a.stringify(d));var c=d.length;s[c]||(s[c]={needed:n,strings:[]}),s[c].needed&&(s[c].strings.push({value:d,row:u}),s[c].needed--)}null!==o.getColHeader(t)&&o.view.appendColHeader(t,r.theadTh),l.empty(r.tbody);for(var h in s)if(s.hasOwnProperty(h))for(var f=0,p=s[h].strings.length;p>f;f++){var g=s[h].strings[f].row,m=o.getCellMeta(g,t);m.col=t,m.row=g;var w=o.getCellRenderer(m),v=document.createElement("tr"),y=document.createElement("td");w(o,y,g,t,o.colToProp(t),s[h].strings[f].value,m),u++,v.appendChild(y),r.tbody.appendChild(v)}var b=o.rootElement.parentNode;b.appendChild(r.container);var C=l.outerWidth(r.table);return b.removeChild(r.container),C},this.determineColumnsWidth=function(){var e=this,n=this.getSettings();if(n.autoColumnSize||!n.colWidths)for(var o=this.countCols(),r=0;o>r;r++)e._getColWidthFromSettings(r)||(this.autoColumnWidths[r]=t.determineColumnWidth.call(e,r));
this.view.wt&&this.view.wt.wtOverlays.adjustElementsSize(!0)},this.modifyColWidth=function(e,t){return this.autoColumnWidths[t]&&this.autoColumnWidths[t]>e?this.autoColumnWidths[t]:e},this.afterDestroy=function(){var e=this;e.autoColumnSizeTmp&&e.autoColumnSizeTmp.container&&e.autoColumnSizeTmp.container.parentNode&&e.autoColumnSizeTmp.container.parentNode.removeChild(e.autoColumnSizeTmp.container),e.autoColumnSizeTmp=null}}Object.defineProperties(n,{AutoColumnSize:{get:function(){return o}},__esModule:{value:!0}});var r,i,s,a=(r=e("./../../helpers.js"),r&&r.__esModule&&r||{"default":r}),l=(i=e("./../../dom.js"),i&&i.__esModule&&i||{"default":i}),u=((s=e("./../../plugins.js"),s&&s.__esModule&&s||{"default":s}).registerPlugin,new o);Handsontable.hooks.add("beforeInit",u.beforeInit),Handsontable.hooks.add("afterUpdateSettings",u.beforeInit)},{"./../../dom.js":27,"./../../helpers.js":42,"./../../plugins.js":45}],48:[function(e,t,n){"use strict";function o(e,t,n,o){var r,i,s,a,l,u=n.length,d=n?n[0].length:0,c=[],h=[];if(r=t.row-e.row,i=t.col-e.col,-1!==["down","up"].indexOf(o)){for(var f=0;i>=f;f++)s=parseInt(n[0][f],10),a=parseInt(n[u-1][f],10),l=("down"===o?a-s:s-a)/(u-1)||0,h.push(l);c.push(h)}if(-1!==["right","left"].indexOf(o))for(var p=0;r>=p;p++)s=parseInt(n[p][0],10),a=parseInt(n[p][d-1],10),l=("right"===o?a-s:s-a)/(d-1)||0,h=[],h.push(l),c.push(h);return c}function r(e){function t(t){return e.autofill?void(e.autofill.handle&&e.autofill.handle.isDragged&&(e.autofill.handle.isDragged>1&&e.autofill.apply(),e.autofill.handle.isDragged=0,a=!1)):!0}function n(e){var t,n;return s.instance.autofill?(t=u.offset(s.instance.table).top-(window.pageYOffset||document.documentElement.scrollTop)+u.outerHeight(s.instance.table),n=u.offset(s.instance.table).left-(window.pageXOffset||document.documentElement.scrollLeft)+u.outerWidth(s.instance.table),s.addingStarted===!1&&s.instance.autofill.handle.isDragged>0&&e.clientY>t&&e.clientX<=n?(s.instance.mouseDragOutside=!0,s.addingStarted=!0):s.instance.mouseDragOutside=!1,void(s.instance.mouseDragOutside&&setTimeout(function(){s.addingStarted=!1,s.instance.alter("insert_row")},200))):!1}var o,r,i,s=this,a=!1;this.instance=e,this.addingStarted=!1,i=d(e),i.addEventListener(document,"mouseup",t),i.addEventListener(document,"mousemove",n),o=this.instance.view.wt.wtSettings.settings.onCellCornerMouseDown,this.instance.view.wt.wtSettings.settings.onCellCornerMouseDown=function(t){e.autofill.handle.isDragged=1,a=!0,o(t)},r=this.instance.view.wt.wtSettings.settings.onCellMouseOver,this.instance.view.wt.wtSettings.settings.onCellMouseOver=function(t,n,o,i){e.autofill&&a&&!e.view.isMouseDown()&&e.autofill.handle&&e.autofill.handle.isDragged&&(e.autofill.handle.isDragged++,e.autofill.showBorder(n),e.autofill.checkIfNewRowNeeded()),r(t,n,o,i)},this.instance.view.wt.wtSettings.settings.onCellCornerDblClick=function(){e.autofill.selectAdjacent()}}Object.defineProperties(n,{Autofill:{get:function(){return r}},__esModule:{value:!0}});var i,s,a,l,u=(i=e("./../../dom.js"),i&&i.__esModule&&i||{"default":i}),d=(s=e("./../../eventManager.js"),s&&s.__esModule&&s||{"default":s}).eventManager,c=((a=e("./../../plugins.js"),a&&a.__esModule&&a||{"default":a}).registerPlugin,(l=e("./../../3rdparty/walkontable/src/cell/coords.js"),l&&l.__esModule&&l||{"default":l}).WalkontableCellCoords);r.prototype.init=function(){this.handle={}},r.prototype.disable=function(){this.handle.disabled=!0},r.prototype.selectAdjacent=function(){var e,t,n,o,r;e=this.instance.selection.isMultiple()?this.instance.view.wt.selections.area.getCorners():this.instance.view.wt.selections.current.getCorners(),t=this.instance.getData();e:for(n=e[2]+1;n<this.instance.countRows();n++){for(r=e[1];r<=e[3];r++)if(t[n][r])break e;(t[n][e[1]-1]||t[n][e[3]+1])&&(o=n)}o&&(this.instance.view.wt.selections.fill.clear(),this.instance.view.wt.selections.fill.add(new c(e[0],e[1])),this.instance.view.wt.selections.fill.add(new c(o,e[3])),this.apply())},r.prototype.apply=function(){var e,t,n,r,i,s,a,l;this.handle.isDragged=0,e=this.instance.view.wt.selections.fill.getCorners(),e&&(this.instance.view.wt.selections.fill.clear(),t=this.instance.selection.isMultiple()?this.instance.view.wt.selections.area.getCorners():this.instance.view.wt.selections.current.getCorners(),Handsontable.hooks.run(this.instance,"afterAutofillApplyValues",t,e),e[0]===t[0]&&e[1]<t[1]?(s="left",n=new c(e[0],e[1]),r=new c(e[2],t[1]-1)):e[0]===t[0]&&e[3]>t[3]?(s="right",n=new c(e[0],t[3]+1),r=new c(e[2],e[3])):e[0]<t[0]&&e[1]===t[1]?(s="up",n=new c(e[0],e[1]),r=new c(t[0]-1,e[3])):e[2]>t[2]&&e[1]===t[1]&&(s="down",n=new c(t[2]+1,e[1]),r=new c(e[2],e[3])),n&&n.row>-1&&n.col>-1?(l={from:this.instance.getSelectedRange().from,to:this.instance.getSelectedRange().to},i=this.instance.getData(l.from.row,l.from.col,l.to.row,l.to.col),a=o(n,r,i,s),Handsontable.hooks.run(this.instance,"beforeAutofill",n,r,i),this.instance.populateFromArray(n.row,n.col,i,r.row,r.col,"autofill",null,s,a),this.instance.selection.setRangeStart(new c(e[0],e[1])),this.instance.selection.setRangeEnd(new c(e[2],e[3]))):this.instance.selection.refreshBorders())},r.prototype.showBorder=function(e){var t=this.instance.getSelectedRange().getTopLeftCorner(),n=this.instance.getSelectedRange().getBottomRightCorner();if("horizontal"!==this.instance.getSettings().fillHandle&&(n.row<e.row||t.row>e.row))e=new c(e.row,n.col);else{if("vertical"===this.instance.getSettings().fillHandle)return;e=new c(n.row,e.col)}this.instance.view.wt.selections.fill.clear(),this.instance.view.wt.selections.fill.add(this.instance.getSelectedRange().from),this.instance.view.wt.selections.fill.add(this.instance.getSelectedRange().to),this.instance.view.wt.selections.fill.add(e),this.instance.view.render()},r.prototype.checkIfNewRowNeeded=function(){var e,t,n=this.instance.countRows(),o=this;this.instance.view.wt.selections.fill.cellRange&&this.addingStarted===!1&&(t=this.instance.getSelected(),e=this.instance.view.wt.selections.fill.getCorners(),t[2]<n-1&&e[2]===n-1&&(this.addingStarted=!0,this.instance._registerTimeout(setTimeout(function(){o.instance.alter("insert_row"),o.addingStarted=!1},200))))},Handsontable.hooks.add("afterInit",function(){var e=new r(this);"undefined"!=typeof this.getSettings().fillHandle&&(e.handle&&this.getSettings().fillHandle===!1?e.disable():e.handle||this.getSettings().fillHandle===!1||(this.autofill=e,this.autofill.init()))}),Handsontable.Autofill=r},{"./../../3rdparty/walkontable/src/cell/coords.js":5,"./../../dom.js":27,"./../../eventManager.js":41,"./../../plugins.js":45}],49:[function(e,t,n){"use strict";Object.defineProperties(n,{"default":{get:function(){return f}},__esModule:{value:!0}});var o,r,i,s,a=(o=e("./../../dom.js"),o&&o.__esModule&&o||{"default":o}),l=(r=e("./../../eventManager.js"),r&&r.__esModule&&r||{"default":r}).eventManager,u=(i=e("./../_base.js"),i&&i.__esModule&&i||{"default":i})["default"],d=(s=e("./../../plugins.js"),s&&s.__esModule&&s||{"default":s}).registerPlugin,c=function(e){var t=this;$traceurRuntime.superConstructor(h).call(this,e);var n=this;this.sortIndicators=[],this.hot.addHook("afterInit",function(){return t.init.call(t,"afterInit")}),this.hot.addHook("afterUpdateSettings",function(){return t.init.call(t,"afterUpdateSettings")}),this.hot.addHook("modifyRow",function(){return n.translateRow.apply(n,arguments)}),this.hot.addHook("afterGetColHeader",function(){return n.getColHeader.apply(n,arguments)}),Handsontable.hooks.register("beforeColumnSort"),Handsontable.hooks.register("afterColumnSort")},h=c;$traceurRuntime.createClass(c,{init:function(e){var t=this.hot.getSettings().columnSorting,n=this;if(this.hot.sortingEnabled=!!t,this.hot.sortingEnabled){this.hot.sortIndex=[];var o,r,i=this.loadSortingState();"undefined"!=typeof i?(o=i.sortColumn,r=i.sortOrder):(o=t.column,r=t.sortOrder),this.sortByColumn(o,r),this.hot.sort=function(){var e=Array.prototype.slice.call(arguments);return n.sortByColumn.apply(n,e)},"undefined"==typeof this.hot.getSettings().observeChanges&&this.enableObserveChangesPlugin(),"afterInit"==e&&(this.bindColumnSortingAfterClick(),this.hot.addHook("afterCreateRow",function(){n.afterCreateRow.apply(n,arguments)}),this.hot.addHook("afterRemoveRow",function(){n.afterRemoveRow.apply(n,arguments)}),this.hot.addHook("afterLoadData",function(){n.init.apply(n,arguments)}))}else this.hot.sort=void 0,this.hot.removeHook("afterCreateRow",this.afterCreateRow),this.hot.removeHook("afterRemoveRow",this.afterRemoveRow),this.hot.removeHook("afterLoadData",this.init)},setSortingColumn:function(e,t){return"undefined"==typeof e?(this.hot.sortColumn=void 0,void(this.hot.sortOrder=void 0)):(this.hot.sortColumn===e&&"undefined"==typeof t?this.hot.sortOrder===!1?this.hot.sortOrder=void 0:this.hot.sortOrder=!this.hot.sortOrder:this.hot.sortOrder="undefined"!=typeof t?t:!0,void(this.hot.sortColumn=e))},sortByColumn:function(e,t){this.setSortingColumn(e,t),"undefined"!=typeof this.hot.sortColumn&&(Handsontable.hooks.run(this.hot,"beforeColumnSort",this.hot.sortColumn,this.hot.sortOrder),this.sort(),this.hot.render(),this.saveSortingState(),Handsontable.hooks.run(this.hot,"afterColumnSort",this.hot.sortColumn,this.hot.sortOrder))},saveSortingState:function(){var e={};"undefined"!=typeof this.hot.sortColumn&&(e.sortColumn=this.hot.sortColumn),"undefined"!=typeof this.hot.sortOrder&&(e.sortOrder=this.hot.sortOrder),(e.hasOwnProperty("sortColumn")||e.hasOwnProperty("sortOrder"))&&Handsontable.hooks.run(this.hot,"persistentStateSave","columnSorting",e)},loadSortingState:function(){var e={};return Handsontable.hooks.run(this.hot,"persistentStateLoad","columnSorting",e),e.value},bindColumnSortingAfterClick:function(){function e(){var e=o.hot.view.TBODY.querySelector("tr").querySelectorAll("th");return e.length}function t(t){var n=a.closest(t,"TH");return a.index(n)-e()}var n=l(this.hot),o=this;n.addEventListener(this.hot.rootElement,"click",function(e){if(a.hasClass(e.target,"columnSorting")){var n=t(e.target);if(n!==this.lastSortedColumn)o.sortOrderClass="ascending";else switch(o.hot.sortOrder){case void 0:o.sortOrderClass="ascending";break;case!0:o.sortOrderClass="descending";break;case!1:o.sortOrderClass=void 0}this.lastSortedColumn=n,o.sortByColumn(n)}})},enableObserveChangesPlugin:function(){var e=this;this.hot._registerTimeout(setTimeout(function(){e.hot.updateSettings({observeChanges:!0})},0))},defaultSort:function(e){return function(t,n){return"string"==typeof t[1]&&(t[1]=t[1].toLowerCase()),"string"==typeof n[1]&&(n[1]=n[1].toLowerCase()),t[1]===n[1]?0:null===t[1]||""===t[1]?1:null===n[1]||""===n[1]?-1:t[1]<n[1]?e?-1:1:t[1]>n[1]?e?1:-1:0}},dateSort:function(e){return function(t,n){if(t[1]===n[1])return 0;if(null===t[1])return 1;if(null===n[1])return-1;var o=new Date(t[1]),r=new Date(n[1]);return r>o?e?-1:1:o>r?e?1:-1:0}},sort:function(){if("undefined"!=typeof this.hot.sortOrder){var e,t;this.hot.sortingEnabled=!1,this.hot.sortIndex.length=0;for(var n=this.hot.colOffset(),o=0,r=this.hot.countRows()-this.hot.getSettings().minSpareRows;r>o;o++)this.hot.sortIndex.push([o,this.hot.getDataAtCell(o,this.hot.sortColumn+n)]);switch(e=this.hot.getCellMeta(0,this.hot.sortColumn),this.sortIndicators[this.hot.sortColumn]=e.sortIndicator,e.type){case"date":t=this.dateSort;break;default:t=this.defaultSort}this.hot.sortIndex.sort(t(this.hot.sortOrder));for(var o=this.hot.sortIndex.length;o<this.hot.countRows();o++)this.hot.sortIndex.push([o,this.hot.getDataAtCell(o,this.hot.sortColumn+n)]);this.hot.sortingEnabled=!0}},translateRow:function(e){return this.hot.sortingEnabled&&"undefined"!=typeof this.hot.sortOrder&&this.hot.sortIndex&&this.hot.sortIndex.length&&this.hot.sortIndex[e]?this.hot.sortIndex[e][0]:e},untranslateRow:function(e){if(this.hot.sortingEnabled&&this.hot.sortIndex&&this.hot.sortIndex.length)for(var t=0;t<this.hot.sortIndex.length;t++)if(this.hot.sortIndex[t][0]==e)return t},getColHeader:function(e,t){var n=t.querySelector(".colHeader");this.hot.getSettings().columnSorting&&e>=0&&a.addClass(n,"columnSorting"),a.removeClass(n,"descending"),a.removeClass(n,"ascending"),this.sortIndicators[e]&&e===this.hot.sortColumn&&("ascending"===this.sortOrderClass?a.addClass(n,"ascending"):"descending"===this.sortOrderClass&&a.addClass(n,"descending"))},isSorted:function(){return"undefined"!=typeof this.hot.sortColumn},afterCreateRow:function(e,t){if(this.isSorted()){for(var n=0;n<this.hot.sortIndex.length;n++)this.hot.sortIndex[n][0]>=e&&(this.hot.sortIndex[n][0]+=t);for(var n=0;t>n;n++)this.hot.sortIndex.splice(e+n,0,[e+n,this.hot.getData()[e+n][this.hot.sortColumn+this.hot.colOffset()]]);this.saveSortingState()}},afterRemoveRow:function(e,t){if(this.isSorted()){var n=this.translateRow(e);this.hot.sortIndex.splice(e,t);for(var o=0;o<this.hot.sortIndex.length;o++)this.hot.sortIndex[o][0]>n&&(this.hot.sortIndex[o][0]-=t);this.saveSortingState()}}},{},u);var f=c;d("columnSorting",c)},{"./../../dom.js":27,"./../../eventManager.js":41,"./../../plugins.js":45,"./../_base.js":46}],50:[function(e,t,n){"use strict";Object.defineProperties(n,{CommentEditor:{get:function(){return i}},__esModule:{value:!0}});var o,r=(o=e("./../../dom.js"),o&&o.__esModule&&o||{"default":o}),i=function(){this.editor=this.createEditor(),this.editorStyle=this.editor.style,this.editorStyle.position="absolute",this.editorStyle.zIndex=100,this.hide()},s=i;$traceurRuntime.createClass(i,{setPosition:function(e,t){this.editorStyle.left=e+"px",this.editorStyle.top=t+"px"},show:function(){this.editorStyle.display="block"},hide:function(){this.editorStyle.display="none"},isVisible:function(){return"block"===this.editorStyle.display},setValue:function(){var e=void 0!==arguments[0]?arguments[0]:"";e=e||"",this.getInputElement().value=e},getValue:function(){return this.getInputElement().value},isFocused:function(){return document.activeElement===this.getInputElement()},focus:function(){this.getInputElement().focus()},createEditor:function(){var e,t,n=document.querySelector("."+s.CLASS_EDITOR_CONTAINER);return n||(n=document.createElement("div"),r.addClass(n,s.CLASS_EDITOR_CONTAINER),document.body.appendChild(n)),e=document.createElement("div"),r.addClass(e,s.CLASS_EDITOR),t=document.createElement("textarea"),r.addClass(t,s.CLASS_INPUT),e.appendChild(t),n.appendChild(e),e},getInputElement:function(){return this.editor.querySelector("."+s.CLASS_INPUT)},destroy:function(){this.editor.parentNode.removeChild(this.editor),this.editor=null,this.editorStyle=null}},{get CLASS_EDITOR_CONTAINER(){return"htCommentsContainer"},get CLASS_EDITOR(){return"htComments"},get CLASS_INPUT(){return"htCommentTextArea"},get CLASS_CELL(){return"htCommentCell"}})},{"./../../dom.js":27}],51:[function(e,t,n){"use strict";Object.defineProperties(n,{Comments:{get:function(){return m}},__esModule:{value:!0}});var o,r,i,s,a,l,u=(o=e("./../../dom.js"),o&&o.__esModule&&o||{"default":o}),d=(r=e("./../../eventManager.js"),r&&r.__esModule&&r||{"default":r}).EventManager,c=(i=e("./../../3rdparty/walkontable/src/cell/coords.js"),i&&i.__esModule&&i||{"default":i}).WalkontableCellCoords,h=(s=e("./../../plugins.js"),s&&s.__esModule&&s||{"default":s}),f=h.registerPlugin,p=(h.getPlugin,(a=e("./../_base.js"),a&&a.__esModule&&a||{"default":a})["default"]),g=(l=e("./commentEditor.js"),l&&l.__esModule&&l||{"default":l}).CommentEditor,m=function(e){var t=this;$traceurRuntime.superConstructor(w).call(this,e),this.hot.getSettings().comments&&(this.editor=new g,this.eventManager=new d(this),this.range={},this.mouseDown=!1,this.contextMenuEvent=!1,this.timer=null,this.hot.addHook("afterInit",function(){return t.registerListeners()}),this.hot.addHook("afterContextMenuDefaultOptions",function(e){return t.addToContextMenu(e)}),this.hot.addHook("afterRenderer",function(e,n,o,r,i,s){return t.onAfterRenderer(e,s)}),this.hot.addHook("afterScrollVertically",function(){return t.refreshEditorPosition()}),this.hot.addHook("afterColumnResize",function(){return t.refreshEditorPosition()}),this.hot.addHook("afterRowResize",function(){return t.refreshEditorPosition()}))},w=m;$traceurRuntime.createClass(m,{registerListeners:function(){var e=this;this.eventManager.addEventListener(document,"mouseover",function(t){return e.onMouseOver(t)}),this.eventManager.addEventListener(document,"mousedown",function(t){return e.onMouseDown(t)}),this.eventManager.addEventListener(document,"mousemove",function(t){return e.onMouseMove(t)}),this.eventManager.addEventListener(document,"mouseup",function(t){return e.onMouseUp(t)}),this.eventManager.addEventListener(this.editor.getInputElement(),"blur",function(t){return e.onEditorBlur(t)})},setRange:function(e){this.range=e},clearRange:function(){this.range={}},targetIsCellWithComment:function(e){return u.hasClass(e.target,"htCommentCell")&&u.closest(e.target,[this.hot.rootElement])?!0:!1},targetIsCommentTextArea:function(e){return this.editor.getInputElement()===e.target},saveComment:function(){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');var e=this.editor.getValue(),t=this.range.from.row,n=this.range.from.col;this.hot.setCellMeta(t,n,"comment",e),this.hot.render()},saveCommentAtCell:function(e,t){this.setRange({from:new c(e,t)}),this.saveComment()},removeComment:function(){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');this.hot.removeCellMeta(this.range.from.row,this.range.from.col,"comment"),this.hot.render(),this.hide()},removeCommentAtCell:function(e,t){this.setRange({from:new c(e,t)}),this.removeComment()},show:function(){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');var e=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return this.refreshEditorPosition(!0),this.editor.setValue(e.comment||""),this.editor.show(),!0},showAtCell:function(e,t){return this.setRange({from:new c(e,t)}),this.show()},hide:function(){this.editor.hide()},refreshEditorPosition:function(){var e=void 0!==arguments[0]?arguments[0]:!1;if(e||this.range.from&&this.editor.isVisible()){var t=this.hot.view.wt.wtTable.getCell(this.range.from),n=u.offset(t),o=this.hot.getColWidth(this.range.from.col),r=n.top,i=n.left,s=0,a=0;this.hot.view.wt.wtViewport.hasVerticalScroll()&&(r-=this.hot.view.wt.wtOverlays.topOverlay.getScrollPosition(),s=20),this.hot.view.wt.wtViewport.hasHorizontalScroll()&&(i-=this.hot.view.wt.wtOverlays.leftOverlay.getScrollPosition(),a=20);var l=i+o,d=r,c=this.hot.view.wt.wtTable.holder.getBoundingClientRect(),h={left:c.left+u.getWindowScrollLeft()+a,right:c.right+u.getWindowScrollLeft()-15,top:c.top+u.getWindowScrollTop()+s,bottom:c.bottom+u.getWindowScrollTop()};l<=h.left||l>h.right||d<=h.top||d>h.bottom?this.hide():this.editor.setPosition(l,d)}},onMouseDown:function(e){this.mouseDown=!0,this.hot.view&&this.hot.view.wt&&(this.contextMenuEvent||this.targetIsCommentTextArea(e)||this.targetIsCellWithComment(e)||this.hide(),this.contextMenuEvent=!1)},onMouseOver:function(e){if(!this.mouseDown&&!this.editor.isFocused())if(this.targetIsCellWithComment(e)){var t=this.hot.view.wt.wtTable.getCoords(e.target),n={from:new c(t.row,t.col)};this.setRange(n),this.show()}else this.targetIsCommentTextArea(e)||this.editor.isFocused()||this.hide()},onMouseMove:function(e){var t=this;this.targetIsCommentTextArea(e)&&(this.mouseDown=!0,clearTimeout(this.timer),this.timer=setTimeout(function(){t.mouseDown=!1},200))},onMouseUp:function(e){this.mouseDown=!1},onAfterRenderer:function(e,t){t.comment&&u.addClass(e,t.commentedCellClassName)},onEditorBlur:function(e){this.saveComment()},checkSelectionCommentsConsistency:function(){var e=!1,t=this.hot.getSelectedRange().from;return this.hot.getCellMeta(t.row,t.col).comment&&(e=!0),e},onContextMenuAddComment:function(){var e=this,t=this.hot.getSelectedRange();this.contextMenuEvent=!0,this.setRange({from:t.from}),this.show(),setTimeout(function(){e.hot&&(e.hot.deselectCell(),e.editor.focus())},10)},onContextMenuRemoveComment:function(e,t){this.contextMenuEvent=!0,this.removeCommentAtCell(t.start.row,t.start.col)},addToContextMenu:function(e){var t=this;e.items.push(Handsontable.ContextMenu.SEPARATOR,{key:"commentsAddEdit",name:function(){return t.checkSelectionCommentsConsistency()?"Edit Comment":"Add Comment"},callback:function(){return t.onContextMenuAddComment()},disabled:function(){return!1}},{key:"commentsRemove",name:function(){return"Delete Comment"},callback:function(e,n){return t.onContextMenuRemoveComment(e,n)},disabled:function(){return!t.checkSelectionCommentsConsistency()}})},destroy:function(){this.eventManager&&this.eventManager.clear(),this.editor&&this.editor.destroy(),$traceurRuntime.superGet(this,w.prototype,"destroy").call(this)}},{},p),f("comments",m)},{"./../../3rdparty/walkontable/src/cell/coords.js":5,"./../../dom.js":27,"./../../eventManager.js":41,"./../../plugins.js":45,"./../_base.js":46,"./commentEditor.js":50}],52:[function(e,t,n){"use strict";function o(e,t){this.instance=e;var n=this;if(n.menus=[],n.htMenus={},n.triggerRows=[],n.eventManager=y(n),this.enabled=!0,this.instance.addHook("afterDestroy",function(){n.destroy()}),this.defaultOptions={items:[{key:"row_above",name:"Insert row above",callback:function(e,t){this.alter("insert_row",t.start.row)},disabled:function(){var e=this.getSelected(),t=[0,e[1],this.countRows()-1,e[1]],n=t.join(",")==e.join(",");return e[0]<0||this.countRows()>=this.getSettings().maxRows||n}},{key:"row_below",name:"Insert row below",callback:function(e,t){this.alter("insert_row",t.end.row+1)},disabled:function(){var e=this.getSelected(),t=[0,e[1],this.countRows()-1,e[1]],n=t.join(",")==e.join(",");return this.getSelected()[0]<0||this.countRows()>=this.getSettings().maxRows||n}},o.SEPARATOR,{key:"col_left",name:"Insert column on the left",callback:function(e,t){this.alter("insert_col",t.start.col)},disabled:function(){if(!this.isColumnModificationAllowed())return!0;var e=this.getSelected(),t=[e[0],0,e[0],this.countCols()-1],n=t.join(",")==e.join(",");return this.getSelected()[1]<0||this.countCols()>=this.getSettings().maxCols||n}},{key:"col_right",name:"Insert column on the right",callback:function(e,t){this.alter("insert_col",t.end.col+1)},disabled:function(){if(!this.isColumnModificationAllowed())return!0;var e=this.getSelected(),t=[e[0],0,e[0],this.countCols()-1],n=t.join(",")==e.join(",");return e[1]<0||this.countCols()>=this.getSettings().maxCols||n}},o.SEPARATOR,{key:"remove_row",name:"Remove row",callback:function(e,t){var n=t.end.row-t.start.row+1;this.alter("remove_row",t.start.row,n)},disabled:function(){var e=this.getSelected(),t=[0,e[1],this.countRows()-1,e[1]],n=t.join(",")==e.join(",");return e[0]<0||n}},{key:"remove_col",name:"Remove column",callback:function(e,t){var n=t.end.col-t.start.col+1;this.alter("remove_col",t.start.col,n)},disabled:function(){if(!this.isColumnModificationAllowed())return!0;var e=this.getSelected(),t=[e[0],0,e[0],this.countCols()-1],n=t.join(",")==e.join(",");return e[1]<0||n}},o.SEPARATOR,{key:"undo",name:"Undo",callback:function(){this.undo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isUndoAvailable()}},{key:"redo",name:"Redo",callback:function(){this.redo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isRedoAvailable()}},o.SEPARATOR,{key:"make_read_only",name:function(){var e="Read only",t=n.checkSelectionReadOnlyConsistency(this);return t&&(e=n.markSelected(e)),e},callback:function(){var e=n.checkSelectionReadOnlyConsistency(this),t=this;this.getSelectedRange().forAll(function(n,o){t.getCellMeta(n,o).readOnly=e?!1:!0}),this.render()}},o.SEPARATOR,{key:"alignment",name:"Alignment",submenu:{items:[{name:function(){var e="Left",t=n.checkSelectionAlignment(this,"htLeft");return t&&(e=n.markSelected(e)),e},callback:function(){c.call(this,this.getSelectedRange(),"horizontal","htLeft")},disabled:!1},{name:function(){var e="Center",t=n.checkSelectionAlignment(this,"htCenter");return t&&(e=n.markSelected(e)),e},callback:function(){c.call(this,this.getSelectedRange(),"horizontal","htCenter")},disabled:!1},{name:function(){var e="Right",t=n.checkSelectionAlignment(this,"htRight");return t&&(e=n.markSelected(e)),e},callback:function(){c.call(this,this.getSelectedRange(),"horizontal","htRight")},disabled:!1},{name:function(){var e="Justify",t=n.checkSelectionAlignment(this,"htJustify");return t&&(e=n.markSelected(e)),e},callback:function(){c.call(this,this.getSelectedRange(),"horizontal","htJustify")},disabled:!1},o.SEPARATOR,{name:function(){var e="Top",t=n.checkSelectionAlignment(this,"htTop");return t&&(e=n.markSelected(e)),e},callback:function(){c.call(this,this.getSelectedRange(),"vertical","htTop")},disabled:!1},{name:function(){var e="Middle",t=n.checkSelectionAlignment(this,"htMiddle");return t&&(e=n.markSelected(e)),e},callback:function(){c.call(this,this.getSelectedRange(),"vertical","htMiddle")},disabled:!1},{name:function(){var e="Bottom",t=n.checkSelectionAlignment(this,"htBottom");return t&&(e=n.markSelected(e)),e},callback:function(){c.call(this,this.getSelectedRange(),"vertical","htBottom")},disabled:!1}]}}]},n.options={},w.extend(n.options,this.options),this.bindMouseEvents(),this.markSelected=function(e){return"<span class='selected'>"+String.fromCharCode(10003)+"</span>"+e},this.checkSelectionAlignment=function(e,t){var n=!1;return e.getSelectedRange().forAll(function(o,r){var i=e.getCellMeta(o,r).className;return i&&-1!=i.indexOf(t)?(n=!0,!1):void 0}),n},!this.instance.getSettings().allowInsertRow){var r=i(this.defaultOptions.items,"row_above");this.defaultOptions.items.splice(r,1);var s=i(this.defaultOptions.items,"row_above");this.defaultOptions.items.splice(s,1),this.defaultOptions.items.splice(s,1)}if(!this.instance.getSettings().allowInsertColumn){var a=i(this.defaultOptions.items,"col_left");this.defaultOptions.items.splice(a,1);var l=i(this.defaultOptions.items,"col_right");this.defaultOptions.items.splice(l,1),this.defaultOptions.items.splice(l,1)}var u,d,h=!1,f=!1;this.instance.getSettings().allowRemoveRow||(u=i(this.defaultOptions.items,"remove_row"),this.defaultOptions.items.splice(u,1),h=!0),this.instance.getSettings().allowRemoveColumn||(d=i(this.defaultOptions.items,"remove_col"),this.defaultOptions.items.splice(d,1),f=!0),h&&f&&this.defaultOptions.items.splice(d,1),this.checkSelectionReadOnlyConsistency=function(e){var t=!1;return e.getSelectedRange().forAll(function(n,o){return e.getCellMeta(n,o).readOnly?(t=!0,!1):void 0}),t},Handsontable.hooks.run(e,"afterContextMenuDefaultOptions",this.defaultOptions)}function r(e,t){for(var n=0,o=e.length;o>n;n++)if(e[n].key===t)return e[n]}function i(e,t){for(var n=0,o=e.length;o>n;n++)if(e[n].key===t)return n}function s(){if(!this.rootElement.className.indexOf("htContextMenu")){for(var e=0,t=0,n=this.getSettings().data.length,r=parseInt(this.view.wt.wtTable.hider.style.width,10),i=0;n>i;i++)this.getSettings().data[i].name==o.SEPARATOR.name?e+=1:t+=26;this.view.wt.wtTable.holder.style.width=r+22+"px",this.view.wt.wtTable.holder.style.height=t+e+4+"px"}}function a(e,t){return-1!=e.indexOf(t)?e:(e=e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ",""),e+=" "+t)}function l(e,t){return-1!=e.indexOf(t)?e:(e=e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ",""),e+=" "+t)}function u(e){for(var t={},n=e.from.row;n<=e.to.row;n++)for(var o=e.from.col;o<=e.to.col;o++)t[n]||(t[n]=[]),t[n][o]=this.getCellMeta(n,o).className;return t}function d(e,t,n,o){var r=this.getCellMeta(e,t),i=o;r.className&&(i="vertical"===n?a(r.className,o):l(r.className,o)),this.setCellMeta(e,t,"className",i)}function c(e,t,n){var o=u.call(this,e);if(this.runHooks("beforeCellAlignment",o,e,t,n),e.from.row==e.to.row&&e.from.col==e.to.col)d.call(this,e.from.row,e.from.col,t,n);else for(var r=e.from.row;r<=e.to.row;r++)for(var i=e.from.col;i<=e.to.col;i++)d.call(this,r,i,t,n);this.render()}function h(){var e=this,t=e.getSettings().contextMenu,n=w.isObject(t)?t:{};t?(e.contextMenu||(e.contextMenu=new o(e,n)),e.contextMenu.enable()):e.contextMenu&&(e.contextMenu.destroy(),delete e.contextMenu)}Object.defineProperties(n,{ContextMenu:{get:function(){return o}},__esModule:{value:!0}});var f,p,g,m,w=(f=e("./../../helpers.js"),f&&f.__esModule&&f||{"default":f}),v=(p=e("./../../dom.js"),p&&p.__esModule&&p||{"default":p}),y=(g=e("./../../eventManager.js"),g&&g.__esModule&&g||{"default":g}).eventManager;(m=e("./../../plugins.js"),m&&m.__esModule&&m||{"default":m}).registerPlugin;o.prototype.createMenu=function(e,t){e&&(e=e.replace(/ /g,"_"),e="htContextSubMenu_"+e);var n;return n=e?document.querySelector(".htContextMenu."+e):document.querySelector(".htContextMenu"),n||(n=document.createElement("DIV"),v.addClass(n,"htContextMenu"),e&&v.addClass(n,e),document.getElementsByTagName("body")[0].appendChild(n)),this.menus.indexOf(n)<0&&(this.menus.push(n),t=t||0,this.triggerRows.push(t)),n},o.prototype.bindMouseEvents=function(){function e(e){function t(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}var n,r,i,s,a=this.instance.getSettings(),l=this.instance.getSettings().rowHeaders,u=this.instance.getSettings().colHeaders;if(r=e.realTarget,this.closeAll(),e.preventDefault(),w.stopPropagation(e),l||u){if(l&&u&&(n=r.parentNode.querySelectorAll(".cornerHeader").length>0))return}else if(!(t(r)||v.hasClass(r,"current")&&v.hasClass(r,"wtBorder")))return;s=this.createMenu(),i=this.getItems(a.contextMenu),this.show(s,i),this.setMenuPosition(e,s),this.eventManager.addEventListener(document.documentElement,"mousedown",w.proxy(o.prototype.closeAll,this))}var t=y(this.instance);t.addEventListener(this.instance.rootElement,"contextmenu",w.proxy(e,this))},o.prototype.bindTableEvents=function(){this._afterScrollCallback=function(){},this.instance.addHook("afterScrollVertically",this._afterScrollCallback),this.instance.addHook("afterScrollHorizontally",this._afterScrollCallback)},o.prototype.unbindTableEvents=function(){this._afterScrollCallback&&(this.instance.removeHook("afterScrollVertically",this._afterScrollCallback),this.instance.removeHook("afterScrollHorizontally",this._afterScrollCallback),this._afterScrollCallback=null)},o.prototype.performAction=function(e,t){var n=this,r=t.getSelected()[0],i=t.getData()[r];if(i.disabled!==!0&&("function"!=typeof i.disabled||i.disabled.call(this.instance)!==!0)&&!i.hasOwnProperty("submenu")){if("function"!=typeof i.callback)return;var s=this.instance.getSelectedRange(),a=o.utils.normalizeSelection(s);i.callback.call(this.instance,i.key,a,e),n.closeAll()}},o.prototype.unbindMouseEvents=function(){this.eventManager.clear();var e=y(this.instance);e.removeEventListener(this.instance.rootElement,"contextmenu")},o.prototype.show=function(e,t){var n=this;e.removeAttribute("style"),e.style.display="block";var o={data:t,colHeaders:!1,colWidths:[200],readOnly:!0,copyPaste:!1,columns:[{data:"name",renderer:w.proxy(this.renderer,this)}],renderAllRows:!0,beforeKeyDown:function(e){n.onBeforeKeyDown(e,r)},afterOnCellMouseOver:function(e,t,o){n.onCellMouseOver(e,t,o,r)}},r=new Handsontable(e,o);r.isHotTableEnv=this.instance.isHotTableEnv,Handsontable.eventManager.isHotTableEnv=this.instance.isHotTableEnv,this.eventManager.removeEventListener(e,"mousedown"),this.eventManager.addEventListener(e,"mousedown",function(e){n.performAction(e,r)}),this.bindTableEvents(),r.listen(),this.htMenus[r.guid]=r,Handsontable.hooks.run(this.instance,"afterContextMenuShow",r)},o.prototype.close=function(e){this.hide(e),this.eventManager.clear(),this.unbindTableEvents(),this.instance.listen()},o.prototype.closeAll=function(){for(;this.menus.length>0;){var e=this.menus.pop();e&&this.close(e)}this.triggerRows=[]},o.prototype.closeLastOpenedSubMenu=function(){var e=this.menus.pop();e&&this.hide(e)},o.prototype.hide=function(e){e.style.display="none";var t=this.htMenus[e.id];Handsontable.hooks.run(this.instance,"afterContextMenuHide",t),
t.destroy(),delete this.htMenus[e.id]},o.prototype.renderer=function(e,t,n,r,i,s){function a(e){return e.hasOwnProperty("submenu")}function l(e){return new RegExp(o.SEPARATOR.name,"i").test(e.name)}function u(e){return e.disabled===!0||"function"==typeof e.disabled&&e.disabled.call(d.instance)===!0}var d=this,c=e.getData()[n],h=document.createElement("DIV");"function"==typeof s&&(s=s.call(this.instance)),v.empty(t),t.appendChild(h),l(c)?v.addClass(t,"htSeparator"):v.fastInnerHTML(h,s),u(c)?(v.addClass(t,"htDisabled"),this.eventManager.addEventListener(h,"mouseenter",function(){e.deselectCell()})):a(c)?(v.addClass(t,"htSubmenu"),this.eventManager.addEventListener(h,"mouseenter",function(){e.selectCell(n,r)})):(v.removeClass(t,"htSubmenu"),v.removeClass(t,"htDisabled"),this.eventManager.addEventListener(h,"mouseenter",function(){e.selectCell(n,r)}))},o.prototype.onCellMouseOver=function(e,t,n,o){var r=this.menus.length;if(r>0){var i=this.menus[r-1];i.id!=o.guid&&this.closeLastOpenedSubMenu()}else this.closeLastOpenedSubMenu();if(-1!=n.className.indexOf("htSubmenu")){var s=o.getData()[t.row],a=this.getItems(s.submenu),l=this.createMenu(s.name,t.row),u=n.getBoundingClientRect();this.show(l,a),this.setSubMenuPosition(u,l)}},o.prototype.onBeforeKeyDown=function(e,t){function n(e){var t=e.getCell(0,0);o.utils.isSeparator(t)||o.utils.isDisabled(t)?i(0,0,e):e.selectCell(0,0)}function r(e){var t=e.countRows()-1,n=e.getCell(t,0);o.utils.isSeparator(n)||o.utils.isDisabled(n)?s(t,0,e):e.selectCell(t,0)}function i(e,t,n){var r=e+1,s=r<n.countRows()?n.getCell(r,t):null;s&&(o.utils.isSeparator(s)||o.utils.isDisabled(s)?i(r,t,n):n.selectCell(r,t))}function s(e,t,n){var r=e-1,i=r>=0?n.getCell(r,t):null;i&&(o.utils.isSeparator(i)||o.utils.isDisabled(i)?s(r,t,n):n.selectCell(r,t))}function a(e,t,n,o){var r=e.getData()[o],i=t.getItems(r.submenu),s=t.createMenu(r.name,o),a=n.getBoundingClientRect(),l=t.show(s,i);t.setSubMenuPosition(a,s),l.selectCell(0,0)}v.enableImmediatePropagation(e);var l=this,u=t.getSelected();switch(e.keyCode){case w.keyCode.ESCAPE:l.closeAll(),e.preventDefault(),e.stopImmediatePropagation();break;case w.keyCode.ENTER:u&&l.performAction(e,t);break;case w.keyCode.ARROW_DOWN:u?i(u[0],u[1],t,l):n(t,l),e.preventDefault(),e.stopImmediatePropagation();break;case w.keyCode.ARROW_UP:u?s(u[0],u[1],t,l):r(t,l),e.preventDefault(),e.stopImmediatePropagation();break;case w.keyCode.ARROW_RIGHT:if(u){var d=u[0],c=t.getCell(u[0],0);o.utils.hasSubMenu(c)&&a(t,l,c,d)}e.preventDefault(),e.stopImmediatePropagation();break;case w.keyCode.ARROW_LEFT:if(u){if(-1!=t.rootElement.className.indexOf("htContextSubMenu_")){l.closeLastOpenedSubMenu();var h=l.menus.length;if(h>0){var f=l.menus[h-1],p=l.triggerRows.pop();t=this.htMenus[f.id],t.selectCell(p,0)}}e.preventDefault(),e.stopImmediatePropagation()}}},o.prototype.getItems=function(e){function t(e){"string"==typeof e?this.name=e:w.extend(this,e)}var n,o;t.prototype=e,e&&e.items&&(e=e.items),e===!0&&(e=this.defaultOptions.items),n=[];for(var i in e)e.hasOwnProperty(i)&&(o="string"==typeof e[i]?r(this.defaultOptions.items,e[i]):r(this.defaultOptions.items,i),o||(o=e[i]),o=new t(o),"object"==typeof e[i]&&w.extend(o,e[i]),o.key||(o.key=i),n.push(o));return n},o.prototype.setSubMenuPosition=function(e,t){var n=v.getWindowScrollTop(),o=v.getWindowScrollLeft(),r={top:n+e.top,topRelative:e.top,left:e.left,leftRelative:e.left-o,scrollTop:n,scrollLeft:o,cellHeight:e.height,cellWidth:e.width};this.menuFitsBelowCursor(r,t,document.body.clientWidth)?this.positionMenuBelowCursor(r,t,!0):this.menuFitsAboveCursor(r,t)?this.positionMenuAboveCursor(r,t,!0):this.positionMenuBelowCursor(r,t,!0),this.menuFitsOnRightOfCursor(r,t,document.body.clientWidth)?this.positionMenuOnRightOfCursor(r,t,!0):this.positionMenuOnLeftOfCursor(r,t,!0)},o.prototype.setMenuPosition=function(e,t){var n=v.getWindowScrollTop(),o=v.getWindowScrollLeft(),r=e.pageY||e.clientY+n,i=e.pageX||e.clientX+o,s={top:r,topRelative:r-n,left:i,leftRelative:i-o,scrollTop:n,scrollLeft:o,cellHeight:e.target.clientHeight,cellWidth:e.target.clientWidth};this.menuFitsBelowCursor(s,t,document.body.clientHeight)?this.positionMenuBelowCursor(s,t):this.menuFitsAboveCursor(s,t)?this.positionMenuAboveCursor(s,t):this.positionMenuBelowCursor(s,t),this.menuFitsOnRightOfCursor(s,t,document.body.clientWidth)?this.positionMenuOnRightOfCursor(s,t):this.positionMenuOnLeftOfCursor(s,t)},o.prototype.menuFitsAboveCursor=function(e,t){return e.topRelative>=t.offsetHeight},o.prototype.menuFitsBelowCursor=function(e,t,n){return e.topRelative+t.offsetHeight<=n},o.prototype.menuFitsOnRightOfCursor=function(e,t,n){return e.leftRelative+t.offsetWidth<=n},o.prototype.positionMenuBelowCursor=function(e,t){t.style.top=e.top+"px"},o.prototype.positionMenuAboveCursor=function(e,t,n){n?t.style.top=e.top+e.cellHeight-t.offsetHeight+"px":t.style.top=e.top-t.offsetHeight+"px"},o.prototype.positionMenuOnRightOfCursor=function(e,t,n){n?t.style.left=1+e.left+e.cellWidth+"px":t.style.left=1+e.left+"px"},o.prototype.positionMenuOnLeftOfCursor=function(e,t,n){n?t.style.left=e.left-t.offsetWidth+"px":t.style.left=e.left-t.offsetWidth+"px"},o.utils={},o.utils.normalizeSelection=function(e){return{start:e.getTopLeftCorner(),end:e.getBottomRightCorner()}},o.utils.isSeparator=function(e){return v.hasClass(e,"htSeparator")},o.utils.hasSubMenu=function(e){return v.hasClass(e,"htSubmenu")},o.utils.isDisabled=function(e){return v.hasClass(e,"htDisabled")},o.prototype.enable=function(){this.enabled||(this.enabled=!0,this.bindMouseEvents())},o.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.closeAll(),this.unbindMouseEvents(),this.unbindTableEvents())},o.prototype.destroy=function(){for(this.closeAll();this.menus.length>0;){var e=this.menus.pop();this.triggerRows.pop(),e&&(this.close(e),this.isMenuEnabledByOtherHotInstance()||this.removeMenu(e))}this.unbindMouseEvents(),this.unbindTableEvents()},o.prototype.isMenuEnabledByOtherHotInstance=function(){for(var e=document.querySelectorAll(".handsontable"),t=!1,n=0,o=e.length;o>n;n++){var r=this.htMenus[e[n].id];if(r&&r.getSettings().contextMenu){t=!0;break}}return t},o.prototype.removeMenu=function(e){e.parentNode&&this.menu.parentNode.removeChild(e)},o.prototype.align=function(e,t,n){c.call(this,e,t,n)},o.SEPARATOR={name:"---------"},Handsontable.hooks.add("afterInit",h),Handsontable.hooks.add("afterUpdateSettings",h),Handsontable.hooks.add("afterInit",s),Handsontable.hooks.register("afterContextMenuDefaultOptions"),Handsontable.hooks.register("afterContextMenuShow"),Handsontable.hooks.register("afterContextMenuHide"),Handsontable.ContextMenu=o},{"./../../dom.js":27,"./../../eventManager.js":41,"./../../helpers.js":42,"./../../plugins.js":45}],53:[function(e,t,n){"use strict";Object.defineProperties(n,{ContextMenuCopyPaste:{get:function(){return f}},__esModule:{value:!0}});var o,r,i,s,a,l=(o=e("./../../dom.js"),o&&o.__esModule&&o||{"default":o}),u=(r=e("./../../eventManager.js"),r&&r.__esModule&&r||{"default":r}).eventManager,d=(i=e("./../../plugins.js"),i&&i.__esModule&&i||{"default":i}).registerPlugin,c=(s=e("./../_base.js"),s&&s.__esModule&&s||{"default":s})["default"],h=(a=e("zeroclipboard"),a&&a.__esModule&&a||{"default":a})["default"],f=function(e){var t=this;$traceurRuntime.superConstructor(p).call(this,e),this.swfPath=null,this.hotContextMenu=null,this.outsideClickDeselectsCache=null,this.hot.addHook("afterContextMenuShow",function(e){return t.setupZeroClipboard(e)}),this.hot.addHook("afterInit",function(){return t.afterInit()}),this.hot.addHook("afterContextMenuDefaultOptions",function(e){return t.addToContextMenu(e)})},p=f;$traceurRuntime.createClass(f,{afterInit:function(){if(this.hot.getSettings().contextMenuCopyPaste){if("object"==typeof this.hot.getSettings().contextMenuCopyPaste&&(this.swfPath=this.hot.getSettings().contextMenuCopyPaste.swfPath),"undefined"==typeof h)throw new Error("To be able to use the Copy/Paste feature from the context menu, you need to manualy include ZeroClipboard.js file to your website.");try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){if("undefined"==typeof navigator.mimeTypes["application/x-shockwave-flash"])throw new Error("To be able to use the Copy/Paste feature from the context menu, your browser needs to have Flash Plugin installed.")}this.prepareZeroClipboard()}},prepareZeroClipboard:function(){this.swfPath&&h.config({swfPath:this.swfPath})},getCopyValue:function(){return this.hot.copyPaste.setCopyableText(),this.hot.copyPaste.copyPasteInstance.elTextarea.value},addToContextMenu:function(e){this.hot.getSettings().contextMenuCopyPaste&&e.items.unshift({key:"copy",name:"Copy"},{key:"paste",name:"Paste",callback:function(){this.copyPaste.triggerPaste()}},Handsontable.ContextMenu.SEPARATOR)},setupZeroClipboard:function(e){var t,n,o=this;if(this.hot.getSettings().contextMenuCopyPaste){this.hotContextMenu=e,t=this.hotContextMenu.getData();for(var r=0,i=t.length;i>r;r++)if("copy"===t[r].key){n=new h(this.hotContextMenu.getCell(r,0)),n.off(),n.on("copy",function(e){var t=e.clipboardData;t.setData("text/plain",o.getCopyValue()),o.hot.getSettings().outsideClickDeselects=o.outsideClickDeselectsCache}),this.bindEvents();break}}},removeCurrentClass:function(){if(this.hotContextMenu.rootElement){var e=this.hotContextMenu.rootElement.querySelector("td.current");e&&l.removeClass(e,"current")}this.outsideClickDeselectsCache=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1},removeZeroClipboardClass:function(){if(this.hotContextMenu.rootElement){var e=this.hotContextMenu.rootElement.querySelector("td.zeroclipboard-is-hover");e&&l.removeClass(e,"zeroclipboard-is-hover")}this.hot.getSettings().outsideClickDeselects=this.outsideClickDeselectsCache},bindEvents:function(){var e=this,t=u(this.hotContextMenu);t.addEventListener(document,"mouseenter",function(){return e.removeCurrentClass()}),t.addEventListener(document,"mouseleave",function(){return e.removeZeroClipboardClass()})}},{},c),d("contextMenuCopyPaste",f)},{"./../../dom.js":27,"./../../eventManager.js":41,"./../../plugins.js":45,"./../_base.js":46,zeroclipboard:"zeroclipboard"}],54:[function(e,t,n){"use strict";function o(e){function t(){e.isListening()&&e.selection.empty()}function n(t){var n,o,r,i,s,a,l,u,d,c;e.isListening()&&e.selection.isSelected()&&(n=t,o=f.parse(n),r=e.getSelected(),i=new p(r[0],r[1]),s=new p(r[2],r[3]),a=new g(i,i,s),l=a.getTopLeftCorner(),u=a.getBottomRightCorner(),d=l,c=new p(Math.max(u.row,o.length-1+l.row),Math.max(u.col,o[0].length-1+l.col)),e.addHookOnce("afterChange",function(e,t){e&&e.length&&this.selectCell(d.row,d.col,c.row,c.col)}),e.populateFromArray(d.row,d.col,o,c.row,c.col,"paste",e.getSettings().pasteMode))}function o(t){if(e.getSelected()&&(!e.getActiveEditor()||!e.getActiveEditor().isOpened())){if(c.isCtrlKey(t.keyCode))return r.setCopyableText(),void t.stopImmediatePropagation();var n=(t.ctrlKey||t.metaKey)&&!t.altKey;t.keyCode==c.keyCode.A&&n&&e._registerTimeout(setTimeout(c.proxy(r.setCopyableText,r),0))}}var r=this;this.copyPasteInstance=h(),this.copyPasteInstance.onCut(t),this.copyPasteInstance.onPaste(n),e.addHook("beforeKeyDown",o),this.destroy=function(){this.copyPasteInstance.removeCallback(t),this.copyPasteInstance.removeCallback(n),this.copyPasteInstance.destroy(),e.removeHook("beforeKeyDown",o)},e.addHook("afterDestroy",c.proxy(this.destroy,this)),this.triggerPaste=c.proxy(this.copyPasteInstance.triggerPaste,this.copyPasteInstance),this.triggerCut=c.proxy(this.copyPasteInstance.triggerCut,this.copyPasteInstance),this.setCopyableText=function(){var t=e.getSettings(),n=t.copyRowsLimit,o=t.copyColsLimit,r=e.getSelectedRange(),i=r.getTopLeftCorner(),s=r.getBottomRightCorner(),a=i.row,l=i.col,u=s.row,d=s.col,c=Math.min(u,a+n-1),h=Math.min(d,l+o-1);e.copyPaste.copyPasteInstance.copyable(e.getCopyableData(a,l,c,h)),(u!==c||d!==h)&&Handsontable.hooks.run(e,"afterCopyLimit",u-a+1,d-l+1,n,o)}}function r(){var e=this,t=e.getSettings().copyPaste!==!1;t&&!e.copyPaste?e.copyPaste=new o(e):!t&&e.copyPaste&&(e.copyPaste.destroy(),delete e.copyPaste)}Object.defineProperties(n,{CopyPaste:{get:function(){return CopyPaste}},__esModule:{value:!0}});var i,s,a,l,u,d,c=(i=e("./../../helpers.js"),i&&i.__esModule&&i||{"default":i}),h=(s=e("copyPaste"),s&&s.__esModule&&s||{"default":s})["default"],f=(a=e("SheetClip"),a&&a.__esModule&&a||{"default":a})["default"],p=((l=e("./../../plugins.js"),l&&l.__esModule&&l||{"default":l}).registerPlugin,(u=e("./../../3rdparty/walkontable/src/cell/coords.js"),u&&u.__esModule&&u||{"default":u}).WalkontableCellCoords),g=(d=e("./../../3rdparty/walkontable/src/cell/range.js"),d&&d.__esModule&&d||{"default":d}).WalkontableCellRange;Handsontable.hooks.add("afterInit",r),Handsontable.hooks.add("afterUpdateSettings",r),Handsontable.hooks.register("afterCopyLimit")},{"./../../3rdparty/walkontable/src/cell/coords.js":5,"./../../3rdparty/walkontable/src/cell/range.js":6,"./../../helpers.js":42,"./../../plugins.js":45,SheetClip:"SheetClip",copyPaste:"copyPaste"}],55:[function(e,t,n){"use strict";function o(){}var r,i,s,a,l=((r=e("./../../plugins.js"),r&&r.__esModule&&r||{"default":r}).registerPlugin,(i=e("./../../3rdparty/walkontable/src/cell/range.js"),i&&i.__esModule&&i||{"default":i}).WalkontableCellRange),u=(s=e("./../../3rdparty/walkontable/src/selection.js"),s&&s.__esModule&&s||{"default":s}).WalkontableSelection,d=function(e){return"boolean"==typeof e&&e===!0?!0:"object"==typeof e&&e.length>0?!0:!1},c=function(){d(this.getSettings().customBorders)&&(this.customBorders||(a=this,this.customBorders=new o))},h=function(e){for(var t=0;t<a.view.wt.selections.length;t++)if(a.view.wt.selections[t].settings.className==e)return t;return-1},f=function(e){var t={row:e.row,col:e.col},n=new u(e,new l(t,t,t)),o=h(e.className);o>=0?a.view.wt.selections[o]=n:a.view.wt.selections.push(n)},p=function(e,t,n){var o=b(e,t);o=C(o,n),this.setCellMeta(e,t,"borders",o),f(o)},g=function(e){for(var t=e.range,n=t.from.row;n<=t.to.row;n++)for(var o=t.from.col;o<=t.to.col;o++){var r=b(n,o),i=0;n==t.from.row&&(i++,e.hasOwnProperty("top")&&(r.top=e.top)),n==t.to.row&&(i++,e.hasOwnProperty("bottom")&&(r.bottom=e.bottom)),o==t.from.col&&(i++,e.hasOwnProperty("left")&&(r.left=e.left)),o==t.to.col&&(i++,e.hasOwnProperty("right")&&(r.right=e.right)),i>0&&(this.setCellMeta(n,o,"borders",r),f(r))}},m=function(e,t){return"border_row"+e+"col"+t},w=function(){return{width:1,color:"#000"}},v=function(){return{hide:!0}},y=function(){return{width:1,color:"#000",cornerVisible:!1}},b=function(e,t){return{className:m(e,t),border:y(),row:e,col:t,top:v(),right:v(),bottom:v(),left:v()}},C=function(e,t){return t.hasOwnProperty("border")&&(e.border=t.border),t.hasOwnProperty("top")&&(e.top=t.top),t.hasOwnProperty("right")&&(e.right=t.right),t.hasOwnProperty("bottom")&&(e.bottom=t.bottom),t.hasOwnProperty("left")&&(e.left=t.left),e},R=function(e){for(var t=document.querySelectorAll("."+e),n=0;n<t.length;n++)if(t[n]&&"TD"!=t[n].nodeName){var o=t[n].parentNode;o.parentNode&&o.parentNode.removeChild(o)}},S=function(e,t){var n=m(e,t);R(n),this.removeCellMeta(e,t,"borders")},E=function(e,t,n,o){var r=this.getCellMeta(e,t).borders;r&&void 0!=r.border||(r=b(e,t)),o?r[n]=v():r[n]=w(),this.setCellMeta(e,t,"borders",r);var i=m(e,t);R(i),f(r),this.render()},T=function(e,t,n){if(e.from.row==e.to.row&&e.from.col==e.to.col)"noBorders"==t?S.call(this,e.from.row,e.from.col):E.call(this,e.from.row,e.from.col,t,n);else switch(t){case"noBorders":for(var o=e.from.col;o<=e.to.col;o++)for(var r=e.from.row;r<=e.to.row;r++)S.call(this,r,o);break;case"top":for(var i=e.from.col;i<=e.to.col;i++)E.call(this,e.from.row,i,t,n);break;case"right":for(var s=e.from.row;s<=e.to.row;s++)E.call(this,s,e.to.col,t);break;case"bottom":for(var a=e.from.col;a<=e.to.col;a++)E.call(this,e.to.row,a,t);break;case"left":for(var l=e.from.row;l<=e.to.row;l++)E.call(this,l,e.from.col,t)}},_=function(e,t){var n=!1;return e.getSelectedRange().forAll(function(o,r){var i=e.getCellMeta(o,r).borders;if(i){if(!t)return n=!0,!1;if(!i[t].hasOwnProperty("hide"))return n=!0,!1}}),n},k=function(e){return"<span class='selected'>"+String.fromCharCode(10003)+"</span>"+e},H=function(e){this.getSettings().customBorders&&(e.items.push(Handsontable.ContextMenu.SEPARATOR),e.items.push({key:"borders",name:"Borders",submenu:{items:{top:{name:function(){var e="Top",t=_(this,"top");return t&&(e=k(e)),e},callback:function(){var e=_(this,"top");T.call(this,this.getSelectedRange(),"top",e)},disabled:!1},right:{name:function(){var e="Right",t=_(this,"right");return t&&(e=k(e)),e},callback:function(){var e=_(this,"right");T.call(this,this.getSelectedRange(),"right",e)},disabled:!1},bottom:{name:function(){var e="Bottom",t=_(this,"bottom");return t&&(e=k(e)),e},callback:function(){var e=_(this,"bottom");T.call(this,this.getSelectedRange(),"bottom",e)},disabled:!1},left:{name:function(){var e="Left",t=_(this,"left");return t&&(e=k(e)),e},callback:function(){var e=_(this,"left");T.call(this,this.getSelectedRange(),"left",e)},disabled:!1},remove:{name:"Remove border(s)",callback:function(){T.call(this,this.getSelectedRange(),"noBorders")},disabled:function(){return!_(this)}}}}}))};Handsontable.hooks.add("beforeInit",c),Handsontable.hooks.add("afterContextMenuDefaultOptions",H),Handsontable.hooks.add("afterInit",function(){var e=this.getSettings().customBorders;if(e){for(var t=0;t<e.length;t++)e[t].range?g.call(this,e[t]):p.call(this,e[t].row,e[t].col,e[t]);this.render(),this.view.wt.draw(!0)}}),Handsontable.CustomBorders=o},{"./../../3rdparty/walkontable/src/cell/range.js":6,"./../../3rdparty/walkontable/src/selection.js":18,"./../../plugins.js":45}],56:[function(e,t,n){"use strict";function o(){this.boundaries=null,this.callback=null}Object.defineProperties(n,{DragToScroll:{get:function(){return o}},__esModule:{value:!0}});var r,i,s=(r=e("./../../eventManager.js"),r&&r.__esModule&&r||{"default":r}).eventManager;(i=e("./../../plugins.js"),i&&i.__esModule&&i||{"default":i}).registerPlugin;Handsontable.plugins.DragToScroll=o,o.prototype.setBoundaries=function(e){this.boundaries=e},o.prototype.setCallback=function(e){this.callback=e},o.prototype.check=function(e,t){var n=0,o=0;t<this.boundaries.top?o=t-this.boundaries.top:t>this.boundaries.bottom&&(o=t-this.boundaries.bottom),e<this.boundaries.left?n=e-this.boundaries.left:e>this.boundaries.right&&(n=e-this.boundaries.right),this.callback(n,o)};var a;if("undefined"!=typeof Handsontable)var l=function(e){e.dragToScrollListening=!1;var t=e.view.wt.wtTable.holder;a=new o,t!==window&&(a.setBoundaries(t.getBoundingClientRect()),a.setCallback(function(e,n){0>e?t.scrollLeft-=50:e>0&&(t.scrollLeft+=50),0>n?t.scrollTop-=20:n>0&&(t.scrollTop+=20)}),e.dragToScrollListening=!0)};Handsontable.hooks.add("afterInit",function(){var e=this,t=s(this);t.addEventListener(document,"mouseup",function(){e.dragToScrollListening=!1}),t.addEventListener(document,"mousemove",function(t){e.dragToScrollListening&&a.check(t.clientX,t.clientY)})}),Handsontable.hooks.add("afterDestroy",function(){s(this).clear()}),Handsontable.hooks.add("afterOnCellMouseDown",function(){l(this)}),Handsontable.hooks.add("afterOnCellCornerMouseDown",function(){l(this)}),Handsontable.plugins.DragToScroll=o},{"./../../eventManager.js":41,"./../../plugins.js":45}],57:[function(e,t,n){"use strict";function o(e){var t=[],n={rows:0,cols:0},o={rows:0,cols:0},r=[],i=[],a={groupIndicatorContainer:"htGroupIndicatorContainer",groupIndicator:function(e){return"ht"+e+"Group"},groupStart:"htGroupStart",collapseButton:"htCollapseButton",expandButton:"htExpandButton",collapseGroupId:function(e){return"htCollapse-"+e},collapseFromLevel:function(e,t){return"htCollapse"+e+"FromLevel-"+t},clickable:"clickable",levelTrigger:"htGroupLevelTrigger"},u=function(e,t){return function(n,o){return"undefined"==typeof t||"asc"===t?n[e]-o[e]:o[e]-n[e]}},d=function(e,t){for(var n=[];t>=e;)n.push(e++);return n},c=function(e,t,n){var o=[],r={row:null,col:null};if("cols"==e)for(;n>=t;)r={row:-1,col:t++},o.push(r);else for(;n>=t;)r={row:t++,col:-1},o.push(r);for(var i=h(o),s=0,a=0,l=0;l<i.length;l++)s+=i[l].filter(function(e){return e.rows}).length,a+=i[l].filter(function(e){return e.cols}).length;return{total:{rows:s,cols:a},groups:i}},h=function(e){for(var t=[],n=0;n<e.length;n++)t.push(f(e[n]));return t},f=function(e,n,o){for(var r=e.row,i=e.col,s=-1===r?0:r,a=-1===i?0:i,l=[],u=0;u<t.length;u++){var d=t[u],c=d.id,h=(d.level,d.rows||[]),f=d.cols||[];-1===l.indexOf(c)&&(-1!==h.indexOf(s)||-1!==f.indexOf(a))&&l.push(d)}-1===i?l=l.concat(w()):-1===r&&(l=l.concat(y())),n&&(l=l.filter(function(e){return e.level===n})),o&&("cols"===o?l=l.filter(function(e){return e.cols}):"rows"===o&&(l=l.filter(function(e){return e.rows})));var p=[];return l.filter(function(e){return-1===p.indexOf(e.id)?(p.push(e.id),e):void 0})},p=function(e){for(var n=0,o=t.length;o>n;n++)if(t[n].id==e)return t[n];return!1},g=function(e,n){for(var o=0,r=t.length;r>o;o++)if(t[o].level==n&&t[o].rows&&t[o].rows.indexOf(e)>-1)return t[o];return!1},m=function(e,n){for(var o=0,r=t.length;r>o;o++)if(t[o].level==n&&t[o].cols&&t[o].cols.indexOf(e)>-1)return t[o];return!1},w=function(){for(var e=[],n=0,o=t.length;o>n;n++)Array.isArray(t[n].cols)&&e.push(t[n]);return e},v=function(e){for(var n=[],o=0,r=t.length;r>o;o++)t[o].cols&&t[o].level===e&&n.push(t[o]);return n},y=function(){for(var e=[],n=0,o=t.length;o>n;n++)Array.isArray(t[n].rows)&&e.push(t[n]);return e},b=function(e){for(var n=[],o=0,r=t.length;r>o;o++)t[o].rows&&t[o].level===e&&n.push(t[o]);return n},C=function(e){var t=0;return e.length&&e.forEach(function(e){if(e=e.filter(function(e){return e.cols}),e.length){var n=e.sort(u("level","desc")),o=n[0].level;o>t&&(t=o)}}),t},R=function(e){var t=0;return e.length&&e.forEach(function(e){if(e=e.filter(function(e){return e.rows}),e.length){var n=e.sort(u("level","desc")),o=n[0].level;o>t&&(t=o)}}),t},S=function(e,r){var i=c("cols",e,r),s=C(i.groups);s===o.cols?o.cols++:s>o.cols&&(o.cols=s+1),n.cols||(n.cols=w().length),n.cols++,t.push({id:"c"+n.cols,level:s+1,cols:d(e,r),hidden:0})},E=function(e,r){var i=c("rows",e,r),s=R(i.groups);o.rows=Math.max(o.rows,s+1),n.rows||(n.rows=y().length),n.rows++,t.push({id:"r"+n.rows,level:s+1,rows:d(e,r),hidden:0})},T=function(e,t){for(var n,o=0,s=t.length;s>o;o++)if(t[o].hidden=e,n=t[o].level,r[n]||(r[n]=[]),i[n]||(i[n]=[]),t[o].rows)for(var a=0,l=t[o].rows.length;l>a;a++)e>0?r[n][t[o].rows[a]]=!0:r[n][t[o].rows[a]]=void 0;else if(t[o].cols)for(var a=0,u=t[o].cols.length;u>a;a++)e>0?i[n][t[o].cols[a]]=!0:i[n][t[o].cols[a]]=void 0},_=function(e,t,n,o){var r,i;switch(e){case"rows":r=g(t+1,n).id,i=Handsontable.Grouping.getGroupLevelsByRows();break;case"cols":r=m(t+1,n).id,i=Handsontable.Grouping.getGroupLevelsByCols()}return!!(i[t+1]&&i[t+1].indexOf(n)>-1&&o==r)},k=function(e,t,n,o){var r,i;switch(e){case"rows":r=g(t-1,n).id,i=Handsontable.Grouping.getGroupLevelsByRows();break;case"cols":r=m(t-1,n).id,i=Handsontable.Grouping.getGroupLevelsByCols()}return!!(i[t-1]&&i[t-1].indexOf(n)>-1&&o==r)},H=function(t,n,s,a){if(0===n)return!1;var l,u,d=k(t,n,s,a),c=_(t,n,s,a),h=!1;switch(t){case"rows":l=Handsontable.Grouping.getGroupLevelsByRows(),u=e.countRows();for(var f=0;f<=o.rows;f++)if(r[f]&&r[f][n+1]){h=!0;break}break;case"cols":l=Handsontable.Grouping.getGroupLevelsByCols(),u=e.countCols();for(var f=0;f<=o.cols;f++)if(i[f]&&i[f][n+1]){h=!0;break}}if(d){if(n==u-1)return!0;if(!c||c&&h)return!0;if(!l[n+1])return!0}return!1},M=function(t){var n;switch(t){case"rows":n=o.rows;for(var s=0;n>=s;s++)if(r[s]&&r[s][e.countRows()-1])return!0;break;case"cols":n=o.cols;for(var s=0;n>=s;s++)if(i[s]&&i[s][e.countCols()-1])return!0}return!1},O=function(t,n,s,a){var l,u,d,c=p(a),h=!1,f=function(e){for(var t=!1,s="rows"==e?r:i,a=0;a<=o[e];a++){for(d=n;c[e].indexOf(d)>-1;)t=!(!s[a]||!s[a][d]),d--;if(t)break}return t},g=k(t,n,s,a),m=_(t,n,s,a);switch(t){case"rows":l=Handsontable.Grouping.getGroupLevelsByRows(),u=e.countRows(),h=f(t);break;case"cols":l=Handsontable.Grouping.getGroupLevelsByCols(),u=e.countCols(),h=f(t)}if(n==u-1)return!1;if(0===n){if(m)return!0}else if(!g||g&&h){if(m)return!0}else if(!l[n-1]&&m)return!0;return!1},D=function(e,t,n,o,r){var i;switch(e){case"rows":i=g(t-1,n).id;break;case"cols":i=m(t-1,n).id}if(!i)return null;if(t>0&&k(e,t-1,n,i)&&i!=o){var l=document.createElement("DIV");return s.addClass(l,a.expandButton),l.id="htExpand-"+i,l.appendChild(document.createTextNode("+")),l.setAttribute("data-level",n),l.setAttribute("data-type",e),l.setAttribute("data-hidden","1"),r.appendChild(l),l}return null},x=function(e){for(var t=y(),n=w(),o=0,r=t.length;r>o;o++)if(t[o].rows.indexOf(e.row)>-1&&t[o].hidden)return!0;if(null===e.col)return!1;for(var o=0,i=n.length;i>o;o++)if(n[o].cols.indexOf(e.col)>-1&&n[o].hidden)return!0;return!1};return{getGroups:function(){return t},getLevels:function(){return o},instance:e,baseSpareRows:e.getSettings().minSpareRows,baseSpareCols:e.getSettings().minSpareCols,getRowGroups:y,getColGroups:w,init:function(){var t=e.getSettings().groups;t&&Array.isArray(t)&&Handsontable.Grouping.initGroups(t)},initGroups:function(e){t=[],e.forEach(function(e){var t=[],n=!1,o=!1;Array.isArray(e.rows)?(t=e.rows,n=!0):Array.isArray(e.cols)&&(t=e.cols,o=!0);var r=t[0],i=t[t.length-1];n?E(r,i):o&&S(r,i)})},resetGroups:function(){t=[],n={rows:0,cols:0},o={rows:0,cols:0};var e;for(var r in a)if("function"!=typeof a[r]){e=document.querySelectorAll("."+a[r]);for(var i=0,l=e.length;l>i;i++)s.removeClass(e[i],a[r])}for(var u=["htGroupColClosest","htGroupCol"],r=0,d=u.length;d>r;r++){e=document.querySelectorAll("."+u[r]);for(var i=0,l=e.length;l>i;i++)s.removeClass(e[i],u[r])}},updateGroups:function(){var e=this.getSettings().groups;Handsontable.Grouping.resetGroups(),Handsontable.Grouping.initGroups(e)},afterGetRowHeader:function(e,t){for(var n=!1,o=0,i=r.length;i>o;o++)r[o]&&r[o][e]===!0&&(n=!0);n?s.addClass(t.parentNode,"hidden"):!n&&s.hasClass(t.parentNode,"hidden")&&s.removeClass(t.parentNode,"hidden")},afterGetColHeader:function(t,n){var o=this.view.wt.wtSettings.getSetting("rowHeaders").length,r=e.rootElement.querySelectorAll("colgroup col:nth-child("+parseInt(t+o+1,10)+")");if(0!==r.length){for(var a=!1,l=0,u=i.length;u>l;l++)i[l]&&i[l][t]===!0&&(a=!0);if(a)for(var l=0,d=r.length;d>l;l++)s.addClass(r[l],"hidden");else if(!a&&s.hasClass(r[0],"hidden"))for(var l=0,d=r.length;d>l;l++)s.removeClass(r[l],"hidden")}},groupIndicatorsFactory:function(e,t){var r,i,u,d,c,h,f,p;switch(t){case"horizontal":r=Handsontable.Grouping.getGroupLevelsByCols(),i=function(e){return Array.prototype.indexOf.call(e.parentNode.parentNode.childNodes,e.parentNode)+1},u=function(e,t){return m(e,t).id},d="cols",c=function(e,t){return m(e-1,t)},h="columnHeaders",f=function(e){if(1===e.length){var t=e[0];e[0]=function(e,n,o){-1>e?v()(e,n,o):(s.removeClass(n,a.groupIndicatorContainer),t(e,n,o))}}return function(){return e}},p=!0;break;case"vertical":r=Handsontable.Grouping.getGroupLevelsByRows(),i=function(e){return s.index(e)+1},u=function(e,t){return g(e,t).id},d="rows",c=function(e,t){return g(e-1,t)},h="rowHeaders",f=function(e){return e}}var w=function(e){var t=document.createElement("div");return e.appendChild(t),{button:t,addClass:function(e){s.addClass(t,e)}}},v=function(){var e=t.charAt(0).toUpperCase()+t.slice(1);return function(t,n,o){o++;for(var i,h;i=n.lastChild;)n.removeChild(i);s.addClass(n,a.groupIndicatorContainer);var f=u(t,o);if(t>-1&&r[t]&&r[t].indexOf(o)>-1&&(h=w(n),h.addClass(a.groupIndicator(e)),O(d,t,o,f)&&h.addClass(a.groupStart),H(d,t,o,f)&&(h.button.appendChild(document.createTextNode("-")),h.addClass(a.collapseButton),h.button.id=a.collapseGroupId(f),h.button.setAttribute("data-level",o),h.button.setAttribute("data-type",d))),p){var g=s.index(n.parentNode);if(-1===t||-1>t&&g===Handsontable.Grouping.getLevels().cols+1||0===g&&0===Handsontable.Grouping.getLevels().cols)if(h=w(n),h.addClass(a.levelTrigger),-1===t)h.button.id=a.collapseFromLevel("Cols",o),h.button.appendChild(document.createTextNode(o));else if(-1>t&&g===Handsontable.Grouping.getLevels().cols+1||0===g&&0===Handsontable.Grouping.getLevels().cols){var m=s.index(n)+1;h.button.id=a.collapseFromLevel("Rows",m),h.button.appendChild(document.createTextNode(m))}}var v=D(d,t,o,f,n);if(t>0){var y=c(t-1,o);v&&y.hidden&&s.addClass(v,a.clickable)}l()}};if(e=f(e),n[d]>0)for(var y=0;y<o[d]+1;y++)Array.isArray(e)||(e="function"==typeof e?e():new Array(e)),e.unshift(v())},getGroupLevelsByRows:function(){for(var e=y(),t=[],n=0,o=e.length;o>n;n++)if(e[n].rows)for(var r=0,i=e[n].rows.length;i>r;r++)t[e[n].rows[r]]||(t[e[n].rows[r]]=[]),t[e[n].rows[r]].push(e[n].level);return t},getGroupLevelsByCols:function(){for(var e=w(),t=[],n=0,o=e.length;o>n;n++)if(e[n].cols)for(var r=0,i=e[n].cols.length;i>r;r++)t[e[n].cols[r]]||(t[e[n].cols[r]]=[]),t[e[n].cols[r]].push(e[n].level);return t},toggleGroupVisibility:function(t,n,r){if(s.hasClass(t.target,a.expandButton)||s.hasClass(t.target,a.collapseButton)||s.hasClass(t.target,a.levelTrigger)){var i,l,u,d,c=t.target,h=c.id.split("-"),f=[],g=function(e){e&&(c=e),h=c.id.split("-"),i=h[1],l=parseInt(c.getAttribute("data-level"),10),u=c.getAttribute("data-type"),d=parseInt(c.getAttribute("data-hidden")),d=isNaN(d)?1:d?0:1,c.setAttribute("data-hidden",d.toString()),f.push(p(i))};if(c.className.indexOf(a.levelTrigger)>-1){for(var m,w=[],y=[],C=c.id.indexOf("Rows")>-1?"rows":"cols",R=1,S=o[C];S>=R;R++)if(m="rows"==C?b(R):v(R),R>=parseInt(h[1],10))for(var E=0,_=m.length;_>E;E++)y.push(m[E]);else for(var E=0,_=m.length;_>E;E++)w.push(m[E]);T(!0,y),T(!1,w)}else g(),T(d,f);u=u||C;var k=M(u),H=u.charAt(0).toUpperCase()+u.slice(1),O=Handsontable.Grouping["baseSpare"+H];k?0==O&&(e.alter("insert_"+u.slice(0,-1),e["count"+H]()),Handsontable.Grouping["dummy"+u.slice(0,-1)]=!0):0==O&&Handsontable.Grouping["dummy"+u.slice(0,-1)]&&(e.alter("remove_"+u.slice(0,-1),e["count"+H]()-1),Handsontable.Grouping["dummy"+u.slice(0,-1)]=!1),e.render(),t.stopImmediatePropagation()}},modifySelectionFactory:function(e){var t,n=this.instance,o=new WalkontableCellCoords(0,0),r=function(e,t){var n=0;switch(e){case"down":for(;x(t);)n++,t.row+=1;break;case"up":for(;x(t);)n--,t.row-=1;break;case"right":for(;x(t);)n++,t.col+=1;break;case"left":for(;x(t);)n--,t.col-=1}return n},i=function(e,t){e.row>0?x(t)&&(e.row+=r("down",t)):e.row<0&&x(t)&&(e.row+=r("up",t)),e.col>0?x(t)&&(e.col+=r("right",t)):e.col<0&&x(t)&&(e.col+=r("left",t))};switch(e){case"start":return function(e){t=n.getSelected(),o.row=t[0]+e.row,o.col=t[1]+e.col,i(e,o)};case"end":return function(e){t=n.getSelected(),o.row=t[2]+e.row,o.col=t[3]+e.col,i(e,o)}}},modifyRowHeight:function(t,n){return e.view.wt.wtTable.rowFilter&&x({row:n,col:null})?0:void 0},validateGroups:function(){for(var t=function(e,t){return e[0]<t[0]&&e[1]<t[1]&&t[0]<=e[1]||e[0]>t[0]&&t[1]<e[1]&&e[0]<=t[1]?!0:void 0},n=e.getSettings().groups,o=[],r=[],i=0,s=n.length;s>i;i++)if(n[i].rows){if(1===n[i].rows.length)throw new Error("Grouping error: Group {"+n[i].rows[0]+"} is invalid. Cannot define single-entry groups.");if(0===n[i].rows.length)throw new Error("Grouping error: Cannot define empty groups.");r.push(n[i].rows);for(var a=0,l=r.length;l>a;a++)if(t(n[i].rows,r[a]))throw new Error("Grouping error: ranges {"+n[i].rows[0]+", "+n[i].rows[1]+"} and {"+r[a][0]+", "+r[a][1]+"} are overlapping.")}else if(n[i].cols){if(1===n[i].cols.length)throw new Error("Grouping error: Group {"+n[i].cols[0]+"} is invalid. Cannot define single-entry groups.");if(0===n[i].cols.length)throw new Error("Grouping error: Cannot define empty groups.");o.push(n[i].cols);for(var a=0,u=o.length;u>a;a++)if(t(n[i].cols,o[a]))throw new Error("Grouping error: ranges {"+n[i].cols[0]+", "+n[i].cols[1]+"} and {"+o[a][0]+", "+o[a][1]+"} are overlapping.")}return!0},afterGetRowHeaderRenderers:function(e){Handsontable.Grouping.groupIndicatorsFactory(e,"vertical");
},afterGetColumnHeaderRenderers:function(e){Handsontable.Grouping.groupIndicatorsFactory(e,"horizontal")},hookProxy:function(t,n){return function(){return e.getSettings().groups?n?Handsontable.Grouping[t](n).apply(this,arguments):Handsontable.Grouping[t].apply(this,arguments):void 0}}}}var r,i,s=(r=e("./../../dom.js"),r&&r.__esModule&&r||{"default":r});(i=e("./../../plugins.js"),i&&i.__esModule&&i||{"default":i}).registerPlugin;o.prototype.beforeInit=function(){};var a=function(){var e=this,t=!!e.getSettings().groups;if(t){var n={};Handsontable.Grouping=new o(e),e.getSettings().rowHeaders||(n.rowHeaders=!0),e.getSettings().colHeaders||(n.colHeaders=!0),(n.colHeaders||n.rowHeaders)&&e.updateSettings(n);var r=Handsontable.Grouping.validateGroups();if(!r)return;e.addHook("beforeInit",Handsontable.Grouping.hookProxy("init")),e.addHook("afterUpdateSettings",Handsontable.Grouping.hookProxy("updateGroups")),e.addHook("afterGetColumnHeaderRenderers",Handsontable.Grouping.hookProxy("afterGetColumnHeaderRenderers")),e.addHook("afterGetRowHeaderRenderers",Handsontable.Grouping.hookProxy("afterGetRowHeaderRenderers")),e.addHook("afterGetRowHeader",Handsontable.Grouping.hookProxy("afterGetRowHeader")),e.addHook("afterGetColHeader",Handsontable.Grouping.hookProxy("afterGetColHeader")),e.addHook("beforeOnCellMouseDown",Handsontable.Grouping.hookProxy("toggleGroupVisibility")),e.addHook("modifyTransformStart",Handsontable.Grouping.hookProxy("modifySelectionFactory","start")),e.addHook("modifyTransformEnd",Handsontable.Grouping.hookProxy("modifySelectionFactory","end")),e.addHook("modifyRowHeight",Handsontable.Grouping.hookProxy("modifyRowHeight"))}},l=function(){for(var e=document.querySelectorAll("colgroup"),t=0,n=e.length;n>t;t++){var o=e[t].querySelectorAll("col.rowHeader");if(0===o.length)return;for(var r=0,i=o.length+1;i>r;r++){if(2==i)return;r<Handsontable.Grouping.getLevels().rows+1&&(r==Handsontable.Grouping.getLevels().rows?s.addClass(o[r],"htGroupColClosest"):s.addClass(o[r],"htGroupCol"))}}};Handsontable.hooks.add("beforeInit",a),Handsontable.hooks.add("afterUpdateSettings",function(){this.getSettings().groups&&!Handsontable.Grouping?a.call(this,arguments):!this.getSettings().groups&&Handsontable.Grouping&&(Handsontable.Grouping.resetGroups(),Handsontable.Grouping=void 0)}),Handsontable.plugins.Grouping=o},{"./../../dom.js":27,"./../../plugins.js":45}],58:[function(e,t,n){"use strict";function o(e){function t(t){t.items.push(Handsontable.ContextMenu.SEPARATOR,{key:"freeze_column",name:function(){var t=e.getSelected()[1];return t>f-1?"Freeze this column":"Unfreeze this column"},disabled:function(){var t=e.getSelected();return t[1]!==t[3]},callback:function(){var t=e.getSelected()[1];t>f-1?l(t):u(t)}})}function n(){e.updateSettings({fixedColumnsLeft:f+1}),f++}function o(){e.updateSettings({fixedColumnsLeft:f-1}),f--}function r(t){e.manualColumnPositions&&0!==e.manualColumnPositions.length||e.manualColumnPositions||(e.manualColumnPositions=[]),t?e.manualColumnPositions[t]||i(t+1):i(e.countCols())}function i(t){if(e.manualColumnPositions.length<t)for(var n=e.manualColumnPositions.length;t>n;n++)e.manualColumnPositions[n]=n}function s(t,n,o,r){null==o&&(o=t),"freeze"===r?e.manualColumnPositions.splice(f,0,e.manualColumnPositions.splice(n,1)[0]):"unfreeze"===r&&e.manualColumnPositions.splice(o,0,e.manualColumnPositions.splice(n,1)[0])}function a(e){for(var t=f,n=d(t),o=d(e);o>n;)t++,n=d(t);return t-1}function l(t){if(!(f-1>=t)){var o=d(t)||t;r(o),s(o,t,null,"freeze"),n(),e.view.wt.wtOverlays.leftOverlay.refresh(),e.view.wt.wtOverlays.adjustElementsSize()}}function u(t){if(!(t>f-1)){var n=a(t),i=d(t)||t;r(i),s(i,t,n,"unfreeze"),o(),e.view.wt.wtOverlays.leftOverlay.refresh()}}function d(t){return e.manualColumnPositions[t]}function c(e){return this.manualColumnPositionsPluginUsages.length>1?e:d(e)}function h(){e.addHook("modifyCol",c),e.addHook("afterContextMenuDefaultOptions",t)}var f=e.getSettings().fixedColumnsLeft,p=function(){"undefined"!=typeof e.manualColumnPositionsPluginUsages?e.manualColumnPositionsPluginUsages.push("manualColumnFreeze"):e.manualColumnPositionsPluginUsages=["manualColumnFreeze"],h()};return{init:p,freezeColumn:l,unfreezeColumn:u,helpers:{addFixedColumn:n,removeFixedColumn:o,checkPositionData:r,modifyColumnOrder:s,getBestColumnReturnPosition:a}}}Object.defineProperties(n,{ManualColumnFreeze:{get:function(){return o}},__esModule:{value:!0}});var r,i=((r=e("./../../plugins.js"),r&&r.__esModule&&r||{"default":r}).registerPlugin,function(){if(this.getSettings().manualColumnFreeze){var e;Handsontable.plugins.manualColumnFreeze=o,this.manualColumnFreeze=new o(this),e=this.manualColumnFreeze,e.init.call(this)}});Handsontable.hooks.add("beforeInit",i)},{"./../../plugins.js":45}],59:[function(e,t,n){"use strict";function o(){function e(e){f=this,p=e;var t=this.view.wt.wtTable.getCoords(e).col;if(t>=0){h=t;var n=p.getBoundingClientRect();c=n.left,g.style.top=n.top+"px",g.style.left=c+"px",f.rootElement.appendChild(g)}}function t(e,t){var n=e.getBoundingClientRect(),o=6;t>0?g.style.left=n.left+n.width-o+"px":g.style.left=n.left+"px"}function n(){var e=this;u.addClass(g,"active"),u.addClass(m,"active");var t=p.getBoundingClientRect();m.style.width=t.width+"px",m.style.height=e.view.maximumVisibleElementHeight(0)+"px",m.style.top=g.style.top,m.style.left=c+"px",e.rootElement.appendChild(m)}function o(e){m.style.left=c+e+"px"}function r(){u.removeClass(g,"active"),u.removeClass(m,"active")}var i,s,a,c,h,f,p,g=document.createElement("DIV"),m=document.createElement("DIV"),w=d(this);g.className="manualColumnMover",m.className="manualColumnMoverGuide";var v=function(){var e=this;Handsontable.hooks.run(e,"persistentStateSave","manualColumnPositions",e.manualColumnPositions)},y=function(){var e=this,t={};return Handsontable.hooks.run(e,"persistentStateLoad","manualColumnPositions",t),t.value},b=function(e){return"BODY"!=e.tagName?"THEAD"==e.parentNode.tagName?!0:(e=e.parentNode,b(e)):!1},C=function(e){return"TABLE"!=e.tagName?"TH"==e.tagName?e:C(e.parentNode):null},R=function(){var d,c=this;w.addEventListener(c.rootElement,"mouseover",function(n){if(b(n.target)){var o=C(n.target);if(o)if(d){var r=c.view.wt.wtTable.getCoords(o).col;r>=0&&(s=r,t(n.target,s-i))}else e.call(c,o)}}),w.addEventListener(c.rootElement,"mousedown",function(e){u.hasClass(e.target,"manualColumnMover")&&(a=l.pageX(e),n.call(c),d=c,i=h,s=h)}),w.addEventListener(window,"mousemove",function(e){d&&o(l.pageX(e)-a)}),w.addEventListener(window,"mouseup",function(t){d&&(r(),d=!1,E(c.manualColumnPositions,c.countCols()),c.manualColumnPositions.splice(s,0,c.manualColumnPositions.splice(i,1)[0]),c.forceFullRender=!0,c.view.render(),v.call(c),Handsontable.hooks.run(c,"afterColumnMove",i,s),e.call(c,p))}),c.addHook("afterDestroy",S)},S=function(){w.clear()},E=function(e,t){if(e.length<t)for(var n=e.length;t>n;n++)e[n]=n};this.beforeInit=function(){this.manualColumnPositions=[]},this.init=function(e){var t=this,n=!!this.getSettings().manualColumnMove;if(n){var o=this.getSettings().manualColumnMove,r=y.call(t);"undefined"!=typeof r?this.manualColumnPositions=r:Array.isArray(o)?this.manualColumnPositions=o:this.manualColumnPositions=[],"afterInit"==e&&("undefined"!=typeof t.manualColumnPositionsPluginUsages?t.manualColumnPositionsPluginUsages.push("manualColumnMove"):t.manualColumnPositionsPluginUsages=["manualColumnMove"],R.call(this),this.manualColumnPositions.length>0&&(this.forceFullRender=!0,this.render()))}else{var i=t.manualColumnPositionsPluginUsages?t.manualColumnPositionsPluginUsages.indexOf("manualColumnMove"):-1;i>-1&&(S.call(this),this.manualColumnPositions=[],t.manualColumnPositionsPluginUsages[i]=void 0)}},this.modifyCol=function(e){return this.getSettings().manualColumnMove?("undefined"==typeof this.manualColumnPositions[e]&&E(this.manualColumnPositions,e+1),this.manualColumnPositions[e]):e},this.afterRemoveCol=function(e,t){if(this.getSettings().manualColumnMove){var n,o=this.manualColumnPositions;n=o.splice(e,t),o=o.map(function(e){var t,o=e;for(t=0;t<n.length;t++)e>n[t]&&o--;return o}),this.manualColumnPositions=o}},this.afterCreateCol=function(e,t){if(this.getSettings().manualColumnMove){var n=this.manualColumnPositions;if(n.length){for(var o=[],r=0;t>r;r++)o.push(e+r);e>=n.length?n.concat(o):(n=n.map(function(n){return n>=e?n+t:n}),n.splice.apply(n,[e,0].concat(o))),this.manualColumnPositions=n}}}}Object.defineProperties(n,{ManualColumnMove:{get:function(){return o}},__esModule:{value:!0}});var r,i,s,a,l=(r=e("./../../helpers.js"),r&&r.__esModule&&r||{"default":r}),u=(i=e("./../../dom.js"),i&&i.__esModule&&i||{"default":i}),d=(s=e("./../../eventManager.js"),s&&s.__esModule&&s||{"default":s}).eventManager,c=((a=e("./../../plugins.js"),a&&a.__esModule&&a||{"default":a}).registerPlugin,new o);Handsontable.hooks.add("beforeInit",c.beforeInit),Handsontable.hooks.add("afterInit",function(){c.init.call(this,"afterInit")}),Handsontable.hooks.add("afterUpdateSettings",function(){c.init.call(this,"afterUpdateSettings")}),Handsontable.hooks.add("modifyCol",c.modifyCol),Handsontable.hooks.add("afterRemoveCol",c.afterRemoveCol),Handsontable.hooks.add("afterCreateCol",c.afterCreateCol),Handsontable.hooks.register("afterColumnMove")},{"./../../dom.js":27,"./../../eventManager.js":41,"./../../helpers.js":42,"./../../plugins.js":45}],60:[function(e,t,n){"use strict";function o(){function e(e){c=this,i=e;var t=this.view.wt.wtTable.getCoords(e).col;if(t>=0){s=t;var n=i.getBoundingClientRect();g=n.left-6,p=parseInt(n.width,10),m.style.top=n.top+"px",m.style.left=g+p+"px",c.rootElement.appendChild(m)}}function t(){m.style.left=g+a+"px"}function n(){var e=this;u.addClass(m,"active"),u.addClass(w,"active"),w.style.top=m.style.top,w.style.left=m.style.left,w.style.height=e.view.maximumVisibleElementHeight(0)+"px",e.rootElement.appendChild(w)}function o(){w.style.left=m.style.left}function r(){u.removeClass(m,"active"),u.removeClass(w,"active")}var i,s,a,c,h,f,p,g,m=document.createElement("DIV"),w=document.createElement("DIV"),v=d(this);m.className="manualColumnResizer",w.className="manualColumnResizerGuide";var y=function(){var e=this;Handsontable.hooks.run(e,"persistentStateSave","manualColumnWidths",e.manualColumnWidths)},b=function(){var e=this,t={};return Handsontable.hooks.run(e,"persistentStateLoad","manualColumnWidths",t),t.value},C=function(e){return"BODY"!=e.tagName?"THEAD"==e.parentNode.tagName?!0:(e=e.parentNode,C(e)):!1},R=function(e){return"TABLE"!=e.tagName?"TH"==e.tagName?e:R(e.parentNode):null},S=function(){var d,c=this,g=0,m=null;v.addEventListener(c.rootElement,"mouseover",function(t){if(C(t.target)){var n=R(t.target);n&&(d||e.call(c,n))}}),v.addEventListener(c.rootElement,"mousedown",function(e){u.hasClass(e.target,"manualColumnResizer")&&(n.call(c),d=c,null==m&&(m=setTimeout(function(){g>=2&&(h=c.determineColumnWidth.call(c,s),T(s,h),c.forceFullRender=!0,c.view.render(),Handsontable.hooks.run(c,"afterColumnResize",s,h)),g=0,m=null},500),c._registerTimeout(m)),g++,f=l.pageX(e),h=p)}),v.addEventListener(window,"mousemove",function(e){d&&(a=p+(l.pageX(e)-f),h=T(s,a),t(),o())}),v.addEventListener(window,"mouseup",function(){d&&(r(),d=!1,h!=p&&(c.forceFullRender=!0,c.view.render(),c.view.wt.wtOverlays.adjustElementsSize(),y.call(c),Handsontable.hooks.run(c,"afterColumnResize",s,h)),e.call(c,i))}),c.addHook("afterDestroy",E)},E=function(){v.clear()};this.beforeInit=function(){this.manualColumnWidths=[]},this.init=function(e){var t=this,n=!!this.getSettings().manualColumnResize;if(n){var o=this.getSettings().manualColumnResize,r=b.call(t);"undefined"!=typeof t.manualColumnWidthsPluginUsages?t.manualColumnWidthsPluginUsages.push("manualColumnResize"):t.manualColumnWidthsPluginUsages=["manualColumnResize"],"undefined"!=typeof r?this.manualColumnWidths=r:Array.isArray(o)?this.manualColumnWidths=o:this.manualColumnWidths=[],"afterInit"==e&&(S.call(this),this.manualColumnWidths.length>0&&(this.forceFullRender=!0,this.render()))}else{var i=t.manualColumnWidthsPluginUsages?t.manualColumnWidthsPluginUsages.indexOf("manualColumnResize"):-1;i>-1&&(E.call(this),this.manualColumnWidths=[])}};var T=function(e,t){return t=Math.max(t,20),e=Handsontable.hooks.run(c,"modifyCol",e),c.manualColumnWidths[e]=t,t};this.modifyColWidth=function(e,t){return t=this.runHooks("modifyCol",t),this.getSettings().manualColumnResize&&this.manualColumnWidths[t]?this.manualColumnWidths[t]:e}}Object.defineProperties(n,{ManualColumnResize:{get:function(){return o}},__esModule:{value:!0}});var r,i,s,a,l=(r=e("./../../helpers.js"),r&&r.__esModule&&r||{"default":r}),u=(i=e("./../../dom.js"),i&&i.__esModule&&i||{"default":i}),d=(s=e("./../../eventManager.js"),s&&s.__esModule&&s||{"default":s}).eventManager,c=((a=e("./../../plugins.js"),a&&a.__esModule&&a||{"default":a}).registerPlugin,new o);Handsontable.hooks.add("beforeInit",c.beforeInit),Handsontable.hooks.add("afterInit",function(){c.init.call(this,"afterInit")}),Handsontable.hooks.add("afterUpdateSettings",function(){c.init.call(this,"afterUpdateSettings")}),Handsontable.hooks.add("modifyColWidth",c.modifyColWidth),Handsontable.hooks.register("afterColumnResize")},{"./../../dom.js":27,"./../../eventManager.js":41,"./../../helpers.js":42,"./../../plugins.js":45}],61:[function(e,t,n){"use strict";function o(){function e(e){var t=this;f=e;var n=this.view.wt.wtTable.getCoords(e).row;if(n>=0){h=n;var o=f.getBoundingClientRect();c=o.top,p.style.top=c+"px",p.style.left=o.left+"px",t.rootElement.appendChild(p)}}function t(e,t){var n=e.getBoundingClientRect(),o=6;t>0?p.style.top=n.top+n.height-o+"px":p.style.top=n.top+"px"}function n(){var e=this;u.addClass(p,"active"),u.addClass(g,"active");var t=f.getBoundingClientRect();g.style.width=e.view.maximumVisibleElementWidth(0)+"px",g.style.height=t.height+"px",g.style.top=c+"px",g.style.left=p.style.left,e.rootElement.appendChild(g)}function o(e){g.style.top=c+e+"px"}function r(){u.removeClass(p,"active"),u.removeClass(g,"active")}var i,s,a,c,h,f,p=document.createElement("DIV"),g=document.createElement("DIV"),m=d(this);p.className="manualRowMover",g.className="manualRowMoverGuide";var w=function(){var e=this;Handsontable.hooks.run(e,"persistentStateSave","manualRowPositions",e.manualRowPositions)},v=function(){var e=this,t={};return Handsontable.hooks.run(e,"persistentStateLoad","manualRowPositions",t),t.value},y=function(e){return"BODY"!=e.tagName?"TBODY"==e.parentNode.tagName?!0:(e=e.parentNode,y(e)):!1},b=function(e){return"TABLE"!=e.tagName?"TH"==e.tagName?e:b(e.parentNode):null},C=function(){var d,c=this;m.addEventListener(c.rootElement,"mouseover",function(n){if(y(n.target)){var o=b(n.target);o&&(d?(s=c.view.wt.wtTable.getCoords(o).row,t(o,s-i)):e.call(c,o))}}),m.addEventListener(c.rootElement,"mousedown",function(e){u.hasClass(e.target,"manualRowMover")&&(a=l.pageY(e),n.call(c),d=c,i=h,s=h)}),m.addEventListener(window,"mousemove",function(e){d&&o(l.pageY(e)-a)}),m.addEventListener(window,"mouseup",function(t){d&&(r(),d=!1,S(c.manualRowPositions,c.countRows()),c.manualRowPositions.splice(s,0,c.manualRowPositions.splice(i,1)[0]),c.forceFullRender=!0,c.view.render(),w.call(c),Handsontable.hooks.run(c,"afterRowMove",i,s),e.call(c,f))}),c.addHook("afterDestroy",R)},R=function(){m.clear()},S=function(e,t){if(e.length<t)for(var n=e.length;t>n;n++)e[n]=n};this.beforeInit=function(){this.manualRowPositions=[]},this.init=function(e){var t=this,n=!!t.getSettings().manualRowMove;if(n){var o=t.getSettings().manualRowMove,r=v.call(t);"undefined"!=typeof t.manualRowPositionsPluginUsages?t.manualRowPositionsPluginUsages.push("manualColumnMove"):t.manualRowPositionsPluginUsages=["manualColumnMove"],"undefined"!=typeof r?this.manualRowPositions=r:Array.isArray(o)?this.manualRowPositions=o:this.manualRowPositions=[],"afterInit"===e&&(C.call(this),this.manualRowPositions.length>0&&(t.forceFullRender=!0,t.render()))}else{var i=t.manualRowPositionsPluginUsages?t.manualRowPositionsPluginUsages.indexOf("manualColumnMove"):-1;i>-1&&(R.call(this),t.manualRowPositions=[],t.manualRowPositionsPluginUsages[i]=void 0)}},this.modifyRow=function(e){var t=this;return t.getSettings().manualRowMove?("undefined"==typeof t.manualRowPositions[e]&&S(this.manualRowPositions,e+1),t.manualRowPositions[e]):e}}Object.defineProperties(n,{ManualRowMove:{get:function(){return o}},__esModule:{value:!0}});var r,i,s,a,l=(r=e("./../../helpers.js"),r&&r.__esModule&&r||{"default":r}),u=(i=e("./../../dom.js"),i&&i.__esModule&&i||{"default":i}),d=(s=e("./../../eventManager.js"),s&&s.__esModule&&s||{"default":s}).eventManager,c=((a=e("./../../plugins.js"),a&&a.__esModule&&a||{"default":a}).registerPlugin,new o);Handsontable.hooks.add("beforeInit",c.beforeInit),Handsontable.hooks.add("afterInit",function(){c.init.call(this,"afterInit")}),Handsontable.hooks.add("afterUpdateSettings",function(){c.init.call(this,"afterUpdateSettings")}),Handsontable.hooks.add("modifyRow",c.modifyRow),Handsontable.hooks.register("afterRowMove")},{"./../../dom.js":27,"./../../eventManager.js":41,"./../../helpers.js":42,"./../../plugins.js":45}],62:[function(e,t,n){"use strict";function o(){function e(e){c=this,i=e;var t=this.view.wt.wtTable.getCoords(e).row;if(t>=0){s=t;var n=i.getBoundingClientRect();g=n.top-6,p=parseInt(n.height,10),m.style.left=n.left+"px",m.style.top=g+p+"px",c.rootElement.appendChild(m)}}function t(){m.style.top=g+a+"px"}function n(){var e=this;u.addClass(m,"active"),u.addClass(w,"active"),w.style.top=m.style.top,w.style.left=m.style.left,w.style.width=e.view.maximumVisibleElementWidth(0)+"px",e.rootElement.appendChild(w)}function o(){w.style.top=m.style.top}function r(){u.removeClass(m,"active"),u.removeClass(w,"active")}var i,s,a,c,h,f,p,g,m=document.createElement("DIV"),w=document.createElement("DIV"),v=d(this);m.className="manualRowResizer",w.className="manualRowResizerGuide";var y=function(){var e=this;Handsontable.hooks.run(e,"persistentStateSave","manualRowHeights",e.manualRowHeights)},b=function(){var e=this,t={};return Handsontable.hooks.run(e,"persistentStateLoad","manualRowHeights",t),t.value},C=function(e){return"BODY"!=e.tagName?"TBODY"==e.parentNode.tagName?!0:(e=e.parentNode,C(e)):!1},R=function(e){return"TABLE"!=e.tagName?"TH"==e.tagName?e:R(e.parentNode):null},S=function(){var d,c=this,g=0,m=null;v.addEventListener(c.rootElement,"mouseover",function(t){if(C(t.target)){var n=R(t.target);n&&(d||e.call(c,n))}}),v.addEventListener(c.rootElement,"mousedown",function(e){u.hasClass(e.target,"manualRowResizer")&&(n.call(c),d=c,null==m&&(m=setTimeout(function(){g>=2&&(T(s,null),c.forceFullRender=!0,c.view.render(),Handsontable.hooks.run(c,"afterRowResize",s,h)),g=0,m=null},500),c._registerTimeout(m)),g++,f=l.pageY(e),h=p)}),v.addEventListener(window,"mousemove",function(e){d&&(a=p+(l.pageY(e)-f),h=T(s,a),t(),o())}),v.addEventListener(window,"mouseup",function(t){d&&(r(),d=!1,h!=p&&(c.forceFullRender=!0,c.view.render(),y.call(c),Handsontable.hooks.run(c,"afterRowResize",s,h)),e.call(c,i))}),c.addHook("afterDestroy",E)},E=function(){v.clear()};this.beforeInit=function(){this.manualRowHeights=[]},this.init=function(e){var t=this,n=!!this.getSettings().manualRowResize;if(n){var o=this.getSettings().manualRowResize,r=b.call(t);"undefined"!=typeof t.manualRowHeightsPluginUsages?t.manualRowHeightsPluginUsages.push("manualRowResize"):t.manualRowHeightsPluginUsages=["manualRowResize"],"undefined"!=typeof r?this.manualRowHeights=r:Array.isArray(o)?this.manualRowHeights=o:this.manualRowHeights=[],"afterInit"===e?(S.call(this),this.manualRowHeights.length>0&&(this.forceFullRender=!0,this.render())):(this.forceFullRender=!0,this.render())}else{var i=t.manualRowHeightsPluginUsages?t.manualRowHeightsPluginUsages.indexOf("manualRowResize"):-1;i>-1&&(E.call(this),this.manualRowHeights=[],t.manualRowHeightsPluginUsages[i]=void 0)}};var T=function(e,t){return e=Handsontable.hooks.run(c,"modifyRow",e),c.manualRowHeights[e]=t,t};this.modifyRowHeight=function(e,t){return this.getSettings().manualRowResize&&(t=this.runHooks("modifyRow",t),void 0!==this.manualRowHeights[t])?this.manualRowHeights[t]:e}}Object.defineProperties(n,{ManualRowResize:{get:function(){return o}},__esModule:{value:!0}});var r,i,s,a,l=(r=e("./../../helpers.js"),r&&r.__esModule&&r||{"default":r}),u=(i=e("./../../dom.js"),i&&i.__esModule&&i||{"default":i}),d=(s=e("./../../eventManager.js"),s&&s.__esModule&&s||{"default":s}).eventManager,c=((a=e("./../../plugins.js"),a&&a.__esModule&&a||{"default":a}).registerPlugin,new o);Handsontable.hooks.add("beforeInit",c.beforeInit),Handsontable.hooks.add("afterInit",function(){c.init.call(this,"afterInit")}),Handsontable.hooks.add("afterUpdateSettings",function(){c.init.call(this,"afterUpdateSettings")}),Handsontable.hooks.add("modifyRowHeight",c.modifyRowHeight),Handsontable.hooks.register("afterRowResize")},{"./../../dom.js":27,"./../../eventManager.js":41,"./../../helpers.js":42,"./../../plugins.js":45}],63:[function(e,t,n){"use strict";function o(){var e=[];return e.getInfo=function(e,t){for(var n=0,o=this.length;o>n;n++)if(this[n].row<=e&&this[n].row+this[n].rowspan-1>=e&&this[n].col<=t&&this[n].col+this[n].colspan-1>=t)return this[n]},e.setInfo=function(e){for(var t=0,n=this.length;n>t;t++)if(this[t].row===e.row&&this[t].col===e.col)return void(this[t]=e);this.push(e)},e.removeInfo=function(e,t){for(var n=0,o=this.length;o>n;n++)if(this[n].row===e&&this[n].col===t){this.splice(n,1);break}},e}function r(e){if(this.mergedCellInfoCollection=new o,Array.isArray(e))for(var t=0,n=e.length;n>t;t++)this.mergedCellInfoCollection.setInfo(e[t])}function i(e,t){var n=this.getSettings().mergeCells;if(n&&!this.selection.isMultiple()){var o=this.mergeCells.mergedCellInfoCollection.getInfo(e[0],e[1]);o&&(e[0]=o.row,e[1]=o.col,e[2]=o.row+o.rowspan-1,e[3]=o.col+o.colspan-1)}}Object.defineProperties(n,{MergeCells:{get:function(){return r}},__esModule:{value:!0}});var s,a,l,u,d=((s=e("./../../plugins.js"),s&&s.__esModule&&s||{"default":s}).registerPlugin,(a=e("./../../3rdparty/walkontable/src/cell/coords.js"),a&&a.__esModule&&a||{"default":a}).WalkontableCellCoords),c=(l=e("./../../3rdparty/walkontable/src/cell/range.js"),l&&l.__esModule&&l||{"default":l}).WalkontableCellRange,h=(u=e("./../../3rdparty/walkontable/src/table.js"),u&&u.__esModule&&u||{"default":u}).WalkontableTable;r.prototype.canMergeRange=function(e){return!e.isSingle()},r.prototype.mergeRange=function(e){if(this.canMergeRange(e)){var t=e.getTopLeftCorner(),n=e.getBottomRightCorner(),o={};o.row=t.row,o.col=t.col,o.rowspan=n.row-t.row+1,o.colspan=n.col-t.col+1,this.mergedCellInfoCollection.setInfo(o)}},r.prototype.mergeOrUnmergeSelection=function(e){var t=this.mergedCellInfoCollection.getInfo(e.from.row,e.from.col);t?this.unmergeSelection(e.from):this.mergeSelection(e)},r.prototype.mergeSelection=function(e){this.mergeRange(e)},r.prototype.unmergeSelection=function(e){var t=this.mergedCellInfoCollection.getInfo(e.row,e.col);this.mergedCellInfoCollection.removeInfo(t.row,t.col)},r.prototype.applySpanProperties=function(e,t,n){var o=this.mergedCellInfoCollection.getInfo(t,n);o?o.row===t&&o.col===n?(e.setAttribute("rowspan",o.rowspan),e.setAttribute("colspan",o.colspan)):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="none"):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"))},r.prototype.modifyTransform=function(e,t,n){var o=function(e,t){return t.row>=e.row&&t.row<=e.row+e.rowspan-1?!0:!1},r=function(e,t){return t.col>=e.col&&t.col<=e.col+e.colspan-1?!0:!1},i=function(e){return new d(t.to.row+e.row,t.to.col+e.col)},s={row:n.row,col:n.col};if("modifyTransformStart"==e){this.lastDesiredCoords||(this.lastDesiredCoords=new d(null,null));for(var a,l=new d(t.highlight.row,t.highlight.col),u=this.mergedCellInfoCollection.getInfo(l.row,l.col),h=0,f=this.mergedCellInfoCollection.length;f>h;h++){var p=this.mergedCellInfoCollection[h];if(p=new d(p.row+p.rowspan-1,p.col+p.colspan-1),t.includes(p)){a=!0;break}}if(u){var g=new d(u.row,u.col),m=new d(u.row+u.rowspan-1,u.col+u.colspan-1),w=new c(g,g,m);w.includes(this.lastDesiredCoords)||(this.lastDesiredCoords=new d(null,null)),s.row=this.lastDesiredCoords.row?this.lastDesiredCoords.row-l.row:s.row,s.col=this.lastDesiredCoords.col?this.lastDesiredCoords.col-l.col:s.col,n.row>0?s.row=u.row+u.rowspan-1-l.row+n.row:n.row<0&&(s.row=l.row-u.row+n.row),n.col>0?s.col=u.col+u.colspan-1-l.col+n.col:n.col<0&&(s.col=l.col-u.col+n.col)}var v=new d(t.highlight.row+s.row,t.highlight.col+s.col),y=this.mergedCellInfoCollection.getInfo(v.row,v.col);y&&(this.lastDesiredCoords=v,s={row:y.row-l.row,col:y.col-l.col})}else if("modifyTransformEnd"==e)for(var h=0,f=this.mergedCellInfoCollection.length;f>h;h++){var b=this.mergedCellInfoCollection[h],g=new d(b.row,b.col),m=new d(b.row+b.rowspan-1,b.col+b.colspan-1),C=new c(g,g,m),R=t.getBordersSharedWith(C);if(C.isEqual(t))t.setDirection("NW-SE");else if(R.length>0){var S=t.highlight.isEqual(C.from);R.indexOf("top")>-1?t.to.isSouthEastOf(C.from)&&S?t.setDirection("NW-SE"):t.to.isSouthWestOf(C.from)&&S&&t.setDirection("NE-SW"):R.indexOf("bottom")>-1&&(t.to.isNorthEastOf(C.from)&&S?t.setDirection("SW-NE"):t.to.isNorthWestOf(C.from)&&S&&t.setDirection("SE-NW"))}var v=i(s),E=o(b,v),T=r(b,v);t.includesRange(C)&&(C.includes(v)||E||T)&&(E&&(s.row<0?s.row-=b.rowspan-1:s.row>0&&(s.row+=b.rowspan-1)),T&&(s.col<0?s.col-=b.colspan-1:s.col>0&&(s.col+=b.colspan-1)))}0!==s.row&&(n.row=s.row),0!==s.col&&(n.col=s.col)};var f=function(){var e=this,t=e.getSettings().mergeCells;t&&(e.mergeCells||(e.mergeCells=new r(t)))},p=function(){var e=this;e.mergeCells&&(e.view.wt.wtTable.getCell=function(t){if(e.getSettings().mergeCells){var n=e.mergeCells.mergedCellInfoCollection.getInfo(t.row,t.col);n&&(t=n)}return h.prototype.getCell.call(this,t)})},g=function(e){if(this.mergeCells){var t=(e.ctrlKey||e.metaKey)&&!e.altKey;t&&77===e.keyCode&&(this.mergeCells.mergeOrUnmergeSelection(this.getSelectedRange()),this.render(),e.stopImmediatePropagation())}},m=function(e){this.getSettings().mergeCells&&(e.items.push(Handsontable.ContextMenu.SEPARATOR),e.items.push({key:"mergeCells",name:function(){var e=this.getSelected(),t=this.mergeCells.mergedCellInfoCollection.getInfo(e[0],e[1]);return t?"Unmerge cells":"Merge cells"},callback:function(){this.mergeCells.mergeOrUnmergeSelection(this.getSelectedRange()),this.render()},disabled:function(){return!1}}))},w=function(e,t,n,o,r,i){this.mergeCells&&this.mergeCells.applySpanProperties(e,t,n)},v=function(e){return function(t){var n=this.getSettings().mergeCells;if(n){var o=this.getSelectedRange();if(this.mergeCells.modifyTransform(e,o,t),"modifyTransformEnd"===e){var r=this.countRows(),i=this.countCols();o.from.row<0?o.from.row=0:o.from.row>0&&o.from.row>=r&&(o.from.row=o.from-1),o.from.col<0?o.from.col=0:o.from.col>0&&o.from.col>=i&&(o.from.col=i-1)}}}},y=function(e){this.lastDesiredCoords=null;var t=this.getSettings().mergeCells;if(t){var n=this.getSelectedRange();n.highlight=new d(n.highlight.row,n.highlight.col),n.to=e;var o=!1;do{o=!1;for(var r=0,i=this.mergeCells.mergedCellInfoCollection.length;i>r;r++){var s=this.mergeCells.mergedCellInfoCollection[r],a=new d(s.row,s.col),l=new d(s.row+s.rowspan-1,s.col+s.colspan-1),u=new c(a,a,l);n.expandByRange(u)&&(e.row=n.to.row,e.col=n.to.col,o=!0)}}while(o)}},b=function(e,t){if(t&&"area"==t){var n=this.getSettings().mergeCells;if(n)for(var o=this.getSelectedRange(),r=new c(o.from,o.from,o.from),i=new c(o.to,o.to,o.to),s=0,a=this.mergeCells.mergedCellInfoCollection.length;a>s;s++){var l=this.mergeCells.mergedCellInfoCollection[s],u=new d(l.row,l.col),h=new d(l.row+l.rowspan-1,l.col+l.colspan-1),f=new c(u,u,h);r.expandByRange(f)&&(e[0]=r.from.row,e[1]=r.from.col),i.expandByRange(f)&&(e[2]=i.from.row,e[3]=i.from.col)}}},C=function(e,t,n){var o=this.getSettings().mergeCells;if(o){var r=this.mergeCells.mergedCellInfoCollection.getInfo(e,t);!r||r.row==e&&r.col==t||(n.copyable=!1)}},R=function(e){var t=this.getSettings().mergeCells;if(t)for(var n,o=this.countCols(),r=0;o>r;r++){if(n=this.mergeCells.mergedCellInfoCollection.getInfo(e.startRow,r),n&&n.row<e.startRow)return e.startRow=n.row,R.call(this,e);if(n=this.mergeCells.mergedCellInfoCollection.getInfo(e.endRow,r)){var i=n.row+n.rowspan-1;if(i>e.endRow)return e.endRow=i,R.call(this,e)}}},S=function(e){var t=this.getSettings().mergeCells;if(t)for(var n,o=this.countRows(),r=0;o>r;r++){if(n=this.mergeCells.mergedCellInfoCollection.getInfo(r,e.startColumn),n&&n.col<e.startColumn)return e.startColumn=n.col,S.call(this,e);if(n=this.mergeCells.mergedCellInfoCollection.getInfo(r,e.endColumn)){var i=n.col+n.colspan-1;if(i>e.endColumn)return e.endColumn=i,S.call(this,e)}}},E=function(e){if(e&&this.mergeCells){var t=this.mergeCells.mergedCellInfoCollection,n=this.getSelectedRange();for(var o in t)if(n.highlight.row==t[o].row&&n.highlight.col==t[o].col&&n.to.row==t[o].row+t[o].rowspan-1&&n.to.col==t[o].col+t[o].colspan-1)return!1}return e};Handsontable.hooks.add("beforeInit",f),Handsontable.hooks.add("afterInit",p),Handsontable.hooks.add("beforeKeyDown",g),Handsontable.hooks.add("modifyTransformStart",v("modifyTransformStart")),Handsontable.hooks.add("modifyTransformEnd",v("modifyTransformEnd")),Handsontable.hooks.add("beforeSetRangeEnd",y),Handsontable.hooks.add("beforeDrawBorders",b),Handsontable.hooks.add("afterIsMultipleSelection",E),Handsontable.hooks.add("afterRenderer",w),Handsontable.hooks.add("afterContextMenuDefaultOptions",m),Handsontable.hooks.add("afterGetCellMeta",C),Handsontable.hooks.add("afterViewportRowCalculatorOverride",R),Handsontable.hooks.add("afterViewportColumnCalculatorOverride",S),Handsontable.hooks.add("afterAutofillApplyValues",i),Handsontable.MergeCells=r},{"./../../3rdparty/walkontable/src/cell/coords.js":5,"./../../3rdparty/walkontable/src/cell/range.js":6,"./../../3rdparty/walkontable/src/table.js":20,"./../../plugins.js":45}],64:[function(e,t,n){"use strict";Object.defineProperties(n,{"default":{get:function(){return f}},__esModule:{value:!0}});var o,r,i,s,a=(o=e("./../../dom.js"),o&&o.__esModule&&o||{"default":o}),l=(r=e("./../_base.js"),r&&r.__esModule&&r||{"default":r})["default"],u=(i=e("./../../eventManager.js"),i&&i.__esModule&&i||{"default":i}).eventManager,d=(s=e("./../../plugins.js"),s&&s.__esModule&&s||{"default":s}).registerPlugin,c=function(e){var t=this;$traceurRuntime.superConstructor(h).call(this,e),this.dragged=[],this.eventManager=u(this.hot),this.bindTouchEvents(),this.hot.addHook("afterInit",function(){return t.init()})},h=c;$traceurRuntime.createClass(c,{init:function(){this.lastSetCell=null,Handsontable.plugins.multipleSelectionHandles=new h(this.hot)},bindTouchEvents:function(){function e(e){if(1===t.dragged.length)return t.dragged.splice(0,t.dragged.length),!0;var n=t.dragged.indexOf(e);return-1==n?!1:void(0===n?t.dragged=t.dragged.slice(0,1):1==n&&(t.dragged=t.dragged.slice(-1)))}var t=this;this.eventManager.addEventListener(this.hot.rootElement,"touchstart",function(e){var n;return a.hasClass(e.target,"topLeftSelectionHandle-HitArea")?(n=t.hot.getSelectedRange(),t.dragged.push("topLeft"),t.touchStartRange={width:n.getWidth(),height:n.getHeight(),direction:n.getDirection()},e.preventDefault(),!1):a.hasClass(e.target,"bottomRightSelectionHandle-HitArea")?(n=t.hot.getSelectedRange(),t.dragged.push("bottomRight"),t.touchStartRange={width:n.getWidth(),height:n.getHeight(),direction:n.getDirection()},e.preventDefault(),!1):void 0}),this.eventManager.addEventListener(this.hot.rootElement,"touchend",function(n){return a.hasClass(n.target,"topLeftSelectionHandle-HitArea")?(e.call(t,"topLeft"),t.touchStartRange=void 0,n.preventDefault(),!1):a.hasClass(n.target,"bottomRightSelectionHandle-HitArea")?(e.call(t,"bottomRight"),t.touchStartRange=void 0,n.preventDefault(),!1):void 0}),this.eventManager.addEventListener(this.hot.rootElement,"touchmove",function(e){var n,o,r,i,s,l,u,d=a.getWindowScrollTop(),c=a.getWindowScrollLeft();0!==t.dragged.length&&(n=document.elementFromPoint(e.touches[0].screenX-c,e.touches[0].screenY-d),
n&&n!==t.lastSetCell&&(("TD"==n.nodeName||"TH"==n.nodeName)&&(o=t.hot.getCoords(n),-1==o.col&&(o.col=0),r=t.hot.getSelectedRange(),i=r.getWidth(),s=r.getHeight(),l=r.getDirection(),1==i&&1==s&&t.hot.selection.setRangeEnd(o),u=t.getCurrentRangeCoords(r,o,t.touchStartRange.direction,l,t.dragged[0]),null!==u.start&&t.hot.selection.setRangeStart(u.start),t.hot.selection.setRangeEnd(u.end),t.lastSetCell=n),e.preventDefault()))})},getCurrentRangeCoords:function(e,t,n,o,r){var i=e.getTopLeftCorner(),s=e.getBottomRightCorner(),a=e.getBottomLeftCorner(),l=e.getTopRightCorner(),u={start:null,end:null};switch(n){case"NE-SW":switch(o){case"NE-SW":case"NW-SE":u="topLeft"==r?{start:new WalkontableCellCoords(t.row,e.highlight.col),end:new WalkontableCellCoords(a.row,t.col)}:{start:new WalkontableCellCoords(e.highlight.row,t.col),end:new WalkontableCellCoords(t.row,i.col)};break;case"SE-NW":"bottomRight"==r&&(u={start:new WalkontableCellCoords(s.row,t.col),end:new WalkontableCellCoords(t.row,i.col)})}break;case"NW-SE":switch(o){case"NE-SW":"topLeft"==r?u={start:t,end:a}:u.end=t;break;case"NW-SE":"topLeft"==r?u={start:t,end:s}:u.end=t;break;case"SE-NW":"topLeft"==r?u={start:t,end:i}:u.end=t;break;case"SW-NE":"topLeft"==r?u={start:t,end:l}:u.end=t}break;case"SW-NE":switch(o){case"NW-SE":u="bottomRight"==r?{start:new WalkontableCellCoords(t.row,i.col),end:new WalkontableCellCoords(a.row,t.col)}:{start:new WalkontableCellCoords(i.row,t.col),end:new WalkontableCellCoords(t.row,s.col)};break;case"SW-NE":u="topLeft"==r?{start:new WalkontableCellCoords(e.highlight.row,t.col),end:new WalkontableCellCoords(t.row,s.col)}:{start:new WalkontableCellCoords(t.row,i.col),end:new WalkontableCellCoords(i.row,t.col)};break;case"SE-NW":"bottomRight"==r?u={start:new WalkontableCellCoords(t.row,l.col),end:new WalkontableCellCoords(i.row,t.col)}:"topLeft"==r&&(u={start:a,end:t})}break;case"SE-NW":switch(o){case"NW-SE":case"NE-SW":case"SW-NE":"topLeft"==r&&(u.end=t);break;case"SE-NW":"topLeft"==r?u.end=t:u={start:t,end:i}}}return u},isDragged:function(){return this.dragged.length>0}},{},l);var f=c;d("multipleSelectionHandles",c)},{"./../../dom.js":27,"./../../eventManager.js":41,"./../../plugins.js":45,"./../_base.js":46}],65:[function(e,t,n){"use strict";function o(){}function r(){var e=this,t=e.getSettings().observeChanges;t?(e.observer&&a.call(e),i.call(e),u.call(e)):t||a.call(e)}function i(){var e=this;e.observeChangesActive=!0,e.pauseObservingChanges=function(){e.observeChangesActive=!1},e.resumeObservingChanges=function(){e.observeChangesActive=!0},e.observedData=e.getData(),e.observer=p.observe(e.observedData,function(t){e.observeChangesActive&&(s.call(e,t),e.render()),e.runHooks("afterChangesObserved")})}function s(e){function t(e){var t;return t=o(e),t=n(t)}function n(e){var t=[];return e.filter(function(e){var n=r(e.path);if(-1!=["add","remove"].indexOf(e.op)&&!isNaN(n.col)){if(-1!=t.indexOf(n.col))return!1;t.push(n.col)}return!0})}function o(e){return e.filter(function(e){return!/[/]length/gi.test(e.path)})}function r(e){var t=e.match(/^\/(\d+)\/?(.*)?$/);return{row:parseInt(t[1],10),col:/^\d*$/.test(t[2])?parseInt(t[2],10):t[2]}}for(var i=this,s=t(e),a=0,l=s.length;l>a;a++){var u=s[a],d=r(u.path);switch(u.op){case"add":isNaN(d.col)?i.runHooks("afterCreateRow",d.row):i.runHooks("afterCreateCol",d.col);break;case"remove":isNaN(d.col)?i.runHooks("afterRemoveRow",d.row,1):i.runHooks("afterRemoveCol",d.col,1);break;case"replace":i.runHooks("afterChange",[d.row,d.col,null,u.value],"external")}}}function a(){var e=this;e.observer&&(l.call(e),d.call(e))}function l(){var e=this;p.unobserve(e.observedData,e.observer),delete e.observeChangesActive,delete e.pauseObservingChanges,delete e.resumeObservingChanges}function u(){var e=this;e.addHook("afterDestroy",a),e.addHook("afterCreateRow",c),e.addHook("afterRemoveRow",c),e.addHook("afterCreateCol",c),e.addHook("afterRemoveCol",c),e.addHook("afterChange",function(e,t){"loadData"!=t&&c.call(this)})}function d(){var e=this;e.removeHook("afterDestroy",a),e.removeHook("afterCreateRow",c),e.removeHook("afterRemoveRow",c),e.removeHook("afterCreateCol",c),e.removeHook("afterRemoveCol",c),e.removeHook("afterChange",c)}function c(){var e=this;e.pauseObservingChanges(),e.addHookOnce("afterChangesObserved",function(){e.resumeObservingChanges()})}Object.defineProperties(n,{ObserveChanges:{get:function(){return o}},__esModule:{value:!0}});var h,f,p=((h=e("./../../plugins.js"),h&&h.__esModule&&h||{"default":h}).registerPlugin,(f=e("jsonpatch"),f&&f.__esModule&&f||{"default":f})["default"]);Handsontable.hooks.add("afterLoadData",r),Handsontable.hooks.add("afterUpdateSettings",r),Handsontable.hooks.register("afterChangesObserved")},{"./../../plugins.js":45,jsonpatch:"jsonpatch"}],66:[function(e,t,n){"use strict";function o(e){var t,n=function(){window.localStorage[e+"__persistentStateKeys"]=JSON.stringify(t)},o=function(){var n=window.localStorage[e+"__persistentStateKeys"],o="string"==typeof n?JSON.parse(n):void 0;t=o?o:[]},r=function(){t=[],n()};o(),this.saveValue=function(o,r){window.localStorage[e+"_"+o]=JSON.stringify(r),-1==t.indexOf(o)&&(t.push(o),n())},this.loadValue=function(t,n){t="undefined"!=typeof t?t:n;var o=window.localStorage[e+"_"+t];return"undefined"==typeof o?void 0:JSON.parse(o)},this.reset=function(t){window.localStorage.removeItem(e+"_"+t)},this.resetAll=function(){for(var n=0;n<t.length;n++)window.localStorage.removeItem(e+"_"+t[n]);r()}}function r(){function e(){var e=this;for(var t in r)r.hasOwnProperty(t)&&e.addHook(t,r[t])}function t(){var e=this;for(var t in r)r.hasOwnProperty(t)&&e.removeHook(t,r[t])}var n=this;this.init=function(){var r=this,i=r.getSettings().persistentState;return n.enabled=!!i,n.enabled?(r.storage||(r.storage=new o(r.rootElement.id)),r.resetState=n.resetValue,void e.call(r)):void t.call(r)},this.saveValue=function(e,t){var n=this;n.storage.saveValue(e,t)},this.loadValue=function(e,t){var n=this;t.value=n.storage.loadValue(e)},this.resetValue=function(e){var t=this;"undefined"!=typeof e?t.storage.reset(e):t.storage.resetAll()};var r={persistentStateSave:n.saveValue,persistentStateLoad:n.loadValue,persistentStateReset:n.resetValue};for(var i in r)r.hasOwnProperty(i)&&Handsontable.hooks.register(i)}Object.defineProperties(n,{HandsontablePersistentState:{get:function(){return r}},__esModule:{value:!0}});var i,s=((i=e("./../../plugins.js"),i&&i.__esModule&&i||{"default":i}).registerPlugin,new r);Handsontable.hooks.add("beforeInit",s.init),Handsontable.hooks.add("afterUpdateSettings",s.init)},{"./../../plugins.js":45}],67:[function(e,t,n){"use strict";function o(){var e=this,t=!!e.getSettings().search;t?e.search=new Handsontable.Search(e):delete e.search}var r,i,s=(r=e("./../../dom.js"),r&&r.__esModule&&r||{"default":r}),a=(i=e("./../../renderers.js"),i&&i.__esModule&&i||{"default":i}),l=a.registerRenderer,u=a.getRenderer;Handsontable.Search=function(e){this.query=function(t,n,o){var r=e.countRows(),i=e.countCols(),s=[];n||(n=Handsontable.Search.global.getDefaultCallback()),o||(o=Handsontable.Search.global.getDefaultQueryMethod());for(var a=0;r>a;a++)for(var l=0;i>l;l++){var u=e.getDataAtCell(a,l),d=e.getCellMeta(a,l),c=d.search.callback||n,h=d.search.queryMethod||o,f=h(t,u);if(f){var p={row:a,col:l,data:u};s.push(p)}c&&c(e,a,l,u,f)}return s}},Handsontable.Search.DEFAULT_CALLBACK=function(e,t,n,o,r){e.getCellMeta(t,n).isSearchResult=r},Handsontable.Search.DEFAULT_QUERY_METHOD=function(e,t){return"undefined"!=typeof e&&null!=e&&e.toLowerCase&&0!==e.length?"undefined"==typeof t||null==t?!1:-1!=t.toString().toLowerCase().indexOf(e.toLowerCase()):!1},Handsontable.Search.DEFAULT_SEARCH_RESULT_CLASS="htSearchResult",Handsontable.Search.global=function(){var e=Handsontable.Search.DEFAULT_CALLBACK,t=Handsontable.Search.DEFAULT_QUERY_METHOD,n=Handsontable.Search.DEFAULT_SEARCH_RESULT_CLASS;return{getDefaultCallback:function(){return e},setDefaultCallback:function(t){e=t},getDefaultQueryMethod:function(){return t},setDefaultQueryMethod:function(e){t=e},getDefaultSearchResultClass:function(){return n},setDefaultSearchResultClass:function(e){n=e}}}(),Handsontable.SearchCellDecorator=function(e,t,n,o,r,i,a){var l=null!==a.search&&"object"==typeof a.search&&a.search.searchResultClass||Handsontable.Search.global.getDefaultSearchResultClass();a.isSearchResult?s.addClass(t,l):s.removeClass(t,l)};var d=u("base");l("base",function(e,t,n,o,r,i,s){d.apply(this,arguments),Handsontable.SearchCellDecorator.apply(this,arguments)}),Handsontable.hooks.add("afterInit",o),Handsontable.hooks.add("afterUpdateSettings",o)},{"./../../dom.js":27,"./../../renderers.js":70}],68:[function(e,t,n){"use strict";Object.defineProperties(n,{TouchScroll:{get:function(){return u}},__esModule:{value:!0}});var o,r,i,s=(o=e("./../../dom.js"),o&&o.__esModule&&o||{"default":o}),a=(r=e("./../_base.js"),r&&r.__esModule&&r||{"default":r})["default"],l=(i=e("./../../plugins.js"),i&&i.__esModule&&i||{"default":i}).registerPlugin,u=function(e){var t=this;$traceurRuntime.superConstructor(d).call(this,e),this.hot.addHook("afterInit",function(){return t.init()}),this.hot.addHook("afterUpdateSettings",function(){return t.onAfterUpdateSettings()}),this.scrollbars=[],this.clones=[]},d=u;$traceurRuntime.createClass(u,{init:function(){this.registerEvents(),this.onAfterUpdateSettings()},onAfterUpdateSettings:function(){var e=this;this.hot.addHookOnce("afterRender",function(){var t=e.hot.view.wt.wtOverlays;e.scrollbars=[],e.scrollbars.push(t.topOverlay),e.scrollbars.push(t.leftOverlay),t.topLeftCornerOverlay&&e.scrollbars.push(t.topLeftCornerOverlay),e.clones=[],t.topOverlay.needFullRender&&e.clones.push(t.topOverlay.clone.wtTable.holder.parentNode),t.leftOverlay.needFullRender&&e.clones.push(t.leftOverlay.clone.wtTable.holder.parentNode),t.topLeftCornerOverlay&&e.clones.push(t.topLeftCornerOverlay.clone.wtTable.holder.parentNode)})},registerEvents:function(){var e=this;this.hot.addHook("beforeTouchScroll",function(){return e.onBeforeTouchScroll()}),this.hot.addHook("afterMomentumScroll",function(){return e.onAfterMomentumScroll()})},onBeforeTouchScroll:function(){Handsontable.freezeOverlays=!0;for(var e=0,t=this.clones.length;t>e;e++)s.addClass(this.clones[e],"hide-tween")},onAfterMomentumScroll:function(){Handsontable.freezeOverlays=!1;for(var e=this,t=0,n=this.clones.length;n>t;t++)s.removeClass(this.clones[t],"hide-tween");for(var o=0,r=this.clones.length;r>o;o++)s.addClass(this.clones[o],"show-tween");setTimeout(function(){for(var t=0,n=e.clones.length;n>t;t++)s.removeClass(e.clones[t],"show-tween")},400);for(var i=0,a=this.scrollbars.length;a>i;i++)this.scrollbars[i].refresh(),this.scrollbars[i].resetFixedPosition();this.hot.view.wt.wtOverlays.syncScrollWithMaster()}},{},a),l("touchScroll",u)},{"./../../dom.js":27,"./../../plugins.js":45,"./../_base.js":46}],69:[function(e,t,n){"use strict";function o(){var e=this,t="undefined"==typeof e.getSettings().undo||e.getSettings().undo;t?e.undoRedo||(e.undoRedo=new Handsontable.UndoRedo(e),s(e),e.addHook("beforeKeyDown",r),e.addHook("afterChange",i)):e.undoRedo&&(delete e.undoRedo,a(e),e.removeHook("beforeKeyDown",r),e.removeHook("afterChange",i))}function r(e){var t=this,n=(e.ctrlKey||e.metaKey)&&!e.altKey;n&&(89===e.keyCode||e.shiftKey&&90===e.keyCode?(t.undoRedo.redo(),e.stopImmediatePropagation()):90===e.keyCode&&(t.undoRedo.undo(),e.stopImmediatePropagation()))}function i(e,t){var n=this;return"loadData"==t?n.undoRedo.clear():void 0}function s(e){e.undo=function(){return e.undoRedo.undo()},e.redo=function(){return e.undoRedo.redo()},e.isUndoAvailable=function(){return e.undoRedo.isUndoAvailable()},e.isRedoAvailable=function(){return e.undoRedo.isRedoAvailable()},e.clearUndo=function(){return e.undoRedo.clear()}}function a(e){delete e.undo,delete e.redo,delete e.isUndoAvailable,delete e.isRedoAvailable,delete e.clearUndo}var l,u=(l=e("./../../helpers.js"),l&&l.__esModule&&l||{"default":l});Handsontable.UndoRedo=function(e){var t=this;this.instance=e,this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,e.addHook("afterChange",function(e,n){if(e){var o=new Handsontable.UndoRedo.ChangeAction(e);t.done(o)}}),e.addHook("afterCreateRow",function(e,n,o){if(!o){var r=new Handsontable.UndoRedo.CreateRowAction(e,n);t.done(r)}}),e.addHook("beforeRemoveRow",function(e,n){var o=t.instance.getData();e=(o.length+e)%o.length;var r=o.slice(e,e+n),i=new Handsontable.UndoRedo.RemoveRowAction(e,r);t.done(i)}),e.addHook("afterCreateCol",function(e,n,o){if(!o){var r=new Handsontable.UndoRedo.CreateColumnAction(e,n);t.done(r)}}),e.addHook("beforeRemoveCol",function(n,o){var r=t.instance.getData();n=(t.instance.countCols()+n)%t.instance.countCols();for(var i=[],s=0,a=r.length;a>s;s++)i[s]=r[s].slice(n,n+o);var l;Array.isArray(e.getSettings().colHeaders)&&(l=e.getSettings().colHeaders.slice(n,n+i.length));var u=new Handsontable.UndoRedo.RemoveColumnAction(n,i,l);t.done(u)}),e.addHook("beforeCellAlignment",function(e,n,o,r){var i=new Handsontable.UndoRedo.CellAlignmentAction(e,n,o,r);t.done(i)})},Handsontable.UndoRedo.prototype.done=function(e){this.ignoreNewActions||(this.doneActions.push(e),this.undoneActions.length=0)},Handsontable.UndoRedo.prototype.undo=function(){if(this.isUndoAvailable()){var e=this.doneActions.pop();this.ignoreNewActions=!0;var t=this;e.undo(this.instance,function(){t.ignoreNewActions=!1,t.undoneActions.push(e)})}},Handsontable.UndoRedo.prototype.redo=function(){if(this.isRedoAvailable()){var e=this.undoneActions.pop();this.ignoreNewActions=!0;var t=this;e.redo(this.instance,function(){t.ignoreNewActions=!1,t.doneActions.push(e)})}},Handsontable.UndoRedo.prototype.isUndoAvailable=function(){return this.doneActions.length>0},Handsontable.UndoRedo.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},Handsontable.UndoRedo.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},Handsontable.UndoRedo.Action=function(){},Handsontable.UndoRedo.Action.prototype.undo=function(){},Handsontable.UndoRedo.Action.prototype.redo=function(){},Handsontable.UndoRedo.ChangeAction=function(e){this.changes=e},u.inherit(Handsontable.UndoRedo.ChangeAction,Handsontable.UndoRedo.Action),Handsontable.UndoRedo.ChangeAction.prototype.undo=function(e,t){for(var n=u.deepClone(this.changes),o=e.countEmptyRows(!0),r=e.countEmptyCols(!0),i=0,s=n.length;s>i;i++)n[i].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtRowProp(n,null,null,"undo");for(var i=0,s=n.length;s>i;i++)e.getSettings().minSpareRows&&n[i][0]+1+e.getSettings().minSpareRows===e.countRows()&&o==e.getSettings().minSpareRows&&(e.alter("remove_row",parseInt(n[i][0]+1,10),e.getSettings().minSpareRows),e.undoRedo.doneActions.pop()),e.getSettings().minSpareCols&&n[i][1]+1+e.getSettings().minSpareCols===e.countCols()&&r==e.getSettings().minSpareCols&&(e.alter("remove_col",parseInt(n[i][1]+1,10),e.getSettings().minSpareCols),e.undoRedo.doneActions.pop())},Handsontable.UndoRedo.ChangeAction.prototype.redo=function(e,t){for(var n=u.deepClone(this.changes),o=0,r=n.length;r>o;o++)n[o].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtRowProp(n,null,null,"redo")},Handsontable.UndoRedo.CreateRowAction=function(e,t){this.index=e,this.amount=t},u.inherit(Handsontable.UndoRedo.CreateRowAction,Handsontable.UndoRedo.Action),Handsontable.UndoRedo.CreateRowAction.prototype.undo=function(e,t){var n=e.countRows(),o=e.getSettings().minSpareRows;this.index>=n&&this.index-o<n&&(this.index-=o),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount)},Handsontable.UndoRedo.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row",this.index+1,this.amount)},Handsontable.UndoRedo.RemoveRowAction=function(e,t){this.index=e,this.data=t},u.inherit(Handsontable.UndoRedo.RemoveRowAction,Handsontable.UndoRedo.Action),Handsontable.UndoRedo.RemoveRowAction.prototype.undo=function(e,t){var n=[this.index,0];Array.prototype.push.apply(n,this.data),Array.prototype.splice.apply(e.getData(),n),e.addHookOnce("afterRender",t),e.render()},Handsontable.UndoRedo.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length)},Handsontable.UndoRedo.CreateColumnAction=function(e,t){this.index=e,this.amount=t},u.inherit(Handsontable.UndoRedo.CreateColumnAction,Handsontable.UndoRedo.Action),Handsontable.UndoRedo.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount)},Handsontable.UndoRedo.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col",this.index+1,this.amount)},Handsontable.UndoRedo.CellAlignmentAction=function(e,t,n,o){this.stateBefore=e,this.range=t,this.type=n,this.alignment=o},Handsontable.UndoRedo.CellAlignmentAction.prototype.undo=function(e,t){if(e.contextMenu){for(var n=this.range.from.row;n<=this.range.to.row;n++)for(var o=this.range.from.col;o<=this.range.to.col;o++)e.setCellMeta(n,o,"className",this.stateBefore[n][o]||" htLeft");e.addHookOnce("afterRender",t),e.render()}},Handsontable.UndoRedo.CellAlignmentAction.prototype.redo=function(e,t){if(e.contextMenu){for(var n=this.range.from.row;n<=this.range.to.row;n++)for(var o=this.range.from.col;o<=this.range.to.col;o++)e.contextMenu.align.call(e,this.range,this.type,this.alignment);e.addHookOnce("afterRender",t),e.render()}},Handsontable.UndoRedo.RemoveColumnAction=function(e,t,n){this.index=e,this.data=t,this.amount=this.data[0].length,this.headers=n},u.inherit(Handsontable.UndoRedo.RemoveColumnAction,Handsontable.UndoRedo.Action),Handsontable.UndoRedo.RemoveColumnAction.prototype.undo=function(e,t){for(var n,o,r=0,i=e.getData().length;i>r;r++)n=e.getSourceDataAtRow(r),o=[this.index,0],Array.prototype.push.apply(o,this.data[r]),Array.prototype.splice.apply(n,o);"undefined"!=typeof this.headers&&(o=[this.index,0],Array.prototype.push.apply(o,this.headers),Array.prototype.splice.apply(e.getSettings().colHeaders,o)),e.addHookOnce("afterRender",t),e.render()},Handsontable.UndoRedo.RemoveColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount)},Handsontable.hooks.add("afterInit",o),Handsontable.hooks.add("afterUpdateSettings",o)},{"./../../helpers.js":42}],70:[function(e,t,n){"use strict";function o(e,t){var n;l[e]=t,n=a.toUpperCaseFirst(e)+"Renderer",Handsontable.renderers[n]=t,Handsontable[n]=t}function r(e){if("function"==typeof e)return e;if("string"!=typeof e)throw Error('Only strings and functions can be passed as "renderer" parameter');if(!(e in l))throw Error('No editor registered under name "'+e+'"');return l[e]}function i(e){return e in l}Object.defineProperties(n,{registerRenderer:{get:function(){return o}},getRenderer:{get:function(){return r}},hasRenderer:{get:function(){return i}},__esModule:{value:!0}});var s,a=(s=e("./helpers.js"),s&&s.__esModule&&s||{"default":s}),l={};Handsontable.renderers=Handsontable.renderers||{},Handsontable.renderers.registerRenderer=o,Handsontable.renderers.getRenderer=r},{"./helpers.js":42}],71:[function(e,t,n){"use strict";function o(e,t,n,o,r,i,a){a.className&&(t.className?t.className=t.className+" "+a.className:t.className=a.className),a.readOnly&&s.addClass(t,a.readOnlyCellClassName),a.valid===!1&&a.invalidCellClassName?s.addClass(t,a.invalidCellClassName):s.removeClass(t,a.invalidCellClassName),a.wordWrap===!1&&a.noWordWrapClassName&&s.addClass(t,a.noWordWrapClassName),!i&&a.placeholder&&s.addClass(t,a.placeholderCellClassName)}Object.defineProperties(n,{cellDecorator:{get:function(){return o}},__esModule:{value:!0}});var r,i,s=(r=e("./../dom.js"),r&&r.__esModule&&r||{"default":r}),a=(i=e("./../renderers.js"),i&&i.__esModule&&i||{"default":i}).registerRenderer;a("base",o),Handsontable.renderers.cellDecorator=o},{"./../dom.js":27,"./../renderers.js":70}],72:[function(e,t,n){"use strict";function o(e,t,n,o,r,i,s){var a=(p.cloneNode(!0),g.cloneNode(!0));if(c("text")(e,t,n,o,r,i,s),t.appendChild(a),l.addClass(t,"htAutocomplete"),t.firstChild||t.appendChild(document.createTextNode(String.fromCharCode(160))),!e.acArrowListener){var d=u(e);e.acArrowListener=function(r){l.hasClass(r.target,"htAutocompleteArrow")&&e.view.wt.getSetting("onCellDblClick",null,new f(n,o),t)},d.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",function(){d.clear()})}}Object.defineProperties(n,{autocompleteRenderer:{get:function(){return o}},__esModule:{value:!0}});var r,i,s,a,l=(r=e("./../dom.js"),r&&r.__esModule&&r||{"default":r}),u=(i=e("./../eventManager.js"),i&&i.__esModule&&i||{"default":i}).eventManager,d=(s=e("./../renderers.js"),s&&s.__esModule&&s||{"default":s}),c=d.getRenderer,h=d.registerRenderer,f=(a=e("./../3rdparty/walkontable/src/cell/coords.js"),a&&a.__esModule&&a||{"default":a}).WalkontableCellCoords,p=document.createElement("DIV");p.className="htAutocompleteWrapper";var g=document.createElement("DIV");g.className="htAutocompleteArrow",g.appendChild(document.createTextNode(String.fromCharCode(9660)));h("autocomplete",o)},{"./../3rdparty/walkontable/src/cell/coords.js":5,"./../dom.js":27,"./../eventManager.js":41,"./../renderers.js":70}],73:[function(e,t,n){"use strict";function o(e,t,n,o,a,l,u){function d(e){var t=[h.keyCode.SPACE,h.keyCode.ENTER,h.keyCode.DELETE,h.keyCode.BACKSPACE];c.enableImmediatePropagation(e),-1===t.indexOf(e.keyCode)||e.isImmediatePropagationStopped()||v(function(){e.stopImmediatePropagation(),e.preventDefault()}),(e.keyCode==h.keyCode.SPACE||e.keyCode==h.keyCode.ENTER)&&p(),(e.keyCode==h.keyCode.DELETE||e.keyCode==h.keyCode.BACKSPACE)&&p(!1)}function p(){var e=void 0!==arguments[0]?arguments[0]:null;v(function(t){for(var n=0,o=t.length;o>n;n++){if(c.hasClass(t[n],w)&&null===e)return;g(t[n],e)}})}function g(e){var t=void 0!==arguments[1]?arguments[1]:null;null===t?e.checked=!e.checked:e.checked=t,y.fireEvent(e,"change")}function v(t){for(var n=e.getSelectedRange(),o=n.getTopLeftCorner(),r=n.getBottomRightCorner(),i=o.row;i<=r.row;i++)for(var s=o.col;s<=r.col;s++){var a=e.getCell(i,s),l=e.getCellMeta(i,s),u=a.querySelectorAll("input[type=checkbox]");u.length>0&&!l.readOnly&&t(u)}}var y=new f(e),b=r();"undefined"==typeof u.checkedTemplate&&(u.checkedTemplate=!0),"undefined"==typeof u.uncheckedTemplate&&(u.uncheckedTemplate=!1),c.empty(t),l===u.checkedTemplate||h.equalsIgnoreCase(l,u.checkedTemplate)?(b.checked=!0,t.appendChild(b)):l===u.uncheckedTemplate||h.equalsIgnoreCase(l,u.uncheckedTemplate)?t.appendChild(b):null===l?(c.addClass(b,"noValue"),t.appendChild(b)):(b.style.display="none",c.addClass(b,w),t.appendChild(b),t.appendChild(document.createTextNode("#bad-value#"))),u.readOnly?y.addEventListener(b,"click",i):(y.addEventListener(b,"mousedown",s),y.addEventListener(b,"mouseup",s),y.addEventListener(b,"change",function(t){e.setDataAtRowProp(n,a,t.target.checked?u.checkedTemplate:u.uncheckedTemplate)})),m.has(e)||(m.set(e,!0),e.addHook("beforeKeyDown",d))}function r(){var e=document.createElement("INPUT");return e.className="htCheckboxRendererInput",e.type="checkbox",e.setAttribute("autocomplete","off"),e.cloneNode(!1)}function i(e){e.preventDefault()}function s(e){h.stopPropagation(e)}Object.defineProperties(n,{checkboxRenderer:{get:function(){return o}},__esModule:{value:!0}});var a,l,u,d,c=(a=e("./../dom.js"),a&&a.__esModule&&a||{"default":a}),h=(l=e("./../helpers.js"),l&&l.__esModule&&l||{"default":l}),f=(u=e("./../eventManager.js"),u&&u.__esModule&&u||{"default":u}).EventManager,p=(d=e("./../renderers.js"),d&&d.__esModule&&d||{"default":d}),g=(p.getRenderer,p.registerRenderer),m=new WeakMap,w="htBadValue";g("checkbox",o)},{"./../dom.js":27,"./../eventManager.js":41,"./../helpers.js":42,"./../renderers.js":70}],74:[function(e,t,n){"use strict";function o(e,t,n,o,r,i,a){l("base").apply(this,arguments),s.fastInnerHTML(t,i)}Object.defineProperties(n,{htmlRenderer:{get:function(){return o}},__esModule:{value:!0}});var r,i,s=(r=e("./../dom.js"),r&&r.__esModule&&r||{"default":r}),a=(i=e("./../renderers.js"),i&&i.__esModule&&i||{"default":i}),l=a.getRenderer,u=a.registerRenderer;u("html",o)},{"./../dom.js":27,"./../renderers.js":70}],75:[function(e,t,n){"use strict";function o(e,t,n,o,r,i,s){u.isNumeric(i)&&("undefined"!=typeof s.language&&d.language(s.language),i=d(i).format(s.format||"0"),l.addClass(t,"htNumeric")),h("text")(e,t,n,o,r,i,s)}Object.defineProperties(n,{numericRenderer:{get:function(){return o}},__esModule:{value:!0}});var r,i,s,a,l=(r=e("./../dom.js"),r&&r.__esModule&&r||{"default":r}),u=(i=e("./../helpers.js"),i&&i.__esModule&&i||{"default":i}),d=(s=e("numeral"),s&&s.__esModule&&s||{"default":s})["default"],c=(a=e("./../renderers.js"),a&&a.__esModule&&a||{"default":a}),h=c.getRenderer,f=c.registerRenderer;f("numeric",o)},{"./../dom.js":27,"./../helpers.js":42,"./../renderers.js":70,numeral:"numeral"}],76:[function(e,t,n){"use strict";function o(e,t,n,o,r,i,a){l("text").apply(this,arguments),i=t.innerHTML;var u,d=a.hashLength||i.length,c=a.hashSymbol||"*";for(u="";u.split(c).length-1<d;u+=c);s.fastInnerHTML(t,u)}Object.defineProperties(n,{passwordRenderer:{get:function(){return o}},__esModule:{value:!0}});var r,i,s=(r=e("./../dom.js"),r&&r.__esModule&&r||{"default":r}),a=(i=e("./../renderers.js"),i&&i.__esModule&&i||{"default":i}),l=a.getRenderer,u=a.registerRenderer;u("password",o)},{"./../dom.js":27,"./../renderers.js":70}],77:[function(e,t,n){"use strict";function o(e,t,n,o,r,i,s){d("base").apply(this,arguments),!i&&s.placeholder&&(i=s.placeholder);var u=l.stringify(i);if(e.getSettings().trimWhitespace||(u=u.replace(/ /g,String.fromCharCode(160))),s.rendererTemplate){a.empty(t);var c=document.createElement("TEMPLATE");c.setAttribute("bind","{{}}"),c.innerHTML=s.rendererTemplate,HTMLTemplateElement.decorate(c),c.model=e.getSourceDataAtRow(n),t.appendChild(c)}else a.fastInnerText(t,u)}Object.defineProperties(n,{textRenderer:{get:function(){return o}},__esModule:{value:!0}});var r,i,s,a=(r=e("./../dom.js"),r&&r.__esModule&&r||{"default":r}),l=(i=e("./../helpers.js"),i&&i.__esModule&&i||{"default":i}),u=(s=e("./../renderers.js"),s&&s.__esModule&&s||{"default":s}),d=u.getRenderer,c=u.registerRenderer;c("text",o)},{"./../dom.js":27,"./../helpers.js":42,"./../renderers.js":70}],78:[function(e,t,n){"use strict";Array.prototype.filter||(Array.prototype.filter=function(e,t){function n(e){return/NodeList/i.test(e.item)}function o(e){for(var t=[],n=0,o=e.length;o>n;n++)t[n]=e[n];return t}if("undefined"==typeof this||null===this)throw new TypeError;if("function"!=typeof e)throw new TypeError;t=t||this,n(t)&&(t=o(t));var r,i,s=t.length,a=[];for(r=0;s>r;r+=1)t.hasOwnProperty(r)&&(i=t[r],e.call(t,i,r,t)&&a.push(i));return a})},{}],79:[function(e,t,n){"use strict";Array.prototype.indexOf||(Array.prototype.indexOf=function(e){var t=this.length>>>0,n=Number(arguments[1])||0;for(n=0>n?Math.ceil(n):Math.floor(n),0>n&&(n+=t);t>n;n++)if(n in this&&this[n]===e)return n;return-1})},{}],80:[function(e,t,n){"use strict";Array.isArray||(Array.isArray=function(e){return"[object Array]"==Object.prototype.toString.call(e)})},{}],81:[function(e,t,n){"use strict";!function(e){function t(e){return{configurable:!0,enumerable:!1,value:e,writable:!0}}function n(){return"__$"+Math.floor(1e9*Math.random())+"$"+ ++G+"$__"}function o(e){return K[e]}function r(){var e=n();return K[e]=!0,e}function i(e){return"object"==typeof e&&e instanceof l}function s(e){return i(e)?"symbol":typeof e}function a(e){var t=new l(e);if(!(this instanceof a))return t;throw new TypeError("Symbol cannot be new'ed")}function l(e){var t=n();j(this,$,{value:this}),j(this,z,{value:t}),j(this,U,{value:e}),d(this),X[t]=this}function u(e){var t=e[q];return t&&t.self===e?t:F(e)?(J.hash.value=Q++,J.self.value=e,Z.value=x(null,J),j(e,q,Z),Z.value):void 0}function d(e){return u(e),P.apply(this,arguments)}function c(e){return u(e),B.apply(this,arguments)}function h(e){return u(e),V.apply(this,arguments)}function f(e){return X[e]||K[e]}function p(e){return i(e)?e[z]:e}function g(e){for(var t=[],n=0;n<e.length;n++)f(e[n])||t.push(e[n]);return t}function m(e){return g(L(e))}function w(e){return g(W(e))}function v(e){for(var t=[],n=L(e),o=0;o<n.length;o++){var r=X[n[o]];r&&t.push(r)}return t}function y(e,t){return N(e,p(t))}function b(e){return I.call(this,p(e))}function C(t){return e.traceur&&e.traceur.options[t]}function R(e,t,n){return i(t)&&(t=t[z]),j(e,t,n),e}function S(e){j(e,"defineProperty",{value:R}),j(e,"getOwnPropertyNames",{value:m}),j(e,"getOwnPropertyDescriptor",{value:y}),j(e.prototype,"hasOwnProperty",{value:b}),j(e,"freeze",{value:d}),j(e,"preventExtensions",{value:c}),j(e,"seal",{value:h}),j(e,"keys",{value:w})}function E(e){for(var t=1;t<arguments.length;t++)for(var n=L(arguments[t]),o=0;o<n.length;o++){var r=n[o];f(r)||!function(t,n){j(e,n,{get:function(){return t[n]},enumerable:!0})}(arguments[t],n[o])}return e}function T(e){return null!=e&&("object"==typeof e||"function"==typeof e)}function _(e){if(null==e)throw D();return O(e)}function k(e){if(null==e)throw new TypeError("Value cannot be converted to an Object");return e}function H(e,t){e.Symbol||(e.Symbol=t,Object.getOwnPropertySymbols=v),e.Symbol.iterator||(e.Symbol.iterator=t("Symbol.iterator"))}function M(e){H(e,a),e.Reflect=e.Reflect||{},e.Reflect.global=e.Reflect.global||e,S(e.Object)}if(!e.$traceurRuntime){var O=Object,D=TypeError,x=O.create,A=O.defineProperties,j=O.defineProperty,P=O.freeze,N=O.getOwnPropertyDescriptor,L=O.getOwnPropertyNames,W=O.keys,I=O.prototype.hasOwnProperty,B=(O.prototype.toString,Object.preventExtensions),V=Object.seal,F=Object.isExtensible,Y=t,G=0,z=n(),U=n(),$=n(),X=x(null),K=x(null);j(a.prototype,"constructor",t(a)),j(a.prototype,"toString",Y(function(){var e=this[$];if(!C("symbols"))return e[z];if(!e)throw TypeError("Conversion from symbol to string");var t=e[U];return void 0===t&&(t=""),"Symbol("+t+")"})),j(a.prototype,"valueOf",Y(function(){var e=this[$];if(!e)throw TypeError("Conversion from symbol to string");return C("symbols")?e:e[z]})),j(l.prototype,"constructor",t(a)),j(l.prototype,"toString",{value:a.prototype.toString,enumerable:!1}),j(l.prototype,"valueOf",{value:a.prototype.valueOf,enumerable:!1});var q=r(),Z={value:void 0},J={hash:{value:void 0},self:{value:void 0}},Q=0;d(l.prototype),M(e),e.$traceurRuntime={checkObjectCoercible:k,createPrivateName:r,defineProperties:A,defineProperty:j,exportStar:E,getOwnHashObject:u,getOwnPropertyDescriptor:N,getOwnPropertyNames:L,isObject:T,isPrivateName:o,isSymbolString:f,keys:W,setupGlobals:M,toObject:_,toProperty:p,"typeof":s}}}(window),function(){function t(t,o){function r(e){return"/"===e.slice(-1)}function i(e){return"/"===e[0]}function s(e){return"."===e[0]}return n=n||"undefined"!=typeof e&&e("path"),r(o)||i(o)?void 0:e(s(o)?n.resolve(n.dirname(t),o):o)}var n;$traceurRuntime.require=t}(),function(){function e(){for(var e,t=[],n=0,o=0;o<arguments.length;o++){var r=$traceurRuntime.checkObjectCoercible(arguments[o]);if("function"!=typeof r[$traceurRuntime.toProperty(Symbol.iterator)])throw new TypeError("Cannot spread non-iterable object.");for(var i=r[$traceurRuntime.toProperty(Symbol.iterator)]();!(e=i.next()).done;)t[n++]=e.value}return t}$traceurRuntime.spread=e}(),function(){function e(e,t){var n=g(e);do{var o=p(n,t);if(o)return o;n=g(n)}while(n);return void 0}function t(e){return e.__proto__}function n(e,t,n,r){return o(e,t,n).apply(e,r)}function o(t,n,o){var r=e(n,o);return r?r.get?r.get.call(t):r.value:void 0}function r(t,n,o,r){var i=e(n,o);if(i&&i.set)return i.set.call(t,r),r;throw d("super has no setter '"+o+"'.")}function i(e){for(var t={},n=w(e),o=0;o<n.length;o++){var r=n[o];t[r]=p(e,r)}for(var i=v(e),o=0;o<i.length;o++){var s=i[o];t[$traceurRuntime.toProperty(s)]=p(e,$traceurRuntime.toProperty(s))}return t}function s(e,t,n,o){return f(t,"constructor",{value:e,configurable:!0,enumerable:!1,writable:!0}),arguments.length>3?("function"==typeof o&&(e.__proto__=o),
e.prototype=c(a(o),i(t))):e.prototype=t,f(e,"prototype",{configurable:!1,writable:!1}),h(e,i(n))}function a(e){if("function"==typeof e){var t=e.prototype;if(u(t)===t||null===t)return e.prototype;throw new d("super prototype must be an Object or null")}if(null===e)return null;throw new d("Super expression must either be null or a function, not "+typeof e+".")}function l(e,t,o){null!==g(t)&&n(e,t,"constructor",o)}var u=Object,d=TypeError,c=u.create,h=$traceurRuntime.defineProperties,f=$traceurRuntime.defineProperty,p=$traceurRuntime.getOwnPropertyDescriptor,g=($traceurRuntime.getOwnPropertyNames,Object.getPrototypeOf),m=Object,w=m.getOwnPropertyNames,v=m.getOwnPropertySymbols;$traceurRuntime.createClass=s,$traceurRuntime.defaultSuperCall=l,$traceurRuntime.superCall=n,$traceurRuntime.superConstructor=t,$traceurRuntime.superGet=o,$traceurRuntime.superSet=r}()},{path:void 0}],82:[function(e,t,n){"use strict";Object.keys||(Object.keys=function(){var e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],o=n.length;return function(r){if("object"!=typeof r&&("function"!=typeof r||null===r))throw new TypeError("Object.keys called on non-object");var i,s,a=[];for(i in r)e.call(r,i)&&a.push(i);if(t)for(s=0;o>s;s++)e.call(r,n[s])&&a.push(n[s]);return a}}())},{}],83:[function(e,t,n){"use strict";if(!String.prototype.trim){var o=/^\s+|\s+$/g;String.prototype.trim=function(){return this.replace(o,"")}}},{}],84:[function(e,t,n){"use strict";"undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty;try{var t=!0;e(function(){},"foo",{})}catch(n){t=!1}var o=+new Date%1e9,r=function(){this.name="__st"+(1e9*Math.random()>>>0)+(o++ +"__"),t||(this._wmCache=[])};t?r.prototype={set:function(t,n){var o=t[this.name];o&&o[0]===t?o[1]=n:e(t,this.name,{value:[t,n],writable:!0})},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},has:function(e){return this.get(e)?!0:!1},"delete":function(e){this.set(e,void 0)}}:r.prototype={set:function(e,t){if("undefined"!=typeof e&&"undefined"!=typeof t){for(var n=0,o=this._wmCache.length;o>n;n++)if(this._wmCache[n].key==e)return void(this._wmCache[n].value=t);this._wmCache.push({key:e,value:t})}},get:function(e){if("undefined"!=typeof e){for(var t=0,n=this._wmCache.length;n>t;t++)if(this._wmCache[t].key==e)return this._wmCache[t].value;return void 0}},has:function(e){return this.get(e)?!0:!1},"delete":function(e){if("undefined"!=typeof e)for(var t=0,n=this._wmCache.length;n>t;t++)this._wmCache[t].key==e&&Array.prototype.slice.call(this._wmCache,t,1)}},window.WeakMap=r}()},{}],85:[function(e,t,n){"use strict";function o(e){var t=this;this.eventManager=h(e),this.instance=e,this.settings=e.getSettings();var n=e.rootElement.getAttribute("style");n&&e.rootElement.setAttribute("data-originalstyle",n),d.addClass(e.rootElement,"handsontable");var o=document.createElement("TABLE");o.className="htCore",this.THEAD=document.createElement("THEAD"),o.appendChild(this.THEAD),this.TBODY=document.createElement("TBODY"),o.appendChild(this.TBODY),e.table=o,e.container.insertBefore(o,e.container.firstChild),this.eventManager.addEventListener(e.rootElement,"mousedown",function(e){t.isTextSelectionAllowed(e.target)||(i(),e.preventDefault(),window.focus())}),this.eventManager.addEventListener(document.documentElement,"keyup",function(t){e.selection.isInProgress()&&!t.shiftKey&&e.selection.finish()});var r;this.isMouseDown=function(){return r},this.eventManager.addEventListener(document.documentElement,"mouseup",function(t){e.selection.isInProgress()&&1===t.which&&e.selection.finish(),r=!1,c.isOutsideInput(document.activeElement)&&e.unlisten()}),this.eventManager.addEventListener(document.documentElement,"mousedown",function(n){var o=n.target,i=n.x||n.clientX,s=n.y||n.clientY;if(!r){if(o!==e.view.wt.wtTable.holder)for(;o!==document.documentElement;){if(null===o){if(n.isTargetWebComponent)break;return}if(o===e.rootElement)return;o=o.parentNode}else{var a=Handsontable.Dom.getScrollbarWidth();if(document.elementFromPoint(i+a,s)!==e.view.wt.wtTable.holder||document.elementFromPoint(i,s+a)!==e.view.wt.wtTable.holder)return}t.settings.outsideClickDeselects?e.deselectCell():e.destroyEditor()}}),this.eventManager.addEventListener(o,"selectstart",function(e){t.settings.fragmentSelection||e.preventDefault()});var i=function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty()},s=[new p({className:"current",border:{width:2,color:"#5292F7",cornerVisible:function(){return t.settings.fillHandle&&!t.isCellEdited()&&!e.selection.isMultiple()},multipleSelectionHandlesVisible:function(){return!t.isCellEdited()&&!e.selection.isMultiple()}}}),new p({className:"area",border:{width:1,color:"#89AFF9",cornerVisible:function(){return t.settings.fillHandle&&!t.isCellEdited()&&e.selection.isMultiple()},multipleSelectionHandlesVisible:function(){return!t.isCellEdited()&&e.selection.isMultiple()}}}),new p({className:"highlight",highlightRowClassName:t.settings.currentRowClassName,highlightColumnClassName:t.settings.currentColClassName}),new p({className:"fill",border:{width:1,color:"red"}})];s.current=s[0],s.area=s[1],s.highlight=s[2],s.fill=s[3];var a={debug:function(){return t.settings.debug},table:o,stretchH:this.settings.stretchH,data:e.getDataAtCell,totalRows:e.countRows,totalColumns:e.countCols,fixedColumnsLeft:function(){return t.settings.fixedColumnsLeft},fixedRowsTop:function(){return t.settings.fixedRowsTop},renderAllRows:t.settings.renderAllRows,rowHeaders:function(){var n=[];return e.hasRowHeaders()&&n.push(function(e,n){t.appendRowHeader(e,n)}),Handsontable.hooks.run(e,"afterGetRowHeaderRenderers",n),n},columnHeaders:function(){var n=[];return e.hasColHeaders()&&n.push(function(e,n){t.appendColHeader(e,n)}),Handsontable.hooks.run(e,"afterGetColumnHeaderRenderers",n),n},columnWidth:e.getColWidth,rowHeight:e.getRowHeight,cellRenderer:function(e,n,o){var r=t.instance.colToProp(n),i=t.instance.getCellMeta(e,n),s=t.instance.getCellRenderer(i),a=t.instance.getDataAtRowProp(e,r);s(t.instance,o,e,n,r,a,i),Handsontable.hooks.run(t.instance,"afterRenderer",o,e,n,r,a,i)},selections:s,hideBorderOnMouseDownOver:function(){return t.settings.fragmentSelection},onCellMouseDown:function(n,o,i,s){e.listen(),t.activeWt=s,r=!0,d.enableImmediatePropagation(n),Handsontable.hooks.run(e,"beforeOnCellMouseDown",n,o,i),n.isImmediatePropagationStopped()||(2===n.button&&e.selection.inInSelection(o)||(n.shiftKey?o.row>=0&&o.col>=0&&e.selection.setRangeEnd(o):(o.row<0||o.col<0)&&(o.row>=0||o.col>=0)?(o.row<0&&(e.selectCell(0,o.col,e.countRows()-1,o.col),e.selection.setSelectedHeaders(!1,!0)),o.col<0&&(e.selectCell(o.row,0,o.row,e.countCols()-1),e.selection.setSelectedHeaders(!0,!1))):(o.row=o.row<0?0:o.row,o.col=o.col<0?0:o.col,e.selection.setRangeStart(o))),Handsontable.hooks.run(e,"afterOnCellMouseDown",n,o,i),t.activeWt=t.wt)},onCellMouseOver:function(n,o,i,s){t.activeWt=s,o.row>=0&&o.col>=0?r&&e.selection.setRangeEnd(o):r&&(o.row<0&&(e.selection.setRangeEnd(new f(e.countRows()-1,o.col)),e.selection.setSelectedHeaders(!1,!0)),o.col<0&&(e.selection.setRangeEnd(new f(o.row,e.countCols()-1)),e.selection.setSelectedHeaders(!0,!1))),Handsontable.hooks.run(e,"afterOnCellMouseOver",n,o,i),t.activeWt=t.wt},onCellCornerMouseDown:function(t){t.preventDefault(),Handsontable.hooks.run(e,"afterOnCellCornerMouseDown",t)},beforeDraw:function(e){t.beforeRender(e)},onDraw:function(e){t.onDraw(e)},onScrollVertically:function(){e.runHooks("afterScrollVertically")},onScrollHorizontally:function(){e.runHooks("afterScrollHorizontally")},onBeforeDrawBorders:function(t,n){e.runHooks("beforeDrawBorders",t,n)},onBeforeTouchScroll:function(){e.runHooks("beforeTouchScroll")},onAfterMomentumScroll:function(){e.runHooks("afterMomentumScroll")},viewportRowCalculatorOverride:function(n){t.settings.viewportRowRenderingOffset&&(n.startRow=Math.max(n.startRow-t.settings.viewportRowRenderingOffset,0),n.endRow=Math.min(n.endRow+t.settings.viewportRowRenderingOffset,e.countRows()-1)),e.runHooks("afterViewportRowCalculatorOverride",n)},viewportColumnCalculatorOverride:function(n){t.settings.viewportColumnRenderingOffset&&(n.startColumn=Math.max(n.startColumn-t.settings.viewportColumnRenderingOffset,0),n.endColumn=Math.min(n.endColumn+t.settings.viewportColumnRenderingOffset,e.countCols()-1)),e.runHooks("afterViewportColumnCalculatorOverride",n)}};Handsontable.hooks.run(e,"beforeInitWalkontable",a),this.wt=new g(a),this.activeWt=this.wt,this.eventManager.addEventListener(t.wt.wtTable.spreader,"mousedown",function(e){e.target===t.wt.wtTable.spreader&&3===e.which&&c.stopPropagation(e)}),this.eventManager.addEventListener(t.wt.wtTable.spreader,"contextmenu",function(e){e.target===t.wt.wtTable.spreader&&3===e.which&&c.stopPropagation(e)}),this.eventManager.addEventListener(document.documentElement,"click",function(){t.settings.observeDOMVisibility&&t.wt.drawInterrupted&&(t.instance.forceFullRender=!0,t.render())})}Object.defineProperties(n,{TableView:{get:function(){return o}},__esModule:{value:!0}});var r,i,s,a,l,u,d=(r=e("./dom.js"),r&&r.__esModule&&r||{"default":r}),c=(i=e("./helpers.js"),i&&i.__esModule&&i||{"default":i}),h=(s=e("./eventManager.js"),s&&s.__esModule&&s||{"default":s}).eventManager,f=(a=e("./3rdparty/walkontable/src/cell/coords.js"),a&&a.__esModule&&a||{"default":a}).WalkontableCellCoords,p=(l=e("./3rdparty/walkontable/src/selection.js"),l&&l.__esModule&&l||{"default":l}).WalkontableSelection,g=(u=e("./3rdparty/walkontable/src/core.js"),u&&u.__esModule&&u||{"default":u}).Walkontable;Handsontable.TableView=o,o.prototype.isTextSelectionAllowed=function(e){return c.isInput(e)?!0:this.settings.fragmentSelection&&d.isChildOf(e,this.TBODY)?!0:!1},o.prototype.isCellEdited=function(){var e=this.instance.getActiveEditor();return e&&e.isOpened()},o.prototype.beforeRender=function(e){e&&Handsontable.hooks.run(this.instance,"beforeRender",this.instance.forceFullRender)},o.prototype.onDraw=function(e){e&&Handsontable.hooks.run(this.instance,"afterRender",this.instance.forceFullRender)},o.prototype.render=function(){this.wt.draw(!this.instance.forceFullRender),this.instance.forceFullRender=!1},o.prototype.getCellAtCoords=function(e,t){var n=this.wt.getCell(e,t);return 0>n?null:n},o.prototype.scrollViewport=function(e){this.wt.scrollViewport(e)},o.prototype.appendRowHeader=function(e,t){if(t.firstChild){var n=t.firstChild;if(!d.hasClass(n,"relative"))return d.empty(t),void this.appendRowHeader(e,t);this.updateCellHeader(n.firstChild,e,this.instance.getRowHeader)}else{var o=document.createElement("div"),r=document.createElement("span");o.className="relative",r.className="colHeader",this.updateCellHeader(r,e,this.instance.getRowHeader),o.appendChild(r),t.appendChild(o)}Handsontable.hooks.run(this.instance,"afterGetRowHeader",e,t)},o.prototype.appendColHeader=function(e,t){if(t.firstChild){var n=t.firstChild;if(!d.hasClass(n,"relative"))return d.empty(t),void this.appendRowHeader(e,t);this.updateCellHeader(n.firstChild,e,this.instance.getColHeader)}else{var o=document.createElement("div"),r=document.createElement("span");o.className="relative",r.className="colHeader",this.updateCellHeader(r,e,this.instance.getColHeader),o.appendChild(r),t.appendChild(o)}Handsontable.hooks.run(this.instance,"afterGetColHeader",e,t)},o.prototype.updateCellHeader=function(e,t,n){t>-1?d.fastInnerHTML(e,n(t)):(d.fastInnerText(e,String.fromCharCode(160)),d.addClass(e,"cornerHeader"))},o.prototype.maximumVisibleElementWidth=function(e){var t=this.wt.wtViewport.getWorkspaceWidth(),n=t-e;return n>0?n:0},o.prototype.maximumVisibleElementHeight=function(e){var t=this.wt.wtViewport.getWorkspaceHeight(),n=t-e;return n>0?n:0},o.prototype.mainViewIsActive=function(){return this.wt===this.activeWt},o.prototype.destroy=function(){this.wt.destroy(),this.eventManager.clear()}},{"./3rdparty/walkontable/src/cell/coords.js":5,"./3rdparty/walkontable/src/core.js":7,"./3rdparty/walkontable/src/selection.js":18,"./dom.js":27,"./eventManager.js":41,"./helpers.js":42}],86:[function(e,t,n){"use strict";var o=function(e,t){var n=e,o="string"==typeof n?n.toLowerCase():null;return function(e){for(var r=!1,i=0,s=e.length;s>i;i++){if(n===e[i]){r=!0;break}if(o===Handsontable.helper.stringify(e[i]).toLowerCase()){r=!0;break}}t(r)}};Handsontable.AutocompleteValidator=function(e,t){this.strict&&this.source?"function"==typeof this.source?this.source(e,o(e,t)):o(e,t)(this.source):t(!0)}},{}],87:[function(e,t,n){"use strict";var o,r,i=(o=e("moment"),o&&o.__esModule&&o||{"default":o})["default"],s=(r=e("./../editors.js"),r&&r.__esModule&&r||{"default":r}).getEditor;Handsontable.DateValidator=function(e,t){var n=!0,o=s("date",this.instance);null===e&&(e="");var r=i(new Date(e)).isValid(),l=i(e,this.dateFormat||o.defaultDateFormat,!0).isValid();if(r||(n=!1),!r&&l&&(n=!0),r&&!l)if(this.correctFormat===!0){var u=a(e,this.dateFormat);this.instance.setDataAtCell(this.row,this.col,u,"dateValidator"),n=!0}else n=!1;t(n)};var a=function(e,t){var n=i(new Date(e));return n.format("YYYY").length>4&&n.year((n.year()+"").substr(0,4)),n.format(t)}},{"./../editors.js":29,moment:"moment"}],88:[function(e,t,n){"use strict";Handsontable.NumericValidator=function(e,t){null===e&&(e=""),t(/^-?\d*(\.|\,)?\d*$/.test(e))}},{}],SheetClip:[function(e,t,n){"use strict";!function(e){function t(e){return e.split('"').length-1}var o={parse:function(e){var n,o,r,i,s,a,l,u=[],d=0;for(r=e.split("\n"),r.length>1&&""===r[r.length-1]&&r.pop(),n=0,o=r.length;o>n;n+=1){for(r[n]=r[n].split(" "),i=0,s=r[n].length;s>i;i+=1)u[d]||(u[d]=[]),a&&0===i?(l=u[d].length-1,u[d][l]=u[d][l]+"\n"+r[n][0],a&&1&t(r[n][0])&&(a=!1,u[d][l]=u[d][l].substring(0,u[d][l].length-1).replace(/""/g,'"'))):i===s-1&&0===r[n][i].indexOf('"')&&1&t(r[n][i])?(u[d].push(r[n][i].substring(1).replace(/""/g,'"')),a=!0):(u[d].push(r[n][i].replace(/""/g,'"')),a=!1);a||(d+=1)}return u},stringify:function(e){var t,n,o,r,i,s="";for(t=0,n=e.length;n>t;t+=1){for(r=e[t].length,o=0;r>o;o+=1)o>0&&(s+=" "),i=e[t][o],s+="string"==typeof i?i.indexOf("\n")>-1?'"'+i.replace(/"/g,'""')+'"':i:null===i||void 0===i?"":i;s+="\n"}return s}};"undefined"!=typeof n?(n.parse=o.parse,n.stringify=o.stringify):e.SheetClip=o}(window)},{}],autoResize:[function(e,t,n){"use strict";function o(){var e,t={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},n=document.body,o=document.createTextNode(""),r=document.createElement("SPAN"),i=function(e,t,n){window.attachEvent?e.attachEvent("on"+t,n):e.addEventListener(t,n,!1)},s=function(e,t,n){window.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)},a=function(i){var s,a;i?/^[a-zA-Z \.,\\\/\|0-9]$/.test(i)||(i="."):i="",void 0!==o.textContent?o.textContent=e.value+i:o.data=e.value+i,r.style.fontSize=Handsontable.Dom.getComputedStyle(e).fontSize,r.style.fontFamily=Handsontable.Dom.getComputedStyle(e).fontFamily,r.style.whiteSpace="pre",n.appendChild(r),s=r.clientWidth+2,n.removeChild(r),e.style.height=t.minHeight+"px",t.minWidth>s?e.style.width=t.minWidth+"px":s>t.maxWidth?e.style.width=t.maxWidth+"px":e.style.width=s+"px",a=e.scrollHeight?e.scrollHeight-1:0,t.minHeight>a?e.style.height=t.minHeight+"px":t.maxHeight<a?(e.style.height=t.maxHeight+"px",e.style.overflowY="visible"):e.style.height=a+"px"},l=function(){window.setTimeout(a,0)},u=function(n){if(n&&n.minHeight)if("inherit"==n.minHeight)t.minHeight=e.clientHeight;else{var i=parseInt(n.minHeight);isNaN(i)||(t.minHeight=i)}if(n&&n.maxHeight)if("inherit"==n.maxHeight)t.maxHeight=e.clientHeight;else{var s=parseInt(n.maxHeight);isNaN(s)||(t.maxHeight=s)}if(n&&n.minWidth)if("inherit"==n.minWidth)t.minWidth=e.clientWidth;else{var a=parseInt(n.minWidth);isNaN(a)||(t.minWidth=a)}if(n&&n.maxWidth)if("inherit"==n.maxWidth)t.maxWidth=e.clientWidth;else{var l=parseInt(n.maxWidth);isNaN(l)||(t.maxWidth=l)}r.firstChild||(r.className="autoResize",r.style.display="inline-block",r.appendChild(o))},d=function(n,o,r){e=n,u(o),"TEXTAREA"==e.nodeName&&(e.style.resize="none",e.style.overflowY="",e.style.height=t.minHeight+"px",e.style.minWidth=t.minWidth+"px",e.style.maxWidth=t.maxWidth+"px",e.style.overflowY="hidden"),r&&(i(e,"change",a),i(e,"cut",l),i(e,"paste",l),i(e,"drop",l),i(e,"keydown",l)),a()};return{init:function(e,t,n){d(e,t,n)},unObserve:function(){s(e,"change",a),s(e,"cut",l),s(e,"paste",l),s(e,"drop",l),s(e,"keydown",l)},resize:a}}"undefined"!=typeof n&&(t.exports=o)},{}],copyPaste:[function(e,t,n){"use strict";function o(){return i?i.hasBeenDestroyed()&&i.init():i=new r,i.refCounter++,i}function r(){this.refCounter=0,this.init()}var i;"undefined"!=typeof n&&(t.exports=o),r.prototype.init=function(){var e,t;this.copyCallbacks=[],this.cutCallbacks=[],this.pasteCallbacks=[],t=document.body,document.getElementById("CopyPasteDiv")?(this.elDiv=document.getElementById("CopyPasteDiv"),this.elTextarea=this.elDiv.firstChild):(this.elDiv=document.createElement("div"),this.elDiv.id="CopyPasteDiv",e=this.elDiv.style,e.position="fixed",e.top="-10000px",e.left="-10000px",t.appendChild(this.elDiv),this.elTextarea=document.createElement("textarea"),this.elTextarea.className="copyPaste",this.elTextarea.onpaste=function(e){var t,n;return"WebkitAppearance"in document.documentElement.style?(t=e.clipboardData.getData("Text"),-1!==navigator.userAgent.indexOf("Safari")&&-1===navigator.userAgent.indexOf("Chrome")&&(n=t.split("\n"),n.pop(),t=n.join("\n")),this.value=t,!1):void 0},e=this.elTextarea.style,e.width="10000px",e.height="10000px",e.overflow="hidden",this.elDiv.appendChild(this.elTextarea),"undefined"!=typeof e.opacity&&(e.opacity=0)),this.onKeyDownRef=this.onKeyDown.bind(this),document.documentElement.addEventListener("keydown",this.onKeyDownRef,!1)},r.prototype.onKeyDown=function(e){function t(){var e=document.activeElement;return e.shadowRoot&&e.shadowRoot.activeElement&&(e=e.shadowRoot.activeElement),["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable}var n=this,o=!1;if(e.metaKey?o=!0:e.ctrlKey&&-1===navigator.userAgent.indexOf("Mac")&&(o=!0),o){if(document.activeElement!==this.elTextarea&&(""!==this.getSelectionText()||t()))return;this.selectNodeText(this.elTextarea),setTimeout(function(){document.activeElement!==n.elTextarea&&n.selectNodeText(n.elTextarea)},0)}!o||67!==e.keyCode&&86!==e.keyCode&&88!==e.keyCode||(88===e.keyCode?setTimeout(function(){n.triggerCut(e)},0):86===e.keyCode&&setTimeout(function(){n.triggerPaste(e)},0))},r.prototype.selectNodeText=function(e){e&&e.select()},r.prototype.getSelectionText=function(){var e="";return window.getSelection?e=window.getSelection().toString():document.selection&&"Control"!==document.selection.type&&(e=document.selection.createRange().text),e},r.prototype.copyable=function(e){if("string"!=typeof e&&void 0===e.toString)throw new Error("copyable requires string parameter");this.elTextarea.value=e,this.selectNodeText(this.elTextarea)},r.prototype.onCut=function(e){this.cutCallbacks.push(e)},r.prototype.onPaste=function(e){this.pasteCallbacks.push(e)},r.prototype.removeCallback=function(e){var t,n;for(t=0,n=this.copyCallbacks.length;n>t;t++)if(this.copyCallbacks[t]===e)return this.copyCallbacks.splice(t,1),!0;for(t=0,n=this.cutCallbacks.length;n>t;t++)if(this.cutCallbacks[t]===e)return this.cutCallbacks.splice(t,1),!0;for(t=0,n=this.pasteCallbacks.length;n>t;t++)if(this.pasteCallbacks[t]===e)return this.pasteCallbacks.splice(t,1),!0;return!1},r.prototype.triggerCut=function(e){var t=this;t.cutCallbacks&&setTimeout(function(){for(var n=0,o=t.cutCallbacks.length;o>n;n++)t.cutCallbacks[n](e)},50)},r.prototype.triggerPaste=function(e,t){var n=this;n.pasteCallbacks&&setTimeout(function(){for(var o=t||n.elTextarea.value,r=0,i=n.pasteCallbacks.length;i>r;r++)n.pasteCallbacks[r](o,e)},50)},r.prototype.destroy=function(){this.hasBeenDestroyed()||0!==--this.refCounter||(this.elDiv&&this.elDiv.parentNode&&(this.elDiv.parentNode.removeChild(this.elDiv),this.elDiv=null,this.elTextarea=null),document.documentElement.removeEventListener("keydown",this.onKeyDownRef))},r.prototype.hasBeenDestroyed=function(){return!this.refCounter}},{}],jsonpatch:[function(e,t,n){"use strict";var o;!function(e){function t(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function n(e,o){var r;for(var i in e)if(e.hasOwnProperty(i)){if(e[i]===o)return t(i)+"/";if("object"==typeof e[i]&&(r=n(e[i],o),""!=r))return t(i)+"/"+r}return""}function o(e,t){if(e===t)return"/";var o=n(e,t);if(""===o)throw new Error("Object not found in root");return"/"+o}function r(e){for(var t=0,n=w.length;n>t;t++)if(w[t].obj===e)return w[t]}function i(e,t){for(var n=0,o=e.observers.length;o>n;n++)if(e.observers[n].callback===t)return e.observers[n].observer}function s(e,t){for(var n=0,o=e.observers.length;o>n;n++)if(e.observers[n].observer===t)return void e.observers.splice(n,1)}function a(e,t){c(t),Object.observe?d(t,e):clearTimeout(t.next);var n=r(e);s(n,t)}function l(e,t){var n,s=[],a=e,l=r(e);if(l?n=i(l,t):(l=new v(e),w.push(l)),n)return n;if(Object.observe)n=function(r){d(n,e),u(n,e);for(var i=0,l=r.length;l>i;){if(("length"!==r[i].name||!C(r[i].object))&&"__Jasmine_been_here_before__"!==r[i].name){var c=r[i].type;switch(c){case"new":c="add";break;case"deleted":c="delete";break;case"updated":c="update"}m[c].call(r[i],s,o(a,r[i].object))}i++}s&&t&&t(s),n.patches=s,s=[]};else if(n={},l.value=JSON.parse(JSON.stringify(e)),t){n.callback=t,n.next=null;var h=this.intervals||[100,1e3,1e4,6e4],f=0,p=function(){c(n)},g=function(){clearTimeout(n.next),n.next=setTimeout(function(){p(),f=0,n.next=setTimeout(b,h[f++])},0)},b=function(){p(),f==h.length&&(f=h.length-1),n.next=setTimeout(b,h[f++])};"undefined"!=typeof window&&(window.addEventListener?(window.addEventListener("mousedown",g),window.addEventListener("mouseup",g),window.addEventListener("keydown",g)):(window.attachEvent("onmousedown",g),window.attachEvent("onmouseup",g),window.attachEvent("onkeydown",g))),n.next=setTimeout(b,h[f++])}return n.patches=s,n.object=e,l.observers.push(new y(t,n)),u(n,e)}function u(e,t){if(Object.observe){Object.observe(t,e);for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];o&&"object"==typeof o&&u(e,o)}}return e}function d(e,t){if(Object.observe){Object.unobserve(t,e);for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];o&&"object"==typeof o&&d(e,o)}}return e}function c(e){if(Object.observe)Object.deliverChangeRecords(e);else{for(var t,n=0,o=w.length;o>n;n++)if(w[n].obj===e.object){t=w[n];break}h(t.value,e.object,e.patches,"")}var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function h(e,n,o,r){for(var i=b(n),s=b(e),a=!1,l=!1,u=s.length-1;u>=0;u--){var d=s[u],c=e[d];if(n.hasOwnProperty(d)){var f=n[d];c instanceof Object?h(c,f,o,r+"/"+t(d)):c!=f&&(a=!0,o.push({op:"replace",path:r+"/"+t(d),value:f}),e[d]=f)}else o.push({op:"remove",path:r+"/"+t(d)}),delete e[d],l=!0}if(l||i.length!=s.length)for(var u=0;u<i.length;u++){var d=i[u];e.hasOwnProperty(d)||(o.push({op:"add",path:r+"/"+t(d),value:n[d]}),e[d]=JSON.parse(JSON.stringify(n[d])))}}function f(e,t){for(var n,o=!1,r=0,i=t.length;i>r;){n=t[r];for(var s=n.path.split("/"),a=e,l=1,u=s.length;;)if(C(a)){var d=parseInt(s[l],10);if(l++,l>=u){o=g[n.op].call(n,a,d,e);break}a=a[d]}else{var c=s[l];if(-1!=c.indexOf("~")&&(c=c.replace(/~1/g,"/").replace(/~0/g,"~")),l++,l>=u){o=p[n.op].call(n,a,c,e);break}a=a[c]}r++}return o}var p={add:function(e,t){return e[t]=this.value,!0},remove:function(e,t){return delete e[t],!0},replace:function(e,t){return e[t]=this.value,!0},move:function(e,t,n){var o={op:"_get",path:this.from};return f(n,[o]),f(n,[{op:"remove",path:this.from}]),f(n,[{op:"add",path:this.path,value:o.value}]),!0},copy:function(e,t,n){var o={op:"_get",path:this.from};return f(n,[o]),f(n,[{op:"add",path:this.path,value:o.value}]),!0},test:function(e,t){return JSON.stringify(e[t])===JSON.stringify(this.value)},_get:function(e,t){this.value=e[t]}},g={add:function(e,t){return e.splice(t,0,this.value),!0},remove:function(e,t){return e.splice(t,1),!0},replace:function(e,t){return e[t]=this.value,!0},move:p.move,copy:p.copy,test:p.test,_get:p._get},m={add:function(e,n){var o={op:"add",path:n+t(this.name),value:this.object[this.name]};e.push(o)},"delete":function(e,n){var o={op:"remove",path:n+t(this.name)};e.push(o)},update:function(e,n){var o={op:"replace",path:n+t(this.name),value:this.object[this.name]};e.push(o)}},w=[];e.intervals;var v=function(){function e(e){this.observers=[],this.obj=e}return e}(),y=function(){function e(e,t){this.callback=e,this.observer=t}return e}();e.unobserve=a,e.observe=l,e.generate=c;var b;b=Object.keys?Object.keys:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t};var C;C=Array.isArray?Array.isArray:function(e){return e.push&&"number"==typeof e.length},e.apply=f}(o||(o={})),"undefined"!=typeof n&&(n.apply=o.apply,n.observe=o.observe,n.unobserve=o.unobserve,n.generate=o.generate)},{}],moment:[function(t,n,o){
//! moment.js
//! version : 2.10.3
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
!function(t,r){"object"==typeof o&&"undefined"!=typeof n?n.exports=r():"function"==typeof e&&e.amd?e(r):t.moment=r()}(this,function(){"use strict";function e(){return xn.apply(null,arguments)}function o(e){xn=e}function r(e){return"[object Array]"===Object.prototype.toString.call(e)}function i(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function s(e,t){var n,o=[];for(n=0;n<e.length;++n)o.push(t(e[n],n));return o}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e,t){for(var n in t)a(t,n)&&(e[n]=t[n]);return a(t,"toString")&&(e.toString=t.toString),a(t,"valueOf")&&(e.valueOf=t.valueOf),e}function u(e,t,n,o){return ke(e,t,n,o,!0).utc()}function d(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function c(e){return null==e._pf&&(e._pf=d()),e._pf}function h(e){if(null==e._isValid){var t=c(e);e._isValid=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated,e._strict&&(e._isValid=e._isValid&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)}return e._isValid}function f(e){var t=u(NaN);return null!=e?l(c(t),e):c(t).userInvalidated=!0,t}function p(e,t){var n,o,r;if("undefined"!=typeof t._isAMomentObject&&(e._isAMomentObject=t._isAMomentObject),"undefined"!=typeof t._i&&(e._i=t._i),"undefined"!=typeof t._f&&(e._f=t._f),"undefined"!=typeof t._l&&(e._l=t._l),"undefined"!=typeof t._strict&&(e._strict=t._strict),"undefined"!=typeof t._tzm&&(e._tzm=t._tzm),"undefined"!=typeof t._isUTC&&(e._isUTC=t._isUTC),"undefined"!=typeof t._offset&&(e._offset=t._offset),"undefined"!=typeof t._pf&&(e._pf=c(t)),"undefined"!=typeof t._locale&&(e._locale=t._locale),jn.length>0)for(n in jn)o=jn[n],r=t[o],"undefined"!=typeof r&&(e[o]=r);return e}function g(t){p(this,t),this._d=new Date(+t._d),Pn===!1&&(Pn=!0,e.updateOffset(this),Pn=!1)}function m(e){return e instanceof g||null!=e&&null!=e._isAMomentObject}function w(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=t>=0?Math.floor(t):Math.ceil(t)),n}function v(e,t,n){var o,r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0;for(o=0;r>o;o++)(n&&e[o]!==t[o]||!n&&w(e[o])!==w(t[o]))&&s++;return s+i}function y(){}function b(e){return e?e.toLowerCase().replace("_","-"):e}function C(e){for(var t,n,o,r,i=0;i<e.length;){for(r=b(e[i]).split("-"),t=r.length,n=b(e[i+1]),n=n?n.split("-"):null;t>0;){if(o=R(r.slice(0,t).join("-")))return o;if(n&&n.length>=t&&v(r,n,!0)>=t-1)break;t--}i++}return null}function R(e){var o=null;if(!Nn[e]&&"undefined"!=typeof n&&n&&n.exports)try{o=An._abbr,t("./locale/"+e),S(o)}catch(r){}return Nn[e]}function S(e,t){var n;return e&&(n="undefined"==typeof t?T(e):E(e,t),n&&(An=n)),An._abbr}function E(e,t){return null!==t?(t.abbr=e,Nn[e]||(Nn[e]=new y),Nn[e].set(t),S(e),Nn[e]):(delete Nn[e],null)}function T(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return An;if(!r(e)){if(t=R(e))return t;e=[e]}return C(e)}function _(e,t){var n=e.toLowerCase();Ln[n]=Ln[n+"s"]=Ln[t]=e}function k(e){return"string"==typeof e?Ln[e]||Ln[e.toLowerCase()]:void 0}function H(e){var t,n,o={};for(n in e)a(e,n)&&(t=k(n),t&&(o[t]=e[n]));return o}function M(t,n){return function(o){return null!=o?(D(this,t,o),e.updateOffset(this,n),this):O(this,t)}}function O(e,t){return e._d["get"+(e._isUTC?"UTC":"")+t]()}function D(e,t,n){return e._d["set"+(e._isUTC?"UTC":"")+t](n)}function x(e,t){var n;if("object"==typeof e)for(n in e)this.set(n,e[n]);else if(e=k(e),"function"==typeof this[e])return this[e](t);return this}function A(e,t,n){for(var o=""+Math.abs(e),r=e>=0;o.length<t;)o="0"+o;return(r?n?"+":"":"-")+o}function j(e,t,n,o){var r=o;"string"==typeof o&&(r=function(){return this[o]()}),e&&(Vn[e]=r),t&&(Vn[t[0]]=function(){return A(r.apply(this,arguments),t[1],t[2])}),n&&(Vn[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function P(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function N(e){var t,n,o=e.match(Wn);for(t=0,n=o.length;n>t;t++)Vn[o[t]]?o[t]=Vn[o[t]]:o[t]=P(o[t]);return function(r){var i="";for(t=0;n>t;t++)i+=o[t]instanceof Function?o[t].call(r,e):o[t];return i}}function L(e,t){return e.isValid()?(t=W(t,e.localeData()),Bn[t]||(Bn[t]=N(t)),Bn[t](e)):e.localeData().invalidDate()}function W(e,t){function n(e){return t.longDateFormat(e)||e}var o=5;for(In.lastIndex=0;o>=0&&In.test(e);)e=e.replace(In,n),In.lastIndex=0,o-=1;return e}function I(e,t,n){no[e]="function"==typeof t?t:function(e){return e&&n?n:t}}function B(e,t){return a(no,e)?no[e](t._strict,t._locale):new RegExp(V(e))}function V(e){return e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,o,r){return t||n||o||r}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function F(e,t){var n,o=t;for("string"==typeof e&&(e=[e]),"number"==typeof t&&(o=function(e,n){n[t]=w(e)}),n=0;n<e.length;n++)oo[e[n]]=o}function Y(e,t){F(e,function(e,n,o,r){o._w=o._w||{},t(e,o._w,o,r)})}function G(e,t,n){null!=t&&a(oo,e)&&oo[e](t,n._a,n,e)}function z(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}function U(e){return this._months[e.month()]}function $(e){return this._monthsShort[e.month()]}function X(e,t,n){var o,r,i;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),o=0;12>o;o++){if(r=u([2e3,o]),n&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[o]||(i="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[o]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[o].test(e))return o;if(n&&"MMM"===t&&this._shortMonthsParse[o].test(e))return o;if(!n&&this._monthsParse[o].test(e))return o}}function K(e,t){var n;return"string"==typeof t&&(t=e.localeData().monthsParse(t),"number"!=typeof t)?e:(n=Math.min(e.date(),z(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e)}function q(t){return null!=t?(K(this,t),e.updateOffset(this,!0),this):O(this,"Month")}function Z(){return z(this.year(),this.month())}function J(e){var t,n=e._a;return n&&-2===c(e).overflow&&(t=n[io]<0||n[io]>11?io:n[so]<1||n[so]>z(n[ro],n[io])?so:n[ao]<0||n[ao]>24||24===n[ao]&&(0!==n[lo]||0!==n[uo]||0!==n[co])?ao:n[lo]<0||n[lo]>59?lo:n[uo]<0||n[uo]>59?uo:n[co]<0||n[co]>999?co:-1,c(e)._overflowDayOfYear&&(ro>t||t>so)&&(t=so),c(e).overflow=t),e}function Q(t){e.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function ee(e,t){var n=!0,o=e+"\n"+(new Error).stack;return l(function(){return n&&(Q(o),n=!1),t.apply(this,arguments)},t)}function te(e,t){po[e]||(Q(t),po[e]=!0)}function ne(e){var t,n,o=e._i,r=go.exec(o);if(r){for(c(e).iso=!0,t=0,n=mo.length;n>t;t++)if(mo[t][1].exec(o)){e._f=mo[t][0]+(r[6]||" ");break}for(t=0,n=wo.length;n>t;t++)if(wo[t][1].exec(o)){e._f+=wo[t][0];break}o.match(Qn)&&(e._f+="Z"),Ce(e)}else e._isValid=!1}function oe(t){var n=vo.exec(t._i);return null!==n?void(t._d=new Date(+n[1])):(ne(t),void(t._isValid===!1&&(delete t._isValid,e.createFromInputFallback(t))))}function re(e,t,n,o,r,i,s){var a=new Date(e,t,n,o,r,i,s);return 1970>e&&a.setFullYear(e),a}function ie(e){var t=new Date(Date.UTC.apply(null,arguments));return 1970>e&&t.setUTCFullYear(e),t}function se(e){return ae(e)?366:365}function ae(e){return e%4===0&&e%100!==0||e%400===0}function le(){return ae(this.year())}function ue(e,t,n){var o,r=n-t,i=n-e.day();return i>r&&(i-=7),r-7>i&&(i+=7),o=He(e).add(i,"d"),{week:Math.ceil(o.dayOfYear()/7),year:o.year()}}function de(e){return ue(e,this._week.dow,this._week.doy).week}function ce(){return this._week.dow}function he(){return this._week.doy}function fe(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function pe(e){var t=ue(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function ge(e,t,n,o,r){var i,s,a=ie(e,0,1).getUTCDay();return a=0===a?7:a,n=null!=n?n:r,i=r-a+(a>o?7:0)-(r>a?7:0),s=7*(t-1)+(n-r)+i+1,{year:s>0?e:e-1,dayOfYear:s>0?s:se(e-1)+s}}function me(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function we(e,t,n){return null!=e?e:null!=t?t:n}function ve(e){var t=new Date;return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function ye(e){var t,n,o,r,i=[];if(!e._d){for(o=ve(e),e._w&&null==e._a[so]&&null==e._a[io]&&be(e),e._dayOfYear&&(r=we(e._a[ro],o[ro]),e._dayOfYear>se(r)&&(c(e)._overflowDayOfYear=!0),n=ie(r,0,e._dayOfYear),e._a[io]=n.getUTCMonth(),e._a[so]=n.getUTCDate()),t=0;3>t&&null==e._a[t];++t)e._a[t]=i[t]=o[t];for(;7>t;t++)e._a[t]=i[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ao]&&0===e._a[lo]&&0===e._a[uo]&&0===e._a[co]&&(e._nextDay=!0,e._a[ao]=0),e._d=(e._useUTC?ie:re).apply(null,i),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ao]=24)}}function be(e){var t,n,o,r,i,s,a;t=e._w,null!=t.GG||null!=t.W||null!=t.E?(i=1,s=4,n=we(t.GG,e._a[ro],ue(He(),1,4).year),o=we(t.W,1),r=we(t.E,1)):(i=e._locale._week.dow,s=e._locale._week.doy,n=we(t.gg,e._a[ro],ue(He(),i,s).year),o=we(t.w,1),null!=t.d?(r=t.d,i>r&&++o):r=null!=t.e?t.e+i:i),a=ge(n,o,r,s,i),e._a[ro]=a.year,e._dayOfYear=a.dayOfYear}function Ce(t){if(t._f===e.ISO_8601)return void ne(t);t._a=[],c(t).empty=!0;var n,o,r,i,s,a=""+t._i,l=a.length,u=0;for(r=W(t._f,t._locale).match(Wn)||[],n=0;n<r.length;n++)i=r[n],o=(a.match(B(i,t))||[])[0],o&&(s=a.substr(0,a.indexOf(o)),s.length>0&&c(t).unusedInput.push(s),a=a.slice(a.indexOf(o)+o.length),u+=o.length),Vn[i]?(o?c(t).empty=!1:c(t).unusedTokens.push(i),G(i,o,t)):t._strict&&!o&&c(t).unusedTokens.push(i);c(t).charsLeftOver=l-u,a.length>0&&c(t).unusedInput.push(a),c(t).bigHour===!0&&t._a[ao]<=12&&t._a[ao]>0&&(c(t).bigHour=void 0),t._a[ao]=Re(t._locale,t._a[ao],t._meridiem),ye(t),J(t)}function Re(e,t,n){var o;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?(o=e.isPM(n),o&&12>t&&(t+=12),o||12!==t||(t=0),t):t}function Se(e){var t,n,o,r,i;if(0===e._f.length)return c(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;r<e._f.length;r++)i=0,t=p({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[r],Ce(t),h(t)&&(i+=c(t).charsLeftOver,i+=10*c(t).unusedTokens.length,c(t).score=i,(null==o||o>i)&&(o=i,n=t));l(e,n||t)}function Ee(e){if(!e._d){var t=H(e._i);e._a=[t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],ye(e)}}function Te(e){var t,n=e._i,o=e._f;return e._locale=e._locale||T(e._l),null===n||void 0===o&&""===n?f({nullInput:!0}):("string"==typeof n&&(e._i=n=e._locale.preparse(n)),m(n)?new g(J(n)):(r(o)?Se(e):o?Ce(e):i(n)?e._d=n:_e(e),t=new g(J(e)),t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t))}function _e(t){var n=t._i;void 0===n?t._d=new Date:i(n)?t._d=new Date(+n):"string"==typeof n?oe(t):r(n)?(t._a=s(n.slice(0),function(e){return parseInt(e,10)}),ye(t)):"object"==typeof n?Ee(t):"number"==typeof n?t._d=new Date(n):e.createFromInputFallback(t)}function ke(e,t,n,o,r){var i={};return"boolean"==typeof n&&(o=n,n=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=r,i._l=n,i._i=e,i._f=t,i._strict=o,Te(i)}function He(e,t,n,o){return ke(e,t,n,o,!1)}function Me(e,t){var n,o;if(1===t.length&&r(t[0])&&(t=t[0]),!t.length)return He();for(n=t[0],o=1;o<t.length;++o)t[o][e](n)&&(n=t[o]);return n}function Oe(){var e=[].slice.call(arguments,0);return Me("isBefore",e)}function De(){var e=[].slice.call(arguments,0);return Me("isAfter",e)}function xe(e){var t=H(e),n=t.year||0,o=t.quarter||0,r=t.month||0,i=t.week||0,s=t.day||0,a=t.hour||0,l=t.minute||0,u=t.second||0,d=t.millisecond||0;this._milliseconds=+d+1e3*u+6e4*l+36e5*a,this._days=+s+7*i,this._months=+r+3*o+12*n,this._data={},this._locale=T(),this._bubble()}function Ae(e){return e instanceof xe}function je(e,t){j(e,0,0,function(){var e=this.utcOffset(),n="+";return 0>e&&(e=-e,n="-"),n+A(~~(e/60),2)+t+A(~~e%60,2)})}function Pe(e){var t=(e||"").match(Qn)||[],n=t[t.length-1]||[],o=(n+"").match(So)||["-",0,0],r=+(60*o[1])+w(o[2]);return"+"===o[0]?r:-r}function Ne(t,n){var o,r;return n._isUTC?(o=n.clone(),r=(m(t)||i(t)?+t:+He(t))-+o,o._d.setTime(+o._d+r),e.updateOffset(o,!1),o):He(t).local()}function Le(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function We(t,n){var o,r=this._offset||0;return null!=t?("string"==typeof t&&(t=Pe(t)),Math.abs(t)<16&&(t=60*t),!this._isUTC&&n&&(o=Le(this)),this._offset=t,this._isUTC=!0,null!=o&&this.add(o,"m"),r!==t&&(!n||this._changeInProgress?et(this,Ke(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?r:Le(this)}function Ie(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Be(e){return this.utcOffset(0,e)}function Ve(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Le(this),"m")),this}function Fe(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Pe(this._i)),this}function Ye(e){return e=e?He(e).utcOffset():0,(this.utcOffset()-e)%60===0}function Ge(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function ze(){if(this._a){var e=this._isUTC?u(this._a):He(this._a);return this.isValid()&&v(this._a,e.toArray())>0}return!1}function Ue(){return!this._isUTC}function $e(){return this._isUTC}function Xe(){return this._isUTC&&0===this._offset}function Ke(e,t){var n,o,r,i=e,s=null;return Ae(e)?i={ms:e._milliseconds,d:e._days,M:e._months}:"number"==typeof e?(i={},t?i[t]=e:i.milliseconds=e):(s=Eo.exec(e))?(n="-"===s[1]?-1:1,i={y:0,d:w(s[so])*n,h:w(s[ao])*n,m:w(s[lo])*n,s:w(s[uo])*n,ms:w(s[co])*n}):(s=To.exec(e))?(n="-"===s[1]?-1:1,i={y:qe(s[2],n),M:qe(s[3],n),d:qe(s[4],n),h:qe(s[5],n),m:qe(s[6],n),s:qe(s[7],n),w:qe(s[8],n)}):null==i?i={}:"object"==typeof i&&("from"in i||"to"in i)&&(r=Je(He(i.from),He(i.to)),i={},i.ms=r.milliseconds,i.M=r.months),o=new xe(i),Ae(e)&&a(e,"_locale")&&(o._locale=e._locale),o}function qe(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Ze(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Je(e,t){var n;return t=Ne(t,e),e.isBefore(t)?n=Ze(e,t):(n=Ze(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function Qe(e,t){return function(n,o){var r,i;return null===o||isNaN(+o)||(te(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period)."),i=n,n=o,o=i),n="string"==typeof n?+n:n,r=Ke(n,o),et(this,r,e),this}}function et(t,n,o,r){var i=n._milliseconds,s=n._days,a=n._months;r=null==r?!0:r,i&&t._d.setTime(+t._d+i*o),s&&D(t,"Date",O(t,"Date")+s*o),a&&K(t,O(t,"Month")+a*o),r&&e.updateOffset(t,s||a)}function tt(e){var t=e||He(),n=Ne(t,this).startOf("day"),o=this.diff(n,"days",!0),r=-6>o?"sameElse":-1>o?"lastWeek":0>o?"lastDay":1>o?"sameDay":2>o?"nextDay":7>o?"nextWeek":"sameElse";return this.format(this.localeData().calendar(r,this,He(t)))}function nt(){return new g(this)}function ot(e,t){var n;return t=k("undefined"!=typeof t?t:"millisecond"),"millisecond"===t?(e=m(e)?e:He(e),+this>+e):(n=m(e)?+e:+He(e),n<+this.clone().startOf(t))}function rt(e,t){var n;return t=k("undefined"!=typeof t?t:"millisecond"),"millisecond"===t?(e=m(e)?e:He(e),+e>+this):(n=m(e)?+e:+He(e),+this.clone().endOf(t)<n)}function it(e,t,n){return this.isAfter(e,n)&&this.isBefore(t,n)}function st(e,t){var n;return t=k(t||"millisecond"),"millisecond"===t?(e=m(e)?e:He(e),+this===+e):(n=+He(e),+this.clone().startOf(t)<=n&&n<=+this.clone().endOf(t))}function at(e){return 0>e?Math.ceil(e):Math.floor(e)}function lt(e,t,n){var o,r,i=Ne(e,this),s=6e4*(i.utcOffset()-this.utcOffset());return t=k(t),"year"===t||"month"===t||"quarter"===t?(r=ut(this,i),"quarter"===t?r/=3:"year"===t&&(r/=12)):(o=this-i,r="second"===t?o/1e3:"minute"===t?o/6e4:"hour"===t?o/36e5:"day"===t?(o-s)/864e5:"week"===t?(o-s)/6048e5:o),n?r:at(r)}function ut(e,t){var n,o,r=12*(t.year()-e.year())+(t.month()-e.month()),i=e.clone().add(r,"months");return 0>t-i?(n=e.clone().add(r-1,"months"),o=(t-i)/(i-n)):(n=e.clone().add(r+1,"months"),o=(t-i)/(n-i)),-(r+o)}function dt(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ct(){var e=this.clone().utc();return 0<e.year()&&e.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():L(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):L(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function ht(t){var n=L(this,t||e.defaultFormat);return this.localeData().postformat(n)}function ft(e,t){return this.isValid()?Ke({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function pt(e){return this.from(He(),e)}function gt(e,t){return this.isValid()?Ke({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function mt(e){return this.to(He(),e)}function wt(e){var t;return void 0===e?this._locale._abbr:(t=T(e),null!=t&&(this._locale=t),this)}function vt(){return this._locale}function yt(e){switch(e=k(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this}function bt(e){return e=k(e),void 0===e||"millisecond"===e?this:this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms")}function Ct(){return+this._d-6e4*(this._offset||0)}function Rt(){return Math.floor(+this/1e3)}function St(){return this._offset?new Date(+this):this._d}function Et(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Tt(){return h(this)}function _t(){return l({},c(this))}function kt(){return c(this).overflow}function Ht(e,t){j(0,[e,e.length],0,t)}function Mt(e,t,n){return ue(He([e,11,31+t-n]),t,n).week}function Ot(e){var t=ue(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==e?t:this.add(e-t,"y")}function Dt(e){var t=ue(this,1,4).year;return null==e?t:this.add(e-t,"y")}function xt(){return Mt(this.year(),1,4)}function At(){var e=this.localeData()._week;return Mt(this.year(),e.dow,e.doy)}function jt(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function Pt(e,t){if("string"==typeof e)if(isNaN(e)){if(e=t.weekdaysParse(e),"number"!=typeof e)return null}else e=parseInt(e,10);return e}function Nt(e){return this._weekdays[e.day()]}function Lt(e){return this._weekdaysShort[e.day()]}function Wt(e){return this._weekdaysMin[e.day()]}function It(e){var t,n,o;for(this._weekdaysParse||(this._weekdaysParse=[]),t=0;7>t;t++)if(this._weekdaysParse[t]||(n=He([2e3,1]).day(t),o="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[t]=new RegExp(o.replace(".",""),"i")),this._weekdaysParse[t].test(e))return t}function Bt(e){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Pt(e,this.localeData()),this.add(e-t,"d")):t}function Vt(e){var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Ft(e){return null==e?this.day()||7:this.day(this.day()%7?e:e-7)}function Yt(e,t){j(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Gt(e,t){return t._meridiemParse}function zt(e){return"p"===(e+"").toLowerCase().charAt(0)}function Ut(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}function $t(e){j(0,[e,3],0,"millisecond")}function Xt(){return this._isUTC?"UTC":""}function Kt(){return this._isUTC?"Coordinated Universal Time":""}function qt(e){return He(1e3*e)}function Zt(){return He.apply(null,arguments).parseZone()}function Jt(e,t,n){var o=this._calendar[e];return"function"==typeof o?o.call(t,n):o}function Qt(e){var t=this._longDateFormat[e];return!t&&this._longDateFormat[e.toUpperCase()]&&(t=this._longDateFormat[e.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e]=t),t}function en(){return this._invalidDate}function tn(e){return this._ordinal.replace("%d",e)}function nn(e){return e}function on(e,t,n,o){var r=this._relativeTime[n];return"function"==typeof r?r(e,t,n,o):r.replace(/%d/i,e)}function rn(e,t){var n=this._relativeTime[e>0?"future":"past"];return"function"==typeof n?n(t):n.replace(/%s/i,t)}function sn(e){var t,n;for(n in e)t=e[n],"function"==typeof t?this[n]=t:this["_"+n]=t;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function an(e,t,n,o){var r=T(),i=u().set(o,t);return r[n](i,e)}function ln(e,t,n,o,r){if("number"==typeof e&&(t=e,e=void 0),e=e||"",null!=t)return an(e,t,n,r);var i,s=[];for(i=0;o>i;i++)s[i]=an(e,i,n,r);return s}function un(e,t){return ln(e,t,"months",12,"month")}function dn(e,t){return ln(e,t,"monthsShort",12,"month")}function cn(e,t){return ln(e,t,"weekdays",7,"day")}function hn(e,t){return ln(e,t,"weekdaysShort",7,"day")}function fn(e,t){return ln(e,t,"weekdaysMin",7,"day")}function pn(){var e=this._data;return this._milliseconds=$o(this._milliseconds),this._days=$o(this._days),this._months=$o(this._months),e.milliseconds=$o(e.milliseconds),e.seconds=$o(e.seconds),e.minutes=$o(e.minutes),e.hours=$o(e.hours),e.months=$o(e.months),e.years=$o(e.years),this}function gn(e,t,n,o){var r=Ke(t,n);return e._milliseconds+=o*r._milliseconds,e._days+=o*r._days,e._months+=o*r._months,e._bubble()}function mn(e,t){return gn(this,e,t,1)}function wn(e,t){return gn(this,e,t,-1)}function vn(){var e,t,n,o=this._milliseconds,r=this._days,i=this._months,s=this._data,a=0;return s.milliseconds=o%1e3,e=at(o/1e3),s.seconds=e%60,t=at(e/60),s.minutes=t%60,n=at(t/60),s.hours=n%24,r+=at(n/24),a=at(yn(r)),r-=at(bn(a)),i+=at(r/30),r%=30,a+=at(i/12),i%=12,s.days=r,s.months=i,s.years=a,this}function yn(e){return 400*e/146097}function bn(e){return 146097*e/400}function Cn(e){var t,n,o=this._milliseconds;if(e=k(e),"month"===e||"year"===e)return t=this._days+o/864e5,n=this._months+12*yn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(bn(this._months/12)),e){case"week":return t/7+o/6048e5;case"day":return t+o/864e5;case"hour":return 24*t+o/36e5;case"minute":return 1440*t+o/6e4;case"second":return 86400*t+o/1e3;case"millisecond":return Math.floor(864e5*t)+o;default:throw new Error("Unknown unit "+e)}}function Rn(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12)}function Sn(e){return function(){return this.as(e)}}function En(e){return e=k(e),this[e+"s"]()}function Tn(e){return function(){return this._data[e]}}function _n(){return at(this.days()/7)}function kn(e,t,n,o,r){return r.relativeTime(t||1,!!n,e,o)}function Hn(e,t,n){var o=Ke(e).abs(),r=ur(o.as("s")),i=ur(o.as("m")),s=ur(o.as("h")),a=ur(o.as("d")),l=ur(o.as("M")),u=ur(o.as("y")),d=r<dr.s&&["s",r]||1===i&&["m"]||i<dr.m&&["mm",i]||1===s&&["h"]||s<dr.h&&["hh",s]||1===a&&["d"]||a<dr.d&&["dd",a]||1===l&&["M"]||l<dr.M&&["MM",l]||1===u&&["y"]||["yy",u];return d[2]=t,d[3]=+e>0,d[4]=n,kn.apply(null,d)}function Mn(e,t){return void 0===dr[e]?!1:void 0===t?dr[e]:(dr[e]=t,!0)}function On(e){var t=this.localeData(),n=Hn(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)}function Dn(){var e=cr(this.years()),t=cr(this.months()),n=cr(this.days()),o=cr(this.hours()),r=cr(this.minutes()),i=cr(this.seconds()+this.milliseconds()/1e3),s=this.asSeconds();return s?(0>s?"-":"")+"P"+(e?e+"Y":"")+(t?t+"M":"")+(n?n+"D":"")+(o||r||i?"T":"")+(o?o+"H":"")+(r?r+"M":"")+(i?i+"S":""):"P0D"}var xn,An,jn=e.momentProperties=[],Pn=!1,Nn={},Ln={},Wn=/(\[[^\[]*\])|(\\)?(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,4}|x|X|zz?|ZZ?|.)/g,In=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Bn={},Vn={},Fn=/\d/,Yn=/\d\d/,Gn=/\d{3}/,zn=/\d{4}/,Un=/[+-]?\d{6}/,$n=/\d\d?/,Xn=/\d{1,3}/,Kn=/\d{1,4}/,qn=/[+-]?\d{1,6}/,Zn=/\d+/,Jn=/[+-]?\d+/,Qn=/Z|[+-]\d\d:?\d\d/gi,eo=/[+-]?\d+(\.\d{1,3})?/,to=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,no={},oo={},ro=0,io=1,so=2,ao=3,lo=4,uo=5,co=6;j("M",["MM",2],"Mo",function(){return this.month()+1}),j("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),j("MMMM",0,0,function(e){return this.localeData().months(this,e)}),_("month","M"),I("M",$n),I("MM",$n,Yn),I("MMM",to),I("MMMM",to),F(["M","MM"],function(e,t){t[io]=w(e)-1}),F(["MMM","MMMM"],function(e,t,n,o){var r=n._locale.monthsParse(e,o,n._strict);null!=r?t[io]=r:c(n).invalidMonth=e});var ho="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),fo="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),po={};e.suppressDeprecationWarnings=!1;var go=/^\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)?)?$/,mo=[["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}/]],wo=[["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/]],vo=/^\/?Date\((\-?\d+)/i;e.createFromInputFallback=ee("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(e){e._d=new Date(e._i+(e._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"),_("year","y"),I("Y",Jn),I("YY",$n,Yn),I("YYYY",Kn,zn),I("YYYYY",qn,Un),I("YYYYYY",qn,Un),F(["YYYY","YYYYY","YYYYYY"],ro),F("YY",function(t,n){n[ro]=e.parseTwoDigitYear(t)}),e.parseTwoDigitYear=function(e){return w(e)+(w(e)>68?1900:2e3)};var yo=M("FullYear",!1);j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),_("week","w"),_("isoWeek","W"),I("w",$n),I("ww",$n,Yn),I("W",$n),I("WW",$n,Yn),Y(["w","ww","W","WW"],function(e,t,n,o){t[o.substr(0,1)]=w(e)});var bo={dow:0,doy:6};j("DDD",["DDDD",3],"DDDo","dayOfYear"),_("dayOfYear","DDD"),I("DDD",Xn),I("DDDD",Gn),F(["DDD","DDDD"],function(e,t,n){n._dayOfYear=w(e)}),e.ISO_8601=function(){};var Co=ee("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var e=He.apply(null,arguments);return this>e?this:e}),Ro=ee("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var e=He.apply(null,arguments);return e>this?this:e});je("Z",":"),je("ZZ",""),I("Z",Qn),I("ZZ",Qn),F(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Pe(e)});var So=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Eo=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,To=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;Ke.fn=xe.prototype;var _o=Qe(1,"add"),ko=Qe(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var Ho=ee("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});j(0,["gg",2],0,function(){return this.weekYear()%100}),j(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ht("gggg","weekYear"),Ht("ggggg","weekYear"),Ht("GGGG","isoWeekYear"),Ht("GGGGG","isoWeekYear"),_("weekYear","gg"),_("isoWeekYear","GG"),I("G",Jn),I("g",Jn),I("GG",$n,Yn),I("gg",$n,Yn),I("GGGG",Kn,zn),I("gggg",Kn,zn),I("GGGGG",qn,Un),I("ggggg",qn,Un),Y(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,o){t[o.substr(0,2)]=w(e)}),Y(["gg","GG"],function(t,n,o,r){n[r]=e.parseTwoDigitYear(t)}),j("Q",0,0,"quarter"),_("quarter","Q"),I("Q",Fn),F("Q",function(e,t){t[io]=3*(w(e)-1)}),j("D",["DD",2],"Do","date"),_("date","D"),I("D",$n),I("DD",$n,Yn),I("Do",function(e,t){return e?t._ordinalParse:t._ordinalParseLenient}),F(["D","DD"],so),F("Do",function(e,t){t[so]=w(e.match($n)[0],10)});var Mo=M("Date",!0);j("d",0,"do","day"),j("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),j("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),j("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),_("day","d"),_("weekday","e"),_("isoWeekday","E"),I("d",$n),I("e",$n),I("E",$n),I("dd",to),I("ddd",to),I("dddd",to),Y(["dd","ddd","dddd"],function(e,t,n){var o=n._locale.weekdaysParse(e);null!=o?t.d=o:c(n).invalidWeekday=e}),Y(["d","e","E"],function(e,t,n,o){t[o]=w(e)});var Oo="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Do="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),xo="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}),Yt("a",!0),Yt("A",!1),_("hour","h"),I("a",Gt),I("A",Gt),I("H",$n),I("h",$n),I("HH",$n,Yn),I("hh",$n,Yn),F(["H","HH"],ao),F(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),F(["h","hh"],function(e,t,n){t[ao]=w(e),c(n).bigHour=!0});var Ao=/[ap]\.?m?\.?/i,jo=M("Hours",!0);j("m",["mm",2],0,"minute"),_("minute","m"),I("m",$n),I("mm",$n,Yn),F(["m","mm"],lo);var Po=M("Minutes",!1);j("s",["ss",2],0,"second"),_("second","s"),I("s",$n),I("ss",$n,Yn),F(["s","ss"],uo);var No=M("Seconds",!1);j("S",0,0,function(){return~~(this.millisecond()/100)}),j(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),$t("SSS"),$t("SSSS"),_("millisecond","ms"),I("S",Xn,Fn),I("SS",Xn,Yn),I("SSS",Xn,Gn),I("SSSS",Zn),F(["S","SS","SSS","SSSS"],function(e,t){t[co]=w(1e3*("0."+e))});var Lo=M("Milliseconds",!1);j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");var Wo=g.prototype;Wo.add=_o,Wo.calendar=tt,Wo.clone=nt,Wo.diff=lt,Wo.endOf=bt,Wo.format=ht,Wo.from=ft,Wo.fromNow=pt,Wo.to=gt,Wo.toNow=mt,Wo.get=x,Wo.invalidAt=kt,Wo.isAfter=ot,Wo.isBefore=rt,Wo.isBetween=it,Wo.isSame=st,Wo.isValid=Tt,Wo.lang=Ho,Wo.locale=wt,Wo.localeData=vt,Wo.max=Ro,Wo.min=Co,Wo.parsingFlags=_t,Wo.set=x,Wo.startOf=yt,Wo.subtract=ko,Wo.toArray=Et,Wo.toDate=St,Wo.toISOString=ct,Wo.toJSON=ct,Wo.toString=dt,Wo.unix=Rt,Wo.valueOf=Ct,Wo.year=yo,Wo.isLeapYear=le,Wo.weekYear=Ot,Wo.isoWeekYear=Dt,Wo.quarter=Wo.quarters=jt,Wo.month=q,Wo.daysInMonth=Z,Wo.week=Wo.weeks=fe,Wo.isoWeek=Wo.isoWeeks=pe,Wo.weeksInYear=At,Wo.isoWeeksInYear=xt,Wo.date=Mo,Wo.day=Wo.days=Bt,Wo.weekday=Vt,Wo.isoWeekday=Ft,Wo.dayOfYear=me,Wo.hour=Wo.hours=jo,Wo.minute=Wo.minutes=Po,Wo.second=Wo.seconds=No,Wo.millisecond=Wo.milliseconds=Lo,Wo.utcOffset=We,Wo.utc=Be,Wo.local=Ve,Wo.parseZone=Fe,Wo.hasAlignedHourOffset=Ye,Wo.isDST=Ge,Wo.isDSTShifted=ze,Wo.isLocal=Ue,Wo.isUtcOffset=$e,Wo.isUtc=Xe,Wo.isUTC=Xe,Wo.zoneAbbr=Xt,Wo.zoneName=Kt,Wo.dates=ee("dates accessor is deprecated. Use date instead.",Mo),Wo.months=ee("months accessor is deprecated. Use month instead",q),Wo.years=ee("years accessor is deprecated. Use year instead",yo),Wo.zone=ee("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Ie);var Io=Wo,Bo={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Vo={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},Fo="Invalid date",Yo="%d",Go=/\d{1,2}/,zo={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"},Uo=y.prototype;
Uo._calendar=Bo,Uo.calendar=Jt,Uo._longDateFormat=Vo,Uo.longDateFormat=Qt,Uo._invalidDate=Fo,Uo.invalidDate=en,Uo._ordinal=Yo,Uo.ordinal=tn,Uo._ordinalParse=Go,Uo.preparse=nn,Uo.postformat=nn,Uo._relativeTime=zo,Uo.relativeTime=on,Uo.pastFuture=rn,Uo.set=sn,Uo.months=U,Uo._months=ho,Uo.monthsShort=$,Uo._monthsShort=fo,Uo.monthsParse=X,Uo.week=de,Uo._week=bo,Uo.firstDayOfYear=he,Uo.firstDayOfWeek=ce,Uo.weekdays=Nt,Uo._weekdays=Oo,Uo.weekdaysMin=Wt,Uo._weekdaysMin=xo,Uo.weekdaysShort=Lt,Uo._weekdaysShort=Do,Uo.weekdaysParse=It,Uo.isPM=zt,Uo._meridiemParse=Ao,Uo.meridiem=Ut,S("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===w(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),e.lang=ee("moment.lang is deprecated. Use moment.locale instead.",S),e.langData=ee("moment.langData is deprecated. Use moment.localeData instead.",T);var $o=Math.abs,Xo=Sn("ms"),Ko=Sn("s"),qo=Sn("m"),Zo=Sn("h"),Jo=Sn("d"),Qo=Sn("w"),er=Sn("M"),tr=Sn("y"),nr=Tn("milliseconds"),or=Tn("seconds"),rr=Tn("minutes"),ir=Tn("hours"),sr=Tn("days"),ar=Tn("months"),lr=Tn("years"),ur=Math.round,dr={s:45,m:45,h:22,d:26,M:11},cr=Math.abs,hr=xe.prototype;hr.abs=pn,hr.add=mn,hr.subtract=wn,hr.as=Cn,hr.asMilliseconds=Xo,hr.asSeconds=Ko,hr.asMinutes=qo,hr.asHours=Zo,hr.asDays=Jo,hr.asWeeks=Qo,hr.asMonths=er,hr.asYears=tr,hr.valueOf=Rn,hr._bubble=vn,hr.get=En,hr.milliseconds=nr,hr.seconds=or,hr.minutes=rr,hr.hours=ir,hr.days=sr,hr.weeks=_n,hr.months=ar,hr.years=lr,hr.humanize=On,hr.toISOString=Dn,hr.toString=Dn,hr.toJSON=Dn,hr.locale=wt,hr.localeData=vt,hr.toIsoString=ee("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Dn),hr.lang=Ho,j("X",0,0,"unix"),j("x",0,0,"valueOf"),I("x",Jn),I("X",eo),F("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),F("x",function(e,t,n){n._d=new Date(w(e))}),e.version="2.10.3",o(He),e.fn=Io,e.min=Oe,e.max=De,e.utc=u,e.unix=qt,e.months=un,e.isDate=i,e.locale=S,e.invalid=f,e.duration=Ke,e.isMoment=m,e.weekdays=cn,e.parseZone=Zt,e.localeData=T,e.isDuration=Ae,e.monthsShort=dn,e.weekdaysMin=fn,e.defineLocale=E,e.weekdaysShort=hn,e.normalizeUnits=k,e.relativeTimeThreshold=Mn;var fr=e;return fr})},{}],numeral:[function(t,n,o){"use strict";(function(){function t(e){this._value=e}function o(e,t,n,o){var r,i,s=Math.pow(10,t);return i=(n(e*s)/s).toFixed(t),o&&(r=new RegExp("0{1,"+o+"}$"),i=i.replace(r,"")),i}function r(e,t,n){var o;return o=t.indexOf("$")>-1?s(e,t,n):t.indexOf("%")>-1?a(e,t,n):t.indexOf(":")>-1?l(e,t):d(e._value,t,n)}function i(e,t){var n,o,r,i,s,a=t,l=["KB","MB","GB","TB","PB","EB","ZB","YB"],d=!1;if(t.indexOf(":")>-1)e._value=u(t);else if(t===v)e._value=0;else{for("."!==m[w].delimiters.decimal&&(t=t.replace(/\./g,"").replace(m[w].delimiters.decimal,".")),n=new RegExp("[^a-zA-Z]"+m[w].abbreviations.thousand+"(?:\\)|(\\"+m[w].currency.symbol+")?(?:\\))?)?$"),o=new RegExp("[^a-zA-Z]"+m[w].abbreviations.million+"(?:\\)|(\\"+m[w].currency.symbol+")?(?:\\))?)?$"),r=new RegExp("[^a-zA-Z]"+m[w].abbreviations.billion+"(?:\\)|(\\"+m[w].currency.symbol+")?(?:\\))?)?$"),i=new RegExp("[^a-zA-Z]"+m[w].abbreviations.trillion+"(?:\\)|(\\"+m[w].currency.symbol+")?(?:\\))?)?$"),s=0;s<=l.length&&!(d=t.indexOf(l[s])>-1?Math.pow(1024,s+1):!1);s++);e._value=(d?d:1)*(a.match(n)?Math.pow(10,3):1)*(a.match(o)?Math.pow(10,6):1)*(a.match(r)?Math.pow(10,9):1)*(a.match(i)?Math.pow(10,12):1)*(t.indexOf("%")>-1?.01:1)*((t.split("-").length+Math.min(t.split("(").length-1,t.split(")").length-1))%2?1:-1)*Number(t.replace(/[^0-9\.]+/g,"")),e._value=d?Math.ceil(e._value):e._value}return e._value}function s(e,t,n){var o,r,i=t.indexOf("$"),s=t.indexOf("("),a=t.indexOf("-"),l="";return t.indexOf(" $")>-1?(l=" ",t=t.replace(" $","")):t.indexOf("$ ")>-1?(l=" ",t=t.replace("$ ","")):t=t.replace("$",""),r=d(e._value,t,n),1>=i?r.indexOf("(")>-1||r.indexOf("-")>-1?(r=r.split(""),o=1,(s>i||a>i)&&(o=0),r.splice(o,0,m[w].currency.symbol+l),r=r.join("")):r=m[w].currency.symbol+l+r:r.indexOf(")")>-1?(r=r.split(""),r.splice(-1,0,l+m[w].currency.symbol),r=r.join("")):r=r+l+m[w].currency.symbol,r}function a(e,t,n){var o,r="",i=100*e._value;return t.indexOf(" %")>-1?(r=" ",t=t.replace(" %","")):t=t.replace("%",""),o=d(i,t,n),o.indexOf(")")>-1?(o=o.split(""),o.splice(-1,0,r+"%"),o=o.join("")):o=o+r+"%",o}function l(e){var t=Math.floor(e._value/60/60),n=Math.floor((e._value-60*t*60)/60),o=Math.round(e._value-60*t*60-60*n);return t+":"+(10>n?"0"+n:n)+":"+(10>o?"0"+o:o)}function u(e){var t=e.split(":"),n=0;return 3===t.length?(n+=60*Number(t[0])*60,n+=60*Number(t[1]),n+=Number(t[2])):2===t.length&&(n+=60*Number(t[0]),n+=Number(t[1])),Number(n)}function d(e,t,n){var r,i,s,a,l,u,d=!1,c=!1,h=!1,f="",p=!1,g=!1,y=!1,b=!1,C=!1,R="",S="",E=Math.abs(e),T=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],_="",k=!1;if(0===e&&null!==v)return v;if(t.indexOf("(")>-1?(d=!0,t=t.slice(1,-1)):t.indexOf("+")>-1&&(c=!0,t=t.replace(/\+/g,"")),t.indexOf("a")>-1&&(p=t.indexOf("aK")>=0,g=t.indexOf("aM")>=0,y=t.indexOf("aB")>=0,b=t.indexOf("aT")>=0,C=p||g||y||b,t.indexOf(" a")>-1?(f=" ",t=t.replace(" a","")):t=t.replace("a",""),E>=Math.pow(10,12)&&!C||b?(f+=m[w].abbreviations.trillion,e/=Math.pow(10,12)):E<Math.pow(10,12)&&E>=Math.pow(10,9)&&!C||y?(f+=m[w].abbreviations.billion,e/=Math.pow(10,9)):E<Math.pow(10,9)&&E>=Math.pow(10,6)&&!C||g?(f+=m[w].abbreviations.million,e/=Math.pow(10,6)):(E<Math.pow(10,6)&&E>=Math.pow(10,3)&&!C||p)&&(f+=m[w].abbreviations.thousand,e/=Math.pow(10,3))),t.indexOf("b")>-1)for(t.indexOf(" b")>-1?(R=" ",t=t.replace(" b","")):t=t.replace("b",""),s=0;s<=T.length;s++)if(r=Math.pow(1024,s),i=Math.pow(1024,s+1),e>=r&&i>e){R+=T[s],r>0&&(e/=r);break}return t.indexOf("o")>-1&&(t.indexOf(" o")>-1?(S=" ",t=t.replace(" o","")):t=t.replace("o",""),S+=m[w].ordinal(e)),t.indexOf("[.]")>-1&&(h=!0,t=t.replace("[.]",".")),a=e.toString().split(".")[0],l=t.split(".")[1],u=t.indexOf(","),l?(l.indexOf("[")>-1?(l=l.replace("]",""),l=l.split("["),_=o(e,l[0].length+l[1].length,n,l[1].length)):_=o(e,l.length,n),a=_.split(".")[0],_=_.split(".")[1].length?m[w].delimiters.decimal+_.split(".")[1]:"",h&&0===Number(_.slice(1))&&(_="")):a=o(e,null,n),a.indexOf("-")>-1&&(a=a.slice(1),k=!0),u>-1&&(a=a.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+m[w].delimiters.thousands)),0===t.indexOf(".")&&(a=""),(d&&k?"(":"")+(!d&&k?"-":"")+(!k&&c?"+":"")+a+_+(S?S:"")+(f?f:"")+(R?R:"")+(d&&k?")":"")}function c(e,t){m[e]=t}function h(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)}function f(){var e=Array.prototype.slice.call(arguments);return e.reduce(function(e,t){var n=h(e),o=h(t);return n>o?n:o},-(1/0))}var p,g="1.5.3",m={},w="en",v=null,y="0,0",b="undefined"!=typeof n&&n.exports;p=function(e){return p.isNumeral(e)?e=e.value():0===e||"undefined"==typeof e?e=0:Number(e)||(e=p.fn.unformat(e)),new t(Number(e))},p.version=g,p.isNumeral=function(e){return e instanceof t},p.language=function(e,t){if(!e)return w;if(e&&!t){if(!m[e])throw new Error("Unknown language : "+e);w=e}return(t||!m[e])&&c(e,t),p},p.languageData=function(e){if(!e)return m[w];if(!m[e])throw new Error("Unknown language : "+e);return m[e]},p.language("en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),p.zeroFormat=function(e){v="string"==typeof e?e:null},p.defaultFormat=function(e){y="string"==typeof e?e:"0.0"},p.validate=function(e,t){var n,o,r,i,s,a,l,u;if("string"!=typeof e&&(e+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",e)),e=e.trim(),""===e)return!1;e=e.replace(/^[+-]?/,"");try{l=p.languageData(t)}catch(d){l=p.languageData(p.language())}return r=l.currency.symbol,s=l.abbreviations,n=l.delimiters.decimal,o="."===l.delimiters.thousands?"\\.":l.delimiters.thousands,u=e.match(/^[^\d\.\,]+/),null!==u&&(e=e.substr(1),u[0]!==r)?!1:(u=e.match(/[^\d]+$/),null!==u&&(e=e.slice(0,-1),u[0]!==s.thousand&&u[0]!==s.million&&u[0]!==s.billion&&u[0]!==s.trillion)?!1:e.match(/^\d+$/)?!0:(a=new RegExp(o+"{2}"),e.match(/[^\d.,]/g)?!1:(i=e.split(n),i.length>2?!1:i.length<2?!!i[0].match(/^\d+.*\d$/)&&!i[0].match(a):""===i[0]?!i[0].match(a)&&!!i[1].match(/^\d+$/):1===i[0].length?!!i[0].match(/^\d+$/)&&!i[0].match(a)&&!!i[1].match(/^\d+$/):!!i[0].match(/^\d+.*\d$/)&&!i[0].match(a)&&!!i[1].match(/^\d+$/))))},"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(e,t){if(null===this||"undefined"==typeof this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof e)throw new TypeError(e+" is not a function");var n,o,r=this.length>>>0,i=!1;for(1<arguments.length&&(o=t,i=!0),n=0;r>n;++n)this.hasOwnProperty(n)&&(i?o=e(o,this[n],n,this):(o=this[n],i=!0));if(!i)throw new TypeError("Reduce of empty array with no initial value");return o}),p.fn=t.prototype={clone:function(){return p(this)},format:function(e,t){return r(this,e?e:y,void 0!==t?t:Math.round)},unformat:function(e){return"[object Number]"===Object.prototype.toString.call(e)?e:i(this,e?e:y)},value:function(){return this._value},valueOf:function(){return this._value},set:function(e){return this._value=Number(e),this},add:function(e){function t(e,t,o,r){return e+n*t}var n=f.call(null,this._value,e);return this._value=[this._value,e].reduce(t,0)/n,this},subtract:function(e){function t(e,t,o,r){return e-n*t}var n=f.call(null,this._value,e);return this._value=[e].reduce(t,this._value*n)/n,this},multiply:function(e){function t(e,t,n,o){var r=f(e,t);return e*r*t*r/(r*r)}return this._value=[this._value,e].reduce(t,1),this},divide:function(e){function t(e,t,n,o){var r=f(e,t);return e*r/(t*r)}return this._value=[this._value,e].reduce(t),this},difference:function(e){return Math.abs(p(this._value).subtract(e).value())}},b&&(n.exports=p),"undefined"==typeof ender&&(this.numeral=p),"function"==typeof e&&e.amd&&e([],function(){return p})}).call(window)},{}],pikaday:[function(t,n,o){/*!
* Pikaday
*
* Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday
*/
!function(r,i){"use strict";var s;if("object"==typeof o){try{s=t("moment")}catch(a){}n.exports=i(s)}else"function"==typeof e&&e.amd?e(function(e){var t="moment";try{s=e(t)}catch(n){}return i(s)}):r.Pikaday=i(r.moment)}(this,function(e){"use strict";var t="function"==typeof e,n=!!window.addEventListener,o=window.document,r=window.setTimeout,i=function(e,t,o,r){n?e.addEventListener(t,o,!!r):e.attachEvent("on"+t,o)},s=function(e,t,o,r){n?e.removeEventListener(t,o,!!r):e.detachEvent("on"+t,o)},a=function(e,t,n){var r;o.createEvent?(r=o.createEvent("HTMLEvents"),r.initEvent(t,!0,!1),r=y(r,n),e.dispatchEvent(r)):o.createEventObject&&(r=o.createEventObject(),r=y(r,n),e.fireEvent("on"+t,r))},l=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},u=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},d=function(e,t){u(e,t)||(e.className=""===e.className?t:e.className+" "+t)},c=function(e,t){e.className=l((" "+e.className+" ").replace(" "+t+" "," "))},h=function(e){return/Array/.test(Object.prototype.toString.call(e))},f=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},p=function(e){var t=e.getDay();return 0===t||6===t},g=function(e){return e%4===0&&e%100!==0||e%400===0},m=function(e,t){return[31,g(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},w=function(e){f(e)&&e.setHours(0,0,0,0)},v=function(e,t){return e.getTime()===t.getTime()},y=function(e,t,n){var o,r;for(o in t)r=void 0!==e[o],r&&"object"==typeof t[o]&&null!==t[o]&&void 0===t[o].nodeName?f(t[o])?n&&(e[o]=new Date(t[o].getTime())):h(t[o])?n&&(e[o]=t[o].slice(0)):e[o]=y({},t[o],n):(n||!r)&&(e[o]=t[o]);return e},b=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},C={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,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"]},onSelect:null,onOpen:null,onClose:null,onDraw:null},R=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},S=function(e,t,n,o,r,i,s){if(s)return'<td class="is-empty"></td>';var a=[];return i&&a.push("is-disabled"),r&&a.push("is-today"),o&&a.push("is-selected"),'<td data-day="'+e+'" class="'+a.join(" ")+'"><button class="pika-button pika-day" type="button" data-pika-year="'+n+'" data-pika-month="'+t+'" data-pika-day="'+e+'">'+e+"</button></td>"},E=function(e,t,n){var o=new Date(n,0,1),r=Math.ceil(((new Date(n,t,e)-o)/864e5+o.getDay()+1)/7);return'<td class="pika-week">'+r+"</td>"},T=function(e,t){return"<tr>"+(t?e.reverse():e).join("")+"</tr>"},_=function(e){return"<tbody>"+e.join("")+"</tbody>"},k=function(e){var t,n=[];for(e.showWeekNumber&&n.push("<th></th>"),t=0;7>t;t++)n.push('<th scope="col"><abbr title="'+R(e,t)+'">'+R(e,t,!0)+"</abbr></th>");return"<thead>"+(e.isRTL?n.reverse():n).join("")+"</thead>"},H=function(e,t,n,o,r){var i,s,a,l,u,d=e._o,c=n===d.minYear,f=n===d.maxYear,p='<div class="pika-title">',g=!0,m=!0;for(a=[],i=0;12>i;i++)a.push('<option value="'+(n===r?i-t:12+i-t)+'"'+(i===o?" selected":"")+(c&&i<d.minMonth||f&&i>d.maxMonth?"disabled":"")+">"+d.i18n.months[i]+"</option>");for(l='<div class="pika-label">'+d.i18n.months[o]+'<select class="pika-select pika-select-month">'+a.join("")+"</select></div>",h(d.yearRange)?(i=d.yearRange[0],s=d.yearRange[1]+1):(i=n-d.yearRange,s=1+n+d.yearRange),a=[];s>i&&i<=d.maxYear;i++)i>=d.minYear&&a.push('<option value="'+i+'"'+(i===n?" selected":"")+">"+i+"</option>");return u='<div class="pika-label">'+n+d.yearSuffix+'<select class="pika-select pika-select-year">'+a.join("")+"</select></div>",p+=d.showMonthAfterYear?u+l:l+u,c&&(0===o||d.minMonth>=o)&&(g=!1),f&&(11===o||d.maxMonth<=o)&&(m=!1),0===t&&(p+='<button class="pika-prev'+(g?"":" is-disabled")+'" type="button">'+d.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(p+='<button class="pika-next'+(m?"":" is-disabled")+'" type="button">'+d.i18n.nextMonth+"</button>"),p+="</div>"},M=function(e,t){return'<table cellpadding="0" cellspacing="0" class="pika-table">'+k(e)+_(t)+"</table>"},O=function(s){var a=this,l=a.config(s);a._onMouseDown=function(e){if(a._v){e=e||window.event;var t=e.target||e.srcElement;if(t){if(!u(t,"is-disabled")){if(u(t,"pika-button")&&!u(t,"is-empty"))return a.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),void(l.bound&&r(function(){a.hide(),l.field&&l.field.blur()},100));u(t,"pika-prev")?a.prevMonth():u(t,"pika-next")&&a.nextMonth()}if(u(t,"pika-select"))a._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}}},a._onChange=function(e){e=e||window.event;var t=e.target||e.srcElement;t&&(u(t,"pika-select-month")?a.gotoMonth(t.value):u(t,"pika-select-year")&&a.gotoYear(t.value))},a._onInputChange=function(n){var o;n.firedBy!==a&&(t?(o=e(l.field.value,l.format),o=o&&o.isValid()?o.toDate():null):o=new Date(Date.parse(l.field.value)),a.setDate(f(o)?o:null),a._v||a.show())},a._onInputFocus=function(){a.show()},a._onInputClick=function(){a.show()},a._onInputBlur=function(){var e=o.activeElement;do if(u(e,"pika-single"))return;while(e=e.parentNode);a._c||(a._b=r(function(){a.hide()},50)),a._c=!1},a._onClick=function(e){e=e||window.event;var t=e.target||e.srcElement,o=t;if(t){!n&&u(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),i(t,"change",a._onChange)));do if(u(o,"pika-single")||o===l.trigger)return;while(o=o.parentNode);a._v&&t!==l.trigger&&o!==l.trigger&&a.hide()}},a.el=o.createElement("div"),a.el.className="pika-single"+(l.isRTL?" is-rtl":""),i(a.el,"mousedown",a._onMouseDown,!0),i(a.el,"change",a._onChange),l.field&&(l.container?l.container.appendChild(a.el):l.bound?o.body.appendChild(a.el):l.field.parentNode.insertBefore(a.el,l.field.nextSibling),i(l.field,"change",a._onInputChange),l.defaultDate||(t&&l.field.value?l.defaultDate=e(l.field.value,l.format).toDate():l.defaultDate=new Date(Date.parse(l.field.value)),l.setDefaultDate=!0));var d=l.defaultDate;f(d)?l.setDefaultDate?a.setDate(d,!0):a.gotoDate(d):a.gotoDate(new Date),l.bound?(this.hide(),a.el.className+=" is-bound",i(l.trigger,"click",a._onInputClick),i(l.trigger,"focus",a._onInputFocus),i(l.trigger,"blur",a._onInputBlur)):this.show()};return O.prototype={config:function(e){this._o||(this._o=y({},C,!0));var t=y(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"==typeof t.disableDayFn?t.disableDayFn:null;var n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,f(t.minDate)||(t.minDate=!1),f(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate<t.minDate&&(t.maxDate=t.minDate=!1),t.minDate&&(w(t.minDate),t.minYear=t.minDate.getFullYear(),t.minMonth=t.minDate.getMonth()),t.maxDate&&(w(t.maxDate),t.maxYear=t.maxDate.getFullYear(),t.maxMonth=t.maxDate.getMonth()),h(t.yearRange)){var o=(new Date).getFullYear()-10;t.yearRange[0]=parseInt(t.yearRange[0],10)||o,t.yearRange[1]=parseInt(t.yearRange[1],10)||o}else t.yearRange=Math.abs(parseInt(t.yearRange,10))||C.yearRange,t.yearRange>100&&(t.yearRange=100);return t},toString:function(n){return f(this._d)?t?e(this._d).format(n||this._o.format):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(n,o){t&&e.isMoment(n)&&this.setDate(n.toDate(),o)},getDate:function(){return f(this._d)?new Date(this._d.getTime()):null},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",a(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),f(e)){var n=this._o.minDate,o=this._o.maxDate;f(n)&&n>e?e=n:f(o)&&e>o&&(e=o),this._d=new Date(e.getTime()),w(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),a(this._o.field,"change",{firedBy:this})),t||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},gotoDate:function(e){var t=!0;if(f(e)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),o=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),r=e.getTime();o.setMonth(o.getMonth()+1),o.setDate(o.getDate()-1),t=r<n.getTime()||o.getTime()<r}t&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}],"right"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustCalendars:function(){this.calendars[0]=b(this.calendars[0]);for(var e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=b({month:this.calendars[0].month+e,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())},setMinDate:function(e){this._o.minDate=e},setMaxDate:function(e){this._o.maxDate=e},draw:function(e){if(this._v||e){var t=this._o,n=t.minYear,o=t.maxYear,i=t.minMonth,s=t.maxMonth,a="";this._y<=n&&(this._y=n,!isNaN(i)&&this._m<i&&(this._m=i)),this._y>=o&&(this._y=o,!isNaN(s)&&this._m>s&&(this._m=s));for(var l=0;l<t.numberOfMonths;l++)a+='<div class="pika-lendar">'+H(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year)+this.render(this.calendars[l].year,this.calendars[l].month)+"</div>";if(this.el.innerHTML=a,t.bound&&"hidden"!==t.field.type&&r(function(){t.trigger.focus()},1),"function"==typeof this._o.onDraw){var u=this;r(function(){u._o.onDraw.call(u)},0)}}},adjustPosition:function(){if(!this._o.container){var e,t,n,r=this._o.trigger,i=r,s=this.el.offsetWidth,a=this.el.offsetHeight,l=window.innerWidth||o.documentElement.clientWidth,u=window.innerHeight||o.documentElement.clientHeight,d=window.pageYOffset||o.body.scrollTop||o.documentElement.scrollTop;if("function"==typeof r.getBoundingClientRect)n=r.getBoundingClientRect(),e=n.left+window.pageXOffset,t=n.bottom+window.pageYOffset;else for(e=i.offsetLeft,t=i.offsetTop+i.offsetHeight;i=i.offsetParent;)e+=i.offsetLeft,t+=i.offsetTop;(this._o.reposition&&e+s>l||this._o.position.indexOf("right")>-1&&e-s+r.offsetWidth>0)&&(e=e-s+r.offsetWidth),(this._o.reposition&&t+a>u+d||this._o.position.indexOf("top")>-1&&t-a-r.offsetHeight>0)&&(t=t-a-r.offsetHeight),this.el.style.cssText=["position: absolute","left: "+e+"px","top: "+t+"px"].join(";")}},render:function(e,t){var n=this._o,o=new Date,r=m(e,t),i=new Date(e,t,1).getDay(),s=[],a=[];w(o),n.firstDay>0&&(i-=n.firstDay,0>i&&(i+=7));for(var l=r+i,u=l;u>7;)u-=7;l+=7-u;for(var d=0,c=0;l>d;d++){var h=new Date(e,t,1+(d-i)),g=f(this._d)?v(h,this._d):!1,y=v(h,o),b=i>d||d>=r+i,C=n.minDate&&h<n.minDate||n.maxDate&&h>n.maxDate||n.disableWeekends&&p(h)||n.disableDayFn&&n.disableDayFn(h);a.push(S(1+(d-i),t,e,g,y,C,b)),7===++c&&(n.showWeekNumber&&a.unshift(E(d-i,t,e)),s.push(T(a,n.isRTL)),a=[],c=0)}return M(n,s)},isVisible:function(){return this._v},show:function(){this._v||(c(this.el,"is-hidden"),this._v=!0,this.draw(),this._o.bound&&(i(o,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var e=this._v;e!==!1&&(this._o.bound&&s(o,"click",this._onClick),this.el.style.cssText="",d(this.el,"is-hidden"),this._v=!1,void 0!==e&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){this.hide(),s(this.el,"mousedown",this._onMouseDown,!0),s(this.el,"change",this._onChange),this._o.field&&(s(this._o.field,"change",this._onInputChange),this._o.bound&&(s(this._o.trigger,"click",this._onInputClick),s(this._o.trigger,"focus",this._onInputFocus),s(this._o.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},O})},{moment:"moment"}],zeroclipboard:[function(t,n,o){/*!
* ZeroClipboard
* The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.
* Copyright (c) 2009-2014 Jon Rohan, James M. Greene
* Licensed MIT
* http://zeroclipboard.org/
* v2.2.0
*/
!function(t,o){"use strict";var r,i,s,a=t,l=a.document,u=a.navigator,d=a.setTimeout,c=a.clearTimeout,h=a.setInterval,f=a.clearInterval,p=a.getComputedStyle,g=a.encodeURIComponent,m=a.ActiveXObject,w=a.Error,v=a.Number.parseInt||a.parseInt,y=a.Number.parseFloat||a.parseFloat,b=a.Number.isNaN||a.isNaN,C=a.Date.now,R=a.Object.keys,S=a.Object.defineProperty,E=a.Object.prototype.hasOwnProperty,T=a.Array.prototype.slice,_=function(){var e=function(e){return e};if("function"==typeof a.wrap&&"function"==typeof a.unwrap)try{var t=l.createElement("div"),n=a.unwrap(t);1===t.nodeType&&n&&1===n.nodeType&&(e=a.unwrap)}catch(o){}return e}(),k=function(e){return T.call(e,0)},H=function(){var e,t,n,r,i,s,a=k(arguments),l=a[0]||{};for(e=1,t=a.length;t>e;e++)if(null!=(n=a[e]))for(r in n)E.call(n,r)&&(i=l[r],s=n[r],l!==s&&s!==o&&(l[r]=s));return l},M=function(e){var t,n,o,r;if("object"!=typeof e||null==e||"number"==typeof e.nodeType)t=e;else if("number"==typeof e.length)for(t=[],n=0,o=e.length;o>n;n++)E.call(e,n)&&(t[n]=M(e[n]));else{t={};for(r in e)E.call(e,r)&&(t[r]=M(e[r]))}return t},O=function(e,t){for(var n={},o=0,r=t.length;r>o;o++)t[o]in e&&(n[t[o]]=e[t[o]]);return n},D=function(e,t){var n={};for(var o in e)-1===t.indexOf(o)&&(n[o]=e[o]);return n},x=function(e){if(e)for(var t in e)E.call(e,t)&&delete e[t];return e},A=function(e,t){if(e&&1===e.nodeType&&e.ownerDocument&&t&&(1===t.nodeType&&t.ownerDocument&&t.ownerDocument===e.ownerDocument||9===t.nodeType&&!t.ownerDocument&&t===e.ownerDocument))do{if(e===t)return!0;e=e.parentNode}while(e);return!1},j=function(e){var t;return"string"==typeof e&&e&&(t=e.split("#")[0].split("?")[0],t=e.slice(0,e.lastIndexOf("/")+1)),t},P=function(e){var t,n;return"string"==typeof e&&e&&(n=e.match(/^(?:|[^:@]*@|.+\)@(?=http[s]?|file)|.+?\s+(?: at |@)(?:[^:\(]+ )*[\(]?)((?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/),n&&n[1]?t=n[1]:(n=e.match(/\)@((?:http[s]?|file):\/\/[\/]?.+?\/[^:\)]*?)(?::\d+)(?::\d+)?/),n&&n[1]&&(t=n[1]))),t},N=function(){var e,t;try{throw new w}catch(n){t=n}return t&&(e=t.sourceURL||t.fileName||P(t.stack)),e},L=function(){var e,t,n;if(l.currentScript&&(e=l.currentScript.src))return e;if(t=l.getElementsByTagName("script"),1===t.length)return t[0].src||o;if("readyState"in t[0])for(n=t.length;n--;)if("interactive"===t[n].readyState&&(e=t[n].src))return e;return"loading"===l.readyState&&(e=t[t.length-1].src)?e:(e=N())?e:o},W=function(){var e,t,n,r=l.getElementsByTagName("script");for(e=r.length;e--;){if(!(n=r[e].src)){t=null;break}if(n=j(n),null==t)t=n;else if(t!==n){t=null;break}}return t||o},I=function(){var e=j(L())||W()||"";return e+"ZeroClipboard.swf"},B=function(){return null==t.opener&&(!!t.top&&t!=t.top||!!t.parent&&t!=t.parent)}(),V={bridge:null,version:"0.0.0",pluginType:"unknown",disabled:null,outdated:null,sandboxed:null,unavailable:null,degraded:null,deactivated:null,overdue:null,ready:null},F="11.0.0",Y={},G={},z=null,U=0,$=0,X={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"}},K=["flash-unavailable","flash-degraded","flash-overdue","version-mismatch","config-mismatch","clipboard-error"],q=["flash-disabled","flash-outdated","flash-sandboxed","flash-unavailable","flash-degraded","flash-deactivated","flash-overdue"],Z=new RegExp("^flash-("+q.map(function(e){return e.replace(/^flash-/,"")}).join("|")+")$"),J=new RegExp("^flash-("+q.slice(1).map(function(e){return e.replace(/^flash-/,"")}).join("|")+")$"),Q={swfPath:I(),trustedDomains:t.location.host?[t.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},ee=function(e){if("object"==typeof e&&null!==e)for(var t in e)if(E.call(e,t))if(/^(?:forceHandCursor|title|zIndex|bubbleEvents)$/.test(t))Q[t]=e[t];else if(null==V.bridge)if("containerId"===t||"swfObjectId"===t){if(!ge(e[t]))throw new Error("The specified `"+t+"` value is not valid as an HTML4 Element ID");Q[t]=e[t]}else Q[t]=e[t];{if("string"!=typeof e||!e)return M(Q);if(E.call(Q,e))return Q[e]}},te=function(){return $e(),{browser:O(u,["userAgent","platform","appName"]),flash:D(V,["bridge"]),zeroclipboard:{version:Ke.version,config:Ke.config()}}},ne=function(){return!!(V.disabled||V.outdated||V.sandboxed||V.unavailable||V.degraded||V.deactivated)},oe=function(e,t){var n,i,s,a={};if("string"==typeof e&&e)s=e.toLowerCase().split(/\s+/);else if("object"==typeof e&&e&&"undefined"==typeof t)for(n in e)E.call(e,n)&&"string"==typeof n&&n&&"function"==typeof e[n]&&Ke.on(n,e[n]);if(s&&s.length){for(n=0,i=s.length;i>n;n++)e=s[n].replace(/^on/,""),a[e]=!0,Y[e]||(Y[e]=[]),Y[e].push(t);if(a.ready&&V.ready&&Ke.emit({type:"ready"}),a.error){for(n=0,i=q.length;i>n;n++)if(V[q[n].replace(/^flash-/,"")]===!0){Ke.emit({type:"error",name:q[n]});break}r!==o&&Ke.version!==r&&Ke.emit({type:"error",name:"version-mismatch",jsVersion:Ke.version,swfVersion:r})}}return Ke},re=function(e,t){var n,o,r,i,s;if(0===arguments.length)i=R(Y);else if("string"==typeof e&&e)i=e.split(/\s+/);else if("object"==typeof e&&e&&"undefined"==typeof t)for(n in e)E.call(e,n)&&"string"==typeof n&&n&&"function"==typeof e[n]&&Ke.off(n,e[n]);if(i&&i.length)for(n=0,o=i.length;o>n;n++)if(e=i[n].toLowerCase().replace(/^on/,""),s=Y[e],s&&s.length)if(t)for(r=s.indexOf(t);-1!==r;)s.splice(r,1),r=s.indexOf(t,r);else s.length=0;return Ke},ie=function(e){var t;return t="string"==typeof e&&e?M(Y[e])||null:M(Y)},se=function(e){var t,n,o;return e=me(e),e&&!Se(e)?"ready"===e.type&&V.overdue===!0?Ke.emit({type:"error",name:"flash-overdue"}):(t=H({},e),Ce.call(this,t),"copy"===e.type&&(o=De(G),n=o.data,z=o.formatMap),n):void 0},ae=function(){var e=V.sandboxed;if($e(),"boolean"!=typeof V.ready&&(V.ready=!1),V.sandboxed!==e&&V.sandboxed===!0)V.ready=!1,Ke.emit({type:"error",name:"flash-sandboxed"});else if(!Ke.isFlashUnusable()&&null===V.bridge){var t=Q.flashLoadTimeout;"number"==typeof t&&t>=0&&(U=d(function(){"boolean"!=typeof V.deactivated&&(V.deactivated=!0),V.deactivated===!0&&Ke.emit({type:"error",name:"flash-deactivated"})},t)),V.overdue=!1,Me()}},le=function(){Ke.clearData(),Ke.blur(),Ke.emit("destroy"),Oe(),Ke.off()},ue=function(e,t){var n;if("object"==typeof e&&e&&"undefined"==typeof t)n=e,Ke.clearData();else{if("string"!=typeof e||!e)return;n={},n[e]=t}for(var o in n)"string"==typeof o&&o&&E.call(n,o)&&"string"==typeof n[o]&&n[o]&&(G[o]=n[o])},de=function(e){"undefined"==typeof e?(x(G),z=null):"string"==typeof e&&E.call(G,e)&&delete G[e]},ce=function(e){return"undefined"==typeof e?M(G):"string"==typeof e&&E.call(G,e)?G[e]:void 0},he=function(e){if(e&&1===e.nodeType){i&&(Ie(i,Q.activeClass),i!==e&&Ie(i,Q.hoverClass)),i=e,We(e,Q.hoverClass);var t=e.getAttribute("title")||Q.title;if("string"==typeof t&&t){var n=He(V.bridge);n&&n.setAttribute("title",t)}var o=Q.forceHandCursor===!0||"pointer"===Be(e,"cursor");ze(o),Ge()}},fe=function(){var e=He(V.bridge);e&&(e.removeAttribute("title"),e.style.left="0px",e.style.top="-9999px",e.style.width="1px",e.style.height="1px"),i&&(Ie(i,Q.hoverClass),Ie(i,Q.activeClass),i=null)},pe=function(){return i||null},ge=function(e){return"string"==typeof e&&e&&/^[A-Za-z][A-Za-z0-9_:\-\.]*$/.test(e)},me=function(e){var t;if("string"==typeof e&&e?(t=e,e={}):"object"==typeof e&&e&&"string"==typeof e.type&&e.type&&(t=e.type),t){t=t.toLowerCase(),!e.target&&(/^(copy|aftercopy|_click)$/.test(t)||"error"===t&&"clipboard-error"===e.name)&&(e.target=s),H(e,{type:t,target:e.target||i||null,relatedTarget:e.relatedTarget||null,currentTarget:V&&V.bridge||null,timeStamp:e.timeStamp||C()||null});var n=X[e.type];return"error"===e.type&&e.name&&n&&(n=n[e.name]),n&&(e.message=n),"ready"===e.type&&H(e,{target:null,version:V.version}),"error"===e.type&&(Z.test(e.name)&&H(e,{target:null,minimumVersion:F}),J.test(e.name)&&H(e,{version:V.version})),"copy"===e.type&&(e.clipboardData={setData:Ke.setData,clearData:Ke.clearData}),"aftercopy"===e.type&&(e=xe(e,z)),e.target&&!e.relatedTarget&&(e.relatedTarget=we(e.target)),ve(e)}},we=function(e){var t=e&&e.getAttribute&&e.getAttribute("data-clipboard-target");return t?l.getElementById(t):null},ve=function(e){if(e&&/^_(?:click|mouse(?:over|out|down|up|move))$/.test(e.type)){var t=e.target,n="_mouseover"===e.type&&e.relatedTarget?e.relatedTarget:o,r="_mouseout"===e.type&&e.relatedTarget?e.relatedTarget:o,i=Ve(t),s=a.screenLeft||a.screenX||0,u=a.screenTop||a.screenY||0,d=l.body.scrollLeft+l.documentElement.scrollLeft,c=l.body.scrollTop+l.documentElement.scrollTop,h=i.left+("number"==typeof e._stageX?e._stageX:0),f=i.top+("number"==typeof e._stageY?e._stageY:0),p=h-d,g=f-c,m=s+p,w=u+g,v="number"==typeof e.movementX?e.movementX:0,y="number"==typeof e.movementY?e.movementY:0;delete e._stageX,delete e._stageY,H(e,{srcElement:t,fromElement:n,toElement:r,screenX:m,screenY:w,pageX:h,pageY:f,clientX:p,clientY:g,x:p,y:g,movementX:v,movementY:y,offsetX:0,offsetY:0,layerX:0,layerY:0})}return e},ye=function(e){var t=e&&"string"==typeof e.type&&e.type||"";return!/^(?:(?:before)?copy|destroy)$/.test(t)},be=function(e,t,n,o){o?d(function(){e.apply(t,n)},0):e.apply(t,n)},Ce=function(e){if("object"==typeof e&&e&&e.type){var t=ye(e),n=Y["*"]||[],o=Y[e.type]||[],r=n.concat(o);if(r&&r.length){var i,s,l,u,d,c=this;for(i=0,s=r.length;s>i;i++)l=r[i],u=c,"string"==typeof l&&"function"==typeof a[l]&&(l=a[l]),"object"==typeof l&&l&&"function"==typeof l.handleEvent&&(u=l,l=l.handleEvent),"function"==typeof l&&(d=H({},e),be(l,u,[d],t))}return this}},Re=function(e){var t=null;return(B===!1||e&&"error"===e.type&&e.name&&-1!==K.indexOf(e.name))&&(t=!1),t},Se=function(e){var t=e.target||i||null,n="swf"===e._source;switch(delete e._source,e.type){case"error":var o="flash-sandboxed"===e.name||Re(e);"boolean"==typeof o&&(V.sandboxed=o),-1!==q.indexOf(e.name)?H(V,{disabled:"flash-disabled"===e.name,outdated:"flash-outdated"===e.name,unavailable:"flash-unavailable"===e.name,degraded:"flash-degraded"===e.name,deactivated:"flash-deactivated"===e.name,overdue:"flash-overdue"===e.name,ready:!1}):"version-mismatch"===e.name&&(r=e.swfVersion,H(V,{disabled:!1,outdated:!1,unavailable:!1,degraded:!1,deactivated:!1,overdue:!1,ready:!1})),Ye();break;case"ready":r=e.swfVersion;var a=V.deactivated===!0;H(V,{disabled:!1,outdated:!1,sandboxed:!1,unavailable:!1,degraded:!1,deactivated:!1,overdue:a,ready:!a}),Ye();break;case"beforecopy":s=t;break;case"copy":var l,u,d=e.relatedTarget;!G["text/html"]&&!G["text/plain"]&&d&&(u=d.value||d.outerHTML||d.innerHTML)&&(l=d.value||d.textContent||d.innerText)?(e.clipboardData.clearData(),e.clipboardData.setData("text/plain",l),u!==l&&e.clipboardData.setData("text/html",u)):!G["text/plain"]&&e.target&&(l=e.target.getAttribute("data-clipboard-text"))&&(e.clipboardData.clearData(),e.clipboardData.setData("text/plain",l));break;case"aftercopy":Ee(e),Ke.clearData(),t&&t!==Le()&&t.focus&&t.focus();break;case"_mouseover":Ke.focus(t),Q.bubbleEvents===!0&&n&&(t&&t!==e.relatedTarget&&!A(e.relatedTarget,t)&&Te(H({},e,{type:"mouseenter",bubbles:!1,cancelable:!1})),Te(H({},e,{type:"mouseover"})));break;case"_mouseout":Ke.blur(),Q.bubbleEvents===!0&&n&&(t&&t!==e.relatedTarget&&!A(e.relatedTarget,t)&&Te(H({},e,{type:"mouseleave",bubbles:!1,cancelable:!1})),Te(H({},e,{type:"mouseout"})));break;case"_mousedown":We(t,Q.activeClass),Q.bubbleEvents===!0&&n&&Te(H({},e,{type:e.type.slice(1)}));break;case"_mouseup":Ie(t,Q.activeClass),Q.bubbleEvents===!0&&n&&Te(H({},e,{type:e.type.slice(1)}));break;case"_click":s=null,Q.bubbleEvents===!0&&n&&Te(H({},e,{type:e.type.slice(1)}));break;case"_mousemove":Q.bubbleEvents===!0&&n&&Te(H({},e,{type:e.type.slice(1)}))}return/^_(?:click|mouse(?:over|out|down|up|move))$/.test(e.type)?!0:void 0},Ee=function(e){if(e.errors&&e.errors.length>0){var t=M(e);H(t,{type:"error",name:"clipboard-error"}),delete t.success,d(function(){Ke.emit(t)},0)}},Te=function(e){if(e&&"string"==typeof e.type&&e){var t,n=e.target||null,o=n&&n.ownerDocument||l,r={view:o.defaultView||a,canBubble:!0,cancelable:!0,detail:"click"===e.type?1:0,button:"number"==typeof e.which?e.which-1:"number"==typeof e.button?e.button:o.createEvent?0:1},i=H(r,e);n&&o.createEvent&&n.dispatchEvent&&(i=[i.type,i.canBubble,i.cancelable,i.view,i.detail,i.screenX,i.screenY,i.clientX,i.clientY,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.button,i.relatedTarget],t=o.createEvent("MouseEvents"),t.initMouseEvent&&(t.initMouseEvent.apply(t,i),t._source="js",n.dispatchEvent(t)))}},_e=function(){var e=Q.flashLoadTimeout;if("number"==typeof e&&e>=0){var t=Math.min(1e3,e/10),n=Q.swfObjectId+"_fallbackContent";$=h(function(){var e=l.getElementById(n);Fe(e)&&(Ye(),V.deactivated=null,Ke.emit({type:"error",name:"swf-not-found"}))},t)}},ke=function(){var e=l.createElement("div");return e.id=Q.containerId,e.className=Q.containerClass,e.style.position="absolute",e.style.left="0px",e.style.top="-9999px",e.style.width="1px",e.style.height="1px",e.style.zIndex=""+Ue(Q.zIndex),e},He=function(e){for(var t=e&&e.parentNode;t&&"OBJECT"===t.nodeName&&t.parentNode;)t=t.parentNode;return t||null},Me=function(){var e,t=V.bridge,n=He(t);if(!t){var o=Ne(a.location.host,Q),r="never"===o?"none":"all",i=je(H({jsVersion:Ke.version},Q)),s=Q.swfPath+Ae(Q.swfPath,Q);n=ke();var u=l.createElement("div");n.appendChild(u),l.body.appendChild(n);var d=l.createElement("div"),c="activex"===V.pluginType;d.innerHTML='<object id="'+Q.swfObjectId+'" name="'+Q.swfObjectId+'" width="100%" height="100%" '+(c?'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"':'type="application/x-shockwave-flash" data="'+s+'"')+">"+(c?'<param name="movie" value="'+s+'"/>':"")+'<param name="allowScriptAccess" value="'+o+'"/><param name="allowNetworking" value="'+r+'"/><param name="menu" value="false"/><param name="wmode" value="transparent"/><param name="flashvars" value="'+i+'"/><div id="'+Q.swfObjectId+'_fallbackContent"> </div></object>',t=d.firstChild,d=null,_(t).ZeroClipboard=Ke,n.replaceChild(t,u),_e()}return t||(t=l[Q.swfObjectId],t&&(e=t.length)&&(t=t[e-1]),!t&&n&&(t=n.firstChild)),V.bridge=t||null,t},Oe=function(){var e=V.bridge;if(e){var t=He(e);t&&("activex"===V.pluginType&&"readyState"in e?(e.style.display="none",function n(){if(4===e.readyState){for(var o in e)"function"==typeof e[o]&&(e[o]=null);e.parentNode&&e.parentNode.removeChild(e),t.parentNode&&t.parentNode.removeChild(t)}else d(n,10)}()):(e.parentNode&&e.parentNode.removeChild(e),t.parentNode&&t.parentNode.removeChild(t))),Ye(),V.ready=null,V.bridge=null,V.deactivated=null,r=o}},De=function(e){var t={},n={};if("object"==typeof e&&e){for(var o in e)if(o&&E.call(e,o)&&"string"==typeof e[o]&&e[o])switch(o.toLowerCase()){case"text/plain":case"text":case"air:text":case"flash:text":t.text=e[o],n.text=o;break;case"text/html":case"html":case"air:html":case"flash:html":t.html=e[o],n.html=o;break;case"application/rtf":case"text/rtf":case"rtf":case"richtext":case"air:rtf":case"flash:rtf":t.rtf=e[o],n.rtf=o}return{data:t,formatMap:n}}},xe=function(e,t){if("object"!=typeof e||!e||"object"!=typeof t||!t)return e;var n={};for(var o in e)if(E.call(e,o))if("errors"===o){n[o]=e[o]?e[o].slice():[];for(var r=0,i=n[o].length;i>r;r++)n[o][r].format=t[n[o][r].format]}else if("success"!==o&&"data"!==o)n[o]=e[o];else{n[o]={};var s=e[o];for(var a in s)a&&E.call(s,a)&&E.call(t,a)&&(n[o][t[a]]=s[a])}return n},Ae=function(e,t){var n=null==t||t&&t.cacheBust===!0;return n?(-1===e.indexOf("?")?"?":"&")+"noCache="+C():""},je=function(e){var t,n,o,r,i="",s=[];if(e.trustedDomains&&("string"==typeof e.trustedDomains?r=[e.trustedDomains]:"object"==typeof e.trustedDomains&&"length"in e.trustedDomains&&(r=e.trustedDomains)),r&&r.length)for(t=0,n=r.length;n>t;t++)if(E.call(r,t)&&r[t]&&"string"==typeof r[t]){if(o=Pe(r[t]),!o)continue;if("*"===o){s.length=0,s.push(o);break}s.push.apply(s,[o,"//"+o,a.location.protocol+"//"+o])}return s.length&&(i+="trustedOrigins="+g(s.join(","))),e.forceEnhancedClipboard===!0&&(i+=(i?"&":"")+"forceEnhancedClipboard=true"),"string"==typeof e.swfObjectId&&e.swfObjectId&&(i+=(i?"&":"")+"swfObjectId="+g(e.swfObjectId)),"string"==typeof e.jsVersion&&e.jsVersion&&(i+=(i?"&":"")+"jsVersion="+g(e.jsVersion)),i},Pe=function(e){if(null==e||""===e)return null;if(e=e.replace(/^\s+|\s+$/g,""),""===e)return null;var t=e.indexOf("//");e=-1===t?e:e.slice(t+2);var n=e.indexOf("/");return e=-1===n?e:-1===t||0===n?null:e.slice(0,n),e&&".swf"===e.slice(-4).toLowerCase()?null:e||null},Ne=function(){var e=function(e){var t,n,o,r=[];if("string"==typeof e&&(e=[e]),"object"!=typeof e||!e||"number"!=typeof e.length)return r;for(t=0,n=e.length;n>t;t++)if(E.call(e,t)&&(o=Pe(e[t]))){if("*"===o){r.length=0,r.push("*");break}-1===r.indexOf(o)&&r.push(o)}return r};return function(t,n){var o=Pe(n.swfPath);null===o&&(o=t);var r=e(n.trustedDomains),i=r.length;if(i>0){if(1===i&&"*"===r[0])return"always";if(-1!==r.indexOf(t))return 1===i&&t===o?"sameDomain":"always"}return"never"}}(),Le=function(){try{return l.activeElement}catch(e){return null}},We=function(e,t){var n,o,r,i=[];if("string"==typeof t&&t&&(i=t.split(/\s+/)),e&&1===e.nodeType&&i.length>0)if(e.classList)for(n=0,o=i.length;o>n;n++)e.classList.add(i[n]);else if(e.hasOwnProperty("className")){for(r=" "+e.className+" ",n=0,o=i.length;o>n;n++)-1===r.indexOf(" "+i[n]+" ")&&(r+=i[n]+" ");e.className=r.replace(/^\s+|\s+$/g,"")}return e},Ie=function(e,t){var n,o,r,i=[];if("string"==typeof t&&t&&(i=t.split(/\s+/)),e&&1===e.nodeType&&i.length>0)if(e.classList&&e.classList.length>0)for(n=0,o=i.length;o>n;n++)e.classList.remove(i[n]);else if(e.className){for(r=(" "+e.className+" ").replace(/[\r\n\t]/g," "),n=0,o=i.length;o>n;n++)r=r.replace(" "+i[n]+" "," ");e.className=r.replace(/^\s+|\s+$/g,"")}return e},Be=function(e,t){var n=p(e,null).getPropertyValue(t);return"cursor"!==t||n&&"auto"!==n||"A"!==e.nodeName?n:"pointer"},Ve=function(e){var t={left:0,top:0,width:0,height:0};if(e.getBoundingClientRect){var n=e.getBoundingClientRect(),o=a.pageXOffset,r=a.pageYOffset,i=l.documentElement.clientLeft||0,s=l.documentElement.clientTop||0,u=0,d=0;if("relative"===Be(l.body,"position")){var c=l.body.getBoundingClientRect(),h=l.documentElement.getBoundingClientRect();u=c.left-h.left||0,d=c.top-h.top||0}t.left=n.left+o-i-u,t.top=n.top+r-s-d,t.width="width"in n?n.width:n.right-n.left,t.height="height"in n?n.height:n.bottom-n.top}return t},Fe=function(e){if(!e)return!1;var t=p(e,null),n=y(t.height)>0,o=y(t.width)>0,r=y(t.top)>=0,i=y(t.left)>=0,s=n&&o&&r&&i,a=s?null:Ve(e),l="none"!==t.display&&"collapse"!==t.visibility&&(s||!!a&&(n||a.height>0)&&(o||a.width>0)&&(r||a.top>=0)&&(i||a.left>=0));return l},Ye=function(){c(U),U=0,f($),$=0},Ge=function(){var e;if(i&&(e=He(V.bridge))){var t=Ve(i);H(e.style,{width:t.width+"px",height:t.height+"px",top:t.top+"px",left:t.left+"px",zIndex:""+Ue(Q.zIndex)})}},ze=function(e){V.ready===!0&&(V.bridge&&"function"==typeof V.bridge.setHandCursor?V.bridge.setHandCursor(e):V.ready=!1)},Ue=function(e){if(/^(?:auto|inherit)$/.test(e))return e;var t;return"number"!=typeof e||b(e)?"string"==typeof e&&(t=Ue(v(e,10))):t=e,"number"==typeof t?t:"auto"},$e=function(e){var n,o,r,i=V.sandboxed,s=null;if(e=e===!0,B===!1)s=!1;else{try{o=t.frameElement||null}catch(a){r={name:a.name,message:a.message}}if(o&&1===o.nodeType&&"IFRAME"===o.nodeName)try{s=o.hasAttribute("sandbox")}catch(a){s=null}else{try{n=document.domain||null}catch(a){n=null}(null===n||r&&"SecurityError"===r.name&&/(^|[\s\(\[@])sandbox(es|ed|ing|[\s\.,!\)\]@]|$)/.test(r.message.toLowerCase()))&&(s=!0)}}return V.sandboxed=s,i===s||e||Xe(m),s},Xe=function(e){function t(e){var t=e.match(/[\d]+/g);return t.length=3,t.join(".")}function n(e){return!!e&&(e=e.toLowerCase())&&(/^(pepflashplayer\.dll|libpepflashplayer\.so|pepperflashplayer\.plugin)$/.test(e)||"chrome.plugin"===e.slice(-13))}function o(e){e&&(a=!0,e.version&&(c=t(e.version)),!c&&e.description&&(c=t(e.description)),e.filename&&(d=n(e.filename)))}var r,i,s,a=!1,l=!1,d=!1,c="";if(u.plugins&&u.plugins.length)r=u.plugins["Shockwave Flash"],o(r),u.plugins["Shockwave Flash 2.0"]&&(a=!0,c="2.0.0.11");else if(u.mimeTypes&&u.mimeTypes.length)s=u.mimeTypes["application/x-shockwave-flash"],r=s&&s.enabledPlugin,o(r);else if("undefined"!=typeof e){l=!0;try{i=new e("ShockwaveFlash.ShockwaveFlash.7"),a=!0,c=t(i.GetVariable("$version"))}catch(h){try{i=new e("ShockwaveFlash.ShockwaveFlash.6"),a=!0,c="6.0.21"}catch(f){try{i=new e("ShockwaveFlash.ShockwaveFlash"),a=!0,c=t(i.GetVariable("$version"))}catch(p){l=!1}}}}V.disabled=a!==!0,V.outdated=c&&y(c)<y(F),V.version=c||"0.0.0",V.pluginType=d?"pepper":l?"activex":a?"netscape":"unknown"};Xe(m),$e(!0);var Ke=function(){return this instanceof Ke?void("function"==typeof Ke._createClient&&Ke._createClient.apply(this,k(arguments))):new Ke};S(Ke,"version",{value:"2.2.0",writable:!1,configurable:!0,enumerable:!0}),Ke.config=function(){return ee.apply(this,k(arguments))},Ke.state=function(){return te.apply(this,k(arguments))},Ke.isFlashUnusable=function(){return ne.apply(this,k(arguments))},Ke.on=function(){return oe.apply(this,k(arguments))},Ke.off=function(){return re.apply(this,k(arguments))},Ke.handlers=function(){return ie.apply(this,k(arguments))},Ke.emit=function(){return se.apply(this,k(arguments))},Ke.create=function(){return ae.apply(this,k(arguments))},Ke.destroy=function(){return le.apply(this,k(arguments))},Ke.setData=function(){return ue.apply(this,k(arguments))},Ke.clearData=function(){return de.apply(this,k(arguments))},Ke.getData=function(){return ce.apply(this,k(arguments))},Ke.focus=Ke.activate=function(){return he.apply(this,k(arguments))},Ke.blur=Ke.deactivate=function(){return fe.apply(this,k(arguments))},Ke.activeElement=function(){return pe.apply(this,k(arguments))};var qe=0,Ze={},Je=0,Qe={},et={};H(Q,{autoActivate:!0});var tt=function(e){var t=this;t.id=""+qe++,Ze[t.id]={instance:t,elements:[],handlers:{}},e&&t.clip(e),Ke.on("*",function(e){return t.emit(e)}),Ke.on("destroy",function(){t.destroy()}),Ke.create()},nt=function(e,t){var n,i,s,a={},l=Ze[this.id],u=l&&l.handlers;if(!l)throw new Error("Attempted to add new listener(s) to a destroyed ZeroClipboard client instance");if("string"==typeof e&&e)s=e.toLowerCase().split(/\s+/);else if("object"==typeof e&&e&&"undefined"==typeof t)for(n in e)E.call(e,n)&&"string"==typeof n&&n&&"function"==typeof e[n]&&this.on(n,e[n]);if(s&&s.length){for(n=0,i=s.length;i>n;n++)e=s[n].replace(/^on/,""),a[e]=!0,u[e]||(u[e]=[]),u[e].push(t);if(a.ready&&V.ready&&this.emit({type:"ready",client:this}),a.error){for(n=0,i=q.length;i>n;n++)if(V[q[n].replace(/^flash-/,"")]){this.emit({type:"error",name:q[n],client:this});break}r!==o&&Ke.version!==r&&this.emit({type:"error",name:"version-mismatch",jsVersion:Ke.version,swfVersion:r})}}return this},ot=function(e,t){var n,o,r,i,s,a=Ze[this.id],l=a&&a.handlers;if(!l)return this;if(0===arguments.length)i=R(l);else if("string"==typeof e&&e)i=e.split(/\s+/);else if("object"==typeof e&&e&&"undefined"==typeof t)for(n in e)E.call(e,n)&&"string"==typeof n&&n&&"function"==typeof e[n]&&this.off(n,e[n]);if(i&&i.length)for(n=0,o=i.length;o>n;n++)if(e=i[n].toLowerCase().replace(/^on/,""),s=l[e],s&&s.length)if(t)for(r=s.indexOf(t);-1!==r;)s.splice(r,1),r=s.indexOf(t,r);else s.length=0;return this},rt=function(e){var t=null,n=Ze[this.id]&&Ze[this.id].handlers;return n&&(t="string"==typeof e&&e?n[e]?n[e].slice(0):[]:M(n)),t},it=function(e){if(dt.call(this,e)){"object"==typeof e&&e&&"string"==typeof e.type&&e.type&&(e=H({},e));var t=H({},me(e),{client:this});ct.call(this,t)}return this},st=function(e){if(!Ze[this.id])throw new Error("Attempted to clip element(s) to a destroyed ZeroClipboard client instance");e=ht(e);for(var t=0;t<e.length;t++)if(E.call(e,t)&&e[t]&&1===e[t].nodeType){e[t].zcClippingId?-1===Qe[e[t].zcClippingId].indexOf(this.id)&&Qe[e[t].zcClippingId].push(this.id):(e[t].zcClippingId="zcClippingId_"+Je++,Qe[e[t].zcClippingId]=[this.id],Q.autoActivate===!0&&ft(e[t]));var n=Ze[this.id]&&Ze[this.id].elements;-1===n.indexOf(e[t])&&n.push(e[t])}return this},at=function(e){var t=Ze[this.id];if(!t)return this;var n,o=t.elements;e="undefined"==typeof e?o.slice(0):ht(e);for(var r=e.length;r--;)if(E.call(e,r)&&e[r]&&1===e[r].nodeType){for(n=0;-1!==(n=o.indexOf(e[r],n));)o.splice(n,1);var i=Qe[e[r].zcClippingId];if(i){for(n=0;-1!==(n=i.indexOf(this.id,n));)i.splice(n,1);0===i.length&&(Q.autoActivate===!0&&pt(e[r]),delete e[r].zcClippingId)}}return this},lt=function(){var e=Ze[this.id];return e&&e.elements?e.elements.slice(0):[]},ut=function(){Ze[this.id]&&(this.unclip(),this.off(),delete Ze[this.id])},dt=function(e){if(!e||!e.type)return!1;if(e.client&&e.client!==this)return!1;var t=Ze[this.id],n=t&&t.elements,o=!!n&&n.length>0,r=!e.target||o&&-1!==n.indexOf(e.target),i=e.relatedTarget&&o&&-1!==n.indexOf(e.relatedTarget),s=e.client&&e.client===this;return t&&(r||i||s)?!0:!1},ct=function(e){var t=Ze[this.id];if("object"==typeof e&&e&&e.type&&t){var n=ye(e),o=t&&t.handlers["*"]||[],r=t&&t.handlers[e.type]||[],i=o.concat(r);if(i&&i.length){var s,l,u,d,c,h=this;for(s=0,l=i.length;l>s;s++)u=i[s],d=h,"string"==typeof u&&"function"==typeof a[u]&&(u=a[u]),"object"==typeof u&&u&&"function"==typeof u.handleEvent&&(d=u,u=u.handleEvent),"function"==typeof u&&(c=H({},e),be(u,d,[c],n))}}},ht=function(e){return"string"==typeof e&&(e=[]),"number"!=typeof e.length?[e]:e},ft=function(e){if(e&&1===e.nodeType){var t=function(e){(e||(e=a.event))&&("js"!==e._source&&(e.stopImmediatePropagation(),e.preventDefault()),delete e._source)},n=function(n){(n||(n=a.event))&&(t(n),Ke.focus(e))};e.addEventListener("mouseover",n,!1),e.addEventListener("mouseout",t,!1),e.addEventListener("mouseenter",t,!1),e.addEventListener("mouseleave",t,!1),e.addEventListener("mousemove",t,!1),et[e.zcClippingId]={mouseover:n,mouseout:t,mouseenter:t,mouseleave:t,mousemove:t}}},pt=function(e){if(e&&1===e.nodeType){var t=et[e.zcClippingId];if("object"==typeof t&&t){for(var n,o,r=["move","leave","enter","out","over"],i=0,s=r.length;s>i;i++)n="mouse"+r[i],o=t[n],"function"==typeof o&&e.removeEventListener(n,o,!1);delete et[e.zcClippingId]}}};Ke._createClient=function(){tt.apply(this,k(arguments))},Ke.prototype.on=function(){return nt.apply(this,k(arguments))},Ke.prototype.off=function(){return ot.apply(this,k(arguments))},Ke.prototype.handlers=function(){return rt.apply(this,k(arguments))},Ke.prototype.emit=function(){return it.apply(this,k(arguments))},Ke.prototype.clip=function(){return st.apply(this,k(arguments))},Ke.prototype.unclip=function(){return at.apply(this,k(arguments))},Ke.prototype.elements=function(){return lt.apply(this,k(arguments))},Ke.prototype.destroy=function(){return ut.apply(this,k(arguments))},Ke.prototype.setText=function(e){if(!Ze[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Ke.setData("text/plain",e),this},Ke.prototype.setHtml=function(e){if(!Ze[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Ke.setData("text/html",e),this},Ke.prototype.setRichText=function(e){if(!Ze[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Ke.setData("application/rtf",e),this},Ke.prototype.setData=function(){if(!Ze[this.id])throw new Error("Attempted to set pending clipboard data from a destroyed ZeroClipboard client instance");return Ke.setData.apply(this,k(arguments)),this},Ke.prototype.clearData=function(){if(!Ze[this.id])throw new Error("Attempted to clear pending clipboard data from a destroyed ZeroClipboard client instance");return Ke.clearData.apply(this,k(arguments)),this},Ke.prototype.getData=function(){if(!Ze[this.id])throw new Error("Attempted to get pending clipboard data from a destroyed ZeroClipboard client instance");return Ke.getData.apply(this,k(arguments))},"function"==typeof e&&e.amd?e(function(){return Ke}):"object"==typeof n&&n&&"object"==typeof n.exports&&n.exports?n.exports=Ke:t.ZeroClipboard=Ke}(function(){return this||window}())},{}]},{},[23,47,48,49,65,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,66,67,68,69,86,87,88,72,73,74,75,76,77,31,35,32,33,40,34,36,37,38,39])("zeroclipboard")});