24 lines
386 KiB
JavaScript
24 lines
386 KiB
JavaScript
|
/*!
|
||
|
* Handsontable 0.18.0
|
||
|
* Handsontable is a JavaScript library for editable tables with basic copy-paste compatibility with Excel and Google Docs
|
||
|
*
|
||
|
* Copyright (c) 2012-2014 Marcin Warpechowski
|
||
|
* Copyright 2015 Handsoncode sp. z o.o. <hello@handsontable.com>
|
||
|
* Licensed under the MIT license.
|
||
|
* http://handsontable.com/
|
||
|
*
|
||
|
* Date: Thu Sep 10 2015 14:56:37 GMT+0200 (CEST)
|
||
|
*/
|
||
|
window.Handsontable={version:"0.18.0",buildDate:"Thu Sep 10 2015 14:56:37 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(l,a){if(!t[l]){if(!e[l]){var u="function"==typeof require&&require;if(!a&&u)return u(l,!0);if(i)return i(l,!0);if(s[l]&&"undefined"!=typeof window[s[l]])return window[s[l]];var c=new Error("Cannot find module '"+l+"'");throw c.code="MODULE_NOT_FOUND",c}var d=t[l]={exports:{}};e[l][0].call(d.exports,function(t){var n=e[l][1][t];return r(n?n:t)},d,d.exports,o,e,t,n)}return t[l].exports}for(var i="function"==typeof require&&require,s=JSON.parse('{"zeroclipboard":"ZeroClipboard","moment":"moment","pikaday":"Pikaday"}')||{},l=0;l<n.length;l++)r(n[l]);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,l=this.first(),a=l.data("handsontable");if("string"!=typeof e)return s=e||{},a?a.updateSettings(s):(a=new n.Core(l[0],s),l.data("handsontable",a),a.init()),l;if(r=[],arguments.length>1)for(t=1,o=arguments.length;o>t;t++)r.push(arguments[t]);if(a){if("undefined"==typeof a[e])throw new Error("Handsontable do not provide action: "+e);i=a[e].apply(a,r),"destroy"===e&&l.removeData()}return i}}(window,jQuery,Handsontable)},{}],2:[function(e,t,n){"use strict";Object.defineProperties(n,{WalkontableBorder:{get:function(){return w}},__esModule:{value:!0}});var o,r,i,s,l=(o=e("helpers/dom/element"),o&&o.__esModule&&o||{"default":o}),a=l.getComputedStyle,u=l.getTrimmingContainer,c=l.innerWidth,d=l.offset,h=l.outerHeight,f=l.outerWidth,g=(r=e("helpers/dom/event"),r&&r.__esModule&&r||{"default":r}).stopImmediatePropagation,p=(i=e("eventManager"),i&&i.__esModule&&i||{"default":i}).EventManager,m=(s=e("cell/coords"),s&&s.__esModule&&s||{"default":s}).WalkontableCellCoords,w=function(e,t){t&&(this.eventManager=new p(e),this.instance=e,this.wot=e,this.settings=t,this.mouseDown=!1,this.main=null,this.top=null,this.left=null,this.bottom=null,this.right=null,this.topStyle=null,this.leftStyle=null,this.bottomStyle=null,this.rightStyle=null,this.cornerDefaultStyle={width:"5px",height:"5px",borderWidth:"2px",borderStyle:"solid",borderColor:"#FFF"},this.corner=null,this.cornerStyle=null,this.createBorders(t),this.registerListeners())};$traceurRuntime.createClass(w,{registerListeners:function(){var e=this;this.eventManager.addEventListener(document.body,"mousedown",function(){return e.onMouseDown()}),this.eventManager.addEventListener(document.body,"mouseup",function(){return e.onMouseUp()});for(var t=0,n=this.main.childNodes.length;n>t;t++)this.eventManager.addEventListener(this.main.childNodes[t],"mouseenter",function(t){return e.onMouseEnter(t)})},onMouseDown:function(){this.mouseDown=!0},onMouseUp:function(){this.mouseDown=!1},onMouseEnter:function(e){function t(e){return e.clientY<Math.floor(r.top)?!0:e.clientY>Math.ceil(r.top+r.height)?!0:e.clientX<Math.floor(r.left)?!0:e.clientX>Math.ceil(r.left+r.width)?!0:void 0}function n(e){t(e)&&(o.eventManager.removeEventListener(document.body,"mousemove",n),o.style.display="block")}if(this.mouseDown&&this.wot.getSetting("hideBorderOnMouseDownOver")){e.preventDefault(),g(e);var o=this,r=this.getBoundingClientRect();this.style.display="none",this.eventManager.addEventListener(document.body,"mousemove",n)}},createBorders:function(e){this.main=document.createElement("div");var t=["top","left","bottom","right","corner"],n=this.main.style;n.position="absolute",n.top=0,n.left=0;for(var o=0;5>o;o++){var r=t[o],i=document.createElement("div");i.className="wtBorder "+(this.settings.className||""),this.settings[r]&&this.settings[r].hide&&(i.className+=" hidden"),n=i.style,n.backgroundColor=this.settings[r]&&this.settings[r].color?this.settings[r].color:e.border.color,n.
|
||
|
this.wtRootElement=this.wot.wtTable.wtRootElement,this.trimmingContainer=a(this.hider.parentNode.parentNode),this.mainTableScrollableElement=l(this.wot.wtTable.TABLE),this.needFullRender=this.shouldBeRendered(),this.areElementSizesAdjusted=!1},h=d;$traceurRuntime.createClass(d,{shouldBeRendered:function(){return!0},makeClone:function(e){if(-1===h.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(){c(this.clone).destroy()}},{get CLONE_TOP(){return"top"},get CLONE_LEFT(){return"left"},get CLONE_CORNER(){return"corner"},get CLONE_DEBUG(){return"debug"},get CLONE_TYPES(){return[h.CLONE_TOP,h.CLONE_LEFT,h.CLONE_CORNER,h.CLONE_DEBUG]}}),window.WalkontableOverlay=d},{eventManager:40,"helpers/dom/element":44,"helpers/object":49}],12:[function(e,t,n){"use strict";Object.defineProperties(n,{WalkontableCornerOverlay:{get:function(){return c}},__esModule:{value:!0}});var o,r,i=(o=e("helpers/dom/element"),o&&o.__esModule&&o||{"default":o}),s=i.outerHeight,l=i.outerWidth,a=i.setOverlayPosition,u=(r=e("_base"),r&&r.__esModule&&r||{"default":r}).WalkontableOverlay,c=function(e){$traceurRuntime.superConstructor(d).call(this,e),this.clone=this.makeClone(u.CLONE_CORNER)},d=c;$traceurRuntime.createClass(c,{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=s(this.clone.wtTable.TABLE),n=l(this.clone.wtTable.TABLE);if(this.trimmingContainer===window){var o,r,i=this.wot.wtTable.hider.getBoundingClientRect(),u=Math.ceil(i.top),c=Math.ceil(i.left),d=Math.ceil(i.bottom),h=Math.ceil(i.right);o=0>c&&h-e.offsetWidth>0?-c+"px":"0",r=0>u&&d-e.offsetHeight>0?-u+"px":"0",a(e,o,r)}e.style.height=(0===t?t:t+4)+"px",e.style.width=(0===n?n:n+4)+"px"}}},{},u),window.WalkontableCornerOverlay=c},{_base:11,"helpers/dom/element":44}],13:[function(e,t,n){"use strict";Object.defineProperties(n,{WalkontableDebugOverlay:{get:function(){return l}},__esModule:{value:!0}});var o,r,i=(o=e("helpers/dom/element"),o&&o.__esModule&&o||{"default":o}).addClass,s=(r=e("_base"),r&&r.__esModule&&r||{"default":r}).WalkontableOverlay,l=function(e){$traceurRuntime.superConstructor(a).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(this.clone.wtTable.holder.parentNode,"wtDebugVisible")},a=l;$traceurRuntime.createClass(l,{},{},s),window.WalkontableDebugOverlay=l},{_base:11,"helpers/dom/element":44}],14:[function(e,t,n){"use strict";Object.defineProperties(n,{WalkontableLeftOverlay:{get:function(){return p}},__esModule:{value:!0}});var o,r,i=(o=e("helpers/dom/element"),o&&o.__esModule&&o||{"default":o}),s=i.addClass,l=i.getScrollbarWidth,a=i.getScrollLeft,u=i.getWindowScrollTop,c=i.hasClass,d=i.outerWidth,h=i.removeClass,f=i.setOverlayPosition,g=(r=e("_base"),r&&r.__esModule&&r||{"default":r}).WalkontableOverlay,p=function(e){$traceurRuntime.superConstructor(m).call(this,e),this.clone=this.makeClone(g.CLONE_LEFT)},m=p;$traceurRuntime.createClass(p,{shouldBeRendered:function(){return this.wot.getSetting("fixedColumnsLeft")||this.wot.getSetting("rowHeaders").length?!0:!1},resetFixedPosition:function(){if(this.needFullRender&&this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=0
|
||
|
return this.wot.wtViewport.rowsVisibleCalculator.count},allRowsInViewport:function(){return this.wot.getSetting("totalRows")==this.getVisibleRowsCount()},getRowHeight:function(e){var t=this.wot.wtSettings.settings.rowHeight(e),n=this.wot.wtViewport.oversizedRows[e];return void 0!==n&&(t=t?Math.max(t,n):n),t},getColumnHeaderHeight:function(e){var t=this.wot.wtSettings.settings.defaultRowHeight,n=this.wot.wtViewport.oversizedColumnHeaders[e];return void 0!==n&&(t=t?Math.max(t,n):n),t},getVisibleColumnsCount:function(){return this.wot.wtViewport.columnsVisibleCalculator.count},allColumnsInViewport:function(){return this.wot.getSetting("totalColumns")==this.getVisibleColumnsCount()},getColumnWidth:function(e){var t=this.wot.wtSettings.settings.columnWidth;return"function"==typeof t?t=t(e):"object"==typeof t&&(t=t[e]),t||this.wot.wtSettings.settings.defaultColumnWidth},getStretchedColumnWidth:function(e){var t=this.getColumnWidth(e),n=this.wot.wtViewport.columnsRenderCalculator;if(n){var o=n.getStretchedColumnWidth(e,t);o&&(t=o)}return t}},{}),window.WalkontableTable=O},{"cell/coords":5,"cell/range":6,"filter/column":9,"filter/row":10,"helpers/dom/element":44,"overlay/corner":12,"overlay/debug":13,"overlay/left":14,"overlay/top":15,tableRenderer: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 h}},__esModule:{value:!0}});var i,s=(i=e("helpers/dom/element"),i&&i.__esModule&&i||{"default":i}),l=s.addClass,a=s.empty,u=s.getScrollbarWidth,c=s.hasClass,d=s.innerHeight,h=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(h,{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.renderColumnHeaders(),this.renderRows(r,n,t),this.wtTable.isWorkingOnClone()||(e=this.wot.wtViewport.getWorkspaceWidth(),this.wot.wtViewport.containerWidth=null),this.adjustColumnHeaderHeights(),this.adjustColumnWidths(t),this.markOversizedColumns()),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(),l=this.wtTable.getLastRenderedColumn(),a=s;l>a;a++){var u=this.wtTable.getStretchedColumnWidth(a),c=this.columnFilter.sourceToRendered(a);this.COLGROUP.childNodes[c+this.rowHeaderCount].style.width=u+"px"}}this.wot.getSetting("onDraw",!0)}},removeRedundantRows:function(e){for(;this.wtTable.tbodyChildrenLength>e;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength--},renderRows:function(e,t,n){for(var o,r,i=0,s=this.rowFilter.renderedToSource(i),l=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),l||this.resetOversizedRow
|
||
|
f.setRangeEnd(e,null,t)},setRangeEnd:function(e,t,n){if(null!==c.selRange){var o,r=!1,i=!0,s=p.view.wt.wtTable.getFirstVisibleRow(),l=p.view.wt.wtTable.getFirstVisibleColumn(),a={row:null,col:null};Handsontable.hooks.run(p,"beforeSetRangeEnd",e),p.selection.begin(),a.row=e.row<0?s:e.row,a.col=e.col<0?l:e.col,c.selRange.to=new F(a.row,a.col),c.settings.multiSelect||(c.selRange.from=e),p.view.wt.selections.current.clear(),o=p.getCellMeta(c.selRange.highlight.row,c.selRange.highlight.col).disableVisualSelection,"string"==typeof o&&(o=[o]),(o===!1||Array.isArray(o)&&-1===o.indexOf("current"))&&p.view.wt.selections.current.add(c.selRange.highlight),p.view.wt.selections.area.clear(),(o===!1||Array.isArray(o)&&-1===o.indexOf("area"))&&f.isMultiple()&&(p.view.wt.selections.area.add(c.selRange.from),p.view.wt.selections.area.add(c.selRange.to)),(c.settings.currentRowClassName||c.settings.currentColClassName)&&(p.view.wt.selections.highlight.clear(),p.view.wt.selections.highlight.add(c.selRange.from),p.view.wt.selections.highlight.add(c.selRange.to)),Handsontable.hooks.run(p,"afterSelection",c.selRange.from.row,c.selRange.from.col,c.selRange.to.row,c.selRange.to.col),Handsontable.hooks.run(p,"afterSelectionByProp",c.selRange.from.row,d.colToProp(c.selRange.from.col),c.selRange.to.row,d.colToProp(c.selRange.to.col)),(0===c.selRange.from.row&&c.selRange.to.row===p.countRows()-1&&p.countRows()>1||0===c.selRange.from.col&&c.selRange.to.col===p.countCols()-1&&p.countCols()>1)&&(r=!0),(e.row<0||e.col<0)&&(i=!1),t!==!1&&!r&&i&&(c.selRange.from&&!f.isMultiple()?p.view.scrollViewport(c.selRange.from):p.view.scrollViewport(e)),f.refreshBorders(null,n)}},refreshBorders:function(e,t){t||g.destroyEditor(e),p.view.render(),f.isSelected()&&!t&&g.prepareEditor()},isMultiple:function(){var e=!(c.selRange.to.col===c.selRange.from.col&&c.selRange.to.row===c.selRange.from.row),t=Handsontable.hooks.run(p,"afterIsMultipleSelection",e);return e?t:void 0},transformStart:function(e,t,n,o){var r,i,s,l=new F(e,t),a=0,u=0;p.runHooks("modifyTransformStart",l),r=p.countRows(),i=p.countCols(),c.selRange.highlight.row+e>r-1?n&&c.settings.minSpareRows>0?(p.alter("insert_row",r),r=p.countRows()):c.settings.autoWrapCol&&(l.row=1-r,l.col=c.selRange.highlight.col+l.col==i-1?1-i:1):c.settings.autoWrapCol&&c.selRange.highlight.row+l.row<0&&c.selRange.highlight.col+l.col>=0&&(l.row=r-1,l.col=c.selRange.highlight.col+l.col==0?i-1:-1),c.selRange.highlight.col+l.col>i-1?n&&c.settings.minSpareCols>0?(p.alter("insert_col",i),i=p.countCols()):c.settings.autoWrapRow&&(l.row=c.selRange.highlight.row+l.row==r-1?1-r:1,l.col=1-i):c.settings.autoWrapRow&&c.selRange.highlight.col+l.col<0&&c.selRange.highlight.row+l.row>=0&&(l.row=c.selRange.highlight.row+l.row==0?r-1:-1,l.col=i-1),s=new F(c.selRange.highlight.row+l.row,c.selRange.highlight.col+l.col),s.row<0?(a=-1,s.row=0):s.row>0&&s.row>=r&&(a=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),p.runHooks("afterModifyTransformStart",s,a,u),f.setRangeStart(s,o)},transformEnd:function(e,t){var n,o,r,i=new F(e,t),s=0,l=0;p.runHooks("modifyTransformEnd",i),n=p.countRows(),o=p.countCols(),r=new F(c.selRange.to.row+i.row,c.selRange.to.col+i.col),r.row<0?(s=-1,r.row=0):r.row>0&&r.row>=n&&(s=1,r.row=n-1),r.col<0?(l=-1,r.col=0):r.col>0&&r.col>=o&&(l=1,r.col=o-1),p.runHooks("afterModifyTransformEnd",r,s,l),f.setRangeEnd(r,!0)},isSelected:function(){return null!==c.selRange},inInSelection:function(e){return f.isSelected()?c.selRange.includes(e):!1},deselect:function(){f.isSelected()&&(p.selection.inProgress=!1,c.selRange=null,p.view.wt.selections.current.clear(),p.view.wt.selections.area.clear(),(c.settings.currentRowClassName||c.settings.currentColClassName)&&p.view.wt.selections.highlight.clear(),g.destroyEditor(),f.refreshBorders(),Handsontable.hooks.run(p,"afterDeselect"))},selectAll:function(){c.settings.multiSelect&&(f.setRangeStart(new F(0,0)),f.setRangeEnd(new F(p.countRows()-1,p.countCols()-1),!1))},empty:function(){if(f.isSelected()){var e,t,n=c.selRange.getTopLeftCorner(),o=c.selRange.getBottomRightCorner(),r=[]
|
||
|
s&&s.__esModule&&s||{"default":s}),p=g.stopPropagation,m=g.stopImmediatePropagation,w=g.isImmediatePropagationStopped,v=((l=e("editors"),l&&l.__esModule&&l||{"default":l}).getEditor,(a=e("eventManager"),a&&a.__esModule&&a||{"default":a}).eventManager);Handsontable.EditorManager=o},{"3rdparty/walkontable/src/cell/coords":5,editors:28,eventManager:40,"helpers/dom/event":45,"helpers/unicode":52}],28:[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&&(c[e]=n,Handsontable.editors[u(e)+"Editor"]=t),d.set(t,n)}function i(e,t){var n;if("function"==typeof e)d.get(e)||r(null,e),n=d.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter ');n=c[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=c[e],!t)throw Error('No editor registered under name "'+e+'"');return t.getConstructor()}function l(e){return c[e]?!0:!1}Object.defineProperties(n,{registerEditor:{get:function(){return r}},getEditor:{get:function(){return i}},hasEditor:{get:function(){return l}},getEditorConstructor:{get:function(){return s}},__esModule:{value:!0}});var a,u=(a=e("helpers/string"),a&&a.__esModule&&a||{"default":a}).toUpperCaseFirst,c={},d=new WeakMap;Handsontable.editors=Handsontable.editors||{},Handsontable.editors.registerEditor=r,Handsontable.editors.getEditor=i},{"helpers/string":51}],29:[function(e,t,n){"use strict";function o(e){this.instance=e,this.state=Handsontable.EditorState.VIRGIN,this._opened=!1,this._fullEditMode=!1,this._closeCallback=null,this.init()}Object.defineProperties(n,{BaseEditor:{get:function(){return o}},__esModule:{value:!0}});var r,i,s=(r=e("helpers/mixed"),r&&r.__esModule&&r||{"default":r}).stringify,l=(i=e("3rdparty/walkontable/src/cell/coords"),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 l(this.row,this.col)),this.instance.view.render(),this.state=Handsontable.EditorState.EDITING,e="string"==typeof e?e:this.originalValue,this.setValue(s(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._fi
|
||
|
u.rowHeaders?1:0,u.colHeaders?1:0;switch(a){case"top":e=f(this.instance.view.wt.wtOverlays.topOverlay.clone.wtTable.holder.parentNode);break;case"left":e=f(this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.holder.parentNode);break;case"corner":e=f(this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.holder.parentNode)}0===this.instance.getSelected()[0]&&(s+=1),0===this.instance.getSelected()[1]&&(l+=1);var c=this.select.style;e&&-1!=e?c[e[0]]=e[1]:v(this.select);var d=h(this.TD);parseInt(d.borderTopWidth,10)>0&&(n-=1),parseInt(d.borderLeftWidth,10)>0&&(t-=1),c.height=n+"px",c.minWidth=t+"px",c.top=s+"px",c.left=l+"px",c.margin="0px"}},S.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.select.style.zIndex=101;break;case"corner":e=this.instance.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=103;break;case"left":e=this.instance.view.wt.wtOverlays.leftOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=102;break;default:e=this.instance.getCell(this.row,this.col),this.select.style.zIndex=""}return-1!=e&&-2!=e?e:void 0},R("select",S)},{_baseEditor:29,editors:28,"helpers/dom/element":44,"helpers/dom/event":45,"helpers/unicode":52}],39:[function(e,t,n){"use strict";Object.defineProperties(n,{TextEditor:{get:function(){return k}},__esModule:{value:!0}});var o,r,i,s,l,a,u,c=(o=e("helpers/dom/element"),o&&o.__esModule&&o||{"default":o}),d=c.addClass,h=c.getCaretPosition,f=c.getComputedStyle,g=c.getCssTransform,p=c.getScrollableElement,m=c.innerWidth,w=c.offset,v=c.resetCssTransform,b=c.setCaretPosition,C=(r=e("autoResize"),r&&r.__esModule&&r||{"default":r})["default"],y=(i=e("_baseEditor"),i&&i.__esModule&&i||{"default":i}).BaseEditor,R=(s=e("eventManager"),s&&s.__esModule&&s||{"default":s}).eventManager,E=(l=e("editors"),l&&l.__esModule&&l||{"default":l}),S=(E.getEditor,E.registerEditor),T=(a=e("helpers/unicode"),a&&a.__esModule&&a||{"default":a}).KEY_CODES,H=(u=e("helpers/dom/event"),u&&u.__esModule&&u||{"default":u}),M=H.stopPropagation,_=H.stopImmediatePropagation,O=H.isImmediatePropagationStopped,k=y.prototype.extend();k.prototype.init=function(){var e=this;this.createElements(),this.eventManager=R(this),this.bindEvents(),this.autoResize=C(),this.instance.addHook("afterDestroy",function(){e.destroy()})},k.prototype.getValue=function(){return this.TEXTAREA.value},k.prototype.setValue=function(e){this.TEXTAREA.value=e};var A=function(e){var t,n=this,o=n.getActiveEditor();if(t=(e.ctrlKey||e.metaKey)&&!e.altKey,e.target===o.TEXTAREA&&!O(e)){if(17===e.keyCode||224===e.keyCode||91===e.keyCode||93===e.keyCode)return void _(e);switch(e.keyCode){case T.ARROW_RIGHT:o.isInFullEditMode()&&(!o.isWaiting()&&!o.allowKeyEventPropagation||!o.isWaiting()&&o.allowKeyEventPropagation&&!o.allowKeyEventPropagation(e.keyCode))&&_(e);break;case T.ARROW_LEFT:o.isInFullEditMode()&&(!o.isWaiting()&&!o.allowKeyEventPropagation||!o.isWaiting()&&o.allowKeyEventPropagation&&!o.allowKeyEventPropagation(e.keyCode))&&_(e);break;case T.ARROW_UP:case T.ARROW_DOWN:o.isInFullEditMode()&&(!o.isWaiting()&&!o.allowKeyEventPropagation||!o.isWaiting()&&o.allowKeyEventPropagation&&!o.allowKeyEventPropagation(e.keyCode))&&_(e);break;case T.ENTER:var r=o.instance.getSelected(),i=!(r[0]===r[2]&&r[1]===r[3]);if(t&&!i||e.altKey){if(o.isOpened()){var s=h(o.TEXTAREA),l=o.getValue(),a=l.slice(0,s)+"\n"+l.slice(s);o.setValue(a),b(o.TEXTAREA,s+1)}else o.beginEditing(o.originalValue+"\n");_(e)}e.preventDefault();break;case T.A:case T.X:case T.C:case T.V:t&&_(e);break;case T.BACKSPACE:case T.DELETE:case T.HOME:case T.END:_(e)}-1===[T.ARROW_UP,T.ARROW_RIGHT,T.ARROW_DOWN,T.ARROW_LEFT].indexOf(e.keyCode)&&o.autoResize.resize(String.fromCharCode(e.keyCode))}};k.prototype.open=function(){this.refreshDimensions(),this.instance.addHook("beforeKeyDown",A)},k.prototype.close=function(){this.textareaParentStyle.display="none",th
|
||
|
return a(n,function(t){return e===u[t]?(o=!0,!1):void 0}),o}Object.defineProperties(n,{KEY_CODES:{get:function(){return u}},isPrintableChar:{get:function(){return o}},isMetaKey:{get:function(){return r}},isCtrlKey:{get:function(){return i}},isKey:{get:function(){return s}},__esModule:{value:!0}});var l,a=(l=e("array"),l&&l.__esModule&&l||{"default":l}).arrayEach,u={MOUSE_LEFT:1,MOUSE_RIGHT:3,MOUSE_MIDDLE:2,BACKSPACE:8,COMMA:188,INSERT:45,DELETE:46,END:35,ENTER:13,ESCAPE:27,CONTROL_LEFT:91,COMMAND_LEFT:17,COMMAND_RIGHT:93,ALT:18,HOME:36,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,SPACE:32,SHIFT:16,CAPS_LOCK:20,TAB:9,ARROW_RIGHT:39,ARROW_LEFT:37,ARROW_UP:38,ARROW_DOWN:40,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,A:65,X:88,C:67,V:86}},{array:41}],53:[function(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},{}],54:[function(e,t,n){"use strict";Object.defineProperties(n,{Hooks:{get:function(){return u}},__esModule:{value:!0}});var o,r,i,s=["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","construct","init","modifyCol","modifyColWidth","modifyRow","modifyRowHeight","persistentStateLoad","persistentStateReset","persistentStateSave"],l=((o=e("eventManager"),o&&o.__esModule&&o||{"default":o}).EventManager,(r=e("helpers/array"),r&&r.__esModule&&r||{"default":r}).arrayEach),a=(i=e("helpers/object"),i&&i.__esModule&&i||{"default":i}).objectEach,u=function(){this.globalBucket=this.createEmptyBucket()};$traceurRuntime.createClass(u,{createEmptyBucket:function(){var e=Object.create(null);return l(s,function(t){return e[t]=[]}),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,o=this;if(Array.isArray(t))l(t,function(t){return o.add(e,t,n)});else{var r=this.getBucket(n);"undefined"==typeof r[e]&&(this.register(e),r[e]=[]),t.skip=!1,-1===r[e].indexOf(t)&&r[e].push(t)}return this},once:function(e,t){var n=void 0!==arguments[2]?arguments[2]:null,o=this;Array.isArray(t)?l(t,function(t){return o.once(e,t,n)}):(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,l){var a=this.globalBucket[t],u=-1,c=a?a.length:0;if(c)for(;++u<c;)if(a[u]&&!a[u].skip){var d=a[u].call(e,
|
||
|
o&&o.__esModule&&o||{"default":o}).addClass,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(n,s.CLASS_EDITOR_CONTAINER),document.body.appendChild(n)),e=document.createElement("div"),r(e,s.CLASS_EDITOR),t=document.createElement("textarea"),r(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"}})},{"helpers/dom/element":44}],62:[function(e,t,n){"use strict";Object.defineProperties(n,{Comments:{get:function(){return R}},__esModule:{value:!0}});var o,r,i,s,l,a,u=(o=e("helpers/dom/element"),o&&o.__esModule&&o||{"default":o}),c=u.addClass,d=u.closest,h=u.getWindowScrollLeft,f=u.getWindowScrollTop,g=u.hasClass,p=u.offset,m=(r=e("eventManager"),r&&r.__esModule&&r||{"default":r}).EventManager,w=(i=e("3rdparty/walkontable/src/cell/coords"),i&&i.__esModule&&i||{"default":i}).WalkontableCellCoords,v=(s=e("plugins"),s&&s.__esModule&&s||{"default":s}),b=v.registerPlugin,C=(v.getPlugin,(l=e("_base"),l&&l.__esModule&&l||{"default":l})["default"]),y=(a=e("commentEditor"),a&&a.__esModule&&a||{"default":a}).CommentEditor,R=function(e){$traceurRuntime.superConstructor(E).call(this,e),this.editor=null,this.eventManager=null,this.range={},this.mouseDown=!1,this.contextMenuEvent=!1,this.timer=null},E=R;$traceurRuntime.createClass(R,{isEnabled:function(){return this.hot.getSettings().comments},enablePlugin:function(){var e=this;this.enabled||(this.editor||(this.editor=new y),this.eventManager||(this.eventManager=new m(this)),this.addHook("afterContextMenuDefaultOptions",function(t){return e.addToContextMenu(t)}),this.addHook("afterRenderer",function(t,n,o,r,i,s){return e.onAfterRenderer(t,s)}),this.addHook("afterScrollVertically",function(){return e.refreshEditorPosition()}),this.addHook("afterColumnResize",function(){return e.refreshEditorPosition()}),this.addHook("afterRowResize",function(){return e.refreshEditorPosition()}),this.registerListeners(),$traceurRuntime.superGet(this,E.prototype,"enablePlugin").call(this))},disablePlugin:function(){$traceurRuntime.superGet(this,E.prototype,"disablePlugin").call(this)},registerListeners:function(){var e=this;this.eventManager.addEventListener(document,"mouseover",function(t){return e.onMouseOver(t)}),this.eventManager.addEventListener(document,"mousedown",function(t){return e.onMouseDown(t)}),this.eventManager.addEventListener(document,"mousemove",function(t){return e.onMouseMove(t)}),this.eventManager.addEventListener(document,"mouseup",function(t){return e.onMouseUp(t)}),this.eventManager.addEventListener(this.editor.getInputElement(),"blur",function(t){return e.onEditorBlur(t)})},setRange:function(e){this.range=e},clearRange:function(){this.range={}},targetIsCellWithComment:function(e){return g(e.target,"htCommentCell")&&d(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
|
||
|
return e.getCellMeta(t,n)}),this.render()},disabled:!1},{key:_+":bottom",name:function(){var e=this,t="Bottom",n=m(this.getSelectedRange(),function(t,n){var o=e.getCellMeta(t,n).className;return o&&-1!==o.indexOf("htBottom")?!0:void 0});return n&&(t=w(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=g(t,function(t,n){return e.getCellMeta(t,n).className}),o="vertical",r="htBottom";this.runHooks("beforeCellAlignment",n,t,o,r),f(t,o,r,function(t,n){return e.getCellMeta(t,n)}),this.render()},disabled:!1}]}},configurable:!0,enumerable:!0,writable:!0}),r)},{"helpers/number":48,"helpers/object":49,utils:69}],69:[function(e,t,n){"use strict";function o(e){return{start:e.getTopLeftCorner(),end:e.getBottomRightCorner()}}function r(e){return m(e,"htSeparator")}function i(e){return m(e,"htSubmenu")}function s(e){return m(e,"htDisabled")}function l(e){var t=e.getSelected();return t?t[0]<0?null:e.countRows()>=e.getSettings().maxRows?null:t:null}function a(e,t){return-1!=e.indexOf(t)?e:(e=e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ",""),e+=" "+t)}function u(e,t){return-1!=e.indexOf(t)?e:(e=e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ",""),e+=" "+t)}function c(e,t){for(var n={},o=e.from.row;o<=e.to.row;o++)for(var r=e.from.col;r<=e.to.col;r++)n[o]||(n[o]=[]),n[o][r]=t(o,r);return n}function d(e,t,n,o){if(e.from.row==e.to.row&&e.from.col==e.to.col)h(e.from.row,e.from.col,t,n,o);else for(var r=e.from.row;r<=e.to.row;r++)for(var i=e.from.col;i<=e.to.col;i++)h(r,i,t,n,o)}function h(e,t,n,o,r){var i=r(e,t),s=o;i.className&&(s="vertical"===n?a(i.className,o):u(i.className,o)),i.className=s}function f(e,t){var n=!1;return e&&e.forAll(function(e,o){return t(e,o)?(n=!0,!1):void 0}),n}function g(e){return'<span class="selected">'+String.fromCharCode(10003)+"</span>"+e}Object.defineProperties(n,{normalizeSelection:{get:function(){return o}},isSeparator:{get:function(){return r}},hasSubMenu:{get:function(){return i}},isDisabled:{get:function(){return s}},getValidSelection:{get:function(){return l}},prepareVerticalAlignClass:{get:function(){return a}},prepareHorizontalAlignClass:{get:function(){return u}},getAlignmentClasses:{get:function(){return c}},align:{get:function(){return d}},checkSelectionConsistency:{get:function(){return f}},markLabelAsSelected:{get:function(){return g}},__esModule:{value:!0}});var p,m=(p=e("helpers/dom/element"),p&&p.__esModule&&p||{"default":p}).hasClass},{"helpers/dom/element":44}],70:[function(e,t,n){"use strict";Object.defineProperties(n,{ContextMenuCopyPaste:{get:function(){return f}},__esModule:{value:!0}});var o,r,i,s,l,a=(o=e("helpers/dom/element"),o&&o.__esModule&&o||{"default":o}).removeClass,u=(r=e("eventManager"),r&&r.__esModule&&r||{"default":r}).eventManager,c=(i=e("plugins"),i&&i.__esModule&&i||{"default":i}).registerPlugin,d=(s=e("_base"),s&&s.__esModule&&s||{"default":s})["default"],h=(l=e("zeroclipboard"),l&&l.__esModule&&l||{"default":l})["default"],f=function(e){var t=this;$traceurRuntime.superConstructor(g).call(this,e),this.swfPath=null,this.hotContextMenu=null,this.outsideClickDeselectsCache=null,this.hot.addHook("afterContextMenuShow",function(e){return t.setupZeroClipboard(e)}),this.hot.addHook("afterInit",function(){return t.afterInit()}),this.hot.addHook("afterContextMenuDefaultOptions",function(e){return t.addToContextMenu(e)})},g=f;$traceurRuntime.createClass(f,{afterInit:function(){if(this.hot.getSettings().contextMenuCopyPaste){"object"==typeof this.hot.getSettings().contextMenuCopyPaste&&(this.swfPath=this.hot.getSettings().contextMenuCopyPaste.swfPath),"undefined"==typeof h&&console.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){"undefined"==typeof navigator.mimeTypes["application/x-shockwave-flash"]&&console.error("To be able to use the Copy/Paste feature from the context menu, your browser needs to have Flash Plugin insta
|
||
|
this.checkPositionData(t),this.modifyColumnOrder(t,e,null,"freeze"),this.addFixedColumn(),this.hot.view.wt.wtOverlays.leftOverlay.refresh(),this.hot.view.wt.wtOverlays.adjustElementsSize()}},unfreezeColumn:function(e){if(!(e>this.fixedColumnsCount-1)){var t=this.getBestColumnReturnPosition(e),n=this.getModifiedColumnIndex(e)||e;this.checkPositionData(n),this.modifyColumnOrder(n,e,t,"unfreeze"),this.removeFixedColumn(),this.hot.view.wt.wtOverlays.leftOverlay.refresh(),this.hot.view.wt.wtOverlays.adjustElementsSize()}},addFixedColumn:function(){this.hot.updateSettings({fixedColumnsLeft:this.fixedColumnsCount+1}),this.fixedColumnsCount++},removeFixedColumn:function(){this.hot.updateSettings({fixedColumnsLeft:this.fixedColumnsCount-1}),this.fixedColumnsCount--},checkPositionData:function(e){this.hot.manualColumnPositions&&0!==this.hot.manualColumnPositions.length||this.hot.manualColumnPositions||(this.hot.manualColumnPositions=[]),e?this.hot.manualColumnPositions[e]||this.createPositionData(e+1):this.createPositionData(this.hot.countCols())},createPositionData:function(e){if(this.hot.manualColumnPositions.length<e)for(var t=this.hot.manualColumnPositions.length;e>t;t++)this.hot.manualColumnPositions[t]=t},modifyColumnOrder:function(e,t,n,o){null==n&&(n=e),"freeze"===o?this.hot.manualColumnPositions.splice(this.fixedColumnsCount,0,this.hot.manualColumnPositions.splice(t,1)[0]):"unfreeze"===o&&this.hot.manualColumnPositions.splice(n,0,this.hot.manualColumnPositions.splice(t,1)[0])},getBestColumnReturnPosition:function(e){for(var t=this.fixedColumnsCount,n=this.getModifiedColumnIndex(t),o=this.getModifiedColumnIndex(e);o>n;)t++,n=this.getModifiedColumnIndex(t);return t-1}},{},i),s("manualColumnFreeze",l)},{_base:56,plugins:55}],76:[function(e,t,n){"use strict";function o(){function e(e){p=this,m=e;var t=this.view.wt.wtTable.getCoords(e).col;if(t>=0){f=t;var n=m.getBoundingClientRect();a=n.left,w.style.top=n.top+"px",w.style.left=a+"px",p.rootElement.appendChild(w)}}function t(e,t){var n=e.getBoundingClientRect(),o=6;t>0?w.style.left=n.left+n.width-o+"px":w.style.left=n.left+"px"}function n(){var e=this;u(w,"active"),u(v,"active");var t=m.getBoundingClientRect();v.style.width=t.width+"px",v.style.height=e.view.maximumVisibleElementHeight(0)+"px",v.style.top=w.style.top,v.style.left=a+"px",e.rootElement.appendChild(v)}function o(e){v.style.left=a+e+"px"}function r(){d(w,"active"),d(v,"active")}var i,s,l,a,f,p,m,w=document.createElement("DIV"),v=document.createElement("DIV"),b=h(this);w.className="manualColumnMover",v.className="manualColumnMoverGuide";var C=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},R=function(e){return"BODY"!=e.tagName?"THEAD"==e.parentNode.tagName?!0:(e=e.parentNode,R(e)):!1},E=function(e){return"TABLE"!=e.tagName?"TH"==e.tagName?e:E(e.parentNode):null},S=function(){var a,u=this;b.addEventListener(u.rootElement,"mouseover",function(n){if(R(n.target)){var o=E(n.target);if(o)if(a){var r=u.view.wt.wtTable.getCoords(o).col;r>=0&&(s=r,t(n.target,s-i))}else e.call(u,o)}}),b.addEventListener(u.rootElement,"mousedown",function(e){c(e.target,"manualColumnMover")&&(l=g(e),n.call(u),a=u,i=f,s=f)}),b.addEventListener(window,"mousemove",function(e){a&&o(g(e)-l)}),b.addEventListener(window,"mouseup",function(t){a&&(r(),a=!1,H(u.manualColumnPositions,u.countCols()),u.manualColumnPositions.splice(s,0,u.manualColumnPositions.splice(i,1)[0]),Handsontable.hooks.run(u,"beforeColumnMove",i,s),u.forceFullRender=!0,u.view.render(),C.call(u),Handsontable.hooks.run(u,"afterColumnMove",i,s),e.call(u,m))}),u.addHook("afterDestroy",T)},T=function(){b.clear()},H=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.manualCol
|
||
|
plugins:55}],81:[function(e,t,n){"use strict";Object.defineProperties(n,{MultipleSelectionHandles:{get:function(){return g}},__esModule:{value:!0}});var o,r,i,s,l=(o=e("helpers/dom/element"),o&&o.__esModule&&o||{"default":o}),a=l.getWindowScrollTop,u=l.hasClass,c=l.getWindowScrollLeft,d=(r=e("_base"),r&&r.__esModule&&r||{"default":r})["default"],h=(i=e("eventManager"),i&&i.__esModule&&i||{"default":i}).EventManager,f=(s=e("plugins"),s&&s.__esModule&&s||{"default":s}).registerPlugin,g=function(e){$traceurRuntime.superConstructor(p).call(this,e),this.dragged=[],this.eventManager=null,this.lastSetCell=null},p=g;$traceurRuntime.createClass(g,{isEnabled:function(){return Handsontable.mobileBrowser},enablePlugin:function(){this.enabled||(this.eventManager||(this.eventManager=new h(this)),this.registerListeners(),$traceurRuntime.superGet(this,p.prototype,"enablePlugin").call(this))},registerListeners: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 u(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):u(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 u(n.target,"topLeftSelectionHandle-HitArea")?(e.call(t,"topLeft"),t.touchStartRange=void 0,n.preventDefault(),!1):u(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(),h=c();0!==t.dragged.length&&(n=document.elementFromPoint(e.touches[0].screenX-h,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(),l=e.getBottomLeftCorner(),a=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(l.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:l}: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:a}: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(l.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,a.col),end:new WalkontableCellCoords(i.row,t.col)}:"topLeft"==r&&(u={start:l,end:t})}break;case"SE-NW"
|
||
|
for(var e,n=[],o=0,r=0;r<arguments.length;r++){var i=$traceurRuntime.checkObjectCoercible(arguments[r]);if("function"!=typeof i[t(Symbol.iterator)])throw new TypeError("Cannot spread non-iterable object.");for(var s=i[t(Symbol.iterator)]();!(e=s.next()).done;)n[o++]=e.value}return n}var t=$traceurRuntime.toProperty;$traceurRuntime.spread=e}(),function(){function e(e,t){var n=p(e);do{var o=g(n,t);if(o)return o;n=p(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 c("super has no setter '"+o+"'.")}function i(e){for(var t={},n=v(e),o=0;o<n.length;o++){var r=n[o];t[r]=g(e,r)}for(var i=b(e),o=0;o<i.length;o++){var s=i[o];t[m(s)]=g(e,m(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=d(l(o),i(t))):e.prototype=t,f(e,"prototype",{configurable:!1,writable:!1}),h(e,i(n))}function l(e){if("function"==typeof e){var t=e.prototype;if(u(t)===t||null===t)return e.prototype;throw new c("super prototype must be an Object or null")}if(null===e)return null;throw new c("Super expression must either be null or a function, not "+typeof e+".")}function a(e,t,o){null!==p(t)&&n(e,t,"constructor",o)}var u=Object,c=TypeError,d=u.create,h=$traceurRuntime.defineProperties,f=$traceurRuntime.defineProperty,g=$traceurRuntime.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=$traceurRuntime.toProperty,w=Object,v=w.getOwnPropertyNames,b=w.getOwnPropertySymbols;$traceurRuntime.createClass=s,$traceurRuntime.defaultSuperCall=a,$traceurRuntime.superCall=n,$traceurRuntime.superConstructor=t,$traceurRuntime.superGet=o,$traceurRuntime.superSet=r}()},{}],96:[function(e,t,n){"use strict";function o(e){var t=this;this.eventManager=C(e),this.instance=e,this.settings=e.getSettings();var n=e.rootElement.getAttribute("style");n&&e.rootElement.setAttribute("data-originalstyle",n),d(e.rootElement,"handsontable");var o=document.createElement("TABLE");d(o,"htCore"),e.getSettings().tableClassName&&d(o,e.getSettings().tableClassName),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,b(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&&e.rootElement){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 l=p();if(document.elementFromPoint(i+l,s)!==e.view.wt.wtTable.holder||document.elementFromPoint(i,s+l)!==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 T({className:"current",border:{width:2,color:"#5292F7",cornerVisible:function(){return t.settings.fillHandle&&!t.isCellEdited()&&!e.selection.isMultiple()},multipleSelectionHandlesVisible:function(){return!t.isCellEdited()&&!e.selectio
|
||
|
op:"replace",path:r+"/"+t(c),value:h}),e[c]=h)}else o.push({op:"remove",path:r+"/"+t(c)}),delete e[c],a=!0}if(a||i.length!=s.length)for(var u=0;u<i.length;u++){var c=i[u];e.hasOwnProperty(c)||(o.push({op:"add",path:r+"/"+t(c),value:n[c]}),e[c]=JSON.parse(JSON.stringify(n[c])))}}function g(e,t){for(var n,o=!1,r=0,i=t.length;i>r;){n=t[r];for(var s=n.path.split("/"),l=e,a=1,u=s.length;;)if(R(l)){var c=parseInt(s[a],10);if(a++,a>=u){o=m[n.op].call(n,l,c,e);break}l=l[c]}else{var d=s[a];if(-1!=d.indexOf("~")&&(d=d.replace(/~1/g,"/").replace(/~0/g,"~")),a++,a>=u){o=p[n.op].call(n,l,d,e);break}l=l[d]}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 g(n,[o]),g(n,[{op:"remove",path:this.from}]),g(n,[{op:"add",path:this.path,value:o.value}]),!0},copy:function(e,t,n){var o={op:"_get",path:this.from};return g(n,[o]),g(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]}},m={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},w={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)}},v=[];e.intervals;var b=function(){function e(e){this.observers=[],this.obj=e}return e}(),C=function(){function e(e,t){this.callback=e,this.observer=t}return e}();e.unobserve=a,e.observe=u,e.generate=h;var y;y=Object.keys?Object.keys:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t};var R;R=Array.isArray?Array.isArray:function(e){return e.push&&"number"==typeof e.length},e.apply=g}(o||(o={})),"undefined"!=typeof n&&(n.apply=o.apply,n.observe=o.observe,n.unobserve=o.unobserve,n.generate=o.generate)},{}],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?l(e,t,n):t.indexOf(":")>-1?a(e,t):c(e._value,t,n)}function i(e,t){var n,o,r,i,s,l=t,a=["KB","MB","GB","TB","PB","EB","ZB","YB"],c=!1;if(t.indexOf(":")>-1)e._value=u(t);else if(t===v)e._value=0;else{for("."!==m[w].delimiters.decimal&&(t=t.replace(/\./g,"").replace(m[w].delimiters.decimal,".")),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<=a.length&&!(c=t.indexOf(a[s])>-1?Math.pow(1024,s+1):!1);s++);e._value=(c?c:1)*(l.match(n)?Math.pow(10,3):1)*(l.match(o)?Math.pow(10,6):1)*(l.match(r)?Math.pow(10,9):1)*(l.match(i)?Math.pow(10,12):1)*(t.indexOf("%")>-1?.01:1)*((t.split("-").length+Math.min(t.split("(").length-1,t.split(")").length-1))%2?1:-1)*Number(t.replace(/[^0-9\.]+/g,"")),e._value=c?Math.ceil(e._value):e._value}return e._value}function s(e,t,n){var o,r,i=t.indexOf("$"),s=t.indexOf("("),l=t.indexOf("-"),a="";return t.indexOf(" $")>-1?(a=" ",t=t.replace(" $","")):t.indexOf("$ ")>-1?(a=" ",t=t.replace("$ ","")):t=t.replace("$",""),r=c(e._value,t,n),1>=i?r.indexOf("(")>-1||r.indexOf("-")>-1?(r=r.split(""),o=1,(s>i||l>i)&&(o=0),r.splice(o,0,m[w].currency.symbol+a),r=r.join("")):r=m[w].currency.symbol+a+r:r.indexOf(")")>-1?(r=r.split(""),r.splice(-1,0,a+m[w].currency.symbol),r=r.join("")):r=r+a+m[w].currency.symbol,r}function l(e,t,n){var o,r="",i=100*e._va
|