Files
seal/static/js/handsontable.full.min.js
2019-07-09 17:41:03 +08:00

46 lines
1.1 MiB
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*!
* Copyright (c) HANDSONCODE sp. z o. o.
*
* HANDSONTABLE is a software distributed by HANDSONCODE sp. z o. o.,
* a Polish corporation, based in Gdynia, Poland, at 96/98 Aleja Zwycięstwa,
* registered with the National Court Register under number 538651,
* EU tax ID number: PL5862294002, share capital: PLN 62,800.00.
*
* This software is protected by applicable copyright laws, including
* international treaties, and dual-licensed depending on whether
* your use is intended for or may result in commercial advantage
* or monetary compensation (commercial purposes), or not.
*
* If your use involves only such purposes as research, private study,
* evaluation and the like, you agree to be bound by the terms included
* in the “handsontable-non-commercial-license.pdf” file, available
* in the main directory of this software repository.
*
* By installing, copying, or otherwise using this software for
* commercial purposes, you agree to be bound by the terms included
* in the “handsontable-general-terms.pdf” file, available in the main
* directory of this software repository.
*
* HANDSONCODE PROVIDES THIS SOFTWARE ON AN “AS IS” BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND. IN NO EVENT
* AND UNDER NO LEGAL THEORY, SHALL HANDSONCODE BE LIABLE
* TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL,
* INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING
* FROM USE OR INABILITY TO USE THIS SOFTWARE.
*
* Version: 7.1.0
* Release date: 11/06/2019 (built at 10/06/2019 10:41:57)
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Handsontable",[],t):"object"==typeof exports?exports.Handsontable=t():e.Handsontable=t()}("undefined"!=typeof self?self:this,function(){return(a={},o.m=n=[function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},function(e,t,n){"use strict";function r(e,t,n,r){var o=-1,i=e,a=n;Array.isArray(e)||(i=Array.from(e));var s=i.length;for(r&&s&&(a=i[o+=1]),o+=1;o<s;)a=t(a,i[o],o,i),o+=1;return a}function o(e,t){var n=0,r=e;Array.isArray(e)||(r=Array.from(e));for(var o=r.length;n<o&&!1!==t(r[n],n,r);)n+=1;return e}function i(e){return r(e,function(e,t){return e+t},0)}n(19),n(56),n(12),n(14),t.__esModule=!0,t.to2dArray=function(e){var t=e.length,n=0;for(;n<t;)e[n]=[e[n]],n+=1},t.extendArray=function(e,t){var n=t.length,r=0;for(;r<n;)e.push(t[r]),r+=1},t.pivot=function(e){var t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;for(var n=e.length,r=e[0].length,o=0;o<n;o++)for(var i=0;i<r;i++)t[i]||(t[i]=[]),t[i][o]=e[o][i];return t},t.arrayReduce=r,t.arrayFilter=function(e,t){var n=0,r=e;Array.isArray(e)||(r=Array.from(e));var o=r.length,i=[],a=-1;for(;n<o;){var s=r[n];t(s,n,r)&&(i[a+=1]=s),n+=1}return i},t.arrayMap=function(e,t){var n=0,r=e;Array.isArray(e)||(r=Array.from(e));var o=r.length,i=[],a=-1;for(;n<o;){var s=r[n];i[a+=1]=t(s,n,r),n+=1}return i},t.arrayEach=o,t.arraySum=i,t.arrayMax=function(e){return r(e,function(e,t){return t<e?e:t},Array.isArray(e)?e[0]:void 0)},t.arrayMin=function(e){return r(e,function(e,t){return e<t?e:t},Array.isArray(e)?e[0]:void 0)},t.arrayAvg=function(e){return e.length?i(e)/e.length:0},t.arrayFlatten=function n(e){return r(e,function(e,t){return e.concat(Array.isArray(t)?n(t):t)},[])},t.arrayUnique=function(e){var t=[];return o(e,function(e){-1===t.indexOf(e)&&t.push(e)}),t}},function(e,t,n){"use strict";var r=n(0);n(10),n(37),n(46),t.__esModule=!0,t.duckSchema=function n(e){var r;Array.isArray(e)?r=[]:(r={},c(e,function(e,t){"__children"!==t&&(e&&"object"===(0,a.default)(e)&&!Array.isArray(e)?r[t]=n(e):Array.isArray(e)?e.length&&"object"===(0,a.default)(e[0])&&!Array.isArray(e[0])?r[t]=[n(e[0])]:r[t]=[]:r[t]=null)}));return r},t.inherit=function(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e},t.extend=function(n,e){return c(e,function(e,t){n[t]=e}),n},t.deepExtend=function n(r,o){c(o,function(e,t){o[t]&&"object"===(0,a.default)(o[t])?(r[t]||(Array.isArray(o[t])?r[t]=[]:"[object Date]"===Object.prototype.toString.call(o[t])?r[t]=o[t]:r[t]={}),n(r[t],o[t])):r[t]=o[t]})},t.deepClone=l,t.clone=function(e){var n={};return c(e,function(e,t){n[t]=e}),n},t.mixin=function(s){s.MIXINS||(s.MIXINS=[]);for(var e=arguments.length,t=new Array(1<e?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return(0,o.arrayEach)(t,function(e){s.MIXINS.push(e.MIXIN_NAME),c(e,function(e,t){if(void 0!==s.prototype[t])throw new Error("Mixin conflict. Property '".concat(t,"' already exist and cannot be overwritten."));if("function"==typeof e)s.prototype[t]=e;else{Object.defineProperty(s.prototype,t,{get:(o=t,i=e,a="_".concat(o),function(){return void 0===this[a]&&(this[a]=function(e){var t=e;return(Array.isArray(t)||u(t))&&(t=l(t)),t}(i)),this[a]}),set:(n=t,r="_".concat(n),function(e){this[r]=e}),configurable:!0})}var n,r,o,i,a})}),s},t.isObjectEqual=function(e,t){return JSON.stringify(e)===JSON.stringify(t)},t.isObject=u,t.defineGetter=function(e,t,n,r){r.value=n,r.writable=!1!==r.writable,r.enumerable=!1!==r.enumerable,r.configurable=!1!==r.configurable,Object.defineProperty(e,t,r)},t.objectEach=c,t.getProperty=function(e,t){var n=t.split("."),r=e;return c(n,function(e){if(void 0===(r=r[e]))return r=void 0,!1}),r},t.deepObjectSize=function(e){return u(e)?function t(e){var n=0;return u(e)?c(e,function(e){n+=t(e)}):n+=1,n}(e):0},t.createObjectPropListener=function(e){var t,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"value",r="_".concat(n),o=(t={_touched:!1},(0,i.default)(t,r,e),(0,i.default)(t,"isTouched",function(){return this._touched}),t);return Object.defineProperty(o,n,{get:function(){return this[r]},set:function(e){this._touched=!0,this[r]=e},enumerable:!0,configurable:!0}),o},t.hasOwnProperty=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var i=r(n(71)),a=r(n(44)),o=n(3);function l(e){return"object"===(0,a.default)(e)?JSON.parse(JSON.stringify(e)):e}function u(e){return"[object Object]"===Object.prototype.toString.call(e)}function c(e,t){for(var n in e)if((!e.hasOwnProperty||e.hasOwnProperty&&Object.prototype.hasOwnProperty.call(e,n))&&!1===t(e[n],n,e))break;return e}},function(e,t,n){"use strict";var r=n(0);n(19),n(31),n(12),n(51),n(40),n(10),n(130),n(37),n(38),n(39),n(46),n(129),t.__esModule=!0,t.getParent=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=-1,r=null,o=e;for(;null!==o;){if(n===t){r=o;break}o=o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o.host:(n+=1,o.parentNode)}return r},t.closest=u,t.closestDown=function(e,t,n){var r=[],o=e;for(;(o=o&&u(o,t,n))&&(!n||n.contains(o));)r.push(o),o=o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o.host:o.parentNode;var i=r.length;return i?r[i-1]:null},t.isChildOf=function(e,t){var n=e.parentNode,r=[];"string"==typeof t?r=Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):r.push(t);for(;null!==n;){if(-1<r.indexOf(n))return!0;n=n.parentNode}return!1},t.isChildOfWebComponentTable=function(e){var t="hot-table",n=!1,r=c(e);function o(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName===t.toUpperCase()}for(;null!==r;){if(o(r)){n=!0;break}if(r.host&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(n=o(r.host))break;r=r.host}r=r.parentNode}return n},t.polymerWrap=c,t.polymerUnwrap=d,t.index=function(e){var t=0,n=e;if(n.previousSibling)for(;n=n.previousSibling;)t+=1;return t},t.overlayContainsElement=function(e,t,n){var r=n.parentElement.querySelector(".ht_clone_".concat(e));return r?r.contains(t):null},t.hasClass=function(e,t){return o(e,t)},t.addClass=function(e,t){return i(e,t)},t.removeClass=function(e,t){return a(e,t)},t.removeTextNodes=function e(t,n){if(3===t.nodeType)n.removeChild(t);else if(-1<["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(t.nodeName))for(var r=t.childNodes,o=r.length-1;0<=o;o--)e(r[o],t)},t.empty=p,t.fastInnerHTML=function(e,t){y.test(t)?e.innerHTML=t:w(e,t)},t.fastInnerText=w,t.isVisible=function e(t){var n=t.ownerDocument.documentElement;var r=t;for(;d(r)!==n;){if(null===r)return!1;if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(r.host){if(r.host.impl)return e(r.host.impl);if(r.host)return e(r.host);throw new Error("Lost in Web Components world")}return!1}if(r.style&&"none"===r.style.display)return!1;r=r.parentNode}return!0},t.offset=function(e){var t,n,r,o,i=e.ownerDocument,a=i.defaultView,s=i.documentElement,l=e;if((0,h.hasCaptionProblem)()&&l.firstChild&&"CAPTION"===l.firstChild.nodeName)return{top:(o=l.getBoundingClientRect()).top+(a.pageYOffset||s.scrollTop)-(s.clientTop||0),left:o.left+(a.pageXOffset||s.scrollLeft)-(s.clientLeft||0)};t=l.offsetLeft,n=l.offsetTop,r=l;for(;(l=l.offsetParent)&&l!==i.body;)t+=l.offsetLeft,n+=l.offsetTop,r=l;r&&"fixed"===r.style.position&&(t+=a.pageXOffset||s.scrollLeft,n+=a.pageYOffset||s.scrollTop);return{left:t,top:n}},t.getWindowScrollTop=C,t.getWindowScrollLeft=E,t.getScrollTop=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:window;return e!==t?e.scrollTop:C(t)},t.getScrollLeft=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:window;return e!==t?e.scrollLeft:E(t)},t.getScrollableElement=function(e){var t=e.ownerDocument,n=t?t.defaultView:void 0;t||(t=e.document?e.document:e,n=t.defaultView);var r=["auto","scroll"],o=(0,h.isGetComputedStyleSupported)(),i=e.parentNode;for(;i&&i.style&&t.body!==i;){var a=i.style,s=a.overflow,l=a.overflowX,u=a.overflowY;if([s,l,u].includes("scroll"))return i;if(o){var c=n.getComputedStyle(i);if(s=c.overflow,l=c.overflowX,u=c.overflowY,r.includes(s)||r.includes(l)||r.includes(u))return i}if(i.clientHeight<=i.scrollHeight+1&&(r.includes(u)||r.includes(s)))return i;if(i.clientWidth<=i.scrollWidth+1&&(r.includes(l)||r.includes(s)))return i;i=i.parentNode}return n},t.getTrimmingContainer=function(e){var t=e.ownerDocument,n=t.defaultView,r=e.parentNode;for(;r&&r.style&&t.body!==r;){if("visible"!==r.style.overflow&&""!==r.style.overflow)return r;var o=S(r,n),i=["scroll","hidden","auto"],a=o.getPropertyValue("overflow"),s=o.getPropertyValue("overflow-y"),l=o.getPropertyValue("overflow-x");if(i.includes(a)||i.includes(s)||i.includes(l))return r;r=r.parentNode}return n},t.getStyle=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:window;{if(!e)return;if(e===n)return"width"===t?"".concat(n.innerWidth,"px"):"height"===t?"".concat(n.innerHeight,"px"):void 0}var r=e.style[t];if(""!==r&&void 0!==r)return r;var o=S(e,n);if(""!==o[t]&&void 0!==o[t])return o[t]},t.getComputedStyle=S,t.outerWidth=function(e){return e.offsetWidth},t.outerHeight=function(e){if((0,h.hasCaptionProblem)()&&e.firstChild&&"CAPTION"===e.firstChild.nodeName)return e.offsetHeight+e.firstChild.offsetHeight;return e.offsetHeight},t.innerHeight=function(e){return e.clientHeight||e.innerHeight},t.innerWidth=function(e){return e.clientWidth||e.innerWidth},t.addEvent=function(e,t,n){var r=e.defaultView;r=r||(e.document?e:e.ownerDocument.defaultView);r.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on".concat(t),n)},t.removeEvent=function(e,t,n){var r=e.defaultView;r=r||(e.document?e:e.ownerDocument.defaultView);r.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on".concat(t),n)},t.getCaretPosition=function(e){var t=e.ownerDocument;{if(e.selectionStart)return e.selectionStart;if(t.selection){e.focus();var n=t.selection.createRange();if(null===n)return 0;var r=e.createTextRange(),o=r.duplicate();return r.moveToBookmark(n.getBookmark()),o.setEndPoint("EndToStart",r),o.text.length}}return 0},t.getSelectionEndPosition=function(e){var t=e.ownerDocument;{if(e.selectionEnd)return e.selectionEnd;if(t.selection){var n=t.selection.createRange();return null===n?0:e.createTextRange().text.indexOf(n.text)+n.text.length}}return 0},t.getSelectionText=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:window,t=e.document,n="";e.getSelection?n=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(n=t.selection.createRange().text);return n},t.clearTextSelection=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:window,t=e.document;e.getSelection?e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges():t.selection&&t.selection.empty()},t.setCaretPosition=function(t,n,r){void 0===r&&(r=n);if(t.setSelectionRange){t.focus();try{t.setSelectionRange(n,r)}catch(e){var o=t.parentNode,i=o.style.display;o.style.display="block",t.setSelectionRange(n,r),o.style.display=i}}else if(t.createTextRange){var e=t.createTextRange();e.collapse(!0),e.moveEnd("character",r),e.moveStart("character",n),e.select()}},t.getScrollbarWidth=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:document;void 0===m&&(m=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:document,t=e.createElement("div");t.style.height="200px",t.style.width="100%";var n=e.createElement("div");n.style.boxSizing="content-box",n.style.height="150px",n.style.left="0px",n.style.overflow="hidden",n.style.position="absolute",n.style.top="0px",n.style.width="200px",n.style.visibility="hidden",n.appendChild(t),(e.body||e.documentElement).appendChild(n);var r=t.offsetWidth;n.style.overflow="scroll";var o=t.offsetWidth;r===o&&(o=n.clientWidth);return(e.body||e.documentElement).removeChild(n),r-o}(e));return m},t.hasVerticalScrollbar=function(e){return e.offsetWidth!==e.clientWidth},t.hasHorizontalScrollbar=function(e){return e.offsetHeight!==e.clientHeight},t.setOverlayPosition=function(e,t,n){(0,l.isIE8)()||(0,l.isIE9)()?(e.style.top=n,e.style.left=t):(0,l.isSafari)()?(e.style["-webkit-transform"]="translate3d(".concat(t,",").concat(n,",0)"),e.style["-webkit-transform"]="translate3d(".concat(t,",").concat(n,",0)")):e.style.transform="translate3d(".concat(t,",").concat(n,",0)")},t.getCssTransform=function(e){var t;{if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];if(e.style["-webkit-transform"]&&""!==(t=e.style["-webkit-transform"]))return["-webkit-transform",t]}return-1},t.resetCssTransform=function(e){e.style.transform&&""!==e.style.transform?e.style.transform="":e.style["-webkit-transform"]&&""!==e.style["-webkit-transform"]&&(e.style["-webkit-transform"]="")},t.isInput=b,t.isOutsideInput=R,t.selectElementIfAllowed=function(e){R(e.ownerDocument.activeElement)||e.select()},t.HTML_CHARACTERS=void 0;var o,i,a,s=r(n(36)),l=n(72),h=n(73);function u(e,t,n){for(var r=e;null!==r&&r!==n;){if(r.nodeType===Node.ELEMENT_NODE&&(-1<t.indexOf(r.nodeName)||-1<t.indexOf(r)))return r;r=r.host&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r.host:r.parentNode}return null}function c(e){return"undefined"!=typeof Polymer&&"function"==typeof wrap?wrap(e):e}function d(e){return"undefined"!=typeof Polymer&&"function"==typeof unwrap?unwrap(e):e}function f(e){var t=[];if(!e||!e.length)return t;for(var n=0;e[n];)t.push(e[n]),n+=1;return t}if((0,h.isClassListSupported)()){var v=function(e){var t=e.createElement("div");return t.classList.add("test","test2"),t.classList.contains("test2")};o=function(e,t){return void 0!==e.classList&&"string"==typeof t&&""!==t&&e.classList.contains(t)},i=function(e,t){var n,r=e.ownerDocument,o=t;if("string"==typeof o&&(o=o.split(" ")),0<(o=f(o)).length)if(v(r))(n=e.classList).add.apply(n,(0,s.default)(o));else for(var i=0;o&&o[i];)e.classList.add(o[i]),i+=1},a=function(e,t){var n,r=t;"string"==typeof r&&(r=r.split(" ")),0<(r=f(r)).length&&(n=e.classList).remove.apply(n,(0,s.default)(r))}}else{var g=function(e){return new RegExp("(\\s|^)".concat(e,"(\\s|$)"))};o=function(e,t){return void 0!==e.className&&g(t).test(e.className)},i=function(e,t){var n=0,r=e.className,o=t;if("string"==typeof o&&(o=o.split(" ")),""===r)r=o.join(" ");else for(;o&&o[n];)g(o[n]).test(r)||(r+=" ".concat(o[n])),n+=1;e.className=r},a=function(e,t){var n=0,r=e.className,o=t;for("string"==typeof o&&(o=o.split(" "));o&&o[n];)r=r.replace(g(o[n])," ").trim(),n+=1;e.className!==r&&(e.className=r)}}function p(e){for(var t;t=e.lastChild;)e.removeChild(t)}var m,y=/(<(.*)>|&(.*);)/;function w(e,t){var n=e.firstChild;n&&3===n.nodeType&&null===n.nextSibling?h.isTextContentSupported?n.textContent=t:n.data=t:(p(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function C(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:window,t=e.scrollY;return void 0===t&&(t=e.document.documentElement.scrollTop),t}function E(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:window,t=e.scrollX;return void 0===t&&(t=e.document.documentElement.scrollLeft),t}function S(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}function b(e){return e&&(-1<["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)||"true"===e.contentEditable)}function R(e){return b(e)&&-1===e.className.indexOf("handsontableInput")&&-1===e.className.indexOf("copyPaste")}t.HTML_CHARACTERS=y},function(t,e){function n(e){return t.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}t.exports=n},function(e,t,n){var r=n(44),o=n(26);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){var r=n(395);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){e.exports=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}},function(e,t,n){var r=n(65),o=n(387),i=Object.prototype;o!==i.toString&&r(i,"toString",o,{unsafe:!0})},function(e,t,n){"use strict";t.__esModule=!0,t.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE=t.FILTERS_BUTTONS_PLACEHOLDER_VALUE=t.FILTERS_BUTTONS_PLACEHOLDER_SEARCH=t.FILTERS_BUTTONS_CANCEL=t.FILTERS_BUTTONS_OK=t.FILTERS_BUTTONS_CLEAR=t.FILTERS_BUTTONS_SELECT_ALL=t.FILTERS_VALUES_BLANK_CELLS=t.FILTERS_LABELS_DISJUNCTION=t.FILTERS_LABELS_CONJUNCTION=t.FILTERS_DIVS_FILTER_BY_VALUE=t.FILTERS_DIVS_FILTER_BY_CONDITION=t.FILTERS_CONDITIONS_YESTERDAY=t.FILTERS_CONDITIONS_TOMORROW=t.FILTERS_CONDITIONS_TODAY=t.FILTERS_CONDITIONS_BEFORE=t.FILTERS_CONDITIONS_AFTER=t.FILTERS_CONDITIONS_NOT_BETWEEN=t.FILTERS_CONDITIONS_BETWEEN=t.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL=t.FILTERS_CONDITIONS_LESS_THAN=t.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL=t.FILTERS_CONDITIONS_GREATER_THAN=t.FILTERS_CONDITIONS_BY_VALUE=t.FILTERS_CONDITIONS_NOT_CONTAIN=t.FILTERS_CONDITIONS_CONTAINS=t.FILTERS_CONDITIONS_ENDS_WITH=t.FILTERS_CONDITIONS_BEGINS_WITH=t.FILTERS_CONDITIONS_NOT_EQUAL=t.FILTERS_CONDITIONS_EQUAL=t.FILTERS_CONDITIONS_NOT_EMPTY=t.FILTERS_CONDITIONS_EMPTY=t.FILTERS_CONDITIONS_NONE=t.FILTERS_CONDITIONS_NAMESPACE=t.FILTERS_NAMESPACE=t.CONTEXTMENU_ITEMS_SHOW_ROW=t.CONTEXTMENU_ITEMS_HIDE_ROW=t.CONTEXTMENU_ITEMS_SHOW_COLUMN=t.CONTEXTMENU_ITEMS_HIDE_COLUMN=t.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD=t.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD=t.CONTEXTMENU_ITEMS_REMOVE_BORDERS=t.CONTEXTMENU_ITEMS_BORDERS_LEFT=t.CONTEXTMENU_ITEMS_BORDERS_BOTTOM=t.CONTEXTMENU_ITEMS_BORDERS_RIGHT=t.CONTEXTMENU_ITEMS_BORDERS_TOP=t.CONTEXTMENU_ITEMS_BORDERS=t.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM=t.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE=t.CONTEXTMENU_ITEMS_ALIGNMENT_TOP=t.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY=t.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT=t.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER=t.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT=t.CONTEXTMENU_ITEMS_ALIGNMENT=t.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT=t.CONTEXTMENU_ITEMS_REMOVE_COMMENT=t.CONTEXTMENU_ITEMS_EDIT_COMMENT=t.CONTEXTMENU_ITEMS_ADD_COMMENT=t.CONTEXTMENU_ITEMS_UNMERGE_CELLS=t.CONTEXTMENU_ITEMS_MERGE_CELLS=t.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN=t.CONTEXTMENU_ITEMS_FREEZE_COLUMN=t.CONTEXTMENU_ITEMS_CUT=t.CONTEXTMENU_ITEMS_COPY=t.CONTEXTMENU_ITEMS_CLEAR_COLUMN=t.CONTEXTMENU_ITEMS_READ_ONLY=t.CONTEXTMENU_ITEMS_REDO=t.CONTEXTMENU_ITEMS_UNDO=t.CONTEXTMENU_ITEMS_REMOVE_COLUMN=t.CONTEXTMENU_ITEMS_REMOVE_ROW=t.CONTEXTMENU_ITEMS_INSERT_RIGHT=t.CONTEXTMENU_ITEMS_INSERT_LEFT=t.CONTEXTMENU_ITEMS_ROW_BELOW=t.CONTEXTMENU_ITEMS_ROW_ABOVE=t.CONTEXTMENU_ITEMS_NO_ITEMS=t.CONTEXT_MENU_ITEMS_NAMESPACE=void 0;var r="ContextMenu:items";t.CONTEXT_MENU_ITEMS_NAMESPACE=r;var o="".concat(r,".noItems");t.CONTEXTMENU_ITEMS_NO_ITEMS=o;var i="".concat(r,".insertRowAbove");t.CONTEXTMENU_ITEMS_ROW_ABOVE=i;var a="".concat(r,".insertRowBelow");t.CONTEXTMENU_ITEMS_ROW_BELOW=a;var s="".concat(r,".insertColumnOnTheLeft");t.CONTEXTMENU_ITEMS_INSERT_LEFT=s;var l="".concat(r,".insertColumnOnTheRight");t.CONTEXTMENU_ITEMS_INSERT_RIGHT=l;var u="".concat(r,".removeRow");t.CONTEXTMENU_ITEMS_REMOVE_ROW=u;var c="".concat(r,".removeColumn");t.CONTEXTMENU_ITEMS_REMOVE_COLUMN=c;var h="".concat(r,".undo");t.CONTEXTMENU_ITEMS_UNDO=h;var d="".concat(r,".redo");t.CONTEXTMENU_ITEMS_REDO=d;var f="".concat(r,".readOnly");t.CONTEXTMENU_ITEMS_READ_ONLY=f;var v="".concat(r,".clearColumn");t.CONTEXTMENU_ITEMS_CLEAR_COLUMN=v;var g="".concat(r,".copy");t.CONTEXTMENU_ITEMS_COPY=g;var p="".concat(r,".cut");t.CONTEXTMENU_ITEMS_CUT=p;var m="".concat(r,".freezeColumn");t.CONTEXTMENU_ITEMS_FREEZE_COLUMN=m;var y="".concat(r,".unfreezeColumn");t.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN=y;var w="".concat(r,".mergeCells");t.CONTEXTMENU_ITEMS_MERGE_CELLS=w;var C="".concat(r,".unmergeCells");t.CONTEXTMENU_ITEMS_UNMERGE_CELLS=C;var E="".concat(r,".addComment");t.CONTEXTMENU_ITEMS_ADD_COMMENT=E;var S="".concat(r,".editComment");t.CONTEXTMENU_ITEMS_EDIT_COMMENT=S;var b="".concat(r,".removeComment");t.CONTEXTMENU_ITEMS_REMOVE_COMMENT=b;var R="".concat(r,".readOnlyComment");t.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT=R;var T="".concat(r,".align");t.CONTEXTMENU_ITEMS_ALIGNMENT=T;var O="".concat(r,".align.left");t.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT=O;var k="".concat(r,".align.center");t.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER=k;var M="".concat(r,".align.right");t.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT=M;var N="".concat(r,".align.justify");t.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY=N;var _="".concat(r,".align.top");t.CONTEXTMENU_ITEMS_ALIGNMENT_TOP=_;var A="".concat(r,".align.middle");t.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE=A;var I="".concat(r,".align.bottom");t.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM=I;var D="".concat(r,".borders");t.CONTEXTMENU_ITEMS_BORDERS=D;var L="".concat(r,".borders.top");t.CONTEXTMENU_ITEMS_BORDERS_TOP=L;var H="".concat(r,".borders.right");t.CONTEXTMENU_ITEMS_BORDERS_RIGHT=H;var x="".concat(r,".borders.bottom");t.CONTEXTMENU_ITEMS_BORDERS_BOTTOM=x;var P="".concat(r,".borders.left");t.CONTEXTMENU_ITEMS_BORDERS_LEFT=P;var F="".concat(r,".borders.remove");t.CONTEXTMENU_ITEMS_REMOVE_BORDERS=F;var B="".concat(r,".nestedHeaders.insertChildRow");t.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD=B;var W="".concat(r,".nestedHeaders.detachFromParent");t.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD=W;var V="".concat(r,".hideColumn");t.CONTEXTMENU_ITEMS_HIDE_COLUMN=V;var U="".concat(r,".showColumn");t.CONTEXTMENU_ITEMS_SHOW_COLUMN=U;var Y="".concat(r,".hideRow");t.CONTEXTMENU_ITEMS_HIDE_ROW=Y;var j="".concat(r,".showRow");t.CONTEXTMENU_ITEMS_SHOW_ROW=j;var G="Filters:";t.FILTERS_NAMESPACE=G;var z="".concat(G,"conditions");t.FILTERS_CONDITIONS_NAMESPACE=z;var X="".concat(z,".none");t.FILTERS_CONDITIONS_NONE=X;var K="".concat(z,".isEmpty");t.FILTERS_CONDITIONS_EMPTY=K;var q="".concat(z,".isNotEmpty");t.FILTERS_CONDITIONS_NOT_EMPTY=q;var $="".concat(z,".isEqualTo");t.FILTERS_CONDITIONS_EQUAL=$;var Q="".concat(z,".isNotEqualTo");t.FILTERS_CONDITIONS_NOT_EQUAL=Q;var Z="".concat(z,".beginsWith");t.FILTERS_CONDITIONS_BEGINS_WITH=Z;var J="".concat(z,".endsWith");t.FILTERS_CONDITIONS_ENDS_WITH=J;var ee="".concat(z,".contains");t.FILTERS_CONDITIONS_CONTAINS=ee;var te="".concat(z,".doesNotContain");t.FILTERS_CONDITIONS_NOT_CONTAIN=te;var ne="".concat(z,".byValue");t.FILTERS_CONDITIONS_BY_VALUE=ne;var re="".concat(z,".greaterThan");t.FILTERS_CONDITIONS_GREATER_THAN=re;var oe="".concat(z,".greaterThanOrEqualTo");t.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL=oe;var ie="".concat(z,".lessThan");t.FILTERS_CONDITIONS_LESS_THAN=ie;var ae="".concat(z,".lessThanOrEqualTo");t.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL=ae;var se="".concat(z,".isBetween");t.FILTERS_CONDITIONS_BETWEEN=se;var le="".concat(z,".isNotBetween");t.FILTERS_CONDITIONS_NOT_BETWEEN=le;var ue="".concat(z,".after");t.FILTERS_CONDITIONS_AFTER=ue;var ce="".concat(z,".before");t.FILTERS_CONDITIONS_BEFORE=ce;var he="".concat(z,".today");t.FILTERS_CONDITIONS_TODAY=he;var de="".concat(z,".tomorrow");t.FILTERS_CONDITIONS_TOMORROW=de;var fe="".concat(z,".yesterday");t.FILTERS_CONDITIONS_YESTERDAY=fe;var ve="".concat(G,"labels.filterByCondition");t.FILTERS_DIVS_FILTER_BY_CONDITION=ve;var ge="".concat(G,"labels.filterByValue");t.FILTERS_DIVS_FILTER_BY_VALUE=ge;var pe="".concat(G,"labels.conjunction");t.FILTERS_LABELS_CONJUNCTION=pe;var me="".concat(G,"labels.disjunction");t.FILTERS_LABELS_DISJUNCTION=me;var ye="".concat(G,"values.blankCells");t.FILTERS_VALUES_BLANK_CELLS=ye;var we="".concat(G,"buttons.selectAll");t.FILTERS_BUTTONS_SELECT_ALL=we;var Ce="".concat(G,"buttons.clear");t.FILTERS_BUTTONS_CLEAR=Ce;var Ee="".concat(G,"buttons.ok");t.FILTERS_BUTTONS_OK=Ee;var Se="".concat(G,"buttons.cancel");t.FILTERS_BUTTONS_CANCEL=Se;var be="".concat(G,"buttons.placeholder.search");t.FILTERS_BUTTONS_PLACEHOLDER_SEARCH=be;var Re="".concat(G,"buttons.placeholder.value");t.FILTERS_BUTTONS_PLACEHOLDER_VALUE=Re;var Te="".concat(G,"buttons.placeholder.secondValue");t.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE=Te},function(e,t,n){"use strict";var r=n(22),o=n(125),i=n(142)(!1),a=[].indexOf,s=!!a&&1/[1].indexOf(1,-0)<0,l=o("indexOf");r({target:"Array",proto:!0,forced:s||l},{indexOf:function(e,t){return s?a.apply(this,arguments)||0:i(this,e,t)}})},function(r,e,t){t(6);var i=t(410);function o(e,t,n){return"undefined"!=typeof Reflect&&Reflect.get?r.exports=o=Reflect.get:r.exports=o=function(e,t,n){var r=i(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}},o(e,t,n||e)}r.exports=o},function(e,t,n){"use strict";var o=n(146),r=n(86),i=n(144),a="String Iterator",s=r.set,l=r.getterFor(a);i(String,"String",function(e){s(this,{type:a,string:String(e),index:0})},function(){var e,t=l(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=o(n,r,!0),t.index+=e.length,{value:e,done:!1})})},function(e,t,n){"use strict";var r=n(0);n(10),n(37),n(39),t.__esModule=!0,t.isNumeric=function(e){var t=(0,o.default)(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)):"object"==t&&!(!e||"number"!=typeof e.valueOf()||e instanceof Date)},t.rangeEach=function(e,t,n){var r=-1;"function"==typeof t?(n=t,t=e):r=e-1;for(;++r<=t&&!1!==n(r););},t.rangeEachReverse=function(e,t,n){var r=e+1;"function"==typeof t&&(n=t,t=0);for(;--r>=t&&!1!==n(r););},t.valueAccordingPercent=function(e,t){return t=parseInt(t.toString().replace("%",""),10),t=parseInt(e*t/100,10)};var o=r(n(44))},function(e,t,n){"use strict";var r=n(69),o=n(100),i=n(102),a=n(86),s=n(144),l="Array Iterator",u=a.set,c=a.getterFor(l);e.exports=s(Array,"Array",function(e,t){u(this,{type:l,target:r(e),index:0,kind:t})},function(){var e=c(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?{value:e.target=void 0,done:!0}:"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(e,t,n){var r=n(34),o=n(192),i=n(16),a=n(63),s=n(35),l=s("iterator"),u=s("toStringTag"),c=i.values;for(var h in o){var d=r[h],f=d&&d.prototype;if(f){if(f[l]!==c)try{a(f,l,c)}catch(e){f[l]=c}if(f[u]||a(f,u,h),o[h])for(var v in i)if(f[v]!==i[v])try{a(f,v,i[v])}catch(e){f[v]=i[v]}}}},function(e,t,n){var r=n(332),o=n(402),i=n(333);e.exports=function(e,t){return r(e)||o(e,t)||i()}},function(e,t,n){"use strict";function u(e){if(!a(e))return!1;var t=e[l];return void 0!==t?!!t:i(e)}var r=n(22),o=n(29),i=n(124),a=n(42),c=n(60),h=n(50),d=n(126),f=n(152),s=n(104),l=n(35)("isConcatSpreadable"),v=9007199254740991,g="Maximum allowed index exceeded",p=!o(function(){var e=[];return e[l]=!1,e.concat()[0]!==e}),m=s("concat");r({target:"Array",proto:!0,forced:!p||!m},{concat:function(e){var t,n,r,o,i,a=c(this),s=f(a,0),l=0;for(t=-1,r=arguments.length;t<r;t++)if(u(i=-1===t?a:arguments[t])){if(o=h(i.length),v<l+o)throw TypeError(g);for(n=0;n<o;n++,l++)n in i&&d(s,l,i[n])}else{if(v<=l)throw TypeError(g);d(s,l++,i)}return s.length=l,s}})},function(e,t,n){"use strict";var r=n(0);n(16),n(76),n(10),n(14),n(24),n(17),t.__esModule=!0,t.registerPlugin=function(e,t){var n=(0,a.toUpperCaseFirst)(e);o.default.getSingleton().add("construct",function(){s.has(this)||s.set(this,{});var e=s.get(this);e[n]||(e[n]=new t(this))}),o.default.getSingleton().add("afterDestroy",function(){if(s.has(this)){var e=s.get(this);(0,i.objectEach)(e,function(e){return e.destroy()}),s.delete(this)}})},t.getPlugin=function(e,t){if("string"!=typeof t)throw Error('Only strings can be passed as "plugin" parameter');var n=(0,a.toUpperCaseFirst)(t);return s.has(e)&&s.get(e)[n]?s.get(e)[n]:void 0},t.getRegistredPluginNames=function(e){return s.has(e)?Object.keys(s.get(e)):[]},t.getPluginName=function(e,n){var r=null;s.has(e)&&(0,i.objectEach)(s.get(e),function(e,t){e===n&&(r=t)});return r};var o=r(n(43)),i=n(4),a=n(68),s=new WeakMap},function(e,t,n){"use strict";var r=n(0);n(12),n(16),n(30),n(10),n(14),n(24),n(17),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(4),s=n(3),l=n(91),u=n(20),c=new WeakMap,h=null,d=function(){function n(e){var t=this;(0,o.default)(this,n),(0,a.defineGetter)(this,"hot",e,{writable:!1}),(0,a.defineGetter)(this,"t",(0,l.getTranslator)(e),{writable:!1}),c.set(this,{hooks:{}}),h=null,this.pluginName=null,this.pluginsInitializedCallbacks=[],this.isPluginsReady=!1,this.enabled=!1,this.initialized=!1,this.hot.addHook("afterPluginsInitialized",function(){return t.onAfterPluginsInitialized()}),this.hot.addHook("afterUpdateSettings",function(e){return t.onUpdateSettings(e)}),this.hot.addHook("beforeInit",function(){return t.init()})}return(0,i.default)(n,[{key:"init",value:function(){this.pluginName=(0,u.getPluginName)(this.hot,this),this.isEnabled&&this.isEnabled()&&this.enablePlugin(),0<=(h=h||(0,u.getRegistredPluginNames)(this.hot)).indexOf(this.pluginName)&&h.splice(h.indexOf(this.pluginName),1),h.length||this.hot.runHooks("afterPluginsInitialized"),this.initialized=!0}},{key:"enablePlugin",value:function(){this.enabled=!0}},{key:"disablePlugin",value:function(){this.eventManager&&this.eventManager.clear(),this.clearHooks(),this.enabled=!1}},{key:"addHook",value:function(e,t){c.get(this).hooks[e]=c.get(this).hooks[e]||[];var n=c.get(this).hooks[e];this.hot.addHook(e,t),n.push(t),c.get(this).hooks[e]=n}},{key:"removeHooks",value:function(t){var n=this;(0,s.arrayEach)(c.get(this).hooks[t]||[],function(e){n.hot.removeHook(t,e)})}},{key:"clearHooks",value:function(){var n=this,e=c.get(this).hooks;(0,a.objectEach)(e,function(e,t){return n.removeHooks(t)}),e.length=0}},{key:"callOnPluginsReady",value:function(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}},{key:"onAfterPluginsInitialized",value:function(){(0,s.arrayEach)(this.pluginsInitializedCallbacks,function(e){return e()}),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}},{key:"onUpdateSettings",value:function(){this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&this.updatePlugin())}},{key:"updatePlugin",value:function(){}},{key:"destroy",value:function(){var n=this;this.eventManager&&this.eventManager.destroy(),this.clearHooks(),(0,a.objectEach)(this,function(e,t){"hot"!==t&&"t"!==t&&(n[t]=null)}),delete this.t,delete this.hot}}]),n}();t.default=d},function(e,t,n){var c=n(34),h=n(113).f,d=n(63),f=n(65),v=n(141),g=n(178),p=n(120);e.exports=function(e,t){var n,r,o,i,a,s=e.target,l=e.global,u=e.stat;if(n=l?c:u?c[s]||v(s,{}):(c[s]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(a=h(n,r))&&a.value:n[r],!p(l?r:s+(u?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;g(i,o)}(e.sham||o&&o.sham)&&d(i,"sham",!0),f(n,r,i,e)}}},function(e,t,n){"use strict";var r=n(0);n(30),t.__esModule=!0,t.getListenersCounter=function(){return l},t.default=void 0;var o=r(n(1)),i=r(n(2)),u=n(5),c=n(4),h=n(73),d=n(33),l=0,f=function(){function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null;(0,o.default)(this,t),this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}return(0,i.default)(t,[{key:"addEventListener",value:function(e,t,n,r){var o=this,i=3<arguments.length&&void 0!==r&&r,a=this.context;function s(e){n.call(this,function(e,t){var n,r,o,i,a,s="HOT-TABLE";t.isTargetWebComponent=!1,t.realTarget=t.target;var l=t.stopImmediatePropagation;if(t.stopImmediatePropagation=function(){l.apply(this),(0,d.stopImmediatePropagation)(this)},!f.isHotTableEnv)return t;t=(0,u.polymerWrap)(t),a=t.path?t.path.length:0;for(;a;){if(a-=1,t.path[a].nodeName===s)n=!0;else if(n&&t.path[a].shadowRoot){i=t.path[a];break}0!==a||i||(i=t.path[a])}i=i||t.target;t.isTargetWebComponent=!0,(0,h.isWebComponentSupportedNatively)()?t.realTarget=t.srcElement||t.toElement:((0,c.hasOwnProperty)(e,"hot")||e.isHotTableEnv||e.wtTable)&&((0,c.hasOwnProperty)(e,"hot")?r=e.hot?e.hot.view.wt.wtTable.TABLE:null:e.isHotTableEnv?r=e.view.activeWt.wtTable.TABLE.parentNode.parentNode:e.wtTable&&(r=e.wtTable.TABLE.parentNode.parentNode),o=(0,u.closest)(t.target,[s],r),t.realTarget=o&&r.querySelector(s)||t.target);return Object.defineProperty(t,"target",{get:function(){return(0,u.polymerWrap)(i)},enumerable:!0,configurable:!0}),t}(a,e))}return"boolean"==typeof i||(0,h.isPassiveEventSupported)()||(i=!1),this.context.eventListeners.push({element:e,event:t,callback:n,callbackProxy:s,options:i}),e.addEventListener(t,s,i),l+=1,function(){o.removeEventListener(e,t,n)}}},{key:"removeEventListener",value:function(e,t,n){for(var r,o=this.context.eventListeners.length;o;)if(o-=1,(r=this.context.eventListeners[o]).event===t&&r.element===e){if(n&&n!==r.callback)continue;this.context.eventListeners.splice(o,1),r.element.removeEventListener(r.event,r.callbackProxy,r.options),l-=1}}},{key:"clearEvents",value:function(){if(this.context)for(var e=this.context.eventListeners.length;e;){e-=1;var t=this.context.eventListeners[e];t&&this.removeEventListener(t.element,t.event,t.callback)}}},{key:"clear",value:function(){this.clearEvents()}},{key:"destroy",value:function(){this.clearEvents(),this.context=null}},{key:"fireEvent",value:function(e,t){var n=e.document,r=e;n||(r=(n=e.ownerDocument?e.ownerDocument:e).defaultView);var o,i={bubbles:!0,cancelable:"mousemove"!==t,view:r,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};n.createEvent?(o=n.createEvent("MouseEvents")).initMouseEvent(t,i.bubbles,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||n.body.parentNode):o=n.createEventObject(),e.dispatchEvent?e.dispatchEvent(o):e.fireEvent("on".concat(t),o)}}]),t}();var a=f;t.default=a},function(e,t,n){"use strict";function r(t){return function(e){return t(this,0<arguments.length?e:void 0)}}var o,i=n(34),a=n(147),s=n(122),l=n(123),u=n(191),c=n(42),h=n(86).enforce,d=n(177),f=!i.ActiveXObject&&"ActiveXObject"in i,v=Object.isExtensible,g=e.exports=l("WeakMap",r,u,!0,!0);if(d&&f){o=u.getConstructor(r,"WeakMap",!0),s.REQUIRED=!0;var p=g.prototype,m=p.delete,y=p.has,w=p.get,C=p.set;a(p,{delete:function(e){if(!c(e)||v(e))return m.call(this,e);var t=h(this);return t.frozen||(t.frozen=new o),m.call(this,e)||t.frozen.delete(e)},has:function(e){if(!c(e)||v(e))return y.call(this,e);var t=h(this);return t.frozen||(t.frozen=new o),y.call(this,e)||t.frozen.has(e)},get:function(e){if(!c(e)||v(e))return w.call(this,e);var t=h(this);return t.frozen||(t.frozen=new o),y.call(this,e)?w.call(this,e):t.frozen.get(e)},set:function(e,t){if(c(e)&&!v(e)){var n=h(this);n.frozen||(n.frozen=new o),y.call(this,e)?C.call(this,e,t):n.frozen.set(e,t)}else C.call(this,e,t);return this}})}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0;var o=r(n(199));t.ViewportColumnsCalculator=o.default;var i=r(n(200));t.ViewportRowsCalculator=i.default;var a=r(n(106));t.CellCoords=a.default;var s=r(n(201));t.CellRange=s.default;var l=r(n(202));t.ColumnFilter=l.default;var u=r(n(203));t.RowFilter=u.default;var c=r(n(396));t.DebugOverlay=c.default;var h=r(n(403));t.LeftOverlay=h.default;var d=r(n(404));t.TopOverlay=d.default;var f=r(n(405));t.TopLeftCornerOverlay=f.default;var v=r(n(406));t.BottomOverlay=v.default;var g=r(n(407));t.BottomLeftCornerOverlay=g.default;var p=r(n(336));t.Border=p.default;var m=r(n(326));t.default=m.default,t.Core=m.default;var y=r(n(327));t.Event=y.default;var w=r(n(328));t.Overlays=w.default;var C=r(n(329));t.Scroll=C.default;var E=r(n(408));t.Selection=E.default;var S=r(n(330));t.Settings=S.default;var b=r(n(331));t.Table=b.default;var R=r(n(334));t.TableRenderer=R.default;var T=r(n(335));t.Viewport=T.default},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){"use strict";var r=n(0);n(10),n(37),n(397),n(205),n(39),n(46),t.__esModule=!0,t.stringify=function(e){var t;switch((0,i.default)(e)){case"string":case"number":t="".concat(e);break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString()}return t},t.isDefined=function(e){return void 0!==e},t.isUndefined=f,t.isEmpty=g,t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t._injectProductInfo=function(e,t){var n,r=!g(e),o="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),i="7.1.0",a="invalid",s="invalid",l=function(e){var t=[][p],n=t;if(e[p]!==C("Z"))return!1;for(var r="",o="B<H4P+".split(""),i=C(o.shift());i;i=C(o.shift()||"A"))--i<""[p]?n|=(y("".concat(y(m(r)+(m(w(e,Math.abs(i),2))+[]).padStart(2,"0"))))%97||2)>>1:r=w(e,i,i?1===o[p]?9:8:6);return n===t}(e=E(e||""));if(r||o||l)if(l){var u=(0,v.default)("11/06/2019","DD/MM/YYYY"),c=Math.floor(u.toDate().getTime()/864e5),h=S(e);if(n=(0,v.default)(864e5*(h+1),"x").format("MMMM DD, YYYY"),h<c){var d=(0,v.default)().diff(u,"days");a=d<=1?"valid":"expired",s=d<=15?"valid":"expired"}else s=a="valid"}else s=o?(a="non_commercial","valid"):a="invalid";else s=a="missing";b()&&(s=a="valid");if(!R&&"valid"!==a){T[a]({keyValidityDate:n,hotVersion:i})&&console["non_commercial"===a?"info":"warn"](T[a]({keyValidityDate:n,hotVersion:i})),R=!0}if("valid"!==s&&t.parentNode){if(O[s]({keyValidityDate:n,hotVersion:i})){var f=document.createElement("div");f.id="hot-display-license-info",f.innerHTML=O[s]({keyValidityDate:n,hotVersion:i}),t.parentNode.insertBefore(f,t.nextSibling)}}};var o=r(n(66)),i=r(n(44)),v=r(n(61)),a=n(67);function s(){var e=(0,o.default)(['\n The license key for Handsontable is missing. Use your purchased key to activate the product. \n Alternatively, you can activate Handsontable to use for non-commercial purposes by \n passing the key: \'non-commercial-and-evaluation\'. \n <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> about it in \n the documentation or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.'],['\n The license key for Handsontable is missing. Use your purchased key to activate the product.\\x20\n Alternatively, you can activate Handsontable to use for non-commercial purposes by\\x20\n passing the key: \'non-commercial-and-evaluation\'.\\x20\n <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> about it in\\x20\n the documentation or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.']);return s=function(){return e},e}function l(){var e=(0,o.default)(["\n The license key for Handsontable expired on ",", and is not valid for the installed \n version ",'. <a href="https://handsontable.com/pricing" target="_blank">Renew</a> your \n license key or downgrade to a version released prior to ','. If you need any \n help, contact us at <a href="mailto:sales@handsontable.com">sales@handsontable.com</a>.'],["\n The license key for Handsontable expired on ",", and is not valid for the installed\\x20\n version ",'. <a href="https://handsontable.com/pricing" target="_blank">Renew</a> your\\x20\n license key or downgrade to a version released prior to ','. If you need any\\x20\n help, contact us at <a href="mailto:sales@handsontable.com">sales@handsontable.com</a>.']);return l=function(){return e},e}function u(){var e=(0,o.default)(['\n The license key for Handsontable is invalid. \n <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> on how to \n install it properly or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.'],['\n The license key for Handsontable is invalid.\\x20\n <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> on how to\\x20\n install it properly or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.']);return u=function(){return e},e}function c(){var e=(0,o.default)(["\n The license key for Handsontable is missing. Use your purchased key to activate the product. \n Alternatively, you can activate Handsontable to use for non-commercial purposes by \n passing the key: 'non-commercial-and-evaluation'. If you need any help, contact \n us at support@handsontable.com."],["\n The license key for Handsontable is missing. Use your purchased key to activate the product.\\x20\n Alternatively, you can activate Handsontable to use for non-commercial purposes by\\x20\n passing the key: 'non-commercial-and-evaluation'. If you need any help, contact\\x20\n us at support@handsontable.com."]);return c=function(){return e},e}function h(){var e=(0,o.default)(["\n The license key for Handsontable expired on ",", and is not valid for the installed \n version ",". Renew your license key at handsontable.com or downgrade to a version released prior \n to ",". If you need any help, contact us at sales@handsontable.com."],["\n The license key for Handsontable expired on ",", and is not valid for the installed\\x20\n version ",". Renew your license key at handsontable.com or downgrade to a version released prior\\x20\n to ",". If you need any help, contact us at sales@handsontable.com."]);return h=function(){return e},e}function d(){var e=(0,o.default)(["\n The license key for Handsontable is invalid. \n If you need any help, contact us at support@handsontable.com."],["\n The license key for Handsontable is invalid.\\x20\n If you need any help, contact us at support@handsontable.com."]);return d=function(){return e},e}function f(e){return void 0===e}function g(e){return null===e||""===e||f(e)}var p="length",m=function(e){return parseInt(e,16)},y=function(e){return parseInt(e,10)},w=function(e,t,n){return e.substr(t,n)},C=function(e){return e.codePointAt(0)-65},E=function(e){return"".concat(e).replace(/\-/g,"")},S=function(e){return m(w(E(e),m("12"),C("F")))/(m(w(E(e),C("B"),~~![][p]))||9)},b=function(){return"undefined"!=typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host)},R=!1,T={invalid:function(){return(0,a.toSingleLine)(d())},expired:function(e){var t=e.keyValidityDate,n=e.hotVersion;return(0,a.toSingleLine)(h(),t,n,t)},missing:function(){return(0,a.toSingleLine)(c())},non_commercial:function(){return""}},O={invalid:function(){return(0,a.toSingleLine)(u())},expired:function(e){var t=e.keyValidityDate,n=e.hotVersion;return(0,a.toSingleLine)(l(),t,n,t)},missing:function(){return(0,a.toSingleLine)(s())},non_commercial:function(){return""}}},function(e,t,n){"use strict";n(19),t.__esModule=!0,t.getCondition=function(e,t){if(!a[e])throw Error('Filter condition "'.concat(e,'" does not exist.'));var n=a[e],r=n.condition,o=n.descriptor,i=t;o.inputValuesDecorator&&(i=o.inputValuesDecorator(i));return function(e){return r.apply(e.meta.instance,[].concat([e],[i]))}},t.getConditionDescriptor=function(e){if(a[e])return a[e].descriptor;throw Error('Filter condition "'.concat(e,'" does not exist.'))},t.registerCondition=function(e,t,n){n.key=e,a[e]={condition:t,descriptor:n}},t.conditions=void 0;var a={};t.conditions=a},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";var r=n(22),d=n(118),f=n(87),v=n(50),g=n(60),p=n(152),m=n(126),o=n(104),y=Math.max,w=Math.min;r({target:"Array",proto:!0,forced:!o("splice")},{splice:function(e,t){var n,r,o,i,a,s,l=g(this),u=v(l.length),c=d(e,u),h=arguments.length;if(0===h?n=r=0:r=1===h?(n=0,u-c):(n=h-2,w(y(f(t),0),u-c)),9007199254740991<u+n-r)throw TypeError("Maximum allowed length exceeded");for(o=p(l,r),i=0;i<r;i++)(a=c+i)in l&&m(o,i,l[a]);if(n<(o.length=r)){for(i=c;i<u-r;i++)s=i+n,(a=i+r)in l?l[s]=l[a]:delete l[s];for(i=u;u-r+n<i;i--)delete l[i-1]}else if(r<n)for(i=u-r;c<i;i--)s=i+n-1,(a=i+r-1)in l?l[s]=l[a]:delete l[s];for(i=0;i<n;i++)l[i+c]=arguments[i+2];return l.length=u-r+n,o}})},function(e,t,n){"use strict";var r=n(22),o=n(142),i=n(100),a=o(!0);r({target:"Array",proto:!0},{includes:function(e,t){return a(this,e,1<arguments.length?t:void 0)}}),i("includes")},function(e,t,n){function r(o){return function(e,t){var n=2<arguments.length,r=n&&s.call(arguments,2);return o(n?function(){("function"==typeof e?e:Function(e)).apply(this,r)}:e,t)}}var o=n(22),i=n(34),a=n(204),s=[].slice;o({global:!0,bind:!0,forced:/MSIE .\./.test(a)},{setTimeout:r(i.setTimeout),setInterval:r(i.setInterval)})},function(e,t,n){"use strict";t.__esModule=!0,t.stopImmediatePropagation=function(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0},t.isImmediatePropagationStopped=function(e){return!1===e.isImmediatePropagationEnabled},t.stopPropagation=function(e){"function"==typeof e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.pageX=function(e){if(e.pageX)return e.pageX;var t=e.target.ownerDocument.defaultView;return e.clientX+(0,r.getWindowScrollLeft)(t)},t.pageY=function(e){if(e.pageY)return e.pageY;var t=e.target.ownerDocument.defaultView;return e.clientY+(0,r.getWindowScrollTop)(t)},t.isRightClick=function(e){return 2===e.button},t.isLeftClick=function(e){return 0===e.button};var r=n(5)},function(e,t){function n(e){return e&&e.Math==Math&&e}var r="object";e.exports=n(typeof globalThis==r&&globalThis)||n(typeof window==r&&window)||n(typeof self==r&&self)||n(typeof global==r&&global)||Function("return this")()},function(e,t,n){var r=n(34),o=n(97),i=n(117),a=n(181),s=r.Symbol,l=o("wks");e.exports=function(e){return l[e]||(l[e]=a&&s[e]||(a?s:i)("Symbol."+e))}},function(e,t,n){var r=n(390),o=n(196),i=n(391);e.exports=function(e){return r(e)||o(e)||i()}},function(e,t,n){"use strict";var r=n(65),o=n(45),i=n(29),a=n(153),s="toString",l=/./[s],u=RegExp.prototype,c=i(function(){return"/a/b"!=l.call({source:"a",flags:"b"})}),h=l.name!=s;(c||h)&&r(RegExp.prototype,s,function(){var e=o(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in u)?a.call(e):n)},{unsafe:!0})},function(e,t,n){"use strict";var r=n(22),o=n(157);r({target:"String",proto:!0,forced:!n(158)("includes")},{includes:function(e,t){return!!~o(this,e,"includes").indexOf(e,1<arguments.length?t:void 0)}})},function(e,t,n){"use strict";var r=n(127),R=n(45),d=n(60),T=n(50),O=n(87),i=n(59),k=n(156),M=n(128),N=Math.max,_=Math.min,f=Math.floor,v=/\$([$&'`]|\d\d?|<[^>]*>)/g,g=/\$([$&'`]|\d\d?)/g;r("replace",2,function(o,E,S){return[function(e,t){var n=i(this),r=null==e?void 0:e[o];return void 0!==r?r.call(e,n,t):E.call(String(n),e,t)},function(e,t){var n=S(E,e,this,t);if(n.done)return n.value;var r=R(e),o=String(this),i="function"==typeof t;i||(t=String(t));var a=r.global;if(a){var s=r.unicode;r.lastIndex=0}for(var l=[];;){var u=M(r,o);if(null===u)break;if(l.push(u),!a)break;""===String(u[0])&&(r.lastIndex=k(o,T(r.lastIndex),s))}for(var c,h="",d=0,f=0;f<l.length;f++){u=l[f];for(var v=String(u[0]),g=N(_(O(u.index),o.length),0),p=[],m=1;m<u.length;m++)p.push(void 0===(c=u[m])?c:String(c));var y=u.groups;if(i){var w=[v].concat(p,g,o);void 0!==y&&w.push(y);var C=String(t.apply(void 0,w))}else C=b(v,o,g,p,y,t);d<=g&&(h+=o.slice(d,g)+C,d=g+v.length)}return h+o.slice(d)}];function b(i,a,s,l,u,e){var c=s+i.length,h=l.length,t=g;return void 0!==u&&(u=d(u),t=v),E.call(e,t,function(e,t){var n;switch(t.charAt(0)){case"$":return"$";case"&":return i;case"`":return a.slice(0,s);case"'":return a.slice(c);case"<":n=u[t.slice(1,-1)];break;default:var r=+t;if(0==r)return e;if(h<r){var o=f(r/10);return 0===o?e:o<=h?void 0===l[o-1]?t.charAt(1):l[o-1]+t.charAt(1):e}n=l[r-1]}return void 0===n?"":n})}})},function(e,t,n){"use strict";var r=n(22),u=n(42),c=n(124),h=n(118),d=n(50),f=n(69),v=n(126),o=n(104),g=n(35)("species"),p=[].slice,m=Math.max;r({target:"Array",proto:!0,forced:!o("slice")},{slice:function(e,t){var n,r,o,i=f(this),a=d(i.length),s=h(e,a),l=h(void 0===t?a:t,a);if(c(i)&&("function"!=typeof(n=i.constructor)||n!==Array&&!c(n.prototype)?u(n)&&null===(n=n[g])&&(n=void 0):n=void 0,n===Array||void 0===n))return p.call(i,s,l);for(r=new(void 0===n?Array:n)(m(l-s,0)),o=0;s<l;s++,o++)s in i&&v(r,o,i[s]);return r.length=o,r}})},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.getRenderer=function(e){if("function"==typeof e)return e;if(g(e))return v(e);throw Error('No registered renderer found under "'.concat(e,'" name'))},t.getRegisteredRenderers=t.getRegisteredRendererNames=t.hasRenderer=t.registerRenderer=void 0;var o=r(n(78)),i=r(n(420)),a=r(n(421)),s=r(n(422)),l=r(n(423)),u=r(n(424)),c=r(n(425)),h=r(n(426)),d=(0,o.default)("renderers"),f=d.register,v=d.getItem,g=d.hasItem,p=d.getNames,m=d.getValues;t.getRegisteredRenderers=m,t.getRegisteredRendererNames=p,t.hasRenderer=g,(t.registerRenderer=f)("base",i.default),f("autocomplete",a.default),f("checkbox",s.default),f("html",l.default),f("numeric",u.default),f("password",c.default),f("text",h.default)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){"use strict";var r=n(0);n(12),n(30),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),s=n(3),a=n(4),l=["afterCellMetaReset","afterChange","afterChangesObserved","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterCreateCol","beforeCreateRow","afterCreateRow","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterLoadData","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterRemoveCol","afterRemoveRow","afterRender","beforeRenderer","afterRenderer","afterScrollHorizontally","afterScrollVertically","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterUpdateSettings","afterValidate","beforeLanguageChange","afterLanguageChange","beforeAutofill","beforeCellAlignment","beforeChange","beforeChangeRender","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeInit","beforeInitWalkontable","beforeKeyDown","beforeOnCellMouseDown","beforeOnCellMouseUp","beforeOnCellContextMenu","beforeOnCellMouseOver","beforeOnCellMouseOut","beforeRemoveCol","beforeRemoveRow","beforeRender","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyCol","unmodifyCol","unmodifyRow","modifyColHeader","modifyColWidth","modifyRow","modifyRowHeader","modifyRowHeight","modifyData","modifyRowData","modifyGetCellCoords","persistentStateLoad","persistentStateReset","persistentStateSave","beforeColumnSort","afterColumnSort","modifyAutofillRange","modifyCopyableRange","beforeCut","afterCut","beforeCopy","afterCopy","beforePaste","afterPaste","beforeColumnMove","afterColumnMove","beforeRowMove","afterRowMove","beforeColumnResize","afterColumnResize","beforeRowResize","afterRowResize","afterGetColumnHeaderRenderers","afterGetRowHeaderRenderers","beforeStretchingColumnWidth","beforeFilter","afterFilter","modifyColumnHeaderHeight","beforeUndo","afterUndo","beforeRedo","afterRedo","modifyRowHeaderWidth","beforeAutofillInsidePopulate","modifyTransformStart","modifyTransformEnd","afterModifyTransformStart","afterModifyTransformEnd","afterViewportRowCalculatorOverride","afterViewportColumnCalculatorOverride","afterPluginsInitialized","skipLengthCache","beforeHideRows","afterHideRows","beforeUnhideRows","afterUnhideRows","beforeHideColumns","afterHideColumns","beforeUnhideColumns","afterUnhideColumns","beforeTrimRow","afterTrimRow","beforeUntrimRow","afterUntrimRow","beforeDropdownMenuShow","afterDropdownMenuShow","afterDropdownMenuHide","hiddenRow","hiddenColumn","beforeAddChild","afterAddChild","beforeDetachChild","afterDetachChild","afterBeginEditing","beforeMergeCells","afterMergeCells","beforeUnmergeCells","afterUnmergeCells","afterListen","afterUnlisten","afterRefreshDimensions","beforeRefreshDimensions"],u=function(){function e(){(0,o.default)(this,e),this.globalBucket=this.createEmptyBucket()}return(0,i.default)(e,null,[{key:"getSingleton",value:function(){return c}}]),(0,i.default)(e,[{key:"createEmptyBucket",value:function(){var t=Object.create(null);return(0,s.arrayEach)(l,function(e){return t[e]=[]}),t}},{key:"getBucket",value:function(e){var t=0<arguments.length&&void 0!==e?e:null;return t?(t.pluginHookBucket||(t.pluginHookBucket=this.createEmptyBucket()),t.pluginHookBucket):this.globalBucket}},{key:"add",value:function(n,r,e){var t=this,o=2<arguments.length&&void 0!==e?e:null;if(Array.isArray(r))(0,s.arrayEach)(r,function(e){return t.add(n,e,o)});else{var i=this.getBucket(o);if(void 0===i[n]&&(this.register(n),i[n]=[]),r.skip=!1,-1===i[n].indexOf(r)){var a=!1;r.initialHook&&(0,s.arrayEach)(i[n],function(e,t){if(e.initialHook)return i[n][t]=r,!(a=!0)}),a||i[n].push(r)}}return this}},{key:"once",value:function(t,e,n){var r=this,o=2<arguments.length&&void 0!==n?n:null;Array.isArray(e)?(0,s.arrayEach)(e,function(e){return r.once(t,e,o)}):(e.runOnce=!0,this.add(t,e,o))}},{key:"remove",value:function(e,t,n){var r=2<arguments.length&&void 0!==n?n:null,o=this.getBucket(r);return void 0!==o[e]&&0<=o[e].indexOf(t)&&(t.skip=!0)}},{key:"has",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:null,r=this.getBucket(n);return!(void 0===r[e]||!r[e].length)}},{key:"run",value:function(e,t,n,r,o,i,a,s){var l=this.globalBucket[t],u=l?l.length:0,c=0;if(u)for(;c<u;)if(l[c]&&!l[c].skip){var h=l[c].call(e,n,r,o,i,a,s);void 0!==h&&(n=h),l[c]&&l[c].runOnce&&this.remove(t,l[c]),c+=1}else c+=1;var d=this.getBucket(e)[t],f=d?d.length:0,v=0;if(f)for(;v<f;)if(d[v]&&!d[v].skip){var g=d[v].call(e,n,r,o,i,a,s);void 0!==g&&(n=g),d[v]&&d[v].runOnce&&this.remove(t,d[v],e),v+=1}else v+=1;return n}},{key:"destroy",value:function(e){var t=0<arguments.length&&void 0!==e?e:null;(0,a.objectEach)(this.getBucket(t),function(e,t,n){return n[t].length=0})}},{key:"register",value:function(e){this.isRegistered(e)||l.push(e)}},{key:"deregister",value:function(e){this.isRegistered(e)&&l.splice(l.indexOf(e),1)}},{key:"isRegistered",value:function(e){return 0<=l.indexOf(e)}},{key:"getRegistered",value:function(){return l}}]),e}(),c=new u;var h=u;t.default=h},function(t,e){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=r=function(e){return n(e)}:t.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(e)}t.exports=r},function(e,t,n){var r=n(42);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){"use strict";var r=n(127),h=n(155),w=n(45),d=n(59),C=n(393),E=n(156),S=n(50),b=n(128),f=n(154),o=n(29),v=[].push,R=Math.min,T=4294967295,O=!o(function(){return!RegExp(T,"y")});r("split",2,function(o,p,m){var y;return y="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||1<".".split(/()()/).length||"".split(/.?/).length?function(e,t){var n=String(d(this)),r=void 0===t?T:t>>>0;if(0==r)return[];if(void 0===e)return[n];if(!h(e))return p.call(n,e,r);for(var o,i,a,s=[],l=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),u=0,c=new RegExp(e.source,l+"g");(o=f.call(c,n))&&!(u<(i=c.lastIndex)&&(s.push(n.slice(u,o.index)),1<o.length&&o.index<n.length&&v.apply(s,o.slice(1)),a=o[0].length,u=i,s.length>=r));)c.lastIndex===o.index&&c.lastIndex++;return u===n.length?!a&&c.test("")||s.push(""):s.push(n.slice(u)),s.length>r?s.slice(0,r):s}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:p.call(this,e,t)}:p,[function(e,t){var n=d(this),r=null==e?void 0:e[o];return void 0!==r?r.call(e,n,t):y.call(String(n),e,t)},function(e,t){var n=m(y,e,this,t,y!==p);if(n.done)return n.value;var r=w(e),o=String(this),i=C(r,RegExp),a=r.unicode,s=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(O?"y":"g"),l=new i(O?r:"^(?:"+r.source+")",s),u=void 0===t?T:t>>>0;if(0==u)return[];if(0===o.length)return null===b(l,o)?[o]:[];for(var c=0,h=0,d=[];h<o.length;){l.lastIndex=O?h:0;var f,v=b(l,O?o:o.slice(h));if(null===v||(f=R(S(l.lastIndex+(O?0:h)),o.length))===c)h=E(o,h,a);else{if(d.push(o.slice(c,h)),d.length===u)return d;for(var g=1;g<=v.length-1;g++)if(d.push(v[g]),d.length===u)return d;h=c=f}}return d.push(o.slice(c)),d}]},!O)},function(e,t,n){var r=n(29);e.exports=!r(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(47),o=n(175),i=n(45),a=n(96),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(i(e),t=a(t,!0),i(n),o)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(87),o=Math.min;e.exports=function(e){return 0<e?o(r(e),9007199254740991):0}},function(e,t,n){"use strict";var r=n(22),o=n(114),i=n(69),a=n(125),s=[].join,l=o!=Object,u=a("join",",");r({target:"Array",proto:!0,forced:l||u},{join:function(e){return s.call(i(this),void 0===e?",":e)}})},function(e,t,n){"use strict";n(31),n(12),n(38),n(46),t.__esModule=!0,t.isPrintableChar=function(e){return 32===e||48<=e&&e<=57||96<=e&&e<=111||186<=e&&e<=192||219<=e&&e<=222||226<=e||65<=e&&e<=90},t.isMetaKey=function(e){return-1!==[i.ARROW_DOWN,i.ARROW_UP,i.ARROW_LEFT,i.ARROW_RIGHT,i.HOME,i.END,i.DELETE,i.BACKSPACE,i.F1,i.F2,i.F3,i.F4,i.F5,i.F6,i.F7,i.F8,i.F9,i.F10,i.F11,i.F12,i.TAB,i.PAGE_DOWN,i.PAGE_UP,i.ENTER,i.ESCAPE,i.SHIFT,i.CAPS_LOCK,i.ALT].indexOf(e)},t.isCtrlKey=function(e){var t=[];navigator.platform.includes("Mac")?t.push(i.COMMAND_LEFT,i.COMMAND_RIGHT,i.COMMAND_FIREFOX):t.push(i.CONTROL);return t.includes(e)},t.isCtrlMetaKey=function(e){return[i.CONTROL,i.COMMAND_LEFT,i.COMMAND_RIGHT,i.COMMAND_FIREFOX].includes(e)},t.isKey=function(t,e){var n=e.split("|"),r=!1;return(0,o.arrayEach)(n,function(e){if(t===i[e])return!(r=!0)}),r},t.KEY_CODES=void 0;var o=n(3),i={MOUSE_LEFT:1,MOUSE_RIGHT:3,MOUSE_MIDDLE:2,BACKSPACE:8,COMMA:188,INSERT:45,DELETE:46,END:35,ENTER:13,ESCAPE:27,CONTROL:17,COMMAND_LEFT:91,COMMAND_RIGHT:93,COMMAND_FIREFOX:224,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,C:67,D:68,F:70,L:76,O:79,P:80,S:83,V:86,X:88};t.KEY_CODES=i},function(e,t,n){"use strict";var r=n(22),o=n(90),i=n(104),a=o(2);r({target:"Array",proto:!0,forced:!i("filter")},{filter:function(e,t){return a(this,e,t)}})},function(e,t,n){var r=n(47),o=n(49).f,i=Function.prototype,a=i.toString,s=/^\s*function ([^ (]*)/;!r||"name"in i||o(i,"name",{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(0);n(16),n(10),n(14),n(24),n(17),t.__esModule=!0,t.RegisteredEditor=b,t.getEditorInstance=t._getEditorInstance=function(e,t){var n;if("function"==typeof e)p.get(e)||R(null,e),n=p.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');n=w(e)}if(n)return n.getInstance(t);throw Error('No editor registered under name "'.concat(e,'"'))},t.registerEditor=R,t.getEditor=function(e){if(C(e))return w(e).getConstructor();throw Error('No registered editor found under "'.concat(e,'" name'))},t.getRegisteredEditors=t.getRegisteredEditorNames=t.hasEditor=void 0;var o=r(n(78)),i=r(n(43)),a=r(n(105)),s=r(n(337)),l=r(n(412)),u=r(n(413)),c=r(n(416)),h=r(n(338)),d=r(n(417)),f=r(n(418)),v=r(n(419)),g=r(n(107)),p=new WeakMap,m=(0,o.default)("editors"),y=m.register,w=m.getItem,C=m.hasItem,E=m.getNames,S=m.getValues;function b(e){var t={},n=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new n(e)),t[e.guid]},i.default.getSingleton().add("afterDestroy",function(){t[this.guid]=null})}function R(e,t){var n=new b(t);"string"==typeof e&&y(e,n),p.set(t,n)}t.getRegisteredEditors=S,t.getRegisteredEditorNames=E,t.hasEditor=C,R("base",a.default),R("autocomplete",s.default),R("checkbox",l.default),R("date",u.default),R("dropdown",c.default),R("handsontable",h.default),R("numeric",d.default),R("password",f.default),R("select",v.default),R("text",g.default)},function(e,t,n){var r=n(22),o=n(392);r({target:"Array",stat:!0,forced:!n(190)(function(e){Array.from(e)})},{from:o})},function(e,t,n){"use strict";t.__esModule=!0,t.log=function(){var e;(0,r.isDefined)(console)&&(e=console).log.apply(e,arguments)},t.warn=function(){var e;(0,r.isDefined)(console)&&(e=console).warn.apply(e,arguments)},t.info=function(){var e;(0,r.isDefined)(console)&&(e=console).info.apply(e,arguments)},t.error=function(){var e;(0,r.isDefined)(console)&&(e=console).error.apply(e,arguments)};var r=n(27)},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var i=n(3),r=n(4),o={_localHooks:Object.create(null),addLocalHook:function(e,t){return this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(t),this},runLocalHooks:function(e){for(var t=this,n=arguments.length,r=new Array(1<n?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this._localHooks[e]&&(0,i.arrayEach)(this._localHooks[e],function(e){return e.apply(t,r)})},clearLocalHooks:function(){return this._localHooks={},this}};(0,r.defineGetter)(o,"MIXIN_NAME","localHooks",{writable:!1,enumerable:!1});var a=o;t.default=a},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(59);e.exports=function(e){return Object(r(e))}},function(e,t,qn){(function(Kn){Kn.exports=function(){"use strict";var t,o;function u(){return t.apply(null,arguments)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function i(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function r(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function d(e,t){for(var n in t)h(t,n)&&(e[n]=t[n]);return h(t,"toString")&&(e.toString=t.toString),h(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,r){return At(e,t,n,r,!0).utc()}function v(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function g(e){if(null==e._isValid){var t=v(e),n=o.call(t.parsedDateParts,function(e){return null!=e}),r=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return r;e._isValid=r}return e._isValid}function p(e){var t=f(NaN);return null!=e?d(v(t),e):v(t).userInvalidated=!0,t}o=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var m=u.momentProperties=[];function y(e,t){var n,r,o;if(i(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),i(t._i)||(e._i=t._i),i(t._f)||(e._f=t._f),i(t._l)||(e._l=t._l),i(t._strict)||(e._strict=t._strict),i(t._tzm)||(e._tzm=t._tzm),i(t._isUTC)||(e._isUTC=t._isUTC),i(t._offset)||(e._offset=t._offset),i(t._pf)||(e._pf=v(t)),i(t._locale)||(e._locale=t._locale),0<m.length)for(n=0;n<m.length;n++)r=m[n],i(o=t[r])||(e[r]=o);return e}var n=!1;function w(e){y(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===n&&(n=!0,u.updateOffset(this),n=!1)}function C(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function E(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function S(e){var t=+e,n=0;return 0!=t&&isFinite(t)&&(n=E(t)),n}function b(e,t,n){var r,o=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0;for(r=0;r<o;r++)(n&&e[r]!==t[r]||!n&&S(e[r])!==S(t[r]))&&a++;return a+i}function R(e){!1===u.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function e(o,i){var a=!0;return d(function(){if(null!=u.deprecationHandler&&u.deprecationHandler(null,o),a){for(var e,t=[],n=0;n<arguments.length;n++){if(e="","object"==typeof arguments[n]){for(var r in e+="\n["+n+"] ",arguments[0])e+=r+": "+arguments[0][r]+", ";e=e.slice(0,-2)}else e=arguments[n];t.push(e)}R(o+"\nArguments: "+Array.prototype.slice.call(t).join("")+"\n"+(new Error).stack),a=!1}return i.apply(this,arguments)},i)}var T,O={};function k(e,t){null!=u.deprecationHandler&&u.deprecationHandler(e,t),O[e]||(R(t),O[e]=!0)}function M(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function N(e,t){var n,r=d({},e);for(n in t)h(t,n)&&(s(e[n])&&s(t[n])?(r[n]={},d(r[n],e[n]),d(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)h(e,n)&&!h(t,n)&&s(e[n])&&(r[n]=d({},r[n]));return r}function _(e){null!=e&&this.set(e)}u.suppressDeprecationWarnings=!1,u.deprecationHandler=null,T=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)h(e,t)&&n.push(t);return n};var A={};function I(e,t){var n=e.toLowerCase();A[n]=A[n+"s"]=A[t]=e}function D(e){return"string"==typeof e?A[e]||A[e.toLowerCase()]:void 0}function L(e){var t,n,r={};for(n in e)h(e,n)&&(t=D(n))&&(r[t]=e[n]);return r}var H={};function x(e,t){H[e]=t}function P(e){var t=[];for(var n in e)t.push({unit:n,priority:H[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}function F(e,t,n){var r=""+Math.abs(e),o=t-r.length,i=0<=e;return(i?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var B=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,W=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V={},U={};function Y(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(U[e]=o),t&&(U[t[0]]=function(){return F(o.apply(this,arguments),t[1],t[2])}),n&&(U[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function j(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function G(e,t){return e.isValid()?(t=z(t,e.localeData()),V[t]=V[t]||function(r){var e,o,i=r.match(B);for(e=0,o=i.length;e<o;e++)U[i[e]]?i[e]=U[i[e]]:i[e]=j(i[e]);return function(e){var t,n="";for(t=0;t<o;t++)n+=M(i[t])?i[t].call(e,r):i[t];return n}}(t),V[t](e)):e.localeData().invalidDate()}function z(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(W.lastIndex=0;0<=n&&W.test(e);)e=e.replace(W,r),W.lastIndex=0,n-=1;return e}var X=/\d/,K=/\d\d/,q=/\d{3}/,$=/\d{4}/,Q=/[+-]?\d{6}/,Z=/\d\d?/,J=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,ne=/\d{1,4}/,re=/[+-]?\d{1,6}/,oe=/\d+/,ie=/[+-]?\d+/,ae=/Z|[+-]\d\d:?\d\d/gi,se=/Z|[+-]\d\d(?::?\d\d)?/gi,le=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ue={};function ce(e,n,r){ue[e]=M(n)?n:function(e,t){return e&&r?r:n}}function he(e,t){return h(ue,e)?ue[e](t._strict,t._locale):new RegExp(function(e){return de(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,o){return t||n||r||o}))}(e))}function de(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var fe={};function ve(e,n){var t,r=n;for("string"==typeof e&&(e=[e]),l(n)&&(r=function(e,t){t[n]=S(e)}),t=0;t<e.length;t++)fe[e[t]]=r}function ge(e,o){ve(e,function(e,t,n,r){n._w=n._w||{},o(e,n._w,n,r)})}function pe(e,t,n){null!=t&&h(fe,e)&&fe[e](t,n._a,n,e)}var me=0,ye=1,we=2,Ce=3,Ee=4,Se=5,be=6,Re=7,Te=8;function Oe(e){return ke(e)?366:365}function ke(e){return e%4==0&&e%100!=0||e%400==0}Y("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),Y(0,["YY",2],0,function(){return this.year()%100}),Y(0,["YYYY",4],0,"year"),Y(0,["YYYYY",5],0,"year"),Y(0,["YYYYYY",6,!0],0,"year"),I("year","y"),x("year",1),ce("Y",ie),ce("YY",Z,K),ce("YYYY",ne,$),ce("YYYYY",re,Q),ce("YYYYYY",re,Q),ve(["YYYYY","YYYYYY"],me),ve("YYYY",function(e,t){t[me]=2===e.length?u.parseTwoDigitYear(e):S(e)}),ve("YY",function(e,t){t[me]=u.parseTwoDigitYear(e)}),ve("Y",function(e,t){t[me]=parseInt(e,10)}),u.parseTwoDigitYear=function(e){return S(e)+(68<S(e)?1900:2e3)};var Me,Ne=_e("FullYear",!0);function _e(t,n){return function(e){return null!=e?(Ie(this,t,e),u.updateOffset(this,n),this):Ae(this,t)}}function Ae(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Ie(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ke(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),De(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function De(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=function(e,t){return(e%t+t)%t}(t,12);return e+=(t-n)/12,1===n?ke(e)?29:28:31-n%7%2}Me=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},Y("M",["MM",2],"Mo",function(){return this.month()+1}),Y("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),Y("MMMM",0,0,function(e){return this.localeData().months(this,e)}),I("month","M"),x("month",8),ce("M",Z),ce("MM",Z,K),ce("MMM",function(e,t){return t.monthsShortRegex(e)}),ce("MMMM",function(e,t){return t.monthsRegex(e)}),ve(["M","MM"],function(e,t){t[ye]=S(e)-1}),ve(["MMM","MMMM"],function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[ye]=o:v(n).invalidMonth=e});var Le=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,He="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var xe="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Pe(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=f([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=Me.call(this._shortMonthsParse,a))?o:null:-1!==(o=Me.call(this._longMonthsParse,a))?o:null:"MMM"===t?-1!==(o=Me.call(this._shortMonthsParse,a))?o:-1!==(o=Me.call(this._longMonthsParse,a))?o:null:-1!==(o=Me.call(this._longMonthsParse,a))?o:-1!==(o=Me.call(this._shortMonthsParse,a))?o:null}function Fe(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=S(t);else if(!l(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),De(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Be(e){return null!=e?(Fe(this,e),u.updateOffset(this,!0),this):Ae(this,"Month")}var We=le;var Ve=le;function Ue(){function e(e,t){return t.length-e.length}var t,n,r=[],o=[],i=[];for(t=0;t<12;t++)n=f([2e3,t]),r.push(this.monthsShort(n,"")),o.push(this.months(n,"")),i.push(this.months(n,"")),i.push(this.monthsShort(n,""));for(r.sort(e),o.sort(e),i.sort(e),t=0;t<12;t++)r[t]=de(r[t]),o[t]=de(o[t]);for(t=0;t<24;t++)i[t]=de(i[t]);this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Ye(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&0<=e&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function je(e,t,n){var r=7+t-n,o=(7+Ye(e,0,r).getUTCDay()-t)%7;return r-o-1}function Ge(e,t,n,r,o){var i,a,s=(7+n-r)%7,l=je(e,r,o),u=1+7*(t-1)+s+l;return a=u<=0?Oe(i=e-1)+u:u>Oe(e)?(i=e+1,u-Oe(e)):(i=e,u),{year:i,dayOfYear:a}}function ze(e,t,n){var r,o,i=je(e.year(),t,n),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?(o=e.year()-1,r=a+Xe(o,t,n)):a>Xe(e.year(),t,n)?(r=a-Xe(e.year(),t,n),o=e.year()+1):(o=e.year(),r=a),{week:r,year:o}}function Xe(e,t,n){var r=je(e,t,n),o=je(e+1,t,n);return(Oe(e)-r+o)/7}Y("w",["ww",2],"wo","week"),Y("W",["WW",2],"Wo","isoWeek"),I("week","w"),I("isoWeek","W"),x("week",5),x("isoWeek",5),ce("w",Z),ce("ww",Z,K),ce("W",Z),ce("WW",Z,K),ge(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=S(e)});Y("d",0,"do","day"),Y("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),Y("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),Y("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),Y("e",0,0,"weekday"),Y("E",0,0,"isoWeekday"),I("day","d"),I("weekday","e"),I("isoWeekday","E"),x("day",11),x("weekday",11),x("isoWeekday",11),ce("d",Z),ce("e",Z),ce("E",Z),ce("dd",function(e,t){return t.weekdaysMinRegex(e)}),ce("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ce("dddd",function(e,t){return t.weekdaysRegex(e)}),ge(["dd","ddd","dddd"],function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:v(n).invalidWeekday=e}),ge(["d","e","E"],function(e,t,n,r){t[r]=S(e)});var Ke="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var qe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var $e="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Qe(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=Me.call(this._weekdaysParse,a))?o:null:"ddd"===t?-1!==(o=Me.call(this._shortWeekdaysParse,a))?o:null:-1!==(o=Me.call(this._minWeekdaysParse,a))?o:null:"dddd"===t?-1!==(o=Me.call(this._weekdaysParse,a))?o:-1!==(o=Me.call(this._shortWeekdaysParse,a))?o:-1!==(o=Me.call(this._minWeekdaysParse,a))?o:null:"ddd"===t?-1!==(o=Me.call(this._shortWeekdaysParse,a))?o:-1!==(o=Me.call(this._weekdaysParse,a))?o:-1!==(o=Me.call(this._minWeekdaysParse,a))?o:null:-1!==(o=Me.call(this._minWeekdaysParse,a))?o:-1!==(o=Me.call(this._weekdaysParse,a))?o:-1!==(o=Me.call(this._shortWeekdaysParse,a))?o:null}var Ze=le;var Je=le;var et=le;function tt(){function e(e,t){return t.length-e.length}var t,n,r,o,i,a=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),i=this.weekdays(n,""),a.push(r),s.push(o),l.push(i),u.push(r),u.push(o),u.push(i);for(a.sort(e),s.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)s[t]=de(s[t]),l[t]=de(l[t]),u[t]=de(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function nt(){return this.hours()%12||12}function rt(e,t){Y(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function ot(e,t){return t._meridiemParse}Y("H",["HH",2],0,"hour"),Y("h",["hh",2],0,nt),Y("k",["kk",2],0,function(){return this.hours()||24}),Y("hmm",0,0,function(){return""+nt.apply(this)+F(this.minutes(),2)}),Y("hmmss",0,0,function(){return""+nt.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),Y("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),Y("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),rt("a",!0),rt("A",!1),I("hour","h"),x("hour",13),ce("a",ot),ce("A",ot),ce("H",Z),ce("h",Z),ce("k",Z),ce("HH",Z,K),ce("hh",Z,K),ce("kk",Z,K),ce("hmm",J),ce("hmmss",ee),ce("Hmm",J),ce("Hmmss",ee),ve(["H","HH"],Ce),ve(["k","kk"],function(e,t,n){var r=S(e);t[Ce]=24===r?0:r}),ve(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ve(["h","hh"],function(e,t,n){t[Ce]=S(e),v(n).bigHour=!0}),ve("hmm",function(e,t,n){var r=e.length-2;t[Ce]=S(e.substr(0,r)),t[Ee]=S(e.substr(r)),v(n).bigHour=!0}),ve("hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[Ce]=S(e.substr(0,r)),t[Ee]=S(e.substr(r,2)),t[Se]=S(e.substr(o)),v(n).bigHour=!0}),ve("Hmm",function(e,t,n){var r=e.length-2;t[Ce]=S(e.substr(0,r)),t[Ee]=S(e.substr(r))}),ve("Hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[Ce]=S(e.substr(0,r)),t[Ee]=S(e.substr(r,2)),t[Se]=S(e.substr(o))});var it,at=_e("Hours",!0),st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d 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"},months:He,monthsShort:xe,week:{dow:0,doy:6},weekdays:Ke,weekdaysMin:$e,weekdaysShort:qe,meridiemParse:/[ap]\.?m?\.?/i},lt={},ut={};function ct(e){return e?e.toLowerCase().replace("_","-"):e}function ht(e){var t=null;if(!lt[e]&&void 0!==Kn&&Kn&&Kn.exports)try{t=it._abbr;qn(401)("./"+e),dt(t)}catch(e){}return lt[e]}function dt(e,t){var n;return e&&(n=i(t)?vt(e):ft(e,t))&&(it=n),it._abbr}function ft(e,t){if(null===t)return delete lt[e],null;var n=st;if(t.abbr=e,null!=lt[e])k("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=lt[e]._config;else if(null!=t.parentLocale){if(null==lt[t.parentLocale])return ut[t.parentLocale]||(ut[t.parentLocale]=[]),ut[t.parentLocale].push({name:e,config:t}),null;n=lt[t.parentLocale]._config}return lt[e]=new _(N(n,t)),ut[e]&&ut[e].forEach(function(e){ft(e.name,e.config)}),dt(e),lt[e]}function vt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return it;if(!a(e)){if(t=ht(e))return t;e=[e]}return function(e){var t,n,r,o,i=0;for(;i<e.length;){for(o=ct(e[i]).split("-"),t=o.length,n=(n=ct(e[i+1]))?n.split("-"):null;0<t;){if(r=ht(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&b(o,n,!0)>=t-1)break;t--}i++}return null}(e)}function gt(e){var t,n=e._a;return n&&-2===v(e).overflow&&(t=n[ye]<0||11<n[ye]?ye:n[we]<1||n[we]>De(n[me],n[ye])?we:n[Ce]<0||24<n[Ce]||24===n[Ce]&&(0!==n[Ee]||0!==n[Se]||0!==n[be])?Ce:n[Ee]<0||59<n[Ee]?Ee:n[Se]<0||59<n[Se]?Se:n[be]<0||999<n[be]?be:-1,v(e)._overflowDayOfYear&&(t<me||we<t)&&(t=we),v(e)._overflowWeeks&&-1===t&&(t=Re),v(e)._overflowWeekday&&-1===t&&(t=Te),v(e).overflow=t),e}function pt(e,t,n){return null!=e?e:null!=t?t:n}function mt(e){var t,n,r,o,i,a=[];if(!e._d){for(r=function(e){var t=new Date(u.now());if(e._useUTC)return[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()];return[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[we]&&null==e._a[ye]&&function(e){var t,n,r,o,i,a,s,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)i=1,a=4,n=pt(t.GG,e._a[me],ze(It(),1,4).year),r=pt(t.W,1),((o=pt(t.E,1))<1||7<o)&&(l=!0);else{i=e._locale._week.dow,a=e._locale._week.doy;var u=ze(It(),i,a);n=pt(t.gg,e._a[me],u.year),r=pt(t.w,u.week),null!=t.d?((o=t.d)<0||6<o)&&(l=!0):null!=t.e?(o=t.e+i,(t.e<0||6<t.e)&&(l=!0)):o=i}r<1||r>Xe(n,i,a)?v(e)._overflowWeeks=!0:null!=l?v(e)._overflowWeekday=!0:(s=Ge(n,r,o,i,a),e._a[me]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(i=pt(e._a[me],r[me]),(e._dayOfYear>Oe(i)||0===e._dayOfYear)&&(v(e)._overflowDayOfYear=!0),n=Ye(i,0,e._dayOfYear),e._a[ye]=n.getUTCMonth(),e._a[we]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ce]&&0===e._a[Ee]&&0===e._a[Se]&&0===e._a[be]&&(e._nextDay=!0,e._a[Ce]=0),e._d=(e._useUTC?Ye:function(e,t,n,r,o,i,a){var s=new Date(e,t,n,r,o,i,a);e<100&&0<=e&&isFinite(s.getFullYear())&&s.setFullYear(e);return s}).apply(null,a),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ce]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(v(e).weekdayMismatch=!0)}}var yt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ct=/Z|[+-]\d\d(?::?\d\d)?/,Et=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],St=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],bt=/^\/?Date\((\-?\d+)/i;function Rt(e){var t,n,r,o,i,a,s=e._i,l=yt.exec(s)||wt.exec(s);if(l){for(v(e).iso=!0,t=0,n=Et.length;t<n;t++)if(Et[t][1].exec(l[1])){o=Et[t][0],r=!1!==Et[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=St.length;t<n;t++)if(St[t][1].exec(l[3])){i=(l[2]||" ")+St[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(l[4]){if(!Ct.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=o+(i||"")+(a||""),Nt(e)}else e._isValid=!1}var Tt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Ot(e,t,n,r,o,i){var a=[function(e){var t=parseInt(e,10);{if(t<=49)return 2e3+t;if(t<=999)return 1900+t}return t}(e),xe.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(o,10)];return i&&a.push(parseInt(i,10)),a}var kt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Mt(e){var t=Tt.exec(function(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e._i));if(t){var n=Ot(t[4],t[3],t[2],t[5],t[6],t[7]);if(!function(e,t,n){if(e){var r=qe.indexOf(e),o=new Date(t[0],t[1],t[2]).getDay();if(r!==o)return v(n).weekdayMismatch=!0,n._isValid=!1}return!0}(t[1],n,e))return;e._a=n,e._tzm=function(e,t,n){{if(e)return kt[e];if(t)return 0;var r=parseInt(n,10),o=r%100;return 60*((r-o)/100)+o}}(t[8],t[9],t[10]),e._d=Ye.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),v(e).rfc2822=!0}else e._isValid=!1}function Nt(e){if(e._f!==u.ISO_8601)if(e._f!==u.RFC_2822){e._a=[],v(e).empty=!0;var t,n,r,o,i,a=""+e._i,s=a.length,l=0;for(r=z(e._f,e._locale).match(B)||[],t=0;t<r.length;t++)o=r[t],(n=(a.match(he(o,e))||[])[0])&&(0<(i=a.substr(0,a.indexOf(n))).length&&v(e).unusedInput.push(i),a=a.slice(a.indexOf(n)+n.length),l+=n.length),U[o]?(n?v(e).empty=!1:v(e).unusedTokens.push(o),pe(o,n,e)):e._strict&&!n&&v(e).unusedTokens.push(o);v(e).charsLeftOver=s-l,0<a.length&&v(e).unusedInput.push(a),e._a[Ce]<=12&&!0===v(e).bigHour&&0<e._a[Ce]&&(v(e).bigHour=void 0),v(e).parsedDateParts=e._a.slice(0),v(e).meridiem=e._meridiem,e._a[Ce]=function(e,t,n){var r;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):(null!=e.isPM&&((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0)),t)}(e._locale,e._a[Ce],e._meridiem),mt(e),gt(e)}else Mt(e);else Rt(e)}function _t(e){var t=e._i,n=e._f;return e._locale=e._locale||vt(e._l),null===t||void 0===n&&""===t?p({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),C(t)?new w(gt(t)):(c(t)?e._d=t:a(n)?function(e){var t,n,r,o,i;if(0===e._f.length)return v(e).invalidFormat=!0,e._d=new Date(NaN);for(o=0;o<e._f.length;o++)i=0,t=y({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],Nt(t),g(t)&&(i+=v(t).charsLeftOver,i+=10*v(t).unusedTokens.length,v(t).score=i,(null==r||i<r)&&(r=i,n=t));d(e,n||t)}(e):n?Nt(e):function(e){var t=e._i;i(t)?e._d=new Date(u.now()):c(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=bt.exec(e._i);if(null!==t)return e._d=new Date(+t[1]);{if(Rt(e),!1!==e._isValid)return;delete e._isValid}{if(Mt(e),!1!==e._isValid)return;delete e._isValid}u.createFromInputFallback(e)}(e):a(t)?(e._a=r(t.slice(0),function(e){return parseInt(e,10)}),mt(e)):s(t)?function(e){if(e._d)return;var t=L(e._i);e._a=r([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),mt(e)}(e):l(t)?e._d=new Date(t):u.createFromInputFallback(e)}(e),g(e)||(e._d=null),e))}function At(e,t,n,r,o){var i={};return!0!==n&&!1!==n||(r=n,n=void 0),(s(e)&&function(e){{if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}}(e)||a(e)&&0===e.length)&&(e=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=o,i._l=n,i._i=e,i._f=t,i._strict=r,function(e){var t=new w(gt(_t(e)));t._nextDay&&(t.add(1,"d"),t._nextDay=void 0);return t}(i)}function It(e,t,n,r){return At(e,t,n,r,!1)}u.createFromInputFallback=e("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),u.ISO_8601=function(){},u.RFC_2822=function(){};var Dt=e("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=It.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:p()}),Lt=e("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=It.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:p()});function Ht(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return It();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var xt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Pt(e){var t=L(e),n=t.year||0,r=t.quarter||0,o=t.month||0,i=t.week||0,a=t.day||0,s=t.hour||0,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===Me.call(xt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<xt.length;++r)if(e[xt[r]]){if(n)return!1;parseFloat(e[xt[r]])!==S(e[xt[r]])&&(n=!0)}return!0}(t),this._milliseconds=+c+1e3*u+6e4*l+1e3*s*60*60,this._days=+a+7*i,this._months=+o+3*r+12*n,this._data={},this._locale=vt(),this._bubble()}function Ft(e){return e instanceof Pt}function Bt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Wt(e,n){Y(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+F(~~(e/60),2)+n+F(~~e%60,2)})}Wt("Z",":"),Wt("ZZ",""),ce("Z",se),ce("ZZ",se),ve(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Ut(se,e)});var Vt=/([\+\-]|\d\d)/gi;function Ut(e,t){var n=(t||"").match(e);if(null===n)return null;var r=n[n.length-1]||[],o=(r+"").match(Vt)||["-",0,0],i=60*o[1]+S(o[2]);return 0===i?0:"+"===o[0]?i:-i}function Yt(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(C(e)||c(e)?e.valueOf():It(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),u.updateOffset(n,!1),n):It(e).local()}function jt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Gt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}u.updateOffset=function(){};var zt=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Xt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Kt(e,t){var n,r,o,i=e,a=null;return Ft(e)?i={ms:e._milliseconds,d:e._days,M:e._months}:l(e)?(i={},t?i[t]=e:i.milliseconds=e):(a=zt.exec(e))?(n="-"===a[1]?-1:1,i={y:0,d:S(a[we])*n,h:S(a[Ce])*n,m:S(a[Ee])*n,s:S(a[Se])*n,ms:S(Bt(1e3*a[be]))*n}):(a=Xt.exec(e))?(n="-"===a[1]?-1:(a[1],1),i={y:qt(a[2],n),M:qt(a[3],n),w:qt(a[4],n),d:qt(a[5],n),h:qt(a[6],n),m:qt(a[7],n),s:qt(a[8],n)}):null==i?i={}:"object"==typeof i&&("from"in i||"to"in i)&&(o=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Yt(t,e),e.isBefore(t)?n=$t(e,t):((n=$t(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(It(i.from),It(i.to)),(i={}).ms=o.milliseconds,i.M=o.months),r=new Pt(i),Ft(e)&&h(e,"_locale")&&(r._locale=e._locale),r}function qt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function $t(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 Qt(r,o){return function(e,t){var n;return null===t||isNaN(+t)||(k(o,"moment()."+o+"(period, number) is deprecated. Please use moment()."+o+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),Zt(this,Kt(e="string"==typeof e?+e:e,t),r),this}}function Zt(e,t,n,r){var o=t._milliseconds,i=Bt(t._days),a=Bt(t._months);e.isValid()&&(r=null==r||r,a&&Fe(e,Ae(e,"Month")+a*n),i&&Ie(e,"Date",Ae(e,"Date")+i*n),o&&e._d.setTime(e._d.valueOf()+o*n),r&&u.updateOffset(e,i||a))}Kt.fn=Pt.prototype,Kt.invalid=function(){return Kt(NaN)};var Jt=Qt(1,"add"),en=Qt(-1,"subtract");function tn(e,t){var n,r,o=12*(t.year()-e.year())+(t.month()-e.month()),i=e.clone().add(o,"months");return r=t-i<0?(n=e.clone().add(o-1,"months"),(t-i)/(i-n)):(n=e.clone().add(1+o,"months"),(t-i)/(n-i)),-(o+r)||0}function nn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=vt(e))&&(this._locale=t),this)}u.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",u.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var rn=e("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)});function on(){return this._locale}function an(e,t){Y(0,[e,e.length],0,t)}function sn(e,t,n,r,o){var i;return null==e?ze(this,r,o).year:((i=Xe(e,r,o))<t&&(t=i),function(e,t,n,r,o){var i=Ge(e,t,n,r,o),a=Ye(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,r,o))}Y(0,["gg",2],0,function(){return this.weekYear()%100}),Y(0,["GG",2],0,function(){return this.isoWeekYear()%100}),an("gggg","weekYear"),an("ggggg","weekYear"),an("GGGG","isoWeekYear"),an("GGGGG","isoWeekYear"),I("weekYear","gg"),I("isoWeekYear","GG"),x("weekYear",1),x("isoWeekYear",1),ce("G",ie),ce("g",ie),ce("GG",Z,K),ce("gg",Z,K),ce("GGGG",ne,$),ce("gggg",ne,$),ce("GGGGG",re,Q),ce("ggggg",re,Q),ge(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=S(e)}),ge(["gg","GG"],function(e,t,n,r){t[r]=u.parseTwoDigitYear(e)}),Y("Q",0,"Qo","quarter"),I("quarter","Q"),x("quarter",7),ce("Q",X),ve("Q",function(e,t){t[ye]=3*(S(e)-1)}),Y("D",["DD",2],"Do","date"),I("date","D"),x("date",9),ce("D",Z),ce("DD",Z,K),ce("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ve(["D","DD"],we),ve("Do",function(e,t){t[we]=S(e.match(Z)[0])});var ln=_e("Date",!0);Y("DDD",["DDDD",3],"DDDo","dayOfYear"),I("dayOfYear","DDD"),x("dayOfYear",4),ce("DDD",te),ce("DDDD",q),ve(["DDD","DDDD"],function(e,t,n){n._dayOfYear=S(e)}),Y("m",["mm",2],0,"minute"),I("minute","m"),x("minute",14),ce("m",Z),ce("mm",Z,K),ve(["m","mm"],Ee);var un=_e("Minutes",!1);Y("s",["ss",2],0,"second"),I("second","s"),x("second",15),ce("s",Z),ce("ss",Z,K),ve(["s","ss"],Se);var cn,hn=_e("Seconds",!1);for(Y("S",0,0,function(){return~~(this.millisecond()/100)}),Y(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Y(0,["SSS",3],0,"millisecond"),Y(0,["SSSS",4],0,function(){return 10*this.millisecond()}),Y(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),Y(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),Y(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),Y(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),Y(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),I("millisecond","ms"),x("millisecond",16),ce("S",te,X),ce("SS",te,K),ce("SSS",te,q),cn="SSSS";cn.length<=9;cn+="S")ce(cn,oe);function dn(e,t){t[be]=S(1e3*("0."+e))}for(cn="S";cn.length<=9;cn+="S")ve(cn,dn);var fn=_e("Milliseconds",!1);Y("z",0,0,"zoneAbbr"),Y("zz",0,0,"zoneName");var vn=w.prototype;function gn(e){return e}vn.add=Jt,vn.calendar=function(e,t){var n=e||It(),r=Yt(n,this).startOf("day"),o=u.calendarFormat(this,r)||"sameElse",i=t&&(M(t[o])?t[o].call(this,n):t[o]);return this.format(i||this.localeData().calendar(o,this,It(n)))},vn.clone=function(){return new w(this)},vn.diff=function(e,t,n){var r,o,i;if(!this.isValid())return NaN;if(!(r=Yt(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=D(t)){case"year":i=tn(this,r)/12;break;case"month":i=tn(this,r);break;case"quarter":i=tn(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-o)/864e5;break;case"week":i=(this-r-o)/6048e5;break;default:i=this-r}return n?i:E(i)},vn.endOf=function(e){if(void 0===(e=D(e))||"millisecond"===e)return this;"date"===e&&(e="day");return this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms")},vn.format=function(e){e=e||(this.isUtc()?u.defaultFormatUtc:u.defaultFormat);var t=G(this,e);return this.localeData().postformat(t)},vn.from=function(e,t){return this.isValid()&&(C(e)&&e.isValid()||It(e).isValid())?Kt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},vn.fromNow=function(e){return this.from(It(),e)},vn.to=function(e,t){return this.isValid()&&(C(e)&&e.isValid()||It(e).isValid())?Kt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},vn.toNow=function(e){return this.to(It(),e)},vn.get=function(e){if(M(this[e=D(e)]))return this[e]();return this},vn.invalidAt=function(){return v(this).overflow},vn.isAfter=function(e,t){var n=C(e)?e:It(e);if(!this.isValid()||!n.isValid())return!1;return"millisecond"===(t=D(i(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()},vn.isBefore=function(e,t){var n=C(e)?e:It(e);if(!this.isValid()||!n.isValid())return!1;return"millisecond"===(t=D(i(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()},vn.isBetween=function(e,t,n,r){return("("===(r=r||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===r[1]?this.isBefore(t,n):!this.isAfter(t,n))},vn.isSame=function(e,t){var n,r=C(e)?e:It(e);if(!this.isValid()||!r.isValid())return!1;return"millisecond"===(t=D(t||"millisecond"))?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())},vn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},vn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},vn.isValid=function(){return g(this)},vn.lang=rn,vn.locale=nn,vn.localeData=on,vn.max=Lt,vn.min=Dt,vn.parsingFlags=function(){return d({},v(this))},vn.set=function(e,t){if("object"==typeof e)for(var n=P(e=L(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(M(this[e=D(e)]))return this[e](t);return this},vn.startOf=function(e){switch(e=D(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}"week"===e&&this.weekday(0);"isoWeek"===e&&this.isoWeekday(1);"quarter"===e&&this.month(3*Math.floor(this.month()/3));return this},vn.subtract=en,vn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},vn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},vn.toDate=function(){return new Date(this.valueOf())},vn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;if(n.year()<0||9999<n.year())return G(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ");if(M(Date.prototype.toISOString))return t?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",G(n,"Z"));return G(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},vn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o=t+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+o)},vn.toJSON=function(){return this.isValid()?this.toISOString():null},vn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},vn.unix=function(){return Math.floor(this.valueOf()/1e3)},vn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},vn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},vn.year=Ne,vn.isLeapYear=function(){return ke(this.year())},vn.weekYear=function(e){return sn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},vn.isoWeekYear=function(e){return sn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},vn.quarter=vn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},vn.month=Be,vn.daysInMonth=function(){return De(this.year(),this.month())},vn.week=vn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},vn.isoWeek=vn.isoWeeks=function(e){var t=ze(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},vn.weeksInYear=function(){var e=this.localeData()._week;return Xe(this.year(),e.dow,e.doy)},vn.isoWeeksInYear=function(){return Xe(this.year(),1,4)},vn.date=ln,vn.day=vn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(n=e,r=this.localeData(),e="string"==typeof n?isNaN(n)?"number"!=typeof(n=r.weekdaysParse(n))?null:n:parseInt(n,10):n,this.add(e-t,"d")):t;var n,r},vn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},vn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;{if(null==e)return this.day()||7;var t=(n=e,r=this.localeData(),"string"!=typeof n?isNaN(n)?null:n:r.weekdaysParse(n)%7||7);return this.day(this.day()%7?t:t-7)}var n,r},vn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},vn.hour=vn.hours=at,vn.minute=vn.minutes=un,vn.second=vn.seconds=hn,vn.millisecond=vn.milliseconds=fn,vn.utcOffset=function(e,t,n){var r,o=this._offset||0;if(!this.isValid())return null!=e?this:NaN;{if(null==e)return this._isUTC?o:jt(this);if("string"==typeof e){if(null===(e=Ut(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=jt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),o!==e&&(!t||this._changeInProgress?Zt(this,Kt(e-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,u.updateOffset(this,!0),this._changeInProgress=null)),this}},vn.utc=function(e){return this.utcOffset(0,e)},vn.local=function(e){this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(jt(this),"m"));return this},vn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ut(ae,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},vn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?It(e).utcOffset():0,(this.utcOffset()-e)%60==0)},vn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},vn.isLocal=function(){return!!this.isValid()&&!this._isUTC},vn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},vn.isUtc=Gt,vn.isUTC=Gt,vn.zoneAbbr=function(){return this._isUTC?"UTC":""},vn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},vn.dates=e("dates accessor is deprecated. Use date instead.",ln),vn.months=e("months accessor is deprecated. Use month instead",Be),vn.years=e("years accessor is deprecated. Use year instead",Ne),vn.zone=e("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),vn.isDSTShifted=e("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!i(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),(e=_t(e))._a){var t=e._isUTC?f(e._a):It(e._a);this._isDSTShifted=this.isValid()&&0<b(e._a,t.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var pn=_.prototype;function mn(e,t,n,r){var o=vt(),i=f().set(r,t);return o[n](i,e)}function yn(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return mn(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=mn(e,r,n,"month");return o}function wn(e,t,n,r){t=("boolean"==typeof e?l(t)&&(n=t,t=void 0):(t=e,e=!1,l(n=t)&&(n=t,t=void 0)),t||"");var o,i=vt(),a=e?i._week.dow:0;if(null!=n)return mn(t,(n+a)%7,r,"day");var s=[];for(o=0;o<7;o++)s[o]=mn(t,(o+a)%7,r,"day");return s}pn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return M(r)?r.call(t,n):r},pn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return!t&&n?(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e]):t},pn.invalidDate=function(){return this._invalidDate},pn.ordinal=function(e){return this._ordinal.replace("%d",e)},pn.preparse=gn,pn.postformat=gn,pn.relativeTime=function(e,t,n,r){var o=this._relativeTime[n];return M(o)?o(e,t,n,r):o.replace(/%d/i,e)},pn.pastFuture=function(e,t){var n=this._relativeTime[0<e?"future":"past"];return M(n)?n(t):n.replace(/%s/i,t)},pn.set=function(e){var t,n;for(n in e)M(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},pn.months=function(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Le).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone},pn.monthsShort=function(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Le.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},pn.monthsParse=function(e,t,n){var r,o,i;if(this._monthsParseExact)return Pe.call(this,e,t,n);this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]);for(r=0;r<12;r++){if(o=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},pn.monthsRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||Ue.call(this),e?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=Ve),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},pn.monthsShortRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||Ue.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=We),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},pn.week=function(e){return ze(e,this._week.dow,this._week.doy).week},pn.firstDayOfYear=function(){return this._week.doy},pn.firstDayOfWeek=function(){return this._week.dow},pn.weekdays=function(e,t){return e?a(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:a(this._weekdays)?this._weekdays:this._weekdays.standalone},pn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},pn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},pn.weekdaysParse=function(e,t,n){var r,o,i;if(this._weekdaysParseExact)return Qe.call(this,e,t,n);this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]);for(r=0;r<7;r++){if(o=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},pn.weekdaysRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||tt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=Ze),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},pn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||tt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Je),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},pn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||tt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=et),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},pn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},pn.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},dt("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===S(e%100/10)?"th":1==t?"st":2==t?"nd":3==t?"rd":"th";return e+n}}),u.lang=e("moment.lang is deprecated. Use moment.locale instead.",dt),u.langData=e("moment.langData is deprecated. Use moment.localeData instead.",vt);var Cn=Math.abs;function En(e,t,n,r){var o=Kt(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function Sn(e){return e<0?Math.floor(e):Math.ceil(e)}function bn(e){return 4800*e/146097}function Rn(e){return 146097*e/4800}function Tn(e){return function(){return this.as(e)}}var On=Tn("ms"),kn=Tn("s"),Mn=Tn("m"),Nn=Tn("h"),_n=Tn("d"),An=Tn("w"),In=Tn("M"),Dn=Tn("y");function Ln(e){return function(){return this.isValid()?this._data[e]:NaN}}var Hn=Ln("milliseconds"),xn=Ln("seconds"),Pn=Ln("minutes"),Fn=Ln("hours"),Bn=Ln("days"),Wn=Ln("months"),Vn=Ln("years");var Un=Math.round,Yn={ss:44,s:45,m:45,h:22,d:26,M:11};var jn=Math.abs;function Gn(e){return(0<e)-(e<0)||+e}function zn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=jn(this._milliseconds)/1e3,r=jn(this._days),o=jn(this._months);e=E(n/60),t=E(e/60),n%=60,e%=60;var i=E(o/12),a=o%=12,s=r,l=t,u=e,c=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var d=h<0?"-":"",f=Gn(this._months)!==Gn(h)?"-":"",v=Gn(this._days)!==Gn(h)?"-":"",g=Gn(this._milliseconds)!==Gn(h)?"-":"";return d+"P"+(i?f+i+"Y":"")+(a?f+a+"M":"")+(s?v+s+"D":"")+(l||u||c?"T":"")+(l?g+l+"H":"")+(u?g+u+"M":"")+(c?g+c+"S":"")}var Xn=Pt.prototype;return Xn.isValid=function(){return this._isValid},Xn.abs=function(){var e=this._data;return this._milliseconds=Cn(this._milliseconds),this._days=Cn(this._days),this._months=Cn(this._months),e.milliseconds=Cn(e.milliseconds),e.seconds=Cn(e.seconds),e.minutes=Cn(e.minutes),e.hours=Cn(e.hours),e.months=Cn(e.months),e.years=Cn(e.years),this},Xn.add=function(e,t){return En(this,e,t,1)},Xn.subtract=function(e,t){return En(this,e,t,-1)},Xn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=D(e))||"year"===e)return t=this._days+r/864e5,n=this._months+bn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(Rn(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Xn.asMilliseconds=On,Xn.asSeconds=kn,Xn.asMinutes=Mn,Xn.asHours=Nn,Xn.asDays=_n,Xn.asWeeks=An,Xn.asMonths=In,Xn.asYears=Dn,Xn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*S(this._months/12):NaN},Xn._bubble=function(){var e,t,n,r,o,i=this._milliseconds,a=this._days,s=this._months,l=this._data;return 0<=i&&0<=a&&0<=s||i<=0&&a<=0&&s<=0||(i+=864e5*Sn(Rn(s)+a),s=a=0),l.milliseconds=i%1e3,e=E(i/1e3),l.seconds=e%60,t=E(e/60),l.minutes=t%60,n=E(t/60),l.hours=n%24,a+=E(n/24),o=E(bn(a)),s+=o,a-=Sn(Rn(o)),r=E(s/12),s%=12,l.days=a,l.months=s,l.years=r,this},Xn.clone=function(){return Kt(this)},Xn.get=function(e){return e=D(e),this.isValid()?this[e+"s"]():NaN},Xn.milliseconds=Hn,Xn.seconds=xn,Xn.minutes=Pn,Xn.hours=Fn,Xn.days=Bn,Xn.weeks=function(){return E(this.days()/7)},Xn.months=Wn,Xn.years=Vn,Xn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=Kt(e).abs(),o=Un(r.as("s")),i=Un(r.as("m")),a=Un(r.as("h")),s=Un(r.as("d")),l=Un(r.as("M")),u=Un(r.as("y")),c=o<=Yn.ss&&["s",o]||o<Yn.s&&["ss",o]||i<=1&&["m"]||i<Yn.m&&["mm",i]||a<=1&&["h"]||a<Yn.h&&["hh",a]||s<=1&&["d"]||s<Yn.d&&["dd",s]||l<=1&&["M"]||l<Yn.M&&["MM",l]||u<=1&&["y"]||["yy",u];return c[2]=t,c[3]=0<+e,c[4]=n,function(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}.apply(null,c)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Xn.toISOString=zn,Xn.toString=zn,Xn.toJSON=zn,Xn.locale=nn,Xn.localeData=on,Xn.toIsoString=e("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",zn),Xn.lang=rn,Y("X",0,0,"unix"),Y("x",0,0,"valueOf"),ce("x",ie),ce("X",/[+-]?\d+(\.\d{1,3})?/),ve("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),ve("x",function(e,t,n){n._d=new Date(S(e))}),u.version="2.20.1",function(e){t=e}(It),u.fn=vn,u.min=function(){return Ht("isBefore",[].slice.call(arguments,0))},u.max=function(){return Ht("isAfter",[].slice.call(arguments,0))},u.now=function(){return Date.now?Date.now():+new Date},u.utc=f,u.unix=function(e){return It(1e3*e)},u.months=function(e,t){return yn(e,t,"months")},u.isDate=c,u.locale=dt,u.invalid=p,u.duration=Kt,u.isMoment=C,u.weekdays=function(e,t,n){return wn(e,t,n,"weekdays")},u.parseZone=function(){return It.apply(null,arguments).parseZone()},u.localeData=vt,u.isDuration=Ft,u.monthsShort=function(e,t){return yn(e,t,"monthsShort")},u.weekdaysMin=function(e,t,n){return wn(e,t,n,"weekdaysMin")},u.defineLocale=ft,u.updateLocale=function(e,t){if(null!=t){var n,r,o=st;null!=(r=ht(e))&&(o=r._config),t=N(o,t),(n=new _(t)).parentLocale=lt[e],lt[e]=n,dt(e)}else null!=lt[e]&&(null!=lt[e].parentLocale?lt[e]=lt[e].parentLocale:null!=lt[e]&&delete lt[e]);return lt[e]},u.locales=function(){return T(lt)},u.weekdaysShort=function(e,t,n){return wn(e,t,n,"weekdaysShort")},u.normalizeUnits=D,u.relativeTimeRounding=function(e){return void 0!==e?"function"==typeof e&&(Un=e,!0):Un},u.relativeTimeThreshold=function(e,t){return void 0!==Yn[e]&&(void 0===t?Yn[e]:(Yn[e]=t,"s"===e&&(Yn.ss=t-1),!0))},u.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},u.prototype=vn,u.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},u}(),window.moment=qn(61)}).call(this,qn(400)(e))},function(e,t,n){"use strict";n(19),n(12),n(40),n(54),n(39),t.__esModule=!0,t.normalizeSelection=function(e){return(0,o.arrayMap)(e,function(e){return{start:e.getTopLeftCorner(),end:e.getBottomRightCorner()}})},t.isSeparator=function(e){return(0,r.hasClass)(e,"htSeparator")},t.hasSubMenu=function(e){return(0,r.hasClass)(e,"htSubmenu")},t.isDisabled=function(e){return(0,r.hasClass)(e,"htDisabled")},t.isSelectionDisabled=function(e){return(0,r.hasClass)(e,"htSelectionDisabled")},t.getValidSelection=function(e){var t=e.getSelected();if(!t)return null;if(t[0]<0)return null;return t},t.prepareVerticalAlignClass=l,t.prepareHorizontalAlignClass=u,t.getAlignmentClasses=function(e,i){var a={};return(0,o.arrayEach)(e,function(e){for(var t=e.from,n=e.to,r=t.row;r<=n.row;r++)for(var o=t.col;o<=n.col;o++)a[r]||(a[r]=[]),a[r][o]=i(r,o)}),a},t.align=function(e,i,a,s,l){(0,o.arrayEach)(e,function(e){var t=e.from,n=e.to;if(t.row===n.row&&t.col===n.col)c(t.row,t.col,i,a,s,l);else for(var r=t.row;r<=n.row;r++)for(var o=t.col;o<=n.col;o++)c(r,o,i,a,s,l)})},t.checkSelectionConsistency=function(e,n){var r=!1;Array.isArray(e)&&(0,o.arrayEach)(e,function(e){return e.forAll(function(e,t){if(n(e,t))return!(r=!0)}),r});return r},t.markLabelAsSelected=function(e){return'<span class="selected">'.concat(String.fromCharCode(10003),"</span>").concat(e)},t.isItemHidden=function(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))},t.filterSeparators=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:i.KEY,n=e.slice(0);return n=function(e){var n=[];return(0,o.arrayEach)(e,function(e,t){0<t?n[n.length-1].name!==e.name&&n.push(e):n.push(e)}),n}(n=function(e,t){var n=e.slice(0);return n.reverse(),(n=a(n,t)).reverse(),n}(n=a(n,t),t))};var o=n(3),r=n(5),i=n(167);function l(e,t){if(-1!==e.indexOf(t))return e;var n=e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","");return"".concat(n," ").concat(t)}function u(e,t){if(-1!==e.indexOf(t))return e;var n=e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","");return"".concat(n," ").concat(t)}function c(e,t,n,r,o,i){var a=o(e,t),s=r;a.className&&(s="vertical"===n?l(a.className,r):u(a.className,r)),i(e,t,"className",s)}function a(e,t){for(var n=e.slice(0);0<n.length&&n[0].name===t;)n.shift();return n}},function(e,t,n){var r=n(47),o=n(49),i=n(95);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";var r=n(22),o=n(149),i=n(60),a=n(29),s=n(125),l=[].sort,u=[1,2,3],c=a(function(){u.sort(void 0)}),h=a(function(){u.sort(null)}),d=s("sort");r({target:"Array",proto:!0,forced:c||!h||d},{sort:function(e){return void 0===e?l.call(i(this)):l.call(i(this),o(e))}})},function(e,t,n){var s=n(34),r=n(97),l=n(63),u=n(48),c=n(141),o=n(176),i=n(86),a=i.get,h=i.enforce,d=String(o).split("toString");r("inspectSource",function(e){return o.call(e)}),(e.exports=function(e,t,n,r){var o=!!r&&!!r.unsafe,i=!!r&&!!r.enumerable,a=!!r&&!!r.noTargetGet;"function"==typeof n&&("string"!=typeof t||u(n,"name")||l(n,"name",t),h(n).source=d.join("string"==typeof t?t:"")),e!==s?(o?!a&&e[t]&&(i=!0):delete e[t],i?e[t]=n:l(e,t,n)):i?e[t]=n:c(t,n)})(Function.prototype,"toString",function(){return"function"==typeof this&&a(this).source||o.call(this)})},function(e,t){e.exports=function(e,t){return t=t||e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}},function(e,t,n){"use strict";n(39),n(129),t.__esModule=!0,t.toSingleLine=function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return(0,o.arrayReduce)(e,function(e,t,n){return e+t.replace(/(?:\r?\n\s+)/g,"")+(r[n]?r[n]:"")},"").trim()};var o=n(3)},function(e,t,n){"use strict";n(12),n(10),n(37),n(39),t.__esModule=!0,t.toUpperCaseFirst=function(e){return e[0].toUpperCase()+e.substr(1)},t.equalsIgnoreCase=function(){for(var e=[],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n.length;for(;o;){o-=1;var i=(0,a.stringify)(n[o]).toLowerCase();-1===e.indexOf(i)&&e.push(i)}return 1===e.length},t.randomString=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()+e()},t.isPercentValue=function(e){return/^([0-9][0-9]?%$)|(^100%$)/.test(e)},t.substitute=function(e){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return"".concat(e).replace(/(?:\\)?\[([^[\]]+)]/g,function(e,t){return"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===n[t]?"":n[t]})},t.stripTags=function(e){return"".concat(e).replace(r,"")};var a=n(27);var r=/<\/?\w+\/?>|<\w+[\s|/][^>]*>/gi},function(e,t,n){var r=n(114),o=n(59);e.exports=function(e){return r(o(e))}},function(e,t,n){"use strict";var r=n(123),o=n(193);e.exports=r("Map",function(t){return function(e){return t(this,0<arguments.length?e:void 0)}},o,!0)},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";t.__esModule=!0,t.setBrowserMeta=o,t.isChrome=function(){return a.chrome.value},t.isEdge=function(){return a.edge.value},t.isIE=function(){return a.ie.value},t.isIE8=function(){return a.ie8.value},t.isIE9=function(){return a.ie9.value},t.isMSBrowser=function(){return a.ie.value||a.edge.value},t.isMobileBrowser=function(){return a.mobile.value},t.isSafari=function(){return a.safari.value};function r(n){var r={value:!1,test:function(e,t){r.value=n(e,t)}};return r}var i=n(4),a={chrome:r(function(e,t){return/Chrome/.test(e)&&/Google/.test(t)}),edge:r(function(e){return/Edge/.test(e)}),ie:r(function(e){return/Trident/.test(e)}),ie8:r(function(){return!document.createTextNode("test").textContent}),ie9:r(function(){return!!document.documentMode}),mobile:r(function(e){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)}),safari:r(function(e,t){return/Safari/.test(e)&&/Apple Computer/.test(t)})};function o(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.userAgent,n=void 0===t?navigator.userAgent:t,r=e.vendor,o=void 0===r?navigator.vendor:r;(0,i.objectEach)(a,function(e){(0,e.test)(n,o)})}o()},function(e,t,n){"use strict";var r=n(0);n(10),n(37),n(131),n(32),t.__esModule=!0,t.requestAnimationFrame=function(e){return c.call(window,e)},t.isClassListSupported=function(){return!!document.documentElement.classList},t.isTextContentSupported=function(){return!!document.createTextNode("test").textContent},t.isGetComputedStyleSupported=function(){return!!window.getComputedStyle},t.cancelAnimationFrame=function(e){h.call(window,e)},t.isTouchSupported=function(){return"ontouchstart"in window},t.isWebComponentSupportedNatively=function(){var e=document.createElement("div");return!(!e.createShadowRoot||!e.createShadowRoot.toString().match(/\[native code\]/))},t.hasCaptionProblem=function(){void 0===o&&function(){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),o=e.offsetHeight<2*e.lastChild.offsetHeight,document.body.removeChild(e)}();return o},t.getComparisonFunction=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(i)return i;i="object"===("undefined"==typeof Intl?"undefined":(0,s.default)(Intl))?new Intl.Collator(e,t).compare:"function"==typeof String.prototype.localeCompare?function(e,t){return"".concat(e).localeCompare(t)}:function(e,t){return e===t?0:t<e?-1:1};return i},t.isPassiveEventSupported=function(){if(void 0!==a)return a;try{var e={get passive(){a=!0}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){a=!1}return a};for(var o,i,a,s=r(n(44)),l=0,u=["ms","moz","webkit","o"],c=window.requestAnimationFrame,h=window.cancelAnimationFrame,d=0;d<u.length&&!c;++d)c=window["".concat(u[d],"RequestAnimationFrame")],h=window["".concat(u[d],"CancelAnimationFrame")]||window["".concat(u[d],"CancelRequestAnimationFrame")];c=c||function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-l)),r=window.setTimeout(function(){e(t+n)},n);return l=t+n,r},h=h||function(e){clearTimeout(e)}},function(e,t,n){"use strict";var r=n(0);n(12),t.__esModule=!0,t.default=void 0;var s=r(n(1)),o=r(n(2)),u=n(5),c=n(4),i=n(3),h=n(57),a=r(n(23)),d=r(n(326)),f={},l=function(){function l(e){(0,s.default)(this,l),(0,c.defineGetter)(this,"wot",e,{writable:!1});var t=this.wot.wtTable,n=t.TABLE,r=t.hider,o=t.spreader,i=t.holder,a=t.wtRootElement;this.instance=this.wot,this.type="",this.mainTableScrollableElement=null,this.TABLE=n,this.hider=r,this.spreader=o,this.holder=i,this.wtRootElement=a,this.trimmingContainer=(0,u.getTrimmingContainer)(this.hider.parentNode.parentNode),this.areElementSizesAdjusted=!1,this.updateStateOfRendering()}return(0,o.default)(l,null,[{key:"registerOverlay",value:function(e,t){if(-1===l.CLONE_TYPES.indexOf(e))throw new Error("Unsupported overlay (".concat(e,")."));f[e]=t}},{key:"createOverlay",value:function(e,t){return new f[e](t)}},{key:"hasOverlay",value:function(e){return void 0!==f[e]}},{key:"isOverlayTypeOf",value:function(e,t){return!(!e||!f[t])&&e instanceof f[t]}},{key:"CLONE_TOP",get:function(){return"top"}},{key:"CLONE_BOTTOM",get:function(){return"bottom"}},{key:"CLONE_LEFT",get:function(){return"left"}},{key:"CLONE_TOP_LEFT_CORNER",get:function(){return"top_left_corner"}},{key:"CLONE_BOTTOM_LEFT_CORNER",get:function(){return"bottom_left_corner"}},{key:"CLONE_DEBUG",get:function(){return"debug"}},{key:"CLONE_TYPES",get:function(){return[l.CLONE_TOP,l.CLONE_BOTTOM,l.CLONE_LEFT,l.CLONE_TOP_LEFT_CORNER,l.CLONE_BOTTOM_LEFT_CORNER,l.CLONE_DEBUG]}}]),(0,o.default)(l,[{key:"updateStateOfRendering",value:function(){var e=this.needFullRender;this.needFullRender=this.shouldBeRendered();var t=e!==this.needFullRender;return t&&!this.needFullRender&&this.reset(),t}},{key:"shouldBeRendered",value:function(){return!0}},{key:"updateTrimmingContainer",value:function(){this.trimmingContainer=(0,u.getTrimmingContainer)(this.hider.parentNode.parentNode)}},{key:"updateMainScrollableElement",value:function(){var e=this.wot,t=e.wtTable;"hidden"===e.rootWindow.getComputedStyle(t.wtRootElement.parentNode).getPropertyValue("overflow")?this.mainTableScrollableElement=this.wot.wtTable.holder:this.mainTableScrollableElement=(0,u.getScrollableElement)(t.TABLE)}},{key:"getRelativeCellPosition",value:function(e,t,n){if(!1!==this.clone.wtTable.holder.contains(e)){var r=this.mainTableScrollableElement===this.wot.rootWindow,o=n<this.wot.getSetting("fixedColumnsLeft"),i=t<this.wot.getSetting("fixedRowsTop"),a=t>=this.wot.getSetting("totalRows")-this.wot.getSetting("fixedRowsBottom"),s={left:this.clone.wtTable.spreader.offsetLeft,top:this.clone.wtTable.spreader.offsetTop},l={left:e.offsetLeft,top:e.offsetTop};return r?this.getRelativeCellPositionWithinWindow(i,o,l,s):this.getRelativeCellPositionWithinHolder(i,a,o,l,s)}(0,h.warn)("The provided element is not a child of the ".concat(this.type," overlay"))}},{key:"getRelativeCellPositionWithinWindow",value:function(e,t,n,r){var o=this.wot.wtTable.wtRootElement.getBoundingClientRect(),i=0,a=0;(i=t?o.left<=0?-1*o.left:0:r.left,e)?a=this.clone.wtTable.TABLE.getBoundingClientRect().top-o.top:a=r.top;return{left:n.left+i,top:n.top+a}}},{key:"getRelativeCellPositionWithinHolder",value:function(e,t,n,r,o){var i=this.clone.cloneSource.wtOverlays.leftOverlay.getScrollPosition(),a=this.clone.cloneSource.wtOverlays.topOverlay.getScrollPosition(),s=0,l=0;if(n||(s=i-o.left),t){var u=this.wot.wtTable.wtRootElement.getBoundingClientRect();l=-1*this.clone.wtTable.TABLE.getBoundingClientRect().top+u.top}else e||(l=a-o.top);return{left:r.left-s,top:r.top-l}}},{key:"makeClone",value:function(e){if(-1===l.CLONE_TYPES.indexOf(e))throw new Error('Clone type "'.concat(e,'" is not supported.'));var t=this.wot,n=t.wtTable,r=t.rootDocument,o=t.rootWindow,i=r.createElement("DIV"),a=r.createElement("TABLE");i.className="ht_clone_".concat(e," handsontable"),i.style.position="absolute",i.style.top=0,i.style.left=0,i.style.overflow="hidden",a.className=n.TABLE.className,i.appendChild(a),this.type=e,n.wtRootElement.parentNode.appendChild(i);var s=this.wot.getSetting("preventOverflow");return!0===s||"horizontal"===s&&this.type===l.CLONE_TOP||"vertical"===s&&this.type===l.CLONE_LEFT?this.mainTableScrollableElement=o:"hidden"===o.getComputedStyle(n.wtRootElement.parentNode).getPropertyValue("overflow")?this.mainTableScrollableElement=n.holder:this.mainTableScrollableElement=(0,u.getScrollableElement)(n.TABLE),new d.default({cloneSource:this.wot,cloneOverlay:this,table:a})}},{key:"refresh",value:function(e){var t=0<arguments.length&&void 0!==e&&e,n=this.shouldBeRendered();this.clone&&(this.needFullRender||n)&&this.clone.draw(t),this.needFullRender=n}},{key:"reset",value:function(){if(this.clone){var e=this.clone.wtTable.holder,t=this.clone.wtTable.hider,n=e.style,r=t.style,o=e.parentNode.style;(0,i.arrayEach)([n,r,o],function(e){e.width="",e.height=""})}}},{key:"destroy",value:function(){new a.default(this.clone).destroy()}}]),l}();t.default=l},function(e,t,n){"use strict";n(19),n(40),n(32),t.__esModule=!0,t.isFunction=function(e){return"function"==typeof e},t.throttle=a,t.throttleAfterHits=function(r){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:200,t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:10,o=a(r,e),i=t;function n(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i?(i-=1,r.apply(this,t)):o.apply(this,t)}return n.clearHits=function(){i=t},n},t.debounce=function(o){var i,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:200,s=null;return function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return s&&clearTimeout(s),s=setTimeout(function(){i=o.apply(e,n)},a),i}},t.pipe=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t.slice(1);return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,i.arrayReduce)(o,function(e,t){return t(e)},r.apply(this,t))}},t.partial=function(r){for(var e=arguments.length,o=new Array(1<e?e-1:0),t=1;t<e;t++)o[t-1]=arguments[t];return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.apply(this,o.concat(t))}},t.curry=function(a){var s=a.length;return function o(i){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=i.concat(t);return r.length>=s?a.apply(this,r):o(r)}}([])},t.curryRight=function(a){var s=a.length;return function o(i){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=i.concat(t.reverse());return r.length>=s?a.apply(this,r):o(r)}}([])};var i=n(3);function a(s){var l=1<arguments.length&&void 0!==arguments[1]?arguments[1]:200,u=0,c={lastCallThrottled:!0},h=null;return function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=Date.now(),i=!1;c.lastCallThrottled=!0,u||(u=o,i=!0);var a=l-(o-u);return i?(c.lastCallThrottled=!1,s.apply(this,n)):(h&&clearTimeout(h),h=setTimeout(function(){c.lastCallThrottled=!1,s.apply(e,n),h=void(u=0)},a)),c}}},function(e,t,n){var r=n(22),o=n(60),i=n(89);r({target:"Object",stat:!0,forced:n(29)(function(){i(1)})},{keys:function(e){return i(o(e))}})},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){"use strict";var r=n(0);n(16),n(70),n(10),n(14),n(17),t.__esModule=!0,t.default=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"common";i.has(e)||i.set(e,new Map);var n=i.get(e);return{register:function(e,t){n.set(e,t)},getItem:function(e){return n.get(e)},hasItem:function(e){return n.has(e)},getNames:function(){return(0,o.default)(n.keys())},getValues:function(){return(0,o.default)(n.values())}}},t.collection=void 0;var o=r(n(36)),i=new Map;t.collection=i},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.getValidator=function(e){if("function"==typeof e)return e;if(d(e))return h(e);throw Error('No registered validator found under "'.concat(e,'" name'))},t.getRegisteredValidators=t.getRegisteredValidatorNames=t.hasValidator=t.registerValidator=void 0;var o=r(n(78)),i=r(n(427)),a=r(n(428)),s=r(n(430)),l=r(n(431)),u=(0,o.default)("validators"),c=u.register,h=u.getItem,d=u.hasItem,f=u.getNames,v=u.getValues;t.getRegisteredValidators=v,t.getRegisteredValidatorNames=f,t.hasValidator=d,(t.registerValidator=c)("autocomplete",i.default),c("date",a.default),c("numeric",s.default),c("time",l.default)},function(e,t,n){"use strict";function r(e){var t,n,r,o,i,a,s,l,u=h(e,!1);if("string"==typeof u&&2<u.length)if(43===(t=(u=S?u.trim():m(u,3)).charCodeAt(0))||45===t){if(88===(n=u.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(u.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+u}for(a=(i=u.slice(2)).length,s=0;s<a;s++)if((l=i.charCodeAt(s))<48||o<l)return NaN;return parseInt(i,r)}return+u}var o=n(47),i=n(34),a=n(120),s=n(65),l=n(48),u=n(77),c=n(151),h=n(96),d=n(29),f=n(101),v=n(99).f,g=n(113).f,p=n(49).f,m=n(197),y="Number",w=i[y],C=w.prototype,E=u(f(C))==y,S="trim"in String.prototype;if(a(y,!w(" 0o1")||!w("0b1")||w("+0x1"))){for(var b,R=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof R&&(E?d(function(){C.valueOf.call(n)}):u(n)!=y)?c(new w(r(t)),n,R):r(t)},T=o?v(w):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),O=0;T.length>O;O++)l(w,b=T[O])&&!l(R,b)&&p(R,b,g(w,b));(R.prototype=C).constructor=R,s(i,y,R)}},function(e,t,n){n(22)({target:"Number",stat:!0},{isInteger:n(441)})},function(e,t,n){"use strict";var r=n(123),o=n(193);e.exports=r("Set",function(t){return function(e){return t(this,0<arguments.length?e:void 0)}},o)},function(e,t,n){"use strict";var r=n(0),o=n(9);n(12),t.__esModule=!0,t.predefinedItems=function(){var n={};return(0,a.objectEach)(S,function(e,t){n[t]=e()}),n},t.addItem=function(e,t){-1===E.indexOf(e)&&(S[e]=t)},t.ITEMS=t.UNDO=t.NO_ITEMS=t.SEPARATOR=t.ROW_BELOW=t.ROW_ABOVE=t.REMOVE_ROW=t.REMOVE_COLUMN=t.REDO=t.READ_ONLY=t.COLUMN_RIGHT=t.COLUMN_LEFT=t.CLEAR_COLUMN=t.ALIGNMENT=void 0;var i=r(n(71)),a=n(4),s=o(n(493));t.ALIGNMENT=s.KEY;var l=o(n(494));t.CLEAR_COLUMN=l.KEY;var u=o(n(495));t.COLUMN_LEFT=u.KEY;var c=o(n(496));t.COLUMN_RIGHT=c.KEY;var h=o(n(497));t.READ_ONLY=h.KEY;var d=o(n(498));t.REDO=d.KEY;var f=o(n(499));t.REMOVE_COLUMN=f.KEY;var v=o(n(500));t.REMOVE_ROW=v.KEY;var g=o(n(501));t.ROW_ABOVE=g.KEY;var p=o(n(502));t.ROW_BELOW=p.KEY;var m=o(n(167));t.SEPARATOR=m.KEY;var y=o(n(503));t.NO_ITEMS=y.KEY;var w,C=o(n(504));t.UNDO=C.KEY;var E=[g.KEY,p.KEY,u.KEY,c.KEY,l.KEY,v.KEY,f.KEY,C.KEY,d.KEY,h.KEY,s.KEY,m.KEY,y.KEY];t.ITEMS=E;var S=(w={},(0,i.default)(w,m.KEY,m.default),(0,i.default)(w,y.KEY,y.default),(0,i.default)(w,g.KEY,g.default),(0,i.default)(w,p.KEY,p.default),(0,i.default)(w,u.KEY,u.default),(0,i.default)(w,c.KEY,c.default),(0,i.default)(w,l.KEY,l.default),(0,i.default)(w,v.KEY,v.default),(0,i.default)(w,f.KEY,f.default),(0,i.default)(w,C.KEY,C.default),(0,i.default)(w,d.KEY,d.default),(0,i.default)(w,h.KEY,h.default),(0,i.default)(w,s.KEY,s.default),w)},function(e,t,n){"use strict";function r(e){return"string"==typeof e&&"'"===e.charAt(0)&&"="===e.charAt(1)}n(131),n(39),t.__esModule=!0,t.isFormulaExpression=function(e){return"string"==typeof e&&2<=e.length&&"="===e.charAt(0)},t.isFormulaExpressionEscaped=r,t.unescapeFormulaExpression=function(e){return r(e)?e.substr(1):e},t.toUpperCaseFormula=function(e){var t=/(\\"|"(?:\\"|[^"])*"|(\+))|(\\'|'(?:\\'|[^'])*'|(\+))/g,n=e.match(t)||[],r=-1;return e.toUpperCase().replace(t,function(){return n[r+=1]})},t.cellCoordFactory=function(t,n){return function(e){return{row:"row"===t?n:e.row,column:"column"===t?n:e.column}}}},function(e,t,n){"use strict";var r=n(0);n(12),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(7)),a=r(n(6)),s=r(n(2)),l=r(n(8)),u=n(111),c=n(3),h=r(n(376)),d=[1,2,3],f=function(e){function r(e,t){var n;return(0,o.default)(this,r),(n=(0,i.default)(this,(0,a.default)(r).call(this,e,t))).precedents=[],n.value=null,n.error=null,n.state=r.STATE_UP_TO_DATE,n}return(0,l.default)(r,e),(0,s.default)(r,null,[{key:"STATE_OUT_OFF_DATE",get:function(){return 1}},{key:"STATE_COMPUTING",get:function(){return 2}},{key:"STATE_UP_TO_DATE",get:function(){return 3}}]),(0,s.default)(r,[{key:"setValue",value:function(e){this.value=e}},{key:"getValue",value:function(){return this.value}},{key:"setError",value:function(e){this.error=e}},{key:"getError",value:function(){return this.error}},{key:"hasError",value:function(){return null!==this.error}},{key:"setState",value:function(e){if(-1===d.indexOf(e))throw Error("Unrecognized state: ".concat(e));this.state=e}},{key:"isState",value:function(e){return this.state===e}},{key:"addPrecedent",value:function(e){if(this.isEqual(e))throw Error(u.ERROR_REF);this.hasPrecedent(e)||this.precedents.push(e)}},{key:"removePrecedent",value:function(t){if(this.isEqual(t))throw Error(u.ERROR_REF);this.precedents=(0,c.arrayFilter)(this.precedents,function(e){return!e.isEqual(t)})}},{key:"clearPrecedents",value:function(){this.precedents.length=0}},{key:"getPrecedents",value:function(){return this.precedents}},{key:"hasPrecedents",value:function(){return 0<this.precedents.length}},{key:"hasPrecedent",value:function(t){return 0<(0,c.arrayFilter)(this.precedents,function(e){return e.isEqual(t)}).length}}]),r}(h.default);t.default=f},function(e,t,n){var r,o,i,a=n(177),s=n(34),l=n(42),u=n(63),c=n(48),h=n(116),d=n(98),f=s.WeakMap;if(a){var v=new f,g=v.get,p=v.has,m=v.set;r=function(e,t){return m.call(v,e,t),t},o=function(e){return g.call(v,e)||{}},i=function(e){return p.call(v,e)}}else{var y=h("state");d[y]=!0,r=function(e,t){return u(e,y,t),t},o=function(e){return c(e,y)?e[y]:{}},i=function(e){return c(e,y)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(n){return function(e){var t;if(!l(e)||(t=o(e)).type!==n)throw TypeError("Incompatible receiver, "+n+" required");return t}}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(0<e?r:n)(e)}},function(e,t,n){"use strict";n(64),t.__esModule=!0;var r=n(360);t.registerRootComparator=r.registerRootComparator,t.getRootComparator=r.getRootComparator,t.getCompareFunctionFactory=r.getCompareFunctionFactory;var o=n(485);t.FIRST_AFTER_SECOND=o.FIRST_AFTER_SECOND,t.FIRST_BEFORE_SECOND=o.FIRST_BEFORE_SECOND,t.DO_NOT_SWAP=o.DO_NOT_SWAP,t.sort=o.sort},function(e,t,n){var r=n(179),o=n(143);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var w=n(103),C=n(114),E=n(60),S=n(50),r=n(152);e.exports=function(h,e){var d=1==h,f=2==h,v=3==h,g=4==h,p=6==h,m=5==h||p,y=e||r;return function(e,t,n){for(var r,o,i=E(e),a=C(i),s=w(t,n,3),l=S(a.length),u=0,c=d?y(e,l):f?y(e,0):void 0;u<l;u++)if((m||u in a)&&(o=s(r=a[u],u,i),h))if(d)c[u]=o;else if(o)switch(h){case 3:return!0;case 5:return r;case 6:return u;case 2:c.push(r)}else if(g)return!1;return p?-1:v||g?g:c}}},function(e,t,n){"use strict";var r=n(0);n(16),n(10),n(14),n(24),n(17),t.__esModule=!0,t.registerIdentity=function(e,t){u.set(e,t)},t.getTranslator=function(e){var t,n=e instanceof a.default?e:h(e);c.has(n)?t=c.get(n):(t=new l(n),c.set(n,t));return t},t.getIdentity=h,t.RecordTranslator=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(161)),s=n(4),l=function(){function t(e){(0,o.default)(this,t),this.hot=e}return(0,i.default)(t,[{key:"toVisualRow",value:function(e){return this.hot.runHooks("unmodifyRow",e)}},{key:"toVisualColumn",value:function(e){return this.hot.runHooks("unmodifyCol",e)}},{key:"toVisual",value:function(e,t){return(0,s.isObject)(e)?{row:this.toVisualRow(e.row),column:this.toVisualColumn(e.column)}:[this.toVisualRow(e),this.toVisualColumn(t)]}},{key:"toPhysicalRow",value:function(e){return this.hot.runHooks("modifyRow",e)}},{key:"toPhysicalColumn",value:function(e){return this.hot.runHooks("modifyCol",e)}},{key:"toPhysical",value:function(e,t){return(0,s.isObject)(e)?{row:this.toPhysicalRow(e.row),column:this.toPhysicalColumn(e.column)}:[this.toPhysicalRow(e),this.toPhysicalColumn(t)]}}]),t}();t.RecordTranslator=l;var u=new WeakMap,c=new WeakMap;function h(e){if(!u.has(e))throw Error("Record translator was not registered for this object identity");return u.get(e)}},function(e,t,n){"use strict";var r=n(0);n(19),n(12),n(64),n(30),t.__esModule=!0,t.default=void 0;var o=r(n(36)),a=n(3),i=n(4),s=n(15),l={_arrayMap:[],getValueByIndex:function(e){var t=null;return e<this._arrayMap.length&&(t=this._arrayMap[e]),t},getIndexByValue:function(e){var t;return-1===(t=this._arrayMap.indexOf(e))?null:t},insertItems:function(t,e){var n=this,r=1<arguments.length&&void 0!==e?e:1,o=(0,a.arrayMax)(this._arrayMap)+1,i=[];return(0,s.rangeEach)(r-1,function(e){i.push(n._arrayMap.splice(t+e,0,o+e))}),i},removeItems:function(e,t){var n=1<arguments.length&&void 0!==t?t:1,r=[];if(Array.isArray(e)){var o=[].concat(this._arrayMap);e.sort(function(e,t){return t-e});for(var i=0,a=e.length;i<a;i++){var s=e[i];this._arrayMap.splice(s,1),r.push(o[s])}}else r=this._arrayMap.splice(e,n);return r},unshiftItems:function(e,t){var n=1<arguments.length&&void 0!==t?t:1,o=this.removeItems(e,n);this._arrayMap=(0,a.arrayMap)(this._arrayMap,function(e){var t=e,n=function(r){return(0,a.arrayReduce)(o,function(e,t){var n=e;return t<r&&(n+=1),n},0)}(t);return n&&(t-=n),t})},shiftItems:function(n,e){var t=this,r=1<arguments.length&&void 0!==e?e:1;this._arrayMap=(0,a.arrayMap)(this._arrayMap,function(e){var t=e;return n<=t&&(t+=r),t}),(0,s.rangeEach)(r-1,function(e){t._arrayMap.splice(n+e,0,n+e)})},swapIndexes:function(e,t){var n;(n=this._arrayMap).splice.apply(n,[t,0].concat((0,o.default)(this._arrayMap.splice(e,1))))},clearMap:function(){this._arrayMap.length=0}};(0,i.defineGetter)(l,"MIXIN_NAME","arrayMapper",{writable:!1,enumerable:!1});var u=l;t.default=u},function(e,t,n){"use strict";n(19),t.__esModule=!0,t.createId=r,t.createDefaultCustomBorder=o,t.createSingleEmptyBorder=i,t.createDefaultHtBorder=l,t.createEmptyBorders=function(e,t){return{id:r(e,t),border:{width:1,color:"#000",cornerVisible:!1},row:e,col:t,top:{hide:!0},right:{hide:!0},bottom:{hide:!0},left:{hide:!0}}},t.extendDefaultBorder=function(e,t){(0,a.hasOwnProperty)(t,"border")&&(e.border=t.border);(0,a.hasOwnProperty)(t,"top")&&(t.top?(0,a.isObject)(t.top)||(t.top={width:1,color:"#000"}):t.top={hide:!0},e.top=t.top);(0,a.hasOwnProperty)(t,"right")&&(t.right?(0,a.isObject)(t.right)||(t.right={width:1,color:"#000"}):t.right={hide:!0},e.right=t.right);(0,a.hasOwnProperty)(t,"bottom")&&(t.bottom?(0,a.isObject)(t.bottom)||(t.bottom={width:1,color:"#000"}):t.bottom={hide:!0},e.bottom=t.bottom);(0,a.hasOwnProperty)(t,"left")&&(t.left?(0,a.isObject)(t.left)||(t.left={width:1,color:"#000"}):t.left={hide:!0},e.left=t.left);return e},t.checkSelectionBorders=function(r,o){var i=!1;return(0,s.arrayEach)(r.getSelectedRange(),function(e){e.forAll(function(e,t){var n=r.getCellMeta(e,t).borders;if(n){if(!o)return!(i=!0);if(!(0,a.hasOwnProperty)(n[o],"hide")||!1===n[o].hide)return!(i=!0)}})}),i},t.markSelected=function(e){return'<span class="selected">'.concat(String.fromCharCode(10003),"</span>").concat(e)};var a=n(4),s=n(3);function r(e,t){return"border_row".concat(e,"col").concat(t)}function o(){return{width:1,color:"#000"}}function i(){return{hide:!0}}function l(){return{width:1,color:"#000",cornerVisible:!1}}},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);t.f=i?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var o=n(42);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(34),o=n(141),i=n(115),a="__core-js_shared__",s=r[a]||o(a,{});(e.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.1.3",mode:i?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports={}},function(e,t,n){var r=n(179),o=n(143).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){var r=n(35),o=n(101),i=n(63),a=r("unscopables"),s=Array.prototype;null==s[a]&&i(s,a,o(null)),e.exports=function(e){s[a][e]=!0}},function(e,t,n){function r(){}var o=n(45),i=n(384),a=n(143),s=n(98),l=n(182),u=n(140),c=n(116)("IE_PROTO"),h="prototype",d=function(){var e,t=u("iframe"),n=a.length;for(t.style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),d=e.F;n--;)delete d[h][a[n]];return d()};e.exports=Object.create||function(e,t){var n;return null!==e?(r[h]=o(e),n=new r,r[h]=null,n[c]=e):n=d(),void 0===t?n:i(n,t)},s[c]=!0},function(e,t){e.exports={}},function(e,t,n){var i=n(149);e.exports=function(r,o,e){if(i(r),void 0===o)return r;switch(e){case 0:return function(){return r.call(o)};case 1:return function(e){return r.call(o,e)};case 2:return function(e,t){return r.call(o,e,t)};case 3:return function(e,t,n){return r.call(o,e,t,n)}}return function(){return r.apply(o,arguments)}}},function(e,t,n){var r=n(29),o=n(35)("species");e.exports=function(t){return!r(function(){var e=[];return(e.constructor={})[o]=function(){return{foo:1}},1!==e[t](Boolean).foo})}},function(e,t,n){"use strict";var r=n(0);n(129),t.__esModule=!0,t.default=t.EditorState=void 0;var o=r(n(7)),i=r(n(6)),a=r(n(8)),s=r(n(1)),l=r(n(2)),u=n(25),c=n(27),h=n(4),d=r(n(409)),f={VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"};t.EditorState=f;var v=function(){function t(e){(0,s.default)(this,t),this.hot=e,this.instance=e,this.state=f.VIRGIN,this._opened=!1,this._fullEditMode=!1,this._closeCallback=null,this.TD=null,this.row=null,this.col=null,this.prop=null,this.originalValue=null,this.cellProperties=null,this.init()}return(0,l.default)(t,[{key:"_fireCallbacks",value:function(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)}},{key:"init",value:function(){}},{key:"getValue",value:function(){throw Error("Editor getValue() method unimplemented")}},{key:"setValue",value:function(){throw Error("Editor setValue() method unimplemented")}},{key:"open",value:function(){throw Error("Editor open() method unimplemented")}},{key:"close",value:function(){throw Error("Editor close() method unimplemented")}},{key:"prepare",value:function(e,t,n,r,o,i){this.TD=r,this.row=e,this.col=t,this.prop=n,this.originalValue=o,this.cellProperties=i,this.state=f.VIRGIN}},{key:"extend",value:function(){return function(e){function t(){return(0,s.default)(this,t),(0,o.default)(this,(0,i.default)(t).apply(this,arguments))}return(0,a.default)(t,e),t}(this.constructor)}},{key:"saveValue",value:function(e,t){var n,r;t?((n=this.hot.getSelectedLast())[0]>n[2]&&(r=n[0],n[0]=n[2],n[2]=r),n[1]>n[3]&&(r=n[1],n[1]=n[3],n[3]=r)):n=[this.row,this.col,null,null],this.hot.populateFromArray(n[0],n[1],e,n[2],n[3],"edit")}},{key:"beginEditing",value:function(e,t){if(this.state===f.VIRGIN){if(this.hot.view.scrollViewport(new u.CellCoords(this.row,this.col)),this.state=f.EDITING,this.isInFullEditMode()){var n="string"==typeof e?e:(0,c.stringify)(this.originalValue);this.setValue(n)}this.open(t),this._opened=!0,this.focus(),this.hot.view.render(),this.hot.runHooks("afterBeginEditing",this.row,this.col)}}},{key:"finishEditing",value:function(e,t,n){var r,o=this;if(n){var i=this._closeCallback;this._closeCallback=function(e){i&&i(e),n(e),o.hot.view.render()}}if(!this.isWaiting())if(this.state!==f.VIRGIN){if(this.state===f.EDITING){if(e)return this.cancelChanges(),void this.hot.view.render();var a=this.getValue();r=this.hot.getSettings().trimWhitespace?[["string"==typeof a?String.prototype.trim.call(a||""):a]]:[[a]],this.state=f.WAITING,this.saveValue(r,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",function(e){o.state=f.FINISHED,o.discardEditor(e)}):(this.state=f.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout(function(){o._fireCallbacks(!0)})}},{key:"cancelChanges",value:function(){this.state=f.FINISHED,this.discardEditor()}},{key:"discardEditor",value:function(e){this.state===f.FINISHED&&(!1===e&&!0!==this.cellProperties.allowInvalid?(this.hot.selectCell(this.row,this.col),this.focus(),this.state=f.EDITING,this._fireCallbacks(!1)):(this.close(),this._opened=!1,this._fullEditMode=!1,this.state=f.VIRGIN,this._fireCallbacks(!0)))}},{key:"enableFullEditMode",value:function(){this._fullEditMode=!0}},{key:"isInFullEditMode",value:function(){return this._fullEditMode}},{key:"isOpened",value:function(){return this._opened}},{key:"isWaiting",value:function(){return this.state===f.WAITING}},{key:"checkEditorSection",value:function(){var e=this.hot.countRows(),t="";return this.row<this.hot.getSettings().fixedRowsTop?t=this.col<this.hot.getSettings().fixedColumnsLeft?"top-left-corner":"top":this.hot.getSettings().fixedRowsBottom&&this.row>=e-this.hot.getSettings().fixedRowsBottom?t=this.col<this.hot.getSettings().fixedColumnsLeft?"bottom-left-corner":"bottom":this.col<this.hot.getSettings().fixedColumnsLeft&&(t="left"),t}}]),t}();(0,h.mixin)(v,d.default);var g=v;t.default=g},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=function(){function n(e,t){(0,o.default)(this,n),this.row=null,this.col=null,void 0!==e&&void 0!==t&&(this.row=e,this.col=t)}return(0,i.default)(n,[{key:"isValid",value:function(e){return!(this.row<0||this.col<0)&&!(this.row>=e.getSetting("totalRows")||this.col>=e.getSetting("totalColumns"))}},{key:"isEqual",value:function(e){return e===this||this.row===e.row&&this.col===e.col}},{key:"isSouthEastOf",value:function(e){return this.row>=e.row&&this.col>=e.col}},{key:"isNorthWestOf",value:function(e){return this.row<=e.row&&this.col<=e.col}},{key:"isSouthWestOf",value:function(e){return this.row>=e.row&&this.col<=e.col}},{key:"isNorthEastOf",value:function(e){return this.row<=e.row&&this.col>=e.col}},{key:"toObject",value:function(){return{row:this.row,col:this.col}}}]),n}();t.default=a},function(e,t,n){"use strict";var r=n(9),o=n(0);n(19),n(31),n(12),n(40),t.__esModule=!0,t.default=void 0;var i=o(n(1)),a=o(n(2)),s=o(n(7)),l=o(n(26)),h=o(n(6)),d=o(n(13)),u=o(n(8)),x=n(5),f=o(n(411)),v=n(72),P=r(n(105)),g=o(n(23)),p=n(52),m=n(33),c=function(e){function c(e){var t;return(0,i.default)(this,c),(t=(0,s.default)(this,(0,h.default)(c).call(this,e))).eventManager=new g.default((0,l.default)(t)),t.autoResize=(0,f.default)(),t.holderZIndex=-1,t.TEXTAREA=void 0,t.textareaStyle=void 0,t.TEXTAREA_PARENT=void 0,t.textareaParentStyle=void 0,t.createElements(),t.bindEvents(),t.hot.addHookOnce("afterDestroy",function(){return t.destroy()}),t}return(0,u.default)(c,e),(0,a.default)(c,[{key:"getValue",value:function(){return this.TEXTAREA.value}},{key:"setValue",value:function(e){this.TEXTAREA.value=e}},{key:"open",value:function(){var t=this;this.refreshDimensions(),this.showEditableElement(),this.addHook("beforeKeyDown",function(e){return t.onBeforeKeyDown(e)})}},{key:"close",value:function(){this.autoResize.unObserve(),this.hot.rootDocument.activeElement===this.TEXTAREA&&this.hot.listen(),this.hideEditableElement(),this.removeHooksByKey("beforeKeyDown")}},{key:"prepare",value:function(e,t,n,r,o,i){var a=this,s=this.state;if((0,d.default)((0,h.default)(c.prototype),"prepare",this).call(this,e,t,n,r,o,i),!i.readOnly){this.refreshDimensions(!0);var l=i.allowInvalid,u=i.fragmentSelection;l&&(this.TEXTAREA.value=""),s!==P.EditorState.FINISHED&&this.hideEditableElement(),u||(0,v.isMobileBrowser)()||this.hot._registerImmediate(function(){return a.focus(!0)})}}},{key:"beginEditing",value:function(e,t){this.state===P.EditorState.VIRGIN&&(this.TEXTAREA.value="",(0,d.default)((0,h.default)(c.prototype),"beginEditing",this).call(this,e,t))}},{key:"focus",value:function(e){0<arguments.length&&void 0!==e&&e?(0,x.selectElementIfAllowed)(this.TEXTAREA):(this.TEXTAREA.select(),(0,x.setCaretPosition)(this.TEXTAREA,this.TEXTAREA.value.length))}},{key:"createElements",value:function(){var e=this.hot.rootDocument;this.TEXTAREA=e.createElement("TEXTAREA"),this.TEXTAREA.tabIndex=-1,(0,x.addClass)(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=e.createElement("DIV"),(0,x.addClass)(this.TEXTAREA_PARENT,"handsontableInputHolder"),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.textareaParentStyle.zIndex="-1",this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}},{key:"getEditedCell",value:function(){var e;switch(this.checkEditorSection()){case"top":e=this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.holderZIndex=101;break;case"top-left-corner":e=this.hot.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.holderZIndex=103;break;case"bottom-left-corner":e=this.hot.view.wt.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.holderZIndex=103;break;case"left":e=this.hot.view.wt.wtOverlays.leftOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.holderZIndex=102;break;case"bottom":e=this.hot.view.wt.wtOverlays.bottomOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.holderZIndex=102;break;default:e=this.hot.getCell(this.row,this.col),this.holderZIndex=-1}return e<0?void 0:e}},{key:"hideEditableElement",value:function(){((0,v.isIE)()||(0,v.isEdge)())&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",this.textareaParentStyle.zIndex="-1"}},{key:"showEditableElement",value:function(){this.textareaParentStyle.height="",this.textareaParentStyle.overflow="",this.textareaParentStyle.position="",this.textareaParentStyle.right="auto",this.textareaParentStyle.zIndex=0<=this.holderZIndex?this.holderZIndex:"",this.textareaParentStyle.opacity="1",this.textareaStyle.textIndent="",this.textareaStyle.overflowY="hidden"}},{key:"refreshValue",value:function(){var e=this.hot.toPhysicalRow(this.row),t=this.hot.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.refreshDimensions()}},{key:"refreshDimensions",value:function(e){var t=0<arguments.length&&void 0!==e&&e;if(this.state===P.EditorState.EDITING||t)if(this.TD=this.getEditedCell(),this.TD){var n,r=this.hot.view.wt,o=r.wtOverlays,i=r.wtViewport,a=(0,x.offset)(this.TD),s=(0,x.offset)(this.hot.rootElement),l=o.topOverlay.holder,u=o.leftOverlay.holder,c=this.hot.countRows(),h=l!==this.hot.rootWindow?l.scrollTop:0,d=u!==this.hot.rootWindow?u.scrollLeft:0,f=this.checkEditorSection(),v=["","left"].includes(f)?h:0,g=["","top","bottom"].includes(f)?d:0,p=a.top===s.top?0:1,m=this.hot.getSettings(),y=this.hot.hasColHeaders(),w=this.TD.style.backgroundColor,C=a.top-s.top-p-v,E=a.left-s.left-1-g;switch(f){case"top":n=(0,x.getCssTransform)(o.topOverlay.clone.wtTable.holder.parentNode);break;case"left":n=(0,x.getCssTransform)(o.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":n=(0,x.getCssTransform)(o.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":n=(0,x.getCssTransform)(o.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":n=(0,x.getCssTransform)(o.bottomOverlay.clone.wtTable.holder.parentNode)}(y&&0===this.hot.getSelectedLast()[0]||m.fixedRowsBottom&&this.hot.getSelectedLast()[0]===c-m.fixedRowsBottom)&&(C+=1),0===this.hot.getSelectedLast()[1]&&(E+=1),n&&-1!==n?this.textareaParentStyle[n[0]]=n[1]:(0,x.resetCssTransform)(this.TEXTAREA_PARENT),this.textareaParentStyle.top="".concat(C,"px"),this.textareaParentStyle.left="".concat(E,"px"),this.showEditableElement();var S=i.rowsRenderCalculator.startPosition,b=i.columnsRenderCalculator.startPosition,R=o.leftOverlay.getScrollPosition(),T=o.topOverlay.getScrollPosition(),O=(0,x.getScrollbarWidth)(this.hot.rootDocument),k=this.TD.offsetTop+S-T,M=this.TD.offsetLeft+b-R,N=(0,x.innerWidth)(this.TD)-8,_=(0,x.hasVerticalScrollbar)(l)?O:0,A=(0,x.hasHorizontalScrollbar)(u)?O:0,I=this.hot.view.maximumVisibleElementWidth(M)-9-_,D=this.TD.scrollHeight+1,L=Math.max(this.hot.view.maximumVisibleElementHeight(k)-A,23),H=(0,x.getComputedStyle)(this.TD,this.hot.rootWindow);this.TEXTAREA.style.fontSize=H.fontSize,this.TEXTAREA.style.fontFamily=H.fontFamily,this.TEXTAREA.style.backgroundColor=w,this.autoResize.init(this.TEXTAREA,{minHeight:Math.min(D,L),maxHeight:L,minWidth:Math.min(N,I),maxWidth:I},!0)}else t||this.close()}},{key:"bindEvents",value:function(){var e=this;this.eventManager.addEventListener(this.TEXTAREA,"cut",function(e){return(0,m.stopPropagation)(e)}),this.eventManager.addEventListener(this.TEXTAREA,"paste",function(e){return(0,m.stopPropagation)(e)}),this.addHook("afterScrollHorizontally",function(){return e.refreshDimensions()}),this.addHook("afterScrollVertically",function(){return e.refreshDimensions()}),this.addHook("afterColumnResize",function(){e.refreshDimensions(),e.focus()}),this.addHook("afterRowResize",function(){e.refreshDimensions(),e.focus()})}},{key:"allowKeyEventPropagation",value:function(){}},{key:"destroy",value:function(){this.eventManager.destroy(),this.clearHooks()}},{key:"onBeforeKeyDown",value:function(e){var t=(e.ctrlKey||e.metaKey)&&!e.altKey;if(e.target===this.TEXTAREA&&!(0,m.isImmediatePropagationStopped)(e)){switch(e.keyCode){case p.KEY_CODES.ARROW_RIGHT:case p.KEY_CODES.ARROW_LEFT:this.isInFullEditMode()&&(this.isWaiting()||this.allowKeyEventPropagation(e.keyCode)||(0,m.stopImmediatePropagation)(e));break;case p.KEY_CODES.ARROW_UP:case p.KEY_CODES.ARROW_DOWN:this.isInFullEditMode()&&(this.isWaiting()||this.allowKeyEventPropagation(e.keyCode)||(0,m.stopImmediatePropagation)(e));break;case p.KEY_CODES.ENTER:var n=this.hot.selection.isMultiple();if(t&&!n||e.altKey){if(this.isOpened()){var r=(0,x.getCaretPosition)(this.TEXTAREA),o=this.getValue(),i="".concat(o.slice(0,r),"\n").concat(o.slice(r));this.setValue(i),(0,x.setCaretPosition)(this.TEXTAREA,r+1)}else this.beginEditing("".concat(this.originalValue,"\n"));(0,m.stopImmediatePropagation)(e)}e.preventDefault();break;case p.KEY_CODES.BACKSPACE:case p.KEY_CODES.DELETE:case p.KEY_CODES.HOME:case p.KEY_CODES.END:(0,m.stopImmediatePropagation)(e)}-1===[p.KEY_CODES.ARROW_UP,p.KEY_CODES.ARROW_RIGHT,p.KEY_CODES.ARROW_DOWN,p.KEY_CODES.ARROW_LEFT].indexOf(e.keyCode)&&this.autoResize.resize(String.fromCharCode(e.keyCode))}}}]),c}(P.default);t.default=c},function(e,t,n){"use strict";n(56),n(12),n(16),n(64),n(10),n(82),n(14),n(17),t.__esModule=!0,t.sortComparison=function(e,t){return"number"!=typeof e||"number"!=typeof t?o(e,t):e-t},t.toVisualValue=u,t.createArrayAssertion=c,t.toEmptyString=function(e){return null==e?"":e},t.unifyColumnValues=function(e){var t=e;t=a?Array.from(new Set(t)):(0,l.arrayUnique)(t);return t=t.sort(function(e,t){return"number"==typeof e&&"number"==typeof t?e-t:e===t?0:t<e?1:-1})},t.intersectValues=function(e,t,r,o){var i,a=[],s=e===t;s||(i=c(t));return(0,l.arrayEach)(e,function(e){var t=!1;(s||i(e))&&(t=!0);var n={checked:t,value:e,visualValue:u(e,r)};o&&o(n),a.push(n)}),a};var r=n(73),l=n(3),o=(0,r.getComparisonFunction)();function u(e,t){var n=e;return""===n&&(n="(".concat(t,")")),n}var i=new Set([1]).has(1),a=i&&"function"==typeof Array.from;function c(e){var t=e;return i&&(t=new Set(t)),function(e){return i?t.has(e):!!~t.indexOf(e)}}},function(e,t,n){"use strict";n(54),t.__esModule=!0,t.getOperationFunc=function(e){if(!r[e])throw Error('Operation with id "'.concat(e,'" does not exist.'));var n=r[e].func;return function(e,t){return n(e,t)}},t.getOperationName=function(e){return r[e].name},t.registerOperation=function(e,t,n){r[e]={name:t,func:n}},t.operations=void 0;var r={};t.operations=r},function(e,t,n){"use strict";var r=n(9),o=n(0);n(138),t.__esModule=!0,t.default=void 0;var i=o(n(1)),a=o(n(2)),s=n(4),l=o(n(58)),u=o(n(23)),c=n(5),h=n(3),d=r(n(11)),f="building",v=["click","input","keydown","keypress","keyup","focus","blur","change"],g=function(){function n(e,t){(0,i.default)(this,n),this.hot=e,this.eventManager=new u.default(this),this.options=(0,s.extend)(n.DEFAULTS,t),this._element=this.hot.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName),this.buildState=!1}return(0,a.default)(n,null,[{key:"DEFAULTS",get:function(){return(0,s.clone)({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}}]),(0,a.default)(n,[{key:"setValue",value:function(e){this.options.value=e,this.update()}},{key:"getValue",value:function(){return this.options.value}},{key:"isBuilt",value:function(){return"built"===this.buildState}},{key:"translateIfPossible",value:function(e){return"string"==typeof e&&e.startsWith(d.FILTERS_NAMESPACE)?this.hot.getTranslatedPhrase(e):e}},{key:"build",value:function(){function t(e,t){n.eventManager.addEventListener(e,t,function(e){return n.runLocalHooks(t,e,n)})}var n=this;if(this.buildState||(this.buildState=f),this.options.className&&(0,c.addClass)(this._element,this.options.className),this.options.children.length)(0,h.arrayEach)(this.options.children,function(e){return n._element.appendChild(e.element)});else if(this.options.wrapIt){var r=this.hot.rootDocument.createElement(this.options.tagName);(0,s.objectEach)(this.options,function(e,t){void 0!==r[t]&&"className"!==t&&"tagName"!==t&&"children"!==t&&(r[t]=n.translateIfPossible(e))}),this._element.appendChild(r),(0,h.arrayEach)(v,function(e){return t(r,e)})}else(0,h.arrayEach)(v,function(e){return t(n._element,e)})}},{key:"update",value:function(){}},{key:"reset",value:function(){this.options.value="",this.update()}},{key:"show",value:function(){this.element.style.display=""}},{key:"hide",value:function(){this.element.style.display="none"}},{key:"focus",value:function(){}},{key:"destroy",value:function(){this.eventManager.destroy(),this.eventManager=null,this.hot=null,this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null}},{key:"element",get:function(){return this.buildState===f||("built"===this.buildState?this.update():(this.buildState=f,this.build(),this.buildState="built")),this._element}}]),n}();(0,s.mixin)(g,l.default);var p=g;t.default=p},function(e,t,n){var o;"undefined"!=typeof self&&self,o=function(){return a={},o.m=n=[function(e,t){t.nil=new Error("#NULL!"),t.div0=new Error("#DIV/0!"),t.value=new Error("#VALUE!"),t.ref=new Error("#REF!"),t.name=new Error("#NAME?"),t.num=new Error("#NUM!"),t.na=new Error("#N/A"),t.error=new Error("#ERROR!"),t.data=new Error("#GETTING_DATA")},function(e,r,t){var o=t(0);r.flattenShallow=function(e){return e&&e.reduce?e.reduce(function(e,t){var n=Array.isArray(e),r=Array.isArray(t);return n&&r?e.concat(t):n?(e.push(t),e):r?[e].concat(t):[e,t]}):e},r.isFlat=function(e){if(!e)return!1;for(var t=0;t<e.length;++t)if(Array.isArray(e[t]))return!1;return!0},r.flatten=function(){for(var e=r.argsToArray.apply(null,arguments);!r.isFlat(e);)e=r.flattenShallow(e);return e},r.argsToArray=function(e){var t=[];return r.arrayEach(e,function(e){t.push(e)}),t},r.numbers=function(){return this.flatten.apply(null,arguments).filter(function(e){return"number"==typeof e})},r.cleanFloat=function(e){return Math.round(1e14*e)/1e14},r.parseBool=function(e){if("boolean"==typeof e)return e;if(e instanceof Error)return e;if("number"==typeof e)return 0!==e;if("string"==typeof e){var t=e.toUpperCase();if("TRUE"===t)return!0;if("FALSE"===t)return!1}return e instanceof Date&&!isNaN(e)||o.value},r.parseNumber=function(e){return void 0===e||""===e?o.value:isNaN(e)?o.value:parseFloat(e)},r.parseNumberArray=function(e){var t,n;if(!e||0===(t=e.length))return o.value;for(;t--;){if((n=r.parseNumber(e[t]))===o.value)return n;e[t]=n}return e},r.parseMatrix=function(e){var t;if(!e||0===e.length)return o.value;for(var n=0;n<e.length;n++)if(t=r.parseNumberArray(e[n]),(e[n]=t)instanceof Error)return t;return e};var n=new Date(Date.UTC(1900,0,1));r.parseDate=function(e){if(isNaN(e))return"string"!=typeof e||(e=new Date(e),isNaN(e))?o.value:e;if(e instanceof Date)return new Date(e);var t=parseInt(e,10);return t<0?o.num:t<=60?new Date(n.getTime()+864e5*(t-1)):new Date(n.getTime()+864e5*(t-2))},r.parseDateArray=function(e){for(var t,n=e.length;n--;){if((t=this.parseDate(e[n]))===o.value)return t;e[n]=t}return e},r.anyIsError=function(){for(var e=arguments.length;e--;)if(arguments[e]instanceof Error)return!0;return!1},r.arrayValuesToNumbers=function(e){for(var t,n=e.length;n--;)if("number"!=typeof(t=e[n]))if(!0!==t)if(!1!==t){if("string"==typeof t){var r=this.parseNumber(t);r instanceof Error?e[n]=0:e[n]=r}}else e[n]=0;else e[n]=1;return e},r.rest=function(e,t){return t=t||1,e&&"function"==typeof e.slice?e.slice(t):e},r.initial=function(e,t){return t=t||1,e&&"function"==typeof e.slice?e.slice(0,e.length-t):e},r.arrayEach=function(e,t){for(var n=-1,r=e.length;++n<r&&!1!==t(e[n],n,e););return e},r.transpose=function(n){return n?n[0].map(function(e,t){return n.map(function(e){return e[t]})}):o.value}},function(e,t,n){"use strict";var r;t.__esModule=!0,t.default=function(e){var t=void 0;e=(e+"").replace(/#|!|\?/g,""),d[e]&&(t=d[e]);return t||null},t.isValidStrict=function(e){var t=!1;for(var n in d)if(Object.prototype.hasOwnProperty.call(d,n)&&d[n]===e){t=!0;break}return t};var o=t.ERROR="ERROR",i=t.ERROR_DIV_ZERO="DIV/0",a=t.ERROR_NAME="NAME",s=t.ERROR_NOT_AVAILABLE="N/A",l=t.ERROR_NULL="NULL",u=t.ERROR_NUM="NUM",c=t.ERROR_REF="REF",h=t.ERROR_VALUE="VALUE",d=((r={})[o]="#ERROR!",r[i]="#DIV/0!",r[a]="#NAME?",r[s]="#N/A",r[l]="#NULL!",r[u]="#NUM!",r[c]="#REF!",r[h]="#VALUE!",r)},function(e,t,n){"use strict";function r(e){var t=void 0;return"number"==typeof e?t=e:"string"==typeof e&&(t=-1<e.indexOf(".")?parseFloat(e):parseInt(e,10)),t}t.__esModule=!0,t.toNumber=r,t.invertNumber=function(e){return-1*r(e)}},function(e,o,t){var v=t(1),l=t(0),i=t(5),a=t(8),g=t(7);o.ABS=function(e){return(e=v.parseNumber(e))instanceof Error?e:Math.abs(e)},o.ACOS=function(e){if((e=v.parseNumber(e))instanceof Error)return e;var t=Math.acos(e);return isNaN(t)&&(t=l.num),t},o.ACOSH=function(e){if((e=v.parseNumber(e))instanceof Error)return e;var t=Math.log(e+Math.sqrt(e*e-1));return isNaN(t)&&(t=l.num),t},o.ACOT=function(e){return(e=v.parseNumber(e))instanceof Error?e:Math.atan(1/e)},o.ACOTH=function(e){if((e=v.parseNumber(e))instanceof Error)return e;var t=.5*Math.log((e+1)/(e-1));return isNaN(t)&&(t=l.num),t},o.AGGREGATE=function(e,t,n,r){if(e=v.parseNumber(e),t=v.parseNumber(e),v.anyIsError(e,t))return l.value;switch(e){case 1:return i.AVERAGE(n);case 2:return i.COUNT(n);case 3:return i.COUNTA(n);case 4:return i.MAX(n);case 5:return i.MIN(n);case 6:return o.PRODUCT(n);case 7:return i.STDEV.S(n);case 8:return i.STDEV.P(n);case 9:return o.SUM(n);case 10:return i.VAR.S(n);case 11:return i.VAR.P(n);case 12:return i.MEDIAN(n);case 13:return i.MODE.SNGL(n);case 14:return i.LARGE(n,r);case 15:return i.SMALL(n,r);case 16:return i.PERCENTILE.INC(n,r);case 17:return i.QUARTILE.INC(n,r);case 18:return i.PERCENTILE.EXC(n,r);case 19:return i.QUARTILE.EXC(n,r)}},o.ARABIC=function(e){if(!/^M*(?:D?C{0,3}|C[MD])(?:L?X{0,3}|X[CL])(?:V?I{0,3}|I[XV])$/.test(e))return l.value;var t=0;return e.replace(/[MDLV]|C[MD]?|X[CL]?|I[XV]?/g,function(e){t+={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1}[e]}),t},o.ASIN=function(e){if((e=v.parseNumber(e))instanceof Error)return e;var t=Math.asin(e);return isNaN(t)&&(t=l.num),t},o.ASINH=function(e){return(e=v.parseNumber(e))instanceof Error?e:Math.log(e+Math.sqrt(e*e+1))},o.ATAN=function(e){return(e=v.parseNumber(e))instanceof Error?e:Math.atan(e)},o.ATAN2=function(e,t){return e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?l.value:Math.atan2(e,t)},o.ATANH=function(e){if((e=v.parseNumber(e))instanceof Error)return e;var t=Math.log((1+e)/(1-e))/2;return isNaN(t)&&(t=l.num),t},o.BASE=function(e,t,n){if(n=n||0,e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),v.anyIsError(e,t,n))return l.value;n=void 0===n?0:n;var r=e.toString(t);return new Array(Math.max(n+1-r.length,0)).join("0")+r},o.CEILING=function(e,t,n){if(t=void 0===t?1:Math.abs(t),n=n||0,e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),v.anyIsError(e,t,n))return l.value;if(0===t)return 0;var r=-Math.floor(Math.log(t)/Math.log(10));return 0<=e?o.ROUND(Math.ceil(e/t)*t,r):0===n?-o.ROUND(Math.floor(Math.abs(e)/t)*t,r):-o.ROUND(Math.ceil(Math.abs(e)/t)*t,r)},o.CEILING.MATH=o.CEILING,o.CEILING.PRECISE=o.CEILING,o.COMBIN=function(e,t){return e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?l.value:o.FACT(e)/(o.FACT(t)*o.FACT(e-t))},o.COMBINA=function(e,t){return e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?l.value:0===e&&0===t?1:o.COMBIN(e+t-1,e-1)},o.COS=function(e){return(e=v.parseNumber(e))instanceof Error?e:Math.cos(e)},o.COSH=function(e){return(e=v.parseNumber(e))instanceof Error?e:(Math.exp(e)+Math.exp(-e))/2},o.COT=function(e){return(e=v.parseNumber(e))instanceof Error?e:1/Math.tan(e)},o.COTH=function(e){if((e=v.parseNumber(e))instanceof Error)return e;var t=Math.exp(2*e);return(t+1)/(t-1)},o.CSC=function(e){return(e=v.parseNumber(e))instanceof Error?e:1/Math.sin(e)},o.CSCH=function(e){return(e=v.parseNumber(e))instanceof Error?e:2/(Math.exp(e)-Math.exp(-e))},o.DECIMAL=function(e,t){return arguments.length<1?l.value:parseInt(e,t)},o.DEGREES=function(e){return(e=v.parseNumber(e))instanceof Error?e:180*e/Math.PI},o.EVEN=function(e){return(e=v.parseNumber(e))instanceof Error?e:o.CEILING(e,-2,-1)},o.EXP=function(e){return arguments.length<1?l.na:"number"!=typeof e||1<arguments.length?l.error:e=Math.exp(e)};var n=[];o.FACT=function(e){if((e=v.parseNumber(e))instanceof Error)return e;var t=Math.floor(e);return 0===t||1===t?1:(0<n[t]||(n[t]=o.FACT(t-1)*t),n[t])},o.FACTDOUBLE=function(e){if((e=v.parseNumber(e))instanceof Error)return e;var t=Math.floor(e);return t<=0?1:t*o.FACTDOUBLE(t-2)},o.FLOOR=function(e,t){if(e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t))return l.value;if(0===t)return 0;if(!(0<e&&0<t||e<0&&t<0))return l.num;t=Math.abs(t);var n=-Math.floor(Math.log(t)/Math.log(10));return 0<=e?o.ROUND(Math.floor(e/t)*t,n):-o.ROUND(Math.ceil(Math.abs(e)/t),n)},o.FLOOR.MATH=function(e,t,n){if(t=void 0===t?1:t,n=void 0===n?0:n,e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),v.anyIsError(e,t,n))return l.value;if(0===t)return 0;t=t?Math.abs(t):1;var r=-Math.floor(Math.log(t)/Math.log(10));return 0<=e?o.ROUND(Math.floor(e/t)*t,r):0===n||void 0===n?-o.ROUND(Math.ceil(Math.abs(e)/t)*t,r):-o.ROUND(Math.floor(Math.abs(e)/t)*t,r)},o.FLOOR.PRECISE=o.FLOOR.MATH,o.GCD=function(){var e=v.parseNumberArray(v.flatten(arguments));if(e instanceof Error)return e;for(var t=e.length,n=e[0],r=n<0?-n:n,o=1;o<t;o++){for(var i=e[o],a=i<0?-i:i;r&&a;)a<r?r%=a:a%=r;r+=a}return r},o.INT=function(e){return(e=v.parseNumber(e))instanceof Error?e:Math.floor(e)},o.ISO={CEILING:o.CEILING},o.LCM=function(){var e=v.parseNumberArray(v.flatten(arguments));if(e instanceof Error)return e;for(var t,n,r,o,i=1;void 0!==(r=e.pop());)for(;1<r;){if(r%2){for(t=3,n=Math.floor(Math.sqrt(r));t<=n&&r%t;t+=2);o=t<=n?t:r}else o=2;for(r/=o,i*=o,t=e.length;t;e[--t]%o==0&&1==(e[t]/=o)&&e.splice(t,1));}return i},o.LN=function(e){return(e=v.parseNumber(e))instanceof Error?e:Math.log(e)},o.LN10=function(){return Math.log(10)},o.LN2=function(){return Math.log(2)},o.LOG10E=function(){return Math.LOG10E},o.LOG2E=function(){return Math.LOG2E},o.LOG=function(e,t){return e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?l.value:(t=void 0===t?10:t,Math.log(e)/Math.log(t))},o.LOG10=function(e){return(e=v.parseNumber(e))instanceof Error?e:Math.log(e)/Math.log(10)},o.MOD=function(e,t){if(e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t))return l.value;if(0===t)return l.div0;var n=Math.abs(e%t);return 0<t?n:-n},o.MROUND=function(e,t){return e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?l.value:e*t<0?l.num:Math.round(e/t)*t},o.MULTINOMIAL=function(){var e=v.parseNumberArray(v.flatten(arguments));if(e instanceof Error)return e;for(var t=0,n=1,r=0;r<e.length;r++)t+=e[r],n*=o.FACT(e[r]);return o.FACT(t)/n},o.ODD=function(e){if((e=v.parseNumber(e))instanceof Error)return e;var t=Math.ceil(Math.abs(e));return t=1&t?t:t+1,0<e?t:-t},o.PI=function(){return Math.PI},o.E=function(){return Math.E},o.POWER=function(e,t){if(e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t))return l.value;var n=Math.pow(e,t);return isNaN(n)?l.num:n},o.PRODUCT=function(){var e=v.parseNumberArray(v.flatten(arguments));if(e instanceof Error)return e;for(var t=1,n=0;n<e.length;n++)t*=e[n];return t},o.QUOTIENT=function(e,t){return e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?l.value:parseInt(e/t,10)},o.RADIANS=function(e){return(e=v.parseNumber(e))instanceof Error?e:e*Math.PI/180},o.RAND=function(){return Math.random()},o.RANDBETWEEN=function(e,t){return e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?l.value:e+Math.ceil((t-e+1)*Math.random())-1},o.ROMAN=function(e){if((e=v.parseNumber(e))instanceof Error)return e;for(var t=String(e).split(""),n=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"],r="",o=3;o--;)r=(n[+t.pop()+10*o]||"")+r;return new Array(+t.join("")+1).join("M")+r},o.ROUND=function(e,t){return e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?l.value:Math.round(e*Math.pow(10,t))/Math.pow(10,t)},o.ROUNDDOWN=function(e,t){return e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?l.value:(0<e?1:-1)*Math.floor(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)},o.ROUNDUP=function(e,t){return e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?l.value:(0<e?1:-1)*Math.ceil(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)},o.SEC=function(e){return(e=v.parseNumber(e))instanceof Error?e:1/Math.cos(e)},o.SECH=function(e){return(e=v.parseNumber(e))instanceof Error?e:2/(Math.exp(e)+Math.exp(-e))},o.SERIESSUM=function(e,t,n,r){if(e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),r=v.parseNumberArray(r),v.anyIsError(e,t,n,r))return l.value;for(var o=r[0]*Math.pow(e,t),i=1;i<r.length;i++)o+=r[i]*Math.pow(e,t+i*n);return o},o.SIGN=function(e){return(e=v.parseNumber(e))instanceof Error?e:e<0?-1:0===e?0:1},o.SIN=function(e){return(e=v.parseNumber(e))instanceof Error?e:Math.sin(e)},o.SINH=function(e){return(e=v.parseNumber(e))instanceof Error?e:(Math.exp(e)-Math.exp(-e))/2},o.SQRT=function(e){return(e=v.parseNumber(e))instanceof Error?e:e<0?l.num:Math.sqrt(e)},o.SQRTPI=function(e){return(e=v.parseNumber(e))instanceof Error?e:Math.sqrt(e*Math.PI)},o.SQRT1_2=function(){return 1/Math.sqrt(2)},o.SQRT2=function(){return Math.sqrt(2)},o.SUBTOTAL=function(e,t){if((e=v.parseNumber(e))instanceof Error)return e;switch(e){case 1:return i.AVERAGE(t);case 2:return i.COUNT(t);case 3:return i.COUNTA(t);case 4:return i.MAX(t);case 5:return i.MIN(t);case 6:return o.PRODUCT(t);case 7:return i.STDEV.S(t);case 8:return i.STDEV.P(t);case 9:return o.SUM(t);case 10:return i.VAR.S(t);case 11:return i.VAR.P(t);case 101:return i.AVERAGE(t);case 102:return i.COUNT(t);case 103:return i.COUNTA(t);case 104:return i.MAX(t);case 105:return i.MIN(t);case 106:return o.PRODUCT(t);case 107:return i.STDEV.S(t);case 108:return i.STDEV.P(t);case 109:return o.SUM(t);case 110:return i.VAR.S(t);case 111:return i.VAR.P(t)}},o.ADD=function(e,t){return 2!==arguments.length?l.na:(e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?l.value:e+t)},o.MINUS=function(e,t){return 2!==arguments.length?l.na:(e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?l.value:e-t)},o.DIVIDE=function(e,t){return 2!==arguments.length?l.na:(e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?l.value:0===t?l.div0:e/t)},o.MULTIPLY=function(e,t){return 2!==arguments.length?l.na:(e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?l.value:e*t)},o.GTE=function(e,t){return 2!==arguments.length?l.na:(e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?l.error:t<=e)},o.LT=function(e,t){return 2!==arguments.length?l.na:(e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?l.error:e<t)},o.LTE=function(e,t){return 2!==arguments.length?l.na:(e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?l.error:e<=t)},o.EQ=function(e,t){return 2!==arguments.length?l.na:e===t},o.NE=function(e,t){return 2!==arguments.length?l.na:e!==t},o.POW=function(e,t){return 2!==arguments.length?l.na:(e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?l.error:o.POWER(e,t))},o.SUM=function(){var n=0;return v.arrayEach(v.argsToArray(arguments),function(e){if("number"==typeof e)n+=e;else if("string"==typeof e){var t=parseFloat(e);isNaN(t)||(n+=t)}else Array.isArray(e)&&(n+=o.SUM.apply(null,e))}),n},o.SUMIF=function(e,t){if((e=v.parseNumberArray(v.flatten(e)))instanceof Error)return e;for(var n=0,r=void 0===t||"*"===t,o=r?null:g.parse(t+""),i=0;i<e.length;i++){var a=e[i];if(r)n+=a;else{var s=[g.createToken(a,g.TOKEN_TYPE_LITERAL)].concat(o);n+=g.compute(s)?a:0}}return n},o.SUMIFS=function(){var e=v.argsToArray(arguments),t=v.parseNumberArray(v.flatten(e.shift()));if(t instanceof Error)return t;for(var n=e,r=t.length,o=n.length,i=0,a=0;a<r;a++){for(var s=t[a],l=!1,u=0;u<o;u++){var c=n[u],h=!1;if(void 0===c||"*"===c)h=!0;else{var d=g.parse(c+""),f=[g.createToken(s,g.TOKEN_TYPE_LITERAL)].concat(d);h=g.compute(f)}if(!h){l=!1;break}l=!0}l&&(i+=s)}return i},o.SUMPRODUCT=function(){if(!arguments||0===arguments.length)return l.value;for(var e,t,n,r,o=arguments.length+1,i=0,a=0;a<arguments[0].length;a++)if(arguments[0][a]instanceof Array)for(var s=0;s<arguments[0][a].length;s++){for(t=e=1;t<o;t++){if((r=v.parseNumber(arguments[t-1][a][s]))instanceof Error)return r;e*=r}i+=e}else{for(t=e=1;t<o;t++){if((n=v.parseNumber(arguments[t-1][a]))instanceof Error)return n;e*=n}i+=e}return i},o.SUMSQ=function(){var e=v.parseNumberArray(v.flatten(arguments));if(e instanceof Error)return e;for(var t=0,n=e.length,r=0;r<n;r++)t+=a.ISNUMBER(e[r])?e[r]*e[r]:0;return t},o.SUMX2MY2=function(e,t){if(e=v.parseNumberArray(v.flatten(e)),t=v.parseNumberArray(v.flatten(t)),v.anyIsError(e,t))return l.value;for(var n=0,r=0;r<e.length;r++)n+=e[r]*e[r]-t[r]*t[r];return n},o.SUMX2PY2=function(e,t){if(e=v.parseNumberArray(v.flatten(e)),t=v.parseNumberArray(v.flatten(t)),v.anyIsError(e,t))return l.value;var n=0;e=v.parseNumberArray(v.flatten(e)),t=v.parseNumberArray(v.flatten(t));for(var r=0;r<e.length;r++)n+=e[r]*e[r]+t[r]*t[r];return n},o.SUMXMY2=function(e,t){if(e=v.parseNumberArray(v.flatten(e)),t=v.parseNumberArray(v.flatten(t)),v.anyIsError(e,t))return l.value;var n=0;e=v.flatten(e),t=v.flatten(t);for(var r=0;r<e.length;r++)n+=Math.pow(e[r]-t[r],2);return n},o.TAN=function(e){return(e=v.parseNumber(e))instanceof Error?e:Math.tan(e)},o.TANH=function(e){if((e=v.parseNumber(e))instanceof Error)return e;var t=Math.exp(2*e);return(t-1)/(t+1)},o.TRUNC=function(e,t){return t=void 0===t?0:t,e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?l.value:(0<e?1:-1)*Math.floor(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)}},function(e,l,t){var s=t(4),n=t(6),c=t(10),g=t(1),v=t(7),p=t(0),h=t(11);l.AVEDEV=function(){var e=g.parseNumberArray(g.flatten(arguments));return e instanceof Error?e:c.sum(c(e).subtract(c.mean(e)).abs()[0])/e.length},l.AVERAGE=function(){for(var e,t=g.numbers(g.flatten(arguments)),n=t.length,r=0,o=0,i=0;i<n;i++)r+=t[i],o+=1;return e=r/o,isNaN(e)&&(e=p.num),e},l.AVERAGEA=function(){for(var e,t=g.flatten(arguments),n=t.length,r=0,o=0,i=0;i<n;i++){var a=t[i];"number"==typeof a&&(r+=a),!0===a&&r++,null!==a&&o++}return e=r/o,isNaN(e)&&(e=p.num),e},l.AVERAGEIF=function(e,t,n){if(arguments.length<=1)return p.na;if(n=n||e,e=g.flatten(e),(n=g.parseNumberArray(g.flatten(n)))instanceof Error)return n;for(var r=0,o=0,i=void 0===t||"*"===t,a=i?null:v.parse(t+""),s=0;s<e.length;s++){var l=e[s];if(i)o+=n[s],r++;else{var u=[v.createToken(l,v.TOKEN_TYPE_LITERAL)].concat(a);v.compute(u)&&(o+=n[s],r++)}}return o/r},l.AVERAGEIFS=function(){for(var e=g.argsToArray(arguments),t=(e.length-1)/2,n=g.flatten(e[0]),r=0,o=0,i=0;i<n.length;i++){for(var a=!1,s=0;s<t;s++){var l=e[2*s+1][i],u=e[2*s+2],c=!1;if(void 0===u||"*"===u)c=!0;else{var h=v.parse(u+""),d=[v.createToken(l,v.TOKEN_TYPE_LITERAL)].concat(h);c=v.compute(d)}if(!c){a=!1;break}a=!0}a&&(o+=n[i],r++)}var f=o/r;return isNaN(f)?0:f},l.BETA={},l.BETA.DIST=function(e,t,n,r,o,i){return arguments.length<4?p.value:(o=void 0===o?0:o,i=void 0===i?1:i,e=g.parseNumber(e),t=g.parseNumber(t),n=g.parseNumber(n),o=g.parseNumber(o),i=g.parseNumber(i),g.anyIsError(e,t,n,o,i)?p.value:(e=(e-o)/(i-o),r?c.beta.cdf(e,t,n):c.beta.pdf(e,t,n)))},l.BETA.INV=function(e,t,n,r,o){return r=void 0===r?0:r,o=void 0===o?1:o,e=g.parseNumber(e),t=g.parseNumber(t),n=g.parseNumber(n),r=g.parseNumber(r),o=g.parseNumber(o),g.anyIsError(e,t,n,r,o)?p.value:c.beta.inv(e,t,n)*(o-r)+r},l.BINOM={},l.BINOM.DIST=function(e,t,n,r){return e=g.parseNumber(e),t=g.parseNumber(t),n=g.parseNumber(n),r=g.parseNumber(r),g.anyIsError(e,t,n,r)?p.value:r?c.binomial.cdf(e,t,n):c.binomial.pdf(e,t,n)},l.BINOM.DIST.RANGE=function(e,t,n,r){if(r=void 0===r?n:r,e=g.parseNumber(e),t=g.parseNumber(t),n=g.parseNumber(n),r=g.parseNumber(r),g.anyIsError(e,t,n,r))return p.value;for(var o=0,i=n;i<=r;i++)o+=s.COMBIN(e,i)*Math.pow(t,i)*Math.pow(1-t,e-i);return o},l.BINOM.INV=function(e,t,n){if(e=g.parseNumber(e),t=g.parseNumber(t),n=g.parseNumber(n),g.anyIsError(e,t,n))return p.value;for(var r=0;r<=e;){if(c.binomial.cdf(r,e,t)>=n)return r;r++}},l.CHISQ={},l.CHISQ.DIST=function(e,t,n){return e=g.parseNumber(e),t=g.parseNumber(t),g.anyIsError(e,t)?p.value:n?c.chisquare.cdf(e,t):c.chisquare.pdf(e,t)},l.CHISQ.DIST.RT=function(e,t){return!e|!t?p.na:e<1||t>Math.pow(10,10)?p.num:"number"!=typeof e||"number"!=typeof t?p.value:1-c.chisquare.cdf(e,t)},l.CHISQ.INV=function(e,t){return e=g.parseNumber(e),t=g.parseNumber(t),g.anyIsError(e,t)?p.value:c.chisquare.inv(e,t)},l.CHISQ.INV.RT=function(e,t){return!e|!t?p.na:e<0||1<e||t<1||t>Math.pow(10,10)?p.num:"number"!=typeof e||"number"!=typeof t?p.value:c.chisquare.inv(1-e,t)},l.CHISQ.TEST=function(e,t){if(2!==arguments.length)return p.na;if(!(e instanceof Array&&t instanceof Array))return p.value;if(e.length!==t.length)return p.value;if(e[0]&&t[0]&&e[0].length!==t[0].length)return p.value;var n,r,o,i=e.length;for(r=0;r<i;r++)e[r]instanceof Array||(n=e[r],e[r]=[],e[r].push(n)),t[r]instanceof Array||(n=t[r],t[r]=[],t[r].push(n));var a=e[0].length,s=1===a?i-1:(i-1)*(a-1),l=0,u=Math.PI;for(r=0;r<i;r++)for(o=0;o<a;o++)l+=Math.pow(e[r][o]-t[r][o],2)/t[r][o];return Math.round(1e6*function(e,t){var n=Math.exp(-.5*e);t%2==1&&(n*=Math.sqrt(2*e/u));for(var r=t;2<=r;)n=n*e/r,r-=2;for(var o=n,i=t;1e-10*n<o;)n+=o=o*e/(i+=2);return 1-n}(l,s))/1e6},l.COLUMN=function(e,t){return 2!==arguments.length?p.na:t<0?p.num:e instanceof Array&&"number"==typeof t?0!==e.length?c.col(e,t):void 0:p.value},l.COLUMNS=function(e){return 1!==arguments.length?p.na:e instanceof Array?0===e.length?0:c.cols(e):p.value},l.CONFIDENCE={},l.CONFIDENCE.NORM=function(e,t,n){return e=g.parseNumber(e),t=g.parseNumber(t),n=g.parseNumber(n),g.anyIsError(e,t,n)?p.value:c.normalci(1,e,t,n)[1]-1},l.CONFIDENCE.T=function(e,t,n){return e=g.parseNumber(e),t=g.parseNumber(t),n=g.parseNumber(n),g.anyIsError(e,t,n)?p.value:c.tci(1,e,t,n)[1]-1},l.CORREL=function(e,t){return e=g.parseNumberArray(g.flatten(e)),t=g.parseNumberArray(g.flatten(t)),g.anyIsError(e,t)?p.value:c.corrcoeff(e,t)},l.COUNT=function(){return g.numbers(g.flatten(arguments)).length},l.COUNTA=function(){var e=g.flatten(arguments);return e.length-l.COUNTBLANK(e)},l.COUNTIN=function(e,t){var n=0;e=g.flatten(e);for(var r=0;r<e.length;r++)e[r]===t&&n++;return n},l.COUNTBLANK=function(){for(var e,t=g.flatten(arguments),n=0,r=0;r<t.length;r++)null!==(e=t[r])&&""!==e||n++;return n},l.COUNTIF=function(e,t){if(e=g.flatten(e),void 0===t||"*"===t)return e.length;for(var n=0,r=v.parse(t+""),o=0;o<e.length;o++){var i=e[o],a=[v.createToken(i,v.TOKEN_TYPE_LITERAL)].concat(r);v.compute(a)&&n++}return n},l.COUNTIFS=function(){for(var e=g.argsToArray(arguments),t=new Array(g.flatten(e[0]).length),n=0;n<t.length;n++)t[n]=!0;for(n=0;n<e.length;n+=2){var r=g.flatten(e[n]),o=e[n+1];if(!(void 0===o||"*"===o))for(var i=v.parse(o+""),a=0;a<r.length;a++){var s=r[a],l=[v.createToken(s,v.TOKEN_TYPE_LITERAL)].concat(i);t[a]=t[a]&&v.compute(l)}}var u=0;for(n=0;n<t.length;n++)t[n]&&u++;return u},l.COUNTUNIQUE=function(){return h.UNIQUE.apply(null,g.flatten(arguments)).length},l.COVARIANCE={},l.COVARIANCE.P=function(e,t){if(e=g.parseNumberArray(g.flatten(e)),t=g.parseNumberArray(g.flatten(t)),g.anyIsError(e,t))return p.value;for(var n=c.mean(e),r=c.mean(t),o=0,i=e.length,a=0;a<i;a++)o+=(e[a]-n)*(t[a]-r);return o/i},l.COVARIANCE.S=function(e,t){return e=g.parseNumberArray(g.flatten(e)),t=g.parseNumberArray(g.flatten(t)),g.anyIsError(e,t)?p.value:c.covariance(e,t)},l.DEVSQ=function(){var e=g.parseNumberArray(g.flatten(arguments));if(e instanceof Error)return e;for(var t=c.mean(e),n=0,r=0;r<e.length;r++)n+=Math.pow(e[r]-t,2);return n},l.EXPON={},l.EXPON.DIST=function(e,t,n){return e=g.parseNumber(e),t=g.parseNumber(t),g.anyIsError(e,t)?p.value:n?c.exponential.cdf(e,t):c.exponential.pdf(e,t)},l.F={},l.F.DIST=function(e,t,n,r){return e=g.parseNumber(e),t=g.parseNumber(t),n=g.parseNumber(n),g.anyIsError(e,t,n)?p.value:r?c.centralF.cdf(e,t,n):c.centralF.pdf(e,t,n)},l.F.DIST.RT=function(e,t,n){return 3!==arguments.length?p.na:e<0||t<1||n<1?p.num:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?p.value:1-c.centralF.cdf(e,t,n)},l.F.INV=function(e,t,n){return e=g.parseNumber(e),t=g.parseNumber(t),n=g.parseNumber(n),g.anyIsError(e,t,n)?p.value:e<=0||1<e?p.num:c.centralF.inv(e,t,n)},l.F.INV.RT=function(e,t,n){return 3!==arguments.length?p.na:e<0||1<e||t<1||t>Math.pow(10,10)||n<1||n>Math.pow(10,10)?p.num:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?p.value:c.centralF.inv(1-e,t,n)},l.F.TEST=function(e,t){if(!e||!t)return p.na;if(!(e instanceof Array&&t instanceof Array))return p.na;if(e.length<2||t.length<2)return p.div0;function n(e,t){for(var n=0,r=0;r<e.length;r++)n+=Math.pow(e[r]-t,2);return n}var r=s.SUM(e)/e.length,o=s.SUM(t)/t.length;return n(e,r)/(e.length-1)/(n(t,o)/(t.length-1))},l.FISHER=function(e){return(e=g.parseNumber(e))instanceof Error?e:Math.log((1+e)/(1-e))/2},l.FISHERINV=function(e){if((e=g.parseNumber(e))instanceof Error)return e;var t=Math.exp(2*e);return(t-1)/(t+1)},l.FORECAST=function(e,t,n){if(e=g.parseNumber(e),t=g.parseNumberArray(g.flatten(t)),n=g.parseNumberArray(g.flatten(n)),g.anyIsError(e,t,n))return p.value;for(var r=c.mean(n),o=c.mean(t),i=n.length,a=0,s=0,l=0;l<i;l++)a+=(n[l]-r)*(t[l]-o),s+=Math.pow(n[l]-r,2);var u=a/s;return o-u*r+u*e},l.FREQUENCY=function(e,t){if(e=g.parseNumberArray(g.flatten(e)),t=g.parseNumberArray(g.flatten(t)),g.anyIsError(e,t))return p.value;for(var n=e.length,r=t.length,o=[],i=0;i<=r;i++)for(var a=o[i]=0;a<n;a++)0===i?e[a]<=t[0]&&(o[0]+=1):i<r?e[a]>t[i-1]&&e[a]<=t[i]&&(o[i]+=1):i===r&&e[a]>t[r-1]&&(o[r]+=1);return o},l.GAMMA=function(e){return(e=g.parseNumber(e))instanceof Error?e:0===e?p.num:parseInt(e,10)===e&&e<0?p.num:c.gammafn(e)},l.GAMMA.DIST=function(e,t,n,r){return 4!==arguments.length?p.na:e<0||t<=0||n<=0?p.value:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?p.value:r?c.gamma.cdf(e,t,n,!0):c.gamma.pdf(e,t,n,!1)},l.GAMMA.INV=function(e,t,n){return 3!==arguments.length?p.na:e<0||1<e||t<=0||n<=0?p.num:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?p.value:c.gamma.inv(e,t,n)},l.GAMMALN=function(e){return(e=g.parseNumber(e))instanceof Error?e:c.gammaln(e)},l.GAMMALN.PRECISE=function(e){return 1!==arguments.length?p.na:e<=0?p.num:"number"!=typeof e?p.value:c.gammaln(e)},l.GAUSS=function(e){return(e=g.parseNumber(e))instanceof Error?e:c.normal.cdf(e,0,1)-.5},l.GEOMEAN=function(){var e=g.parseNumberArray(g.flatten(arguments));return e instanceof Error?e:c.geomean(e)},l.GROWTH=function(e,t,n,r){if((e=g.parseNumberArray(e))instanceof Error)return e;var o;if(void 0===t)for(t=[],o=1;o<=e.length;o++)t.push(o);if(void 0===n)for(n=[],o=1;o<=e.length;o++)n.push(o);if(t=g.parseNumberArray(t),n=g.parseNumberArray(n),g.anyIsError(t,n))return p.value;void 0===r&&(r=!0);var i,a,s=e.length,l=0,u=0,c=0,h=0;for(o=0;o<s;o++){var d=t[o],f=Math.log(e[o]);l+=d,u+=f,c+=d*f,h+=d*d}l/=s,u/=s,c/=s,h/=s,a=r?u-(i=(c-l*u)/(h-l*l))*l:(i=c/h,0);var v=[];for(o=0;o<n.length;o++)v.push(Math.exp(a+i*n[o]));return v},l.HARMEAN=function(){var e=g.parseNumberArray(g.flatten(arguments));if(e instanceof Error)return e;for(var t=e.length,n=0,r=0;r<t;r++)n+=1/e[r];return t/n},l.HYPGEOM={},l.HYPGEOM.DIST=function(e,t,n,r,o){if(e=g.parseNumber(e),t=g.parseNumber(t),n=g.parseNumber(n),r=g.parseNumber(r),g.anyIsError(e,t,n,r))return p.value;function a(e,t,n,r){return s.COMBIN(n,e)*s.COMBIN(r-n,t-e)/s.COMBIN(r,t)}return o?function(e,t,n,r){for(var o=0,i=0;i<=e;i++)o+=a(i,t,n,r);return o}(e,t,n,r):a(e,t,n,r)},l.INTERCEPT=function(e,t){return e=g.parseNumberArray(e),t=g.parseNumberArray(t),g.anyIsError(e,t)?p.value:e.length!==t.length?p.na:l.FORECAST(0,e,t)},l.KURT=function(){var e=g.parseNumberArray(g.flatten(arguments));if(e instanceof Error)return e;for(var t=c.mean(e),n=e.length,r=0,o=0;o<n;o++)r+=Math.pow(e[o]-t,4);return n*(n+1)/((n-1)*(n-2)*(n-3))*(r/=Math.pow(c.stdev(e,!0),4))-3*(n-1)*(n-1)/((n-2)*(n-3))},l.LARGE=function(e,t){return e=g.parseNumberArray(g.flatten(e)),t=g.parseNumber(t),g.anyIsError(e,t)?e:e.sort(function(e,t){return t-e})[t-1]},l.LINEST=function(e,t){if(e=g.parseNumberArray(g.flatten(e)),t=g.parseNumberArray(g.flatten(t)),g.anyIsError(e,t))return p.value;for(var n=c.mean(e),r=c.mean(t),o=t.length,i=0,a=0,s=0;s<o;s++)i+=(t[s]-r)*(e[s]-n),a+=Math.pow(t[s]-r,2);var l=i/a;return[l,n-l*r]},l.LOGEST=function(e,t){if(e=g.parseNumberArray(g.flatten(e)),t=g.parseNumberArray(g.flatten(t)),g.anyIsError(e,t))return p.value;for(var n=0;n<e.length;n++)e[n]=Math.log(e[n]);var r=l.LINEST(e,t);return r[0]=Math.round(1e6*Math.exp(r[0]))/1e6,r[1]=Math.round(1e6*Math.exp(r[1]))/1e6,r},l.LOGNORM={},l.LOGNORM.DIST=function(e,t,n,r){return e=g.parseNumber(e),t=g.parseNumber(t),n=g.parseNumber(n),g.anyIsError(e,t,n)?p.value:r?c.lognormal.cdf(e,t,n):c.lognormal.pdf(e,t,n)},l.LOGNORM.INV=function(e,t,n){return e=g.parseNumber(e),t=g.parseNumber(t),n=g.parseNumber(n),g.anyIsError(e,t,n)?p.value:c.lognormal.inv(e,t,n)},l.MAX=function(){var e=g.numbers(g.flatten(arguments));return 0===e.length?0:Math.max.apply(Math,e)},l.MAXA=function(){var e=g.arrayValuesToNumbers(g.flatten(arguments));return 0===e.length?0:Math.max.apply(Math,e)},l.MEDIAN=function(){var e=g.arrayValuesToNumbers(g.flatten(arguments)),t=c.median(e);return isNaN(t)&&(t=p.num),t},l.MIN=function(){var e=g.numbers(g.flatten(arguments));return 0===e.length?0:Math.min.apply(Math,e)},l.MINA=function(){var e=g.arrayValuesToNumbers(g.flatten(arguments));return 0===e.length?0:Math.min.apply(Math,e)},l.MODE={},l.MODE.MULT=function(){var e=g.parseNumberArray(g.flatten(arguments));if(e instanceof Error)return e;for(var t,n=e.length,r={},o=[],i=0,a=0;a<n;a++)r[t=e[a]]=r[t]?r[t]+1:1,r[t]>i&&(i=r[t],o=[]),r[t]===i&&(o[o.length]=t);return o},l.MODE.SNGL=function(){var e=g.parseNumberArray(g.flatten(arguments));return e instanceof Error?e:l.MODE.MULT(e).sort(function(e,t){return e-t})[0]},l.NEGBINOM={},l.NEGBINOM.DIST=function(e,t,n,r){return e=g.parseNumber(e),t=g.parseNumber(t),n=g.parseNumber(n),g.anyIsError(e,t,n)?p.value:r?c.negbin.cdf(e,t,n):c.negbin.pdf(e,t,n)},l.NORM={},l.NORM.DIST=function(e,t,n,r){return e=g.parseNumber(e),t=g.parseNumber(t),n=g.parseNumber(n),g.anyIsError(e,t,n)?p.value:n<=0?p.num:r?c.normal.cdf(e,t,n):c.normal.pdf(e,t,n)},l.NORM.INV=function(e,t,n){return e=g.parseNumber(e),t=g.parseNumber(t),n=g.parseNumber(n),g.anyIsError(e,t,n)?p.value:c.normal.inv(e,t,n)},l.NORM.S={},l.NORM.S.DIST=function(e,t){return(e=g.parseNumber(e))instanceof Error?p.value:t?c.normal.cdf(e,0,1):c.normal.pdf(e,0,1)},l.NORM.S.INV=function(e){return(e=g.parseNumber(e))instanceof Error?p.value:c.normal.inv(e,0,1)},l.PEARSON=function(e,t){if(t=g.parseNumberArray(g.flatten(t)),e=g.parseNumberArray(g.flatten(e)),g.anyIsError(t,e))return p.value;for(var n=c.mean(e),r=c.mean(t),o=e.length,i=0,a=0,s=0,l=0;l<o;l++)i+=(e[l]-n)*(t[l]-r),a+=Math.pow(e[l]-n,2),s+=Math.pow(t[l]-r,2);return i/Math.sqrt(a*s)},l.PERCENTILE={},l.PERCENTILE.EXC=function(e,t){if(e=g.parseNumberArray(g.flatten(e)),t=g.parseNumber(t),g.anyIsError(e,t))return p.value;var n=(e=e.sort(function(e,t){return e-t})).length;if(t<1/(n+1)||1-1/(n+1)<t)return p.num;var r=t*(n+1)-1,o=Math.floor(r);return g.cleanFloat(r===o?e[r]:e[o]+(r-o)*(e[o+1]-e[o]))},l.PERCENTILE.INC=function(e,t){if(e=g.parseNumberArray(g.flatten(e)),t=g.parseNumber(t),g.anyIsError(e,t))return p.value;var n=t*((e=e.sort(function(e,t){return e-t})).length-1),r=Math.floor(n);return g.cleanFloat(n===r?e[n]:e[r]+(n-r)*(e[r+1]-e[r]))},l.PERCENTRANK={},l.PERCENTRANK.EXC=function(e,t,n){if(n=void 0===n?3:n,e=g.parseNumberArray(g.flatten(e)),t=g.parseNumber(t),n=g.parseNumber(n),g.anyIsError(e,t,n))return p.value;e=e.sort(function(e,t){return e-t});for(var r=h.UNIQUE.apply(null,e),o=e.length,i=r.length,a=Math.pow(10,n),s=0,l=!1,u=0;!l&&u<i;)t===r[u]?(s=(e.indexOf(r[u])+1)/(o+1),l=!0):t>=r[u]&&(t<r[u+1]||u===i-1)&&(s=(e.indexOf(r[u])+1+(t-r[u])/(r[u+1]-r[u]))/(o+1),l=!0),u++;return Math.floor(s*a)/a},l.PERCENTRANK.INC=function(e,t,n){if(n=void 0===n?3:n,e=g.parseNumberArray(g.flatten(e)),t=g.parseNumber(t),n=g.parseNumber(n),g.anyIsError(e,t,n))return p.value;e=e.sort(function(e,t){return e-t});for(var r=h.UNIQUE.apply(null,e),o=e.length,i=r.length,a=Math.pow(10,n),s=0,l=!1,u=0;!l&&u<i;)t===r[u]?(s=e.indexOf(r[u])/(o-1),l=!0):t>=r[u]&&(t<r[u+1]||u===i-1)&&(s=(e.indexOf(r[u])+(t-r[u])/(r[u+1]-r[u]))/(o-1),l=!0),u++;return Math.floor(s*a)/a},l.PERMUT=function(e,t){return e=g.parseNumber(e),t=g.parseNumber(t),g.anyIsError(e,t)?p.value:s.FACT(e)/s.FACT(e-t)},l.PERMUTATIONA=function(e,t){return e=g.parseNumber(e),t=g.parseNumber(t),g.anyIsError(e,t)?p.value:Math.pow(e,t)},l.PHI=function(e){return(e=g.parseNumber(e))instanceof Error?p.value:Math.exp(-.5*e*e)/2.5066282746310002},l.POISSON={},l.POISSON.DIST=function(e,t,n){return e=g.parseNumber(e),t=g.parseNumber(t),g.anyIsError(e,t)?p.value:n?c.poisson.cdf(e,t):c.poisson.pdf(e,t)},l.PROB=function(e,t,n,r){if(void 0===n)return 0;if(r=void 0===r?n:r,e=g.parseNumberArray(g.flatten(e)),t=g.parseNumberArray(g.flatten(t)),n=g.parseNumber(n),r=g.parseNumber(r),g.anyIsError(e,t,n,r))return p.value;if(n===r)return 0<=e.indexOf(n)?t[e.indexOf(n)]:0;for(var o=e.sort(function(e,t){return e-t}),i=o.length,a=0,s=0;s<i;s++)o[s]>=n&&o[s]<=r&&(a+=t[e.indexOf(o[s])]);return a},l.QUARTILE={},l.QUARTILE.EXC=function(e,t){if(e=g.parseNumberArray(g.flatten(e)),t=g.parseNumber(t),g.anyIsError(e,t))return p.value;switch(t){case 1:return l.PERCENTILE.EXC(e,.25);case 2:return l.PERCENTILE.EXC(e,.5);case 3:return l.PERCENTILE.EXC(e,.75);default:return p.num}},l.QUARTILE.INC=function(e,t){if(e=g.parseNumberArray(g.flatten(e)),t=g.parseNumber(t),g.anyIsError(e,t))return p.value;switch(t){case 1:return l.PERCENTILE.INC(e,.25);case 2:return l.PERCENTILE.INC(e,.5);case 3:return l.PERCENTILE.INC(e,.75);default:return p.num}},l.RANK={},l.RANK.AVG=function(e,t,n){if(e=g.parseNumber(e),t=g.parseNumberArray(g.flatten(t)),g.anyIsError(e,t))return p.value;for(var r=(n=n||!1)?function(e,t){return e-t}:function(e,t){return t-e},o=(t=(t=g.flatten(t)).sort(r)).length,i=0,a=0;a<o;a++)t[a]===e&&i++;return 1<i?(2*t.indexOf(e)+i+1)/2:t.indexOf(e)+1},l.RANK.EQ=function(e,t,n){if(e=g.parseNumber(e),t=g.parseNumberArray(g.flatten(t)),g.anyIsError(e,t))return p.value;var r=(n=n||!1)?function(e,t){return e-t}:function(e,t){return t-e};return(t=t.sort(r)).indexOf(e)+1},l.ROW=function(e,t){return 2!==arguments.length?p.na:t<0?p.num:e instanceof Array&&"number"==typeof t?0!==e.length?c.row(e,t):void 0:p.value},l.ROWS=function(e){return 1!==arguments.length?p.na:e instanceof Array?0===e.length?0:c.rows(e):p.value},l.RSQ=function(e,t){return e=g.parseNumberArray(g.flatten(e)),t=g.parseNumberArray(g.flatten(t)),g.anyIsError(e,t)?p.value:Math.pow(l.PEARSON(e,t),2)},l.SKEW=function(){var e=g.parseNumberArray(g.flatten(arguments));if(e instanceof Error)return e;for(var t=c.mean(e),n=e.length,r=0,o=0;o<n;o++)r+=Math.pow(e[o]-t,3);return n*r/((n-1)*(n-2)*Math.pow(c.stdev(e,!0),3))},l.SKEW.P=function(){var e=g.parseNumberArray(g.flatten(arguments));if(e instanceof Error)return e;for(var t=c.mean(e),n=e.length,r=0,o=0,i=0;i<n;i++)o+=Math.pow(e[i]-t,3),r+=Math.pow(e[i]-t,2);return r/=n,(o/=n)/Math.pow(r,1.5)},l.SLOPE=function(e,t){if(e=g.parseNumberArray(g.flatten(e)),t=g.parseNumberArray(g.flatten(t)),g.anyIsError(e,t))return p.value;for(var n=c.mean(t),r=c.mean(e),o=t.length,i=0,a=0,s=0;s<o;s++)i+=(t[s]-n)*(e[s]-r),a+=Math.pow(t[s]-n,2);return i/a},l.SMALL=function(e,t){return e=g.parseNumberArray(g.flatten(e)),t=g.parseNumber(t),g.anyIsError(e,t)?e:e.sort(function(e,t){return e-t})[t-1]},l.STANDARDIZE=function(e,t,n){return e=g.parseNumber(e),t=g.parseNumber(t),n=g.parseNumber(n),g.anyIsError(e,t,n)?p.value:(e-t)/n},l.STDEV={},l.STDEV.P=function(){var e=l.VAR.P.apply(this,arguments),t=Math.sqrt(e);return isNaN(t)&&(t=p.num),t},l.STDEV.S=function(){var e=l.VAR.S.apply(this,arguments);return Math.sqrt(e)},l.STDEVA=function(){var e=l.VARA.apply(this,arguments);return Math.sqrt(e)},l.STDEVPA=function(){var e=l.VARPA.apply(this,arguments),t=Math.sqrt(e);return isNaN(t)&&(t=p.num),t},l.STEYX=function(e,t){if(e=g.parseNumberArray(g.flatten(e)),t=g.parseNumberArray(g.flatten(t)),g.anyIsError(e,t))return p.value;for(var n=c.mean(t),r=c.mean(e),o=t.length,i=0,a=0,s=0,l=0;l<o;l++)i+=Math.pow(e[l]-r,2),a+=(t[l]-n)*(e[l]-r),s+=Math.pow(t[l]-n,2);return Math.sqrt((i-a*a/s)/(o-2))},l.TRANSPOSE=function(e){return e?c.transpose(e):p.na},l.T=n.T,l.T.DIST=function(e,t,n){return e=g.parseNumber(e),t=g.parseNumber(t),g.anyIsError(e,t)?p.value:n?c.studentt.cdf(e,t):c.studentt.pdf(e,t)},l.T.DIST["2T"]=function(e,t){return 2!==arguments.length?p.na:e<0||t<1?p.num:"number"!=typeof e||"number"!=typeof t?p.value:2*(1-c.studentt.cdf(e,t))},l.T.DIST.RT=function(e,t){return 2!==arguments.length?p.na:e<0||t<1?p.num:"number"!=typeof e||"number"!=typeof t?p.value:1-c.studentt.cdf(e,t)},l.T.INV=function(e,t){return e=g.parseNumber(e),t=g.parseNumber(t),g.anyIsError(e,t)?p.value:c.studentt.inv(e,t)},l.T.INV["2T"]=function(e,t){return e=g.parseNumber(e),t=g.parseNumber(t),e<=0||1<e||t<1?p.num:g.anyIsError(e,t)?p.value:Math.abs(c.studentt.inv(e/2,t))},l.T.TEST=function(e,t){if(e=g.parseNumberArray(g.flatten(e)),t=g.parseNumberArray(g.flatten(t)),g.anyIsError(e,t))return p.value;var n,r=c.mean(e),o=c.mean(t),i=0,a=0;for(n=0;n<e.length;n++)i+=Math.pow(e[n]-r,2);for(n=0;n<t.length;n++)a+=Math.pow(t[n]-o,2);i/=e.length-1,a/=t.length-1;var s=Math.abs(r-o)/Math.sqrt(i/e.length+a/t.length);return l.T.DIST["2T"](s,e.length+t.length-2)},l.TREND=function(e,t,n){if(e=g.parseNumberArray(g.flatten(e)),t=g.parseNumberArray(g.flatten(t)),n=g.parseNumberArray(g.flatten(n)),g.anyIsError(e,t,n))return p.value;var r=l.LINEST(e,t),o=r[0],i=r[1],a=[];return n.forEach(function(e){a.push(o*e+i)}),a},l.TRIMMEAN=function(e,t){if(e=g.parseNumberArray(g.flatten(e)),t=g.parseNumber(t),g.anyIsError(e,t))return p.value;var n=s.FLOOR(e.length*t,2)/2;return c.mean(g.initial(g.rest(e.sort(function(e,t){return e-t}),n),n))},l.VAR={},l.VAR.P=function(){for(var e,t=g.numbers(g.flatten(arguments)),n=t.length,r=0,o=l.AVERAGE(t),i=0;i<n;i++)r+=Math.pow(t[i]-o,2);return e=r/n,isNaN(e)&&(e=p.num),e},l.VAR.S=function(){for(var e=g.numbers(g.flatten(arguments)),t=e.length,n=0,r=l.AVERAGE(e),o=0;o<t;o++)n+=Math.pow(e[o]-r,2);return n/(t-1)},l.VARA=function(){for(var e=g.flatten(arguments),t=e.length,n=0,r=0,o=l.AVERAGEA(e),i=0;i<t;i++){var a=e[i];n+="number"==typeof a?Math.pow(a-o,2):!0===a?Math.pow(1-o,2):Math.pow(0-o,2),null!==a&&r++}return n/(r-1)},l.VARPA=function(){for(var e,t=g.flatten(arguments),n=t.length,r=0,o=0,i=l.AVERAGEA(t),a=0;a<n;a++){var s=t[a];r+="number"==typeof s?Math.pow(s-i,2):!0===s?Math.pow(1-i,2):Math.pow(0-i,2),null!==s&&o++}return e=r/o,isNaN(e)&&(e=p.num),e},l.WEIBULL={},l.WEIBULL.DIST=function(e,t,n,r){return e=g.parseNumber(e),t=g.parseNumber(t),n=g.parseNumber(n),g.anyIsError(e,t,n)?p.value:r?1-Math.exp(-Math.pow(e/n,t)):Math.pow(e,t-1)*Math.exp(-Math.pow(e/n,t))*t/Math.pow(n,t)},l.Z={},l.Z.TEST=function(e,t,n){if(e=g.parseNumberArray(g.flatten(e)),t=g.parseNumber(t),g.anyIsError(e,t))return p.value;n=n||l.STDEV.S(e);var r=e.length;return 1-l.NORM.S.DIST((l.AVERAGE(e)-t)/(n/Math.sqrt(r)),!0)}},function(e,t,n){var i=n(1),a=n(0);t.ASC=function(){throw new Error("ASC is not implemented")},t.BAHTTEXT=function(){throw new Error("BAHTTEXT is not implemented")},t.CHAR=function(e){return(e=i.parseNumber(e))instanceof Error?e:String.fromCharCode(e)},t.CLEAN=function(e){return(e=e||"").replace(/[\0-\x1F]/g,"")},t.CODE=function(e){var t=(e=e||"").charCodeAt(0);return isNaN(t)&&(t=a.na),t},t.CONCATENATE=function(){for(var e=i.flatten(arguments),t=0;-1<(t=e.indexOf(!0));)e[t]="TRUE";for(var n=0;-1<(n=e.indexOf(!1));)e[n]="FALSE";return e.join("")},t.DBCS=function(){throw new Error("DBCS is not implemented")},t.DOLLAR=function(){throw new Error("DOLLAR is not implemented")},t.EXACT=function(e,t){return 2!==arguments.length?a.na:e===t},t.FIND=function(e,t,n){return arguments.length<2?a.na:(n=void 0===n?0:n,t?t.indexOf(e,n-1)+1:null)},t.FIXED=function(){throw new Error("FIXED is not implemented")},t.HTML2TEXT=function(e){var t="";return e&&(e instanceof Array?e.forEach(function(e){""!==t&&(t+="\n"),t+=e.replace(/<(?:.|\n)*?>/gm,"")}):t=e.replace(/<(?:.|\n)*?>/gm,"")),t},t.LEFT=function(e,t){return t=void 0===t?1:t,(t=i.parseNumber(t))instanceof Error||"string"!=typeof e?a.value:e?e.substring(0,t):null},t.LEN=function(e){return 0===arguments.length?a.error:"string"==typeof e?e?e.length:0:e.length?e.length:a.value},t.LOWER=function(e){return"string"!=typeof e?a.value:e?e.toLowerCase():e},t.MID=function(e,t,n){if(t=i.parseNumber(t),n=i.parseNumber(n),i.anyIsError(t,n)||"string"!=typeof e)return n;var r=t-1,o=r+n;return e.substring(r,o)},t.NUMBERVALUE=function(e,t,n){return t=void 0===t?".":t,n=void 0===n?",":n,Number(e.replace(t,".").replace(n,""))},t.PRONETIC=function(){throw new Error("PRONETIC is not implemented")},t.PROPER=function(e){return void 0===e||0===e.length?a.value:(!0===e&&(e="TRUE"),!1===e&&(e="FALSE"),isNaN(e)&&"number"==typeof e?a.value:("number"==typeof e&&(e=""+e),e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})))},t.REGEXEXTRACT=function(e,t){if(arguments.length<2)return a.na;var n=e.match(new RegExp(t));return n?n[1<n.length?n.length-1:0]:null},t.REGEXMATCH=function(e,t,n){if(arguments.length<2)return a.na;var r=e.match(new RegExp(t));return n?r:!!r},t.REGEXREPLACE=function(e,t,n){return arguments.length<3?a.na:e.replace(new RegExp(t),n)},t.REPLACE=function(e,t,n,r){return t=i.parseNumber(t),n=i.parseNumber(n),i.anyIsError(t,n)||"string"!=typeof e||"string"!=typeof r?a.value:e.substr(0,t-1)+r+e.substr(t-1+n)},t.REPT=function(e,t){return(t=i.parseNumber(t))instanceof Error?t:new Array(t+1).join(e)},t.RIGHT=function(e,t){return t=void 0===t?1:t,(t=i.parseNumber(t))instanceof Error?t:e?e.substring(e.length-t):a.na},t.SEARCH=function(e,t,n){var r;return"string"!=typeof e||"string"!=typeof t?a.value:(n=void 0===n?0:n,0===(r=t.toLowerCase().indexOf(e.toLowerCase(),n-1)+1)?a.value:r)},t.SPLIT=function(e,t){return e.split(t)},t.SUBSTITUTE=function(e,t,n,r){if(arguments.length<2)return a.na;if(!(e&&t&&n))return e;if(void 0===r)return e.replace(new RegExp(t,"g"),n);for(var o=0,i=0;0<e.indexOf(t,o);)if(o=e.indexOf(t,o+1),++i===r)return e.substring(0,o)+n+e.substring(o+t.length)},t.T=function(e){return"string"==typeof e?e:""},t.TEXT=function(){throw new Error("TEXT is not implemented")},t.TRIM=function(e){return"string"!=typeof e?a.value:e.replace(/ +/g," ").trim()},t.UNICHAR=t.CHAR,t.UNICODE=t.CODE,t.UPPER=function(e){return"string"!=typeof e?a.value:e.toUpperCase()},t.VALUE=function(){throw new Error("VALUE is not implemented")}},function(e,t){var i=[">",">=","<","<=","=","<>"],a="operator",s="literal",n=[a,s];function l(e,t){if(-1===n.indexOf(t))throw new Error("Unsupported token type: "+t);return{value:e,type:t}}function r(e){for(var t="",n=[],r=0;r<e.length;r++){var o=e[r];0===r&&0<=i.indexOf(o)?n.push(l(o,a)):t+=o}return 0<t.length&&n.push(l(function(e){return"string"!=typeof e||/^\d+(\.\d+)?$/.test(e)&&(e=-1===e.indexOf(".")?parseInt(e,10):parseFloat(e)),e}(t),s)),0<n.length&&n[0].type!==a&&n.unshift(l("=",a)),n}t.TOKEN_TYPE_OPERATOR=a,t.TOKEN_TYPE_LITERAL=s,t.parse=function(e){return r(function(e){for(var t=e.length,n=[],r=0,o="",i="";r<t;){var a=e.charAt(r);switch(a){case">":case"<":case"=":i+=a,0<o.length&&(n.push(o),o="");break;default:0<i.length&&(n.push(i),i=""),o+=a}r++}return 0<o.length&&n.push(o),0<i.length&&n.push(i),n}(e))},t.createToken=l,t.compute=function(e){for(var t,n=[],r=0;r<e.length;r++){var o=e[r];switch(o.type){case a:t=o.value;break;case s:n.push(o.value)}}return function(e,t){var n=!1;switch(t){case">":n=e[0]>e[1];break;case">=":n=e[0]>=e[1];break;case"<":n=e[0]<e[1];break;case"<=":n=e[0]<=e[1];break;case"=":n=e[0]==e[1];break;case"<>":n=e[0]!=e[1]}return n}(n,t)}},function(e,t,n){var r=n(0);t.CELL=function(){throw new Error("CELL is not implemented")},t.ERROR={},t.ERROR.TYPE=function(e){switch(e){case r.nil:return 1;case r.div0:return 2;case r.value:return 3;case r.ref:return 4;case r.name:return 5;case r.num:return 6;case r.na:return 7;case r.data:return 8}return r.na},t.INFO=function(){throw new Error("INFO is not implemented")},t.ISBLANK=function(e){return null===e},t.ISBINARY=function(e){return/^[01]{1,10}$/.test(e)},t.ISERR=function(e){return 0<=[r.value,r.ref,r.div0,r.num,r.name,r.nil].indexOf(e)||"number"==typeof e&&(isNaN(e)||!isFinite(e))},t.ISERROR=function(e){return t.ISERR(e)||e===r.na},t.ISEVEN=function(e){return!(1&Math.floor(Math.abs(e)))},t.ISFORMULA=function(){throw new Error("ISFORMULA is not implemented")},t.ISLOGICAL=function(e){return!0===e||!1===e},t.ISNA=function(e){return e===r.na},t.ISNONTEXT=function(e){return"string"!=typeof e},t.ISNUMBER=function(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)},t.ISODD=function(e){return!!(1&Math.floor(Math.abs(e)))},t.ISREF=function(){throw new Error("ISREF is not implemented")},t.ISTEXT=function(e){return"string"==typeof e},t.N=function(e){return this.ISNUMBER(e)?e:e instanceof Date?e.getTime():!0===e?1:!1===e?0:this.ISERROR(e)?e:0},t.NA=function(){return r.na},t.SHEET=function(){throw new Error("SHEET is not implemented")},t.SHEETS=function(){throw new Error("SHEETS is not implemented")},t.TYPE=function(e){return this.ISNUMBER(e)?1:this.ISTEXT(e)?2:this.ISLOGICAL(e)?4:this.ISERROR(e)?16:Array.isArray(e)?64:void 0}},function(e,t,n){var f=n(0),v=n(1),r=new Date(Date.UTC(1900,0,1)),i=[void 0,0,1,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,1,2,3,4,5,6,0],o=[[],[1,2,3,4,5,6,7],[7,1,2,3,4,5,6],[6,0,1,2,3,4,5],[],[],[],[],[],[],[],[7,1,2,3,4,5,6],[6,7,1,2,3,4,5],[5,6,7,1,2,3,4],[4,5,6,7,1,2,3],[3,4,5,6,7,1,2],[2,3,4,5,6,7,1],[1,2,3,4,5,6,7]],g=[[],[6,0],[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],void 0,void 0,void 0,[0,0],[1,1],[2,2],[3,3],[4,4],[5,5],[6,6]];function d(e){return 1===new Date(e,1,29).getMonth()}function p(e,t){return Math.ceil((t-e)/1e3/60/60/24)}function a(e){var t=-22038912e5<e?2:1;return Math.ceil((e-r)/864e5)+t}t.DATE=function(e,t,n){return e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),v.anyIsError(e,t,n)?f.value:e<0||t<0||n<0?f.num:new Date(e,t-1,n)},t.DATEVALUE=function(e){var t,n=2;return"string"!=typeof e?f.value:(t=Date.parse(e),isNaN(t)?f.value:(t<=-22038912e5&&(n=1),Math.ceil((t-r)/864e5)+n))},t.DAY=function(e){var t=v.parseDate(e);return t instanceof Error?t:t.getDate()},t.DAYS=function(e,t){return e=v.parseDate(e),t=v.parseDate(t),e instanceof Error?e:t instanceof Error?t:a(e)-a(t)},t.DAYS360=function(e,t,n){if(n=v.parseBool(n),e=v.parseDate(e),t=v.parseDate(t),e instanceof Error)return e;if(t instanceof Error)return t;if(n instanceof Error)return n;var r,o,i=e.getMonth(),a=t.getMonth();if(n)r=31===e.getDate()?30:e.getDate(),o=31===t.getDate()?30:t.getDate();else{var s=new Date(e.getFullYear(),i+1,0).getDate(),l=new Date(t.getFullYear(),a+1,0).getDate();r=e.getDate()===s?30:e.getDate(),o=t.getDate()===l?r<30?(a++,1):30:t.getDate()}return 360*(t.getFullYear()-e.getFullYear())+30*(a-i)+(o-r)},t.EDATE=function(e,t){return(e=v.parseDate(e))instanceof Error?e:isNaN(t)?f.value:(t=parseInt(t,10),e.setMonth(e.getMonth()+t),a(e))},t.EOMONTH=function(e,t){return(e=v.parseDate(e))instanceof Error?e:isNaN(t)?f.value:(t=parseInt(t,10),a(new Date(e.getFullYear(),e.getMonth()+t+1,0)))},t.HOUR=function(e){return(e=v.parseDate(e))instanceof Error?e:e.getHours()},t.INTERVAL=function(e){if("number"!=typeof e&&"string"!=typeof e)return f.value;e=parseInt(e,10);var t=Math.floor(e/94608e4);e%=94608e4;var n=Math.floor(e/2592e3);e%=2592e3;var r=Math.floor(e/86400);e%=86400;var o=Math.floor(e/3600);e%=3600;var i=Math.floor(e/60),a=e%=60;return"P"+(t=0<t?t+"Y":"")+(n=0<n?n+"M":"")+(r=0<r?r+"D":"")+"T"+(o=0<o?o+"H":"")+(i=0<i?i+"M":"")+(a=0<a?a+"S":"")},t.ISOWEEKNUM=function(e){if((e=v.parseDate(e))instanceof Error)return e;e.setHours(0,0,0),e.setDate(e.getDate()+4-(e.getDay()||7));var t=new Date(e.getFullYear(),0,1);return Math.ceil(((e-t)/864e5+1)/7)},t.MINUTE=function(e){return(e=v.parseDate(e))instanceof Error?e:e.getMinutes()},t.MONTH=function(e){return(e=v.parseDate(e))instanceof Error?e:e.getMonth()+1},t.NETWORKDAYS=function(e,t,n){return this.NETWORKDAYS.INTL(e,t,1,n)},t.NETWORKDAYS.INTL=function(e,t,n,r){if((e=v.parseDate(e))instanceof Error)return e;if((t=v.parseDate(t))instanceof Error)return t;if(!((n=void 0===n?g[1]:g[n])instanceof Array))return f.value;void 0===r?r=[]:r instanceof Array||(r=[r]);for(var o=0;o<r.length;o++){var i=v.parseDate(r[o]);if(i instanceof Error)return i;r[o]=i}var a=(t-e)/864e5+1,s=a,l=e;for(o=0;o<a;o++){var u=0<(new Date).getTimezoneOffset()?l.getUTCDay():l.getDay(),c=!1;u!==n[0]&&u!==n[1]||(c=!0);for(var h=0;h<r.length;h++){var d=r[h];if(d.getDate()===l.getDate()&&d.getMonth()===l.getMonth()&&d.getFullYear()===l.getFullYear()){c=!0;break}}c&&s--,l.setDate(l.getDate()+1)}return s},t.NOW=function(){return new Date},t.SECOND=function(e){return(e=v.parseDate(e))instanceof Error?e:e.getSeconds()},t.TIME=function(e,t,n){return e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),v.anyIsError(e,t,n)?f.value:e<0||t<0||n<0?f.num:(3600*e+60*t+n)/86400},t.TIMEVALUE=function(e){return(e=v.parseDate(e))instanceof Error?e:(3600*e.getHours()+60*e.getMinutes()+e.getSeconds())/86400},t.TODAY=function(){return new Date},t.WEEKDAY=function(e,t){if((e=v.parseDate(e))instanceof Error)return e;void 0===t&&(t=1);var n=e.getDay();return o[t][n]},t.WEEKNUM=function(e,t){if((e=v.parseDate(e))instanceof Error)return e;if(void 0===t&&(t=1),21===t)return this.ISOWEEKNUM(e);var n=i[t],r=new Date(e.getFullYear(),0,1),o=r.getDay()<n?1:0;return r-=24*Math.abs(r.getDay()-n)*60*60*1e3,Math.floor((e-r)/864e5/7+1)+o},t.WORKDAY=function(e,t,n){return this.WORKDAY.INTL(e,t,1,n)},t.WORKDAY.INTL=function(e,t,n,r){if((e=v.parseDate(e))instanceof Error)return e;if((t=v.parseNumber(t))instanceof Error)return t;if(t<0)return f.num;if(!((n=void 0===n?g[1]:g[n])instanceof Array))return f.value;void 0===r?r=[]:r instanceof Array||(r=[r]);for(var o=0;o<r.length;o++){var i=v.parseDate(r[o]);if(i instanceof Error)return i;r[o]=i}for(var a=0;a<t;){e.setDate(e.getDate()+1);var s=e.getDay();if(s!==n[0]&&s!==n[1]){for(var l=0;l<r.length;l++){var u=r[l];if(u.getDate()===e.getDate()&&u.getMonth()===e.getMonth()&&u.getFullYear()===e.getFullYear()){a--;break}}a++}}return e},t.YEAR=function(e){return(e=v.parseDate(e))instanceof Error?e:e.getFullYear()},t.YEARFRAC=function(e,t,n){if((e=v.parseDate(e))instanceof Error)return e;if((t=v.parseDate(t))instanceof Error)return t;n=n||0;var r=e.getDate(),o=e.getMonth()+1,i=e.getFullYear(),a=t.getDate(),s=t.getMonth()+1,l=t.getFullYear();switch(n){case 0:return 31===r&&31===a?a=r=30:31===r?r=30:30===r&&31===a&&(a=30),(a+30*s+360*l-(r+30*o+360*i))/360;case 1:var u=365;if(i===l||i+1===l&&(s<o||o===s&&a<=r))return(i===l&&d(i)||function(e,t){var n=e.getFullYear(),r=new Date(n,2,1);if(d(n)&&e<r&&r<=t)return!0;var o=t.getFullYear(),i=new Date(o,2,1);return d(o)&&i<=t&&e<i}(e,t)||1===s&&29===a)&&(u=366),p(e,t)/u;var c=l-i+1,h=(new Date(l+1,0,1)-new Date(i,0,1))/1e3/60/60/24/c;return p(e,t)/h;case 2:return p(e,t)/360;case 3:return p(e,t)/365;case 4:return(a+30*s+360*l-(r+30*o+360*i))/360}}},function(e,t,n){var d;"undefined"!=typeof self&&self,e.exports=(function(l,d){var u=l.utils.isFunction;function f(e,t){return e-t}function v(e,t,n){return d.max(t,d.min(e,n))}l.sum=function(e){for(var t=0,n=e.length;0<=--n;)t+=e[n];return t},l.sumsqrd=function(e){for(var t=0,n=e.length;0<=--n;)t+=e[n]*e[n];return t},l.sumsqerr=function(e){for(var t,n=l.mean(e),r=0,o=e.length;0<=--o;)r+=(t=e[o]-n)*t;return r},l.sumrow=function(e){for(var t=0,n=e.length;0<=--n;)t+=e[n];return t},l.product=function(e){for(var t=1,n=e.length;0<=--n;)t*=e[n];return t},l.min=function(e){for(var t=e[0],n=0;++n<e.length;)e[n]<t&&(t=e[n]);return t},l.max=function(e){for(var t=e[0],n=0;++n<e.length;)e[n]>t&&(t=e[n]);return t},l.unique=function(e){for(var t={},n=[],r=0;r<e.length;r++)t[e[r]]||(t[e[r]]=!0,n.push(e[r]));return n},l.mean=function(e){return l.sum(e)/e.length},l.meansqerr=function(e){return l.sumsqerr(e)/e.length},l.geomean=function(e){return d.pow(l.product(e),1/e.length)},l.median=function(e){var t=e.length,n=e.slice().sort(f);return 1&t?n[t/2|0]:(n[t/2-1]+n[t/2])/2},l.cumsum=function(e){return l.cumreduce(e,function(e,t){return e+t})},l.cumprod=function(e){return l.cumreduce(e,function(e,t){return e*t})},l.diff=function(e){for(var t=[],n=e.length,r=1;r<n;r++)t.push(e[r]-e[r-1]);return t},l.rank=function(e){for(var t=e.length,n=e.slice().sort(f),r=new Array(t),o=0;o<t;o++){var i=n.indexOf(e[o]),a=n.lastIndexOf(e[o]);if(i===a)var s=i;else s=(i+a)/2;r[o]=s+1}return r},l.mode=function(e){for(var t=e.length,n=e.slice().sort(f),r=1,o=0,i=0,a=[],s=0;s<t;s++)n[s]===n[s+1]?r++:(o<r?(a=[n[s]],o=r,i=0):r===o&&(a.push(n[s]),i++),r=1);return 0===i?a[0]:a},l.range=function(e){return l.max(e)-l.min(e)},l.variance=function(e,t){return l.sumsqerr(e)/(e.length-(t?1:0))},l.pooledvariance=function(e){return e.reduce(function(e,t){return e+l.sumsqerr(t)},0)/(e.reduce(function(e,t){return e+t.length},0)-e.length)},l.deviation=function(e){for(var t=l.mean(e),n=e.length,r=new Array(n),o=0;o<n;o++)r[o]=e[o]-t;return r},l.stdev=function(e,t){return d.sqrt(l.variance(e,t))},l.pooledstdev=function(e){return d.sqrt(l.pooledvariance(e))},l.meandev=function(e){for(var t=l.mean(e),n=[],r=e.length-1;0<=r;r--)n.push(d.abs(e[r]-t));return l.mean(n)},l.meddev=function(e){for(var t=l.median(e),n=[],r=e.length-1;0<=r;r--)n.push(d.abs(e[r]-t));return l.median(n)},l.coeffvar=function(e){return l.stdev(e)/l.mean(e)},l.quartiles=function(e){var t=e.length,n=e.slice().sort(f);return[n[d.round(t/4)-1],n[d.round(t/2)-1],n[d.round(3*t/4)-1]]},l.quantiles=function(e,t,n,r){var o,i,a,s,l=e.slice().sort(f),u=[t.length],c=e.length;void 0===n&&(n=3/8),void 0===r&&(r=3/8);for(var h=0;h<t.length;h++)s=v((i=c*(o=t[h])+(n+o*(1-n-r)))-(a=d.floor(v(i,1,c-1))),0,1),u[h]=(1-s)*l[a-1]+s*l[a];return u},l.percentile=function(e,t){var n=e.slice().sort(f),r=t*(n.length-1),o=parseInt(r),i=r-o;return o+1<n.length?n[o]*(1-i)+n[o+1]*i:n[o]},l.percentileOfScore=function(e,t,n){var r,o=0,i=e.length,a=!1;"strict"===n&&(a=!0);for(var s=0;s<i;s++)r=e[s],(a&&r<t||!a&&r<=t)&&o++;return o/i},l.histogram=function(e,t){for(var n=l.min(e),r=t||4,o=(l.max(e)-n)/r,i=e.length,a=(t=[],0);a<r;a++)t[a]=0;for(a=0;a<i;a++)t[d.min(d.floor((e[a]-n)/o),r-1)]+=1;return t},l.covariance=function(e,t){for(var n=l.mean(e),r=l.mean(t),o=e.length,i=new Array(o),a=0;a<o;a++)i[a]=(e[a]-n)*(t[a]-r);return l.sum(i)/(o-1)},l.corrcoeff=function(e,t){return l.covariance(e,t)/l.stdev(e,1)/l.stdev(t,1)},l.spearmancoeff=function(e,t){return e=l.rank(e),t=l.rank(t),l.corrcoeff(e,t)},l.stanMoment=function(e,t){for(var n=l.mean(e),r=l.stdev(e),o=e.length,i=0,a=0;a<o;a++)i+=d.pow((e[a]-n)/r,t);return i/e.length},l.skewness=function(e){return l.stanMoment(e,3)},l.kurtosis=function(e){return l.stanMoment(e,4)-3};var c=l.prototype;!function(e){for(var t=0;t<e.length;t++)!function(i){c[i]=function(e,t){var n=[],r=0,o=this;if(u(e)&&(t=e,e=!1),t)return setTimeout(function(){t.call(o,c[i].call(o,e))}),this;if(1<this.length){for(o=!0===e?this:this.transpose();r<o.length;r++)n[r]=l[i](o[r]);return n}return l[i](this[0],e)}}(e[t])}("cumsum cumprod".split(" ")),function(e){for(var t=0;t<e.length;t++)!function(i){c[i]=function(e,t){var n=[],r=0,o=this;if(u(e)&&(t=e,e=!1),t)return setTimeout(function(){t.call(o,c[i].call(o,e))}),this;if(1<this.length){for("sumrow"!==i&&(o=!0===e?this:this.transpose());r<o.length;r++)n[r]=l[i](o[r]);return!0===e?l[i](l.utils.toVector(n)):n}return l[i](this[0],e)}}(e[t])}("sum sumsqrd sumsqerr sumrow product min max unique mean meansqerr geomean median diff rank mode range variance deviation stdev meandev meddev coeffvar quartiles histogram skewness kurtosis".split(" ")),function(e){for(var t=0;t<e.length;t++)!function(s){c[s]=function(){var e=[],t=0,n=this,r=Array.prototype.slice.call(arguments);if(u(r[r.length-1])){var o=r[r.length-1],i=r.slice(0,r.length-1);return setTimeout(function(){o.call(n,c[s].apply(n,i))}),this}o=void 0;var a=function(e){return l[s].apply(n,[e].concat(r))};if(1<this.length){for(n=n.transpose();t<n.length;t++)e[t]=a(n[t]);return e}return a(this[0])}}(e[t])}("quantiles percentileOfScore".split(" "))}(d=function(s,l){var t=Array.prototype.concat,e=Array.prototype.slice,n=Object.prototype.toString;function u(e,t){var n=t<e?e:t;return s.pow(10,17-~~(s.log(0<n?n:-n)*s.LOG10E))}var c=Array.isArray||function(e){return"[object Array]"===n.call(e)};function h(e){return"[object Function]"===n.call(e)}function d(e){return"number"==typeof e&&e==e}function f(){return new f._init(arguments)}function r(){return 0}function o(){return 1}function a(e,t){return e===t?1:0}f.fn=f.prototype,(f._init=function(e){if(c(e[0]))if(c(e[0][0])){h(e[1])&&(e[0]=f.map(e[0],e[1]));for(var t=0;t<e[0].length;t++)this[t]=e[0][t];this.length=e[0].length}else this[0]=h(e[1])?f.map(e[0],e[1]):e[0],this.length=1;else if(d(e[0]))this[0]=f.seq.apply(null,e),this.length=1;else{if(e[0]instanceof f)return f(e[0].toArray());this[0]=[],this.length=1}return this}).prototype=f.prototype,(f._init.constructor=f).utils={calcRdx:u,isArray:c,isFunction:h,isNumber:d,toVector:function(e){return t.apply([],e)}},f.extend=function(e){var t;if(1===arguments.length){for(t in e)f[t]=e[t];return this}for(var n=1;n<arguments.length;n++)for(t in arguments[n])e[t]=arguments[n][t];return e},f.rows=function(e){return e.length||1},f.cols=function(e){return e[0].length||1},f.dimensions=function(e){return{rows:f.rows(e),cols:f.cols(e)}},f.row=function(t,e){return c(e)?e.map(function(e){return f.row(t,e)}):t[e]},f.rowa=function(e,t){return f.row(e,t)},f.col=function(r,t){if(c(t)){var o=f.arange(r.length).map(function(e){return new Array(t.length)});return t.forEach(function(t,n){f.arange(r.length).forEach(function(e){o[e][n]=r[e][t]})}),o}for(var e=new Array(r.length),n=0;n<r.length;n++)e[n]=[r[n][t]];return e},f.cola=function(e,t){return f.col(e,t).map(function(e){return e[0]})},f.diag=function(e){for(var t=f.rows(e),n=new Array(t),r=0;r<t;r++)n[r]=[e[r][r]];return n},f.antidiag=function(e){for(var t=f.rows(e)-1,n=new Array(t),r=0;0<=t;t--,r++)n[r]=[e[r][t]];return n},f.transpose=function(e){var t,n,r,o,i=[];c(e[0])||(e=[e]),n=e.length,r=e[0].length;for(var a=0;a<r;a++){for(t=new Array(n),o=0;o<n;o++)t[o]=e[o][a];i.push(t)}return 1===i.length?i[0]:i},f.map=function(e,t,n){var r,o,i,a,s;for(c(e[0])||(e=[e]),o=e.length,i=e[0].length,a=n?e:new Array(o),r=0;r<o;r++)for(a[r]||(a[r]=new Array(i)),s=0;s<i;s++)a[r][s]=t(e[r][s],r,s);return 1===a.length?a[0]:a},f.cumreduce=function(e,t,n){var r,o,i,a,s;for(c(e[0])||(e=[e]),o=e.length,i=e[0].length,a=n?e:new Array(o),r=0;r<o;r++)for(a[r]||(a[r]=new Array(i)),0<i&&(a[r][0]=e[r][0]),s=1;s<i;s++)a[r][s]=t(a[r][s-1],e[r][s]);return 1===a.length?a[0]:a},f.alter=function(e,t){return f.map(e,t,!0)},f.create=function(e,t,n){var r,o=new Array(e);h(t)&&(n=t,t=e);for(var i=0;i<e;i++)for(o[i]=new Array(t),r=0;r<t;r++)o[i][r]=n(i,r);return o},f.zeros=function(e,t){return d(t)||(t=e),f.create(e,t,r)},f.ones=function(e,t){return d(t)||(t=e),f.create(e,t,o)},f.rand=function(e,t){return d(t)||(t=e),f.create(e,t,s.random)},f.identity=function(e,t){return d(t)||(t=e),f.create(e,t,a)},f.symmetric=function(e){var t,n,r=e.length;if(e.length!==e[0].length)return!1;for(t=0;t<r;t++)for(n=0;n<r;n++)if(e[n][t]!==e[t][n])return!1;return!0},f.clear=function(e){return f.alter(e,r)},f.seq=function(e,t,n,r){h(r)||(r=!1);var o,i=[],a=u(e,t),s=(t*a-e*a)/((n-1)*a),l=e;for(o=0;l<=t&&o<n;l=(e*a+s*a*++o)/a)i.push(r?r(l,o):l);return i},f.arange=function(e,t,n){var r=[];if(n=n||1,t===l&&(t=e,e=0),e===t||0===n)return[];if(e<t&&n<0)return[];if(t<e&&0<n)return[];if(0<n)for(i=e;i<t;i+=n)r.push(i);else for(i=e;i>t;i+=n)r.push(i);return r},f.slice=function(){function a(e,t,n,r){var o,i=[],a=e.length;if(t===l&&n===l&&r===l)return f.copy(e);if(t=t||0,n=n||e.length,r=r||1,(t=0<=t?t:a+t)===(n=0<=n?n:a+n)||0===r)return[];if(t<n&&r<0)return[];if(n<t&&0<r)return[];if(0<r)for(o=t;o<n;o+=r)i.push(e[o]);else for(o=t;n<o;o+=r)i.push(e[o]);return i}return function(e,t){if(d((t=t||{}).row)){if(d(t.col))return e[t.row][t.col];var n=f.rowa(e,t.row),r=t.col||{};return a(n,r.start,r.end,r.step)}if(d(t.col)){var o=f.cola(e,t.col),i=t.row||{};return a(o,i.start,i.end,i.step)}i=t.row||{},r=t.col||{};return a(e,i.start,i.end,i.step).map(function(e){return a(e,r.start,r.end,r.step)})}}(),f.sliceAssign=function(o,e,i){if(d(e.row)){if(d(e.col))return o[e.row][e.col]=i;e.col=e.col||{},e.col.start=e.col.start||0,e.col.end=e.col.end||o[0].length,e.col.step=e.col.step||1;var t=f.arange(e.col.start,s.min(o.length,e.col.end),e.col.step),n=e.row;return t.forEach(function(e,t){o[n][e]=i[t]}),o}if(d(e.col)){e.row=e.row||{},e.row.start=e.row.start||0,e.row.end=e.row.end||o.length,e.row.step=e.row.step||1;var r=f.arange(e.row.start,s.min(o[0].length,e.row.end),e.row.step),a=e.col;return r.forEach(function(e,t){o[e][a]=i[t]}),o}i[0].length===l&&(i=[i]),e.row.start=e.row.start||0,e.row.end=e.row.end||o.length,e.row.step=e.row.step||1,e.col.start=e.col.start||0,e.col.end=e.col.end||o[0].length,e.col.step=e.col.step||1;var r=f.arange(e.row.start,s.min(o.length,e.row.end),e.row.step),t=f.arange(e.col.start,s.min(o[0].length,e.col.end),e.col.step);return r.forEach(function(n,r){t.forEach(function(e,t){o[n][e]=i[r][t]})}),o},f.diagonal=function(e){var n=f.zeros(e.length,e.length);return e.forEach(function(e,t){n[t][t]=e}),n},f.copy=function(e){return e.map(function(e){return d(e)?e:e.map(function(e){return e})})};var v=f.prototype;return v.length=0,v.push=Array.prototype.push,v.sort=Array.prototype.sort,v.splice=Array.prototype.splice,v.slice=Array.prototype.slice,v.toArray=function(){return 1<this.length?e.call(this):e.call(this)[0]},v.map=function(e,t){return f(f.map(this,e,t))},v.cumreduce=function(e,t){return f(f.cumreduce(this,e,t))},v.alter=function(e){return f.alter(this,e),this},function(e){for(var t=0;t<e.length;t++)!function(r){v[r]=function(e){var t,n=this;return e?(setTimeout(function(){e.call(n,v[r].call(n))}),this):(t=f[r](this),c(t)?f(t):t)}}(e[t])}("transpose clear symmetric rows cols dimensions diag antidiag".split(" ")),function(e){for(var t=0;t<e.length;t++)!function(r){v[r]=function(e,t){var n=this;return t?(setTimeout(function(){t.call(n,v[r].call(n,e))}),this):f(f[r](this,e))}}(e[t])}("row col".split(" ")),function(e){for(var t=0;t<e.length;t++)!function(e){v[e]=function(){return f(f[e].apply(null,arguments))}}(e[t])}("create zeros ones rand identity".split(" ")),f}(Math),Math),function(p,m){p.gammaln=function(e){var t,n,r,o=0,i=[76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18],a=1.000000000190015;for(r=(n=t=e)+5.5,r-=(t+.5)*m.log(r);o<6;o++)a+=i[o]/++n;return m.log(2.5066282746310007*a/t)-r},p.gammafn=function(e){var t,n,r,o=[-1.716185138865495,24.76565080557592,-379.80425647094563,629.3311553128184,866.9662027904133,-31451.272968848367,-36144.413418691176,66456.14382024054],i=[-30.8402300119739,315.35062697960416,-1015.1563674902192,-3107.771671572311,22538.11842098015,4755.846277527881,-134659.9598649693,-115132.2596755535],a=!1,s=0,l=0,u=0,c=e;if(c<=0){if(!(r=c%1+36e-17))return 1/0;a=(1&c?-1:1)*m.PI/m.sin(m.PI*r),c=1-c}t=(n=c)<1?c++:(c-=s=(0|c)-1)-1;for(var h=0;h<8;++h)u=(u+o[h])*t,l=l*t+i[h];if(r=u/l+1,n<c)r/=n;else if(c<n)for(h=0;h<s;++h)r*=c,c++;return a&&(r=a/r),r},p.gammap=function(e,t){return p.lowRegGamma(e,t)*p.gammafn(e)},p.lowRegGamma=function(e,t){var n,r=p.gammaln(e),o=e,i=1/e,a=i,s=t+1-e,l=1/1e-30,u=1/s,c=u,h=1,d=-~(8.5*m.log(1<=e?e:1/e)+.4*e+17);if(t<0||e<=0)return NaN;if(t<e+1){for(;h<=d;h++)i+=a*=t/++o;return i*m.exp(-t+e*m.log(t)-r)}for(;h<=d;h++)c*=(u=1/(u=(n=-h*(h-e))*u+(s+=2)))*(l=s+n/l);return 1-c*m.exp(-t+e*m.log(t)-r)},p.factorialln=function(e){return e<0?NaN:p.gammaln(e+1)},p.factorial=function(e){return e<0?NaN:p.gammafn(e+1)},p.combination=function(e,t){return 170<e||170<t?m.exp(p.combinationln(e,t)):p.factorial(e)/p.factorial(t)/p.factorial(e-t)},p.combinationln=function(e,t){return p.factorialln(e)-p.factorialln(t)-p.factorialln(e-t)},p.permutation=function(e,t){return p.factorial(e)/p.factorial(e-t)},p.betafn=function(e,t){if(!(e<=0||t<=0))return 170<e+t?m.exp(p.betaln(e,t)):p.gammafn(e)*p.gammafn(t)/p.gammafn(e+t)},p.betaln=function(e,t){return p.gammaln(e)+p.gammaln(t)-p.gammaln(e+t)},p.betacf=function(e,t,n){var r,o,i,a,s=1e-30,l=1,u=t+n,c=t+1,h=t-1,d=1,f=1-u*e/c;for(m.abs(f)<s&&(f=s),a=f=1/f;l<=100&&(f=1+(o=l*(n-l)*e/((h+(r=2*l))*(t+r)))*f,m.abs(f)<s&&(f=s),d=1+o/d,m.abs(d)<s&&(d=s),a*=(f=1/f)*d,f=1+(o=-(t+l)*(u+l)*e/((t+r)*(c+r)))*f,m.abs(f)<s&&(f=s),d=1+o/d,m.abs(d)<s&&(d=s),a*=i=(f=1/f)*d,!(m.abs(i-1)<3e-7));l++);return a},p.gammapinv=function(e,t){var n,r,o,i,a,s,l=0,u=t-1,c=p.gammaln(t);if(1<=e)return m.max(100,t+100*m.sqrt(t));if(e<=0)return 0;for(n=1<t?(a=m.log(u),s=m.exp(u*(a-1)-c),i=e<.5?e:1-e,n=(2.30753+.27061*(r=m.sqrt(-2*m.log(i))))/(1+r*(.99229+.04481*r))-r,e<.5&&(n=-n),m.max(.001,t*m.pow(1-1/(9*t)-n/(3*m.sqrt(t)),3))):e<(r=1-t*(.253+.12*t))?m.pow(e/r,1/t):1-m.log(1-(e-r)/(1-r));l<12;l++){if(n<=0)return 0;if((n-=r=(o=(p.lowRegGamma(t,n)-e)/(r=1<t?s*m.exp(-(n-u)+u*(m.log(n)-a)):m.exp(-n+u*m.log(n)-c)))/(1-.5*m.min(1,o*((t-1)/n-1))))<=0&&(n=.5*(n+r)),m.abs(r)<1e-8*n)break}return n},p.erf=function(e){var t,n,r,o,i=[-1.3026537197817094,.6419697923564902,.019476473204185836,-.00956151478680863,-.000946595344482036,.000366839497852761,42523324806907e-18,-20278578112534e-18,-1624290004647e-18,130365583558e-17,1.5626441722e-8,-8.5238095915e-8,6.529054439e-9,5.059343495e-9,-9.91364156e-10,-2.27365122e-10,96467911e-18,2394038e-18,-6886027e-18,894487e-18,313092e-18,-112708e-18,381e-18,7106e-18,-1523e-18,-94e-18,121e-18,-28e-18],a=i.length-1,s=!1,l=0,u=0;for(e<0&&(e=-e,s=!0),n=4*(t=2/(2+e))-2;0<a;a--)l=n*(r=l)-u+i[a],u=r;return o=t*m.exp(-e*e+.5*(i[0]+n*l)-u),s?o-1:1-o},p.erfc=function(e){return 1-p.erf(e)},p.erfcinv=function(e){var t,n,r,o,i=0;if(2<=e)return-100;if(e<=0)return 100;for(o=e<1?e:2-e,t=-.70711*((2.30753+.27061*(r=m.sqrt(-2*m.log(o/2))))/(1+r*(.99229+.04481*r))-r);i<2;i++)t+=(n=p.erfc(t)-o)/(1.1283791670955126*m.exp(-t*t)-t*n);return e<1?t:-t},p.ibetainv=function(e,t,n){var r,o,i,a,s,l,u,c,h,d,f=t-1,v=n-1,g=0;if(e<=0)return 0;if(1<=e)return 1;for(l=1<=t&&1<=n?(i=e<.5?e:1-e,l=(2.30753+.27061*(a=m.sqrt(-2*m.log(i))))/(1+a*(.99229+.04481*a))-a,e<.5&&(l=-l),u=(l*l-3)/6,c=2/(1/(2*t-1)+1/(2*n-1)),h=l*m.sqrt(u+c)/c-(1/(2*n-1)-1/(2*t-1))*(u+5/6-2/(3*c)),t/(t+n*m.exp(2*h))):(r=m.log(t/(t+n)),o=m.log(n/(t+n)),e<(a=m.exp(t*r)/t)/(h=a+(s=m.exp(n*o)/n))?m.pow(t*h*e,1/t):1-m.pow(n*h*(1-e),1/n)),d=-p.gammaln(t)-p.gammaln(n)+p.gammaln(t+n);g<10;g++){if(0===l||1===l)return l;if((l-=a=(s=(p.ibeta(l,t,n)-e)/(a=m.exp(f*m.log(l)+v*m.log(1-l)+d)))/(1-.5*m.min(1,s*(f/l-v/(1-l)))))<=0&&(l=.5*(l+a)),1<=l&&(l=.5*(l+a+1)),m.abs(a)<1e-8*l&&0<g)break}return l},p.ibeta=function(e,t,n){var r=0===e||1===e?0:m.exp(p.gammaln(t+n)-p.gammaln(t)-p.gammaln(n)+t*m.log(e)+n*m.log(1-e));return!(e<0||1<e)&&(e<(t+1)/(t+n+2)?r*p.betacf(e,t,n)/t:1-r*p.betacf(1-e,n,t)/n)},p.randn=function(e,t){var n,r,o,i,a;if(t=t||e,e)return p.create(e,t,function(){return p.randn()});for(;n=m.random(),r=1.7156*(m.random()-.5),.27597<(a=(o=n-.449871)*o+(i=m.abs(r)+.386595)*(.196*i-.25472*o))&&(.27846<a||r*r>-4*m.log(n)*n*n););return r/n},p.randg=function(e,t,n){var r,o,i,a,s,l,u=e;if(n=n||t,e=e||1,t)return(l=p.zeros(t,n)).alter(function(){return p.randg(e)}),l;e<1&&(e+=1),r=e-1/3,o=1/m.sqrt(9*r);do{for(;(a=1+o*(s=p.randn()))<=0;);a*=a*a,i=m.random()}while(i>1-.331*m.pow(s,4)&&m.log(i)>.5*s*s+r*(1-a+m.log(a)));if(e==u)return r*a;for(;0===(i=m.random()););return m.pow(i,1/u)*r*a},function(e){for(var t=0;t<e.length;t++)!function(t){p.fn[t]=function(){return p(p.map(this,function(e){return p[t](e)}))}}(e[t])}("gammaln gammafn factorial factorialln".split(" ")),function(e){for(var t=0;t<e.length;t++)!function(e){p.fn[e]=function(){return p(p[e].apply(null,arguments))}}(e[t])}("randn".split(" "))}(d,Math),function(S,b){function y(e,t,n){var r=[.9815606342467192,.9041172563704749,.7699026741943047,.5873179542866175,.3678314989981802,.1252334085114689],o=[.04717533638651183,.10693932599531843,.16007832854334622,.20316742672306592,.2334925365383548,.24914704581340277],i=.5*e;if(8<=i)return 1;var a,s=2*S.normal.cdf(i,0,1,1,0)-1;s=s>=b.exp(-50/n)?b.pow(s,n):0;for(var l=i,u=(8-i)/(a=3<e?2:3),c=l+u,h=0,d=n-1,f=1;f<=a;f++){for(var v=0,g=.5*(c+l),p=.5*(c-l),m=1;m<=12;m++){var y,w=g+p*(6<m?r[(y=12-m+1)-1]:-r[(y=m)-1]),C=w*w;if(60<C)break;var E=2*S.normal.cdf(w,0,1,1,0)*.5-2*S.normal.cdf(w,e,1,1,0)*.5;E>=b.exp(-30/d)&&(v+=E=o[y-1]*b.exp(-.5*C)*b.pow(E,d))}h+=v*=2*p*n/b.sqrt(2*b.PI),l=c,c+=u}return(s+=h)<=b.exp(-30/t)?0:1<=(s=b.pow(s,t))?1:s}!function(e){for(var t=0;t<e.length;t++)!function(i){S[i]=function(e,t,n){return this instanceof arguments.callee?(this._a=e,this._b=t,this._c=n,this):new arguments.callee(e,t,n)},S.fn[i]=function(e,t,n){var r=S[i](e,t,n);return r.data=this,r},S[i].prototype.sample=function(e){var t=this._a,n=this._b,r=this._c;return e?S.alter(e,function(){return S[i].sample(t,n,r)}):S[i].sample(t,n,r)},function(e){for(var t=0;t<e.length;t++)!function(o){S[i].prototype[o]=function(e){var t=this._a,n=this._b,r=this._c;return e||0===e||(e=this.data),"number"!=typeof e?S.fn.map.call(e,function(e){return S[i][o](e,t,n,r)}):S[i][o](e,t,n,r)}}(e[t])}("pdf cdf inv".split(" ")),function(e){for(var t=0;t<e.length;t++)!function(e){S[i].prototype[e]=function(){return S[i][e](this._a,this._b,this._c)}}(e[t])}("mean median mode variance".split(" "))}(e[t])}("beta centralF cauchy chisquare exponential gamma invgamma kumaraswamy laplace lognormal noncentralt normal pareto studentt weibull uniform binomial negbin hypgeom poisson triangular tukey arcsine".split(" ")),S.extend(S.beta,{pdf:function(e,t,n){return 1<e||e<0?0:1==t&&1==n?1:t<512&&n<512?b.pow(e,t-1)*b.pow(1-e,n-1)/S.betafn(t,n):b.exp((t-1)*b.log(e)+(n-1)*b.log(1-e)-S.betaln(t,n))},cdf:function(e,t,n){return 1<e||e<0?1*(1<e):S.ibeta(e,t,n)},inv:function(e,t,n){return S.ibetainv(e,t,n)},mean:function(e,t){return e/(e+t)},median:function(e,t){return S.ibetainv(.5,e,t)},mode:function(e,t){return(e-1)/(e+t-2)},sample:function(e,t){var n=S.randg(e);return n/(n+S.randg(t))},variance:function(e,t){return e*t/(b.pow(e+t,2)*(e+t+1))}}),S.extend(S.centralF,{pdf:function(e,t,n){var r;return e<0?0:t<=2?0===e&&t<2?1/0:0===e&&2===t?1:1/S.betafn(t/2,n/2)*b.pow(t/n,t/2)*b.pow(e,t/2-1)*b.pow(1+t/n*e,-(t+n)/2):(r=t*e/(n+e*t),t*(n/(n+e*t))/2*S.binomial.pdf((t-2)/2,(t+n-2)/2,r))},cdf:function(e,t,n){return e<0?0:S.ibeta(t*e/(t*e+n),t/2,n/2)},inv:function(e,t,n){return n/(t*(1/S.ibetainv(e,t/2,n/2)-1))},mean:function(e,t){return 2<t?t/(t-2):void 0},mode:function(e,t){return 2<e?t*(e-2)/(e*(t+2)):void 0},sample:function(e,t){return 2*S.randg(e/2)/e/(2*S.randg(t/2)/t)},variance:function(e,t){if(!(t<=4))return 2*t*t*(e+t-2)/(e*(t-2)*(t-2)*(t-4))}}),S.extend(S.cauchy,{pdf:function(e,t,n){return n<0?0:n/(b.pow(e-t,2)+b.pow(n,2))/b.PI},cdf:function(e,t,n){return b.atan((e-t)/n)/b.PI+.5},inv:function(e,t,n){return t+n*b.tan(b.PI*(e-.5))},median:function(e,t){return e},mode:function(e,t){return e},sample:function(e,t){return S.randn()*b.sqrt(1/(2*S.randg(.5)))*t+e}}),S.extend(S.chisquare,{pdf:function(e,t){return e<0?0:0===e&&2===t?.5:b.exp((t/2-1)*b.log(e)-e/2-t/2*b.log(2)-S.gammaln(t/2))},cdf:function(e,t){return e<0?0:S.lowRegGamma(t/2,e/2)},inv:function(e,t){return 2*S.gammapinv(e,.5*t)},mean:function(e){return e},median:function(e){return e*b.pow(1-2/(9*e),3)},mode:function(e){return 0<e-2?e-2:0},sample:function(e){return 2*S.randg(e/2)},variance:function(e){return 2*e}}),S.extend(S.exponential,{pdf:function(e,t){return e<0?0:t*b.exp(-t*e)},cdf:function(e,t){return e<0?0:1-b.exp(-t*e)},inv:function(e,t){return-b.log(1-e)/t},mean:function(e){return 1/e},median:function(e){return 1/e*b.log(2)},mode:function(e){return 0},sample:function(e){return-1/e*b.log(b.random())},variance:function(e){return b.pow(e,-2)}}),S.extend(S.gamma,{pdf:function(e,t,n){return e<0?0:0===e&&1===t?1/n:b.exp((t-1)*b.log(e)-e/n-S.gammaln(t)-t*b.log(n))},cdf:function(e,t,n){return e<0?0:S.lowRegGamma(t,e/n)},inv:function(e,t,n){return S.gammapinv(e,t)*n},mean:function(e,t){return e*t},mode:function(e,t){if(1<e)return(e-1)*t},sample:function(e,t){return S.randg(e)*t},variance:function(e,t){return e*t*t}}),S.extend(S.invgamma,{pdf:function(e,t,n){return e<=0?0:b.exp(-(t+1)*b.log(e)-n/e-S.gammaln(t)+t*b.log(n))},cdf:function(e,t,n){return e<=0?0:1-S.lowRegGamma(t,n/e)},inv:function(e,t,n){return n/S.gammapinv(1-e,t)},mean:function(e,t){return 1<e?t/(e-1):void 0},mode:function(e,t){return t/(e+1)},sample:function(e,t){return t/S.randg(e)},variance:function(e,t){if(!(e<=2))return t*t/((e-1)*(e-1)*(e-2))}}),S.extend(S.kumaraswamy,{pdf:function(e,t,n){return 0===e&&1===t?n:1===e&&1===n?t:b.exp(b.log(t)+b.log(n)+(t-1)*b.log(e)+(n-1)*b.log(1-b.pow(e,t)))},cdf:function(e,t,n){return e<0?0:1<e?1:1-b.pow(1-b.pow(e,t),n)},inv:function(e,t,n){return b.pow(1-b.pow(1-e,1/n),1/t)},mean:function(e,t){return t*S.gammafn(1+1/e)*S.gammafn(t)/S.gammafn(1+1/e+t)},median:function(e,t){return b.pow(1-b.pow(2,-1/t),1/e)},mode:function(e,t){if(1<=e&&1<=t&&1!==e&&1!==t)return b.pow((e-1)/(e*t-1),1/e)},variance:function(e,t){throw new Error("variance not yet implemented")}}),S.extend(S.lognormal,{pdf:function(e,t,n){return e<=0?0:b.exp(-b.log(e)-.5*b.log(2*b.PI)-b.log(n)-b.pow(b.log(e)-t,2)/(2*n*n))},cdf:function(e,t,n){return e<0?0:.5+.5*S.erf((b.log(e)-t)/b.sqrt(2*n*n))},inv:function(e,t,n){return b.exp(-1.4142135623730951*n*S.erfcinv(2*e)+t)},mean:function(e,t){return b.exp(e+t*t/2)},median:function(e,t){return b.exp(e)},mode:function(e,t){return b.exp(e-t*t)},sample:function(e,t){return b.exp(S.randn()*t+e)},variance:function(e,t){return(b.exp(t*t)-1)*b.exp(2*e+t*t)}}),S.extend(S.noncentralt,{pdf:function(e,t,n){return b.abs(n)<1e-14?S.studentt.pdf(e,t):b.abs(e)<1e-14?b.exp(S.gammaln((t+1)/2)-n*n/2-.5*b.log(b.PI*t)-S.gammaln(t/2)):t/e*(S.noncentralt.cdf(e*b.sqrt(1+2/t),t+2,n)-S.noncentralt.cdf(e,t,n))},cdf:function(e,t,n){if(b.abs(n)<1e-14)return S.studentt.cdf(e,t);var r=!1;e<0&&(r=!0,n=-n);for(var o=S.normal.cdf(-n,0,1),i=1e-14+1,a=i,s=e*e/(e*e+t),l=0,u=b.exp(-n*n/2),c=b.exp(-n*n/2-.5*b.log(2)-S.gammaln(1.5))*n;l<200||1e-14<a||1e-14<i;)a=i,0<l&&(u*=n*n/(2*l),c*=n*n/(2*(l+.5))),o+=.5*(i=u*S.beta.cdf(s,l+.5,t/2)+c*S.beta.cdf(s,l+1,t/2)),l++;return r?1-o:o}}),S.extend(S.normal,{pdf:function(e,t,n){return b.exp(-.5*b.log(2*b.PI)-b.log(n)-b.pow(e-t,2)/(2*n*n))},cdf:function(e,t,n){return.5*(1+S.erf((e-t)/b.sqrt(2*n*n)))},inv:function(e,t,n){return-1.4142135623730951*n*S.erfcinv(2*e)+t},mean:function(e,t){return e},median:function(e,t){return e},mode:function(e,t){return e},sample:function(e,t){return S.randn()*t+e},variance:function(e,t){return t*t}}),S.extend(S.pareto,{pdf:function(e,t,n){return e<t?0:n*b.pow(t,n)/b.pow(e,n+1)},cdf:function(e,t,n){return e<t?0:1-b.pow(t/e,n)},inv:function(e,t,n){return t/b.pow(1-e,1/n)},mean:function(e,t){if(!(t<=1))return t*b.pow(e,t)/(t-1)},median:function(e,t){return e*(t*b.SQRT2)},mode:function(e,t){return e},variance:function(e,t){if(!(t<=2))return e*e*t/(b.pow(t-1,2)*(t-2))}}),S.extend(S.studentt,{pdf:function(e,t){return t=1e100<t?1e100:t,1/(b.sqrt(t)*S.betafn(.5,t/2))*b.pow(1+e*e/t,-(t+1)/2)},cdf:function(e,t){var n=t/2;return S.ibeta((e+b.sqrt(e*e+t))/(2*b.sqrt(e*e+t)),n,n)},inv:function(e,t){var n=S.ibetainv(2*b.min(e,1-e),.5*t,.5);return n=b.sqrt(t*(1-n)/n),.5<e?n:-n},mean:function(e){return 1<e?0:void 0},median:function(e){return 0},mode:function(e){return 0},sample:function(e){return S.randn()*b.sqrt(e/(2*S.randg(e/2)))},variance:function(e){return 2<e?e/(e-2):1<e?1/0:void 0}}),S.extend(S.weibull,{pdf:function(e,t,n){return e<0||t<0||n<0?0:n/t*b.pow(e/t,n-1)*b.exp(-b.pow(e/t,n))},cdf:function(e,t,n){return e<0?0:1-b.exp(-b.pow(e/t,n))},inv:function(e,t,n){return t*b.pow(-b.log(1-e),1/n)},mean:function(e,t){return e*S.gammafn(1+1/t)},median:function(e,t){return e*b.pow(b.log(2),1/t)},mode:function(e,t){return t<=1?0:e*b.pow((t-1)/t,1/t)},sample:function(e,t){return e*b.pow(-b.log(b.random()),1/t)},variance:function(e,t){return e*e*S.gammafn(1+2/t)-b.pow(S.weibull.mean(e,t),2)}}),S.extend(S.uniform,{pdf:function(e,t,n){return e<t||n<e?0:1/(n-t)},cdf:function(e,t,n){return e<t?0:e<n?(e-t)/(n-t):1},inv:function(e,t,n){return t+e*(n-t)},mean:function(e,t){return.5*(e+t)},median:function(e,t){return S.mean(e,t)},mode:function(e,t){throw new Error("mode is not yet implemented")},sample:function(e,t){return e/2+t/2+(t/2-e/2)*(2*b.random()-1)},variance:function(e,t){return b.pow(t-e,2)/12}}),S.extend(S.binomial,{pdf:function(e,t,n){return 0===n||1===n?t*n===e?1:0:S.combination(t,e)*b.pow(n,e)*b.pow(1-n,t-e)},cdf:function(e,t,n){var r=[],o=0;if(e<0)return 0;if(e<t){for(;o<=e;o++)r[o]=S.binomial.pdf(o,t,n);return S.sum(r)}return 1}}),S.extend(S.negbin,{pdf:function(e,t,n){return e===e>>>0&&(e<0?0:S.combination(e+t-1,t-1)*b.pow(1-n,e)*b.pow(n,t))},cdf:function(e,t,n){var r=0,o=0;if(e<0)return 0;for(;o<=e;o++)r+=S.negbin.pdf(o,t,n);return r}}),S.extend(S.hypgeom,{pdf:function(e,t,n,r){if(e!=e|0)return!1;if(e<0||e<n-(t-r))return 0;if(r<e||n<e)return 0;if(t<2*n)return t<2*r?S.hypgeom.pdf(t-n-r+e,t,t-n,t-r):S.hypgeom.pdf(r-e,t,t-n,r);if(t<2*r)return S.hypgeom.pdf(n-e,t,n,t-r);if(n<r)return S.hypgeom.pdf(e,t,r,n);for(var o=1,i=0,a=0;a<e;a++){for(;1<o&&i<r;)o*=1-n/(t-i),i++;o*=(r-a)*(n-a)/((a+1)*(t-n-r+a+1))}for(;i<r;i++)o*=1-n/(t-i);return b.min(1,b.max(0,o))},cdf:function(e,t,n,r){if(e<0||e<n-(t-r))return 0;if(r<=e||n<=e)return 1;if(t<2*n)return t<2*r?S.hypgeom.cdf(t-n-r+e,t,t-n,t-r):1-S.hypgeom.cdf(r-e-1,t,t-n,r);if(t<2*r)return 1-S.hypgeom.cdf(n-e-1,t,n,t-r);if(n<r)return S.hypgeom.cdf(e,t,r,n);for(var o=1,i=1,a=0,s=0;s<e;s++){for(;1<o&&a<r;){var l=1-n/(t-a);i*=l,o*=l,a++}o+=i*=(r-s)*(n-s)/((s+1)*(t-n-r+s+1))}for(;a<r;a++)o*=1-n/(t-a);return b.min(1,b.max(0,o))}}),S.extend(S.poisson,{pdf:function(e,t){return t<0||e%1!=0||e<0?0:b.pow(t,e)*b.exp(-t)/S.factorial(e)},cdf:function(e,t){var n=[],r=0;if(e<0)return 0;for(;r<=e;r++)n.push(S.poisson.pdf(r,t));return S.sum(n)},mean:function(e){return e},variance:function(e){return e},sample:function(e){for(var t=1,n=0,r=b.exp(-e);n++,r<(t*=b.random()););return n-1}}),S.extend(S.triangular,{pdf:function(e,t,n,r){return n<=t||r<t||n<r?NaN:e<t||n<e?0:e<r?2*(e-t)/((n-t)*(r-t)):e===r?2/(n-t):2*(n-e)/((n-t)*(n-r))},cdf:function(e,t,n,r){return n<=t||r<t||n<r?NaN:e<=t?0:n<=e?1:e<=r?b.pow(e-t,2)/((n-t)*(r-t)):1-b.pow(n-e,2)/((n-t)*(n-r))},inv:function(e,t,n,r){return n<=t||r<t||n<r?NaN:e<=(r-t)/(n-t)?t+(n-t)*b.sqrt(e*((r-t)/(n-t))):t+(n-t)*(1-b.sqrt((1-e)*(1-(r-t)/(n-t))))},mean:function(e,t,n){return(e+t+n)/3},median:function(e,t,n){return n<=(e+t)/2?t-b.sqrt((t-e)*(t-n))/b.sqrt(2):(e+t)/2<n?e+b.sqrt((t-e)*(n-e))/b.sqrt(2):void 0},mode:function(e,t,n){return n},sample:function(e,t,n){var r=b.random();return r<(n-e)/(t-e)?e+b.sqrt(r*(t-e)*(n-e)):t-b.sqrt((1-r)*(t-e)*(t-n))},variance:function(e,t,n){return(e*e+t*t+n*n-e*t-e*n-t*n)/18}}),S.extend(S.arcsine,{pdf:function(e,t,n){return n<=t?NaN:e<=t||n<=e?0:2/b.PI*b.pow(b.pow(n-t,2)-b.pow(2*e-t-n,2),-.5)},cdf:function(e,t,n){return e<t?0:e<n?2/b.PI*b.asin(b.sqrt((e-t)/(n-t))):1},inv:function(e,t,n){return t+(.5-.5*b.cos(b.PI*e))*(n-t)},mean:function(e,t){return t<=e?NaN:(e+t)/2},median:function(e,t){return t<=e?NaN:(e+t)/2},mode:function(e,t){throw new Error("mode is not yet implemented")},sample:function(e,t){return(e+t)/2+(t-e)/2*b.sin(2*b.PI*S.uniform.sample(0,1))},variance:function(e,t){return t<=e?NaN:b.pow(t-e,2)/8}}),S.extend(S.laplace,{pdf:function(e,t,n){return n<=0?0:b.exp(-b.abs(e-t)/n)/(2*n)},cdf:function(e,t,n){return n<=0?0:e<t?.5*b.exp((e-t)/n):1-.5*b.exp(-(e-t)/n)},mean:function(e,t){return e},median:function(e,t){return e},mode:function(e,t){return e},variance:function(e,t){return 2*t*t},sample:function(e,t){var n=b.random()-.5;return e-t*function(e){return e/b.abs(e)}(n)*b.log(1-2*b.abs(n))}}),S.extend(S.tukey,{cdf:function(e,t,n){var r=t,o=[.9894009349916499,.9445750230732326,.8656312023878318,.755404408355003,.6178762444026438,.45801677765722737,.2816035507792589,.09501250983763744],i=[.027152459411754096,.062253523938647894,.09515851168249279,.12462897125553388,.14959598881657674,.16915651939500254,.18260341504492358,.1894506104550685];if(e<=0)return 0;if(n<2||r<2)return NaN;if(!Number.isFinite(e))return 1;if(25e3<n)return y(e,1,r);var a,s=.5*n,l=s*b.log(n)-n*b.log(2)-S.gammaln(s),u=s-1,c=.25*n;a=n<=100?1:n<=800?.5:n<=5e3?.25:.125,l+=b.log(a);for(var h=0,d=1;d<=50;d++){for(var f=0,v=(2*d-1)*a,g=1;g<=16;g++){var p,m;-30<=(m=8<g?(p=g-8-1,l+u*b.log(v+o[p]*a)-(o[p]*a+v)*c):(p=g-1,l+u*b.log(v-o[p]*a)+(o[p]*a-v)*c))&&(f+=y(8<g?e*b.sqrt(.5*(o[p]*a+v)):e*b.sqrt(.5*(-o[p]*a+v)),1,r)*i[p]*b.exp(m))}if(1<=d*a&&f<=1e-14)break;h+=f}if(1e-14<f)throw new Error("tukey.cdf failed to converge");return 1<h&&(h=1),h},inv:function(e,t,n){if(n<2||t<2)return NaN;if(e<0||1<e)return NaN;if(0===e)return 0;if(1===e)return 1/0;var r,o=function(e,t,n){var r=.5-.5*e,o=b.sqrt(b.log(1/(r*r))),i=o+((((-453642210148e-16*o-.204231210125)*o-.342242088547)*o-1)*o+.322232421088)/((((.0038560700634*o+.10353775285)*o+.531103462366)*o+.588581570495)*o+.099348462606);n<120&&(i+=(i*i*i+i)/n/4);var a=.8832-.2368*i;return n<120&&(a+=-1.214/n+1.208*i/n),i*(a*b.log(t-1)+1.4142)}(e,t,n),i=S.tukey.cdf(o,t,n)-e;r=0<i?b.max(0,o-1):o+1;for(var a,s=S.tukey.cdf(r,t,n)-e,l=1;l<50;l++)if(a=r-s*(r-o)/(s-i),i=s,o=r,a<0&&(a=0,s=-e),s=S.tukey.cdf(a,t,n)-e,r=a,b.abs(r-o)<1e-4)return a;throw new Error("tukey.inv failed to converge")}})}(d,Math),function(p,g){var s,l,o=Array.prototype.push,t=p.utils.isArray;function c(e){return t(e)||e instanceof p}p.extend({add:function(e,r){return c(r)?(c(r[0])||(r=[r]),p.map(e,function(e,t,n){return e+r[t][n]})):p.map(e,function(e){return e+r})},subtract:function(e,r){return c(r)?(c(r[0])||(r=[r]),p.map(e,function(e,t,n){return e-r[t][n]||0})):p.map(e,function(e){return e-r})},divide:function(e,t){return c(t)?(c(t[0])||(t=[t]),p.multiply(e,p.inv(t))):p.map(e,function(e){return e/t})},multiply:function(e,t){var n,r,o,i,a,s,l,u;if(void 0===e.length&&void 0===t.length)return e*t;if(a=e.length,s=e[0].length,l=p.zeros(a,o=c(t)?t[0].length:s),u=0,c(t)){for(;u<o;u++)for(n=0;n<a;n++){for(r=i=0;r<s;r++)i+=e[n][r]*t[r][u];l[n][u]=i}return 1===a&&1===u?l[0][0]:l}return p.map(e,function(e){return e*t})},outer:function(e,t){return p.multiply(e.map(function(e){return[e]}),[t])},dot:function(e,t){c(e[0])||(e=[e]),c(t[0])||(t=[t]);for(var n,r,o=1===e[0].length&&1!==e.length?p.transpose(e):e,i=1===t[0].length&&1!==t.length?p.transpose(t):t,a=[],s=0,l=o.length,u=o[0].length;s<l;s++){for(a[s]=[],r=n=0;r<u;r++)n+=o[s][r]*i[s][r];a[s]=n}return 1===a.length?a[0]:a},pow:function(e,t){return p.map(e,function(e){return g.pow(e,t)})},exp:function(e){return p.map(e,function(e){return g.exp(e)})},log:function(e){return p.map(e,function(e){return g.log(e)})},abs:function(e){return p.map(e,function(e){return g.abs(e)})},norm:function(e,t){var n=0,r=0;for(isNaN(t)&&(t=2),c(e[0])&&(e=e[0]);r<e.length;r++)n+=g.pow(g.abs(e[r]),t);return g.pow(n,1/t)},angle:function(e,t){return g.acos(p.dot(e,t)/(p.norm(e)*p.norm(t)))},aug:function(e,t){for(var n=[],r=0;r<e.length;r++)n.push(e[r].slice());for(r=0;r<n.length;r++)o.apply(n[r],t[r]);return n},inv:function(e){for(var t,n=e.length,r=e[0].length,o=p.identity(n,r),i=p.gauss_jordan(e,o),a=[],s=0;s<n;s++)for(a[s]=[],t=r;t<i[0].length;t++)a[s][t-r]=i[s][t];return a},det:function(e){var t,n=e.length,r=2*n,o=new Array(r),i=n-1,a=r-1,s=i-n+1,l=a,u=0,c=0;if(2===n)return e[0][0]*e[1][1]-e[0][1]*e[1][0];for(;u<r;u++)o[u]=1;for(u=0;u<n;u++){for(t=0;t<n;t++)o[s<0?s+n:s]*=e[u][t],o[l<n?l+n:l]*=e[u][t],s++,l--;s=--i-n+1,l=--a}for(u=0;u<n;u++)c+=o[u];for(;u<r;u++)c-=o[u];return c},gauss_elimination:function(e,t){var n,r,o,i,a=0,s=0,l=e.length,u=e[0].length,c=1,h=0,d=[];for(n=(e=p.aug(e,t))[0].length,a=0;a<l;a++){for(r=e[a][a],i=(s=a)+1;i<u;i++)r<g.abs(e[i][a])&&(r=e[i][a],s=i);if(s!=a)for(i=0;i<n;i++)o=e[a][i],e[a][i]=e[s][i],e[s][i]=o;for(s=a+1;s<l;s++)for(c=e[s][a]/e[a][a],i=a;i<n;i++)e[s][i]=e[s][i]-c*e[a][i]}for(a=l-1;0<=a;a--){for(h=0,s=a+1;s<=l-1;s++)h+=d[s]*e[a][s];d[a]=(e[a][n-1]-h)/e[a][a]}return d},gauss_jordan:function(e,t){for(var n=p.aug(e,t),r=n.length,o=n[0].length,i=0,a=0;a<r;a++){for(var s=a,l=a+1;l<r;l++)g.abs(n[l][a])>g.abs(n[s][a])&&(s=l);var u=n[a];for(n[a]=n[s],n[s]=u,l=a+1;l<r;l++){i=n[l][a]/n[a][a];for(var c=a;c<o;c++)n[l][c]-=n[a][c]*i}}for(a=r-1;0<=a;a--){for(i=n[a][a],l=0;l<a;l++)for(c=o-1;a-1<c;c--)n[l][c]-=n[a][c]*n[l][a]/i;for(n[a][a]/=i,c=r;c<o;c++)n[a][c]/=i}return n},triaUpSolve:function(n,e){var r,o=n[0].length,i=p.zeros(1,o)[0],t=!1;return null!=e[0].length&&(e=e.map(function(e){return e[0]}),t=!0),p.arange(o-1,-1,-1).forEach(function(t){r=p.arange(t+1,o).map(function(e){return i[e]*n[t][e]}),i[t]=(e[t]-p.sum(r))/n[t][t]}),t?i.map(function(e){return[e]}):i},triaLowSolve:function(n,e){var r,t=n[0].length,o=p.zeros(1,t)[0],i=!1;return null!=e[0].length&&(e=e.map(function(e){return e[0]}),i=!0),p.arange(t).forEach(function(t){r=p.arange(t).map(function(e){return n[t][e]*o[e]}),o[t]=(e[t]-p.sum(r))/n[t][t]}),i?o.map(function(e){return[e]}):o},lu:function(r){var e,t=r.length,o=p.identity(t),a=p.zeros(r.length,r[0].length);return p.arange(t).forEach(function(e){a[0][e]=r[0][e]}),p.arange(1,t).forEach(function(n){p.arange(n).forEach(function(t){e=p.arange(t).map(function(e){return o[n][e]*a[e][t]}),o[n][t]=(r[n][t]-p.sum(e))/a[t][t]}),p.arange(n,t).forEach(function(t){e=p.arange(n).map(function(e){return o[n][e]*a[e][t]}),a[n][t]=r[i][t]-p.sum(e)})}),[o,a]},cholesky:function(e){var r,t=e.length,o=p.zeros(e.length,e[0].length);return p.arange(t).forEach(function(n){r=p.arange(n).map(function(e){return g.pow(o[n][e],2)}),o[n][n]=g.sqrt(e[n][n]-p.sum(r)),p.arange(n+1,t).forEach(function(t){r=p.arange(n).map(function(e){return o[n][e]*o[t][e]}),o[t][n]=(e[n][t]-p.sum(r))/o[n][n]})}),o},gauss_jacobi:function(e,t,n,r){for(var o,i,a,s,l=0,u=0,c=e.length,h=[],d=[],f=[];l<c;l++)for(h[l]=[],d[l]=[],f[l]=[],u=0;u<c;u++)u<l?(h[l][u]=e[l][u],d[l][u]=f[l][u]=0):l<u?(d[l][u]=e[l][u],h[l][u]=f[l][u]=0):(f[l][u]=e[l][u],h[l][u]=d[l][u]=0);for(a=p.multiply(p.multiply(p.inv(f),p.add(h,d)),-1),i=p.multiply(p.inv(f),t),o=n,s=p.add(p.multiply(a,n),i),l=2;g.abs(p.norm(p.subtract(s,o)))>r;)o=s,s=p.add(p.multiply(a,o),i),l++;return s},gauss_seidel:function(e,t,n,r){for(var o,i,a,s,l,u=0,c=e.length,h=[],d=[],f=[];u<c;u++)for(h[u]=[],d[u]=[],f[u]=[],o=0;o<c;o++)o<u?(h[u][o]=e[u][o],d[u][o]=f[u][o]=0):u<o?(d[u][o]=e[u][o],h[u][o]=f[u][o]=0):(f[u][o]=e[u][o],h[u][o]=d[u][o]=0);for(s=p.multiply(p.multiply(p.inv(p.add(f,h)),d),-1),a=p.multiply(p.inv(p.add(f,h)),t),i=n,l=p.add(p.multiply(s,n),a),u=2;g.abs(p.norm(p.subtract(l,i)))>r;)i=l,l=p.add(p.multiply(s,i),a),u+=1;return l},SOR:function(e,t,n,r,o){for(var i,a,s,l,u,c=0,h=e.length,d=[],f=[],v=[];c<h;c++)for(d[c]=[],f[c]=[],v[c]=[],i=0;i<h;i++)i<c?(d[c][i]=e[c][i],f[c][i]=v[c][i]=0):c<i?(f[c][i]=e[c][i],d[c][i]=v[c][i]=0):(v[c][i]=e[c][i],d[c][i]=f[c][i]=0);for(l=p.multiply(p.inv(p.add(v,p.multiply(d,o))),p.subtract(p.multiply(v,1-o),p.multiply(f,o))),s=p.multiply(p.multiply(p.inv(p.add(v,p.multiply(d,o))),t),o),a=n,u=p.add(p.multiply(l,n),s),c=2;g.abs(p.norm(p.subtract(u,a)))>r;)a=u,u=p.add(p.multiply(l,a),s),c++;return u},householder:function(e){for(var t,n,r,o,i=e.length,a=e[0].length,s=0,l=[],u=[];s<i-1;s++){for(t=0,o=s+1;o<a;o++)t+=e[o][s]*e[o][s];for(t=(0<e[s+1][s]?-1:1)*g.sqrt(t),n=g.sqrt((t*t-e[s+1][s]*t)/2),(l=p.zeros(i,1))[s+1][0]=(e[s+1][s]-t)/(2*n),r=s+2;r<i;r++)l[r][0]=e[r][s]/(2*n);u=p.subtract(p.identity(i,a),p.multiply(p.multiply(l,p.transpose(l)),2)),e=p.multiply(u,p.multiply(e,u))}return e},QR:(s=p.sum,l=p.arange,function(t){var e,n,o,i=t.length,a=t[0].length;for(t=p.copy(t),r=p.zeros(a,a),n=0;n<a;n++){for(r[n][n]=g.sqrt(s(l(i).map(function(e){return t[e][n]*t[e][n]}))),e=0;e<i;e++)t[e][n]=t[e][n]/r[n][n];for(o=n+1;o<a;o++)for(r[n][o]=s(l(i).map(function(e){return t[e][n]*t[e][o]})),e=0;e<i;e++)t[e][o]=t[e][o]-t[e][n]*r[n][o]}return[t,r]}),lstsq:function(e,t){var n=!1;void 0===t[0].length&&(t=t.map(function(e){return[e]}),n=!0);var r=p.QR(e),o=r[0],i=r[1],a=e[0].length,s=p.slice(o,{col:{end:a}}),l=function(s){var e=(s=p.copy(s)).length,l=p.identity(e);return p.arange(e-1,-1,-1).forEach(function(a){p.sliceAssign(l,{row:a},p.divide(p.slice(l,{row:a}),s[a][a])),p.sliceAssign(s,{row:a},p.divide(p.slice(s,{row:a}),s[a][a])),p.arange(a).forEach(function(e){var t=p.multiply(s[e][a],-1),n=p.slice(s,{row:e}),r=p.multiply(p.slice(s,{row:a}),t);p.sliceAssign(s,{row:e},p.add(n,r));var o=p.slice(l,{row:e}),i=p.multiply(p.slice(l,{row:a}),t);p.sliceAssign(l,{row:e},p.add(o,i))})}),l}(p.slice(i,{row:{end:a}})),u=p.transpose(s);void 0===u[0].length&&(u=[u]);var c=p.multiply(p.multiply(l,u),t);return void 0===c.length&&(c=[[c]]),n?c.map(function(e){return e[0]}):c},jacobi:function(e){for(var t,n,r,o,i,a,s=1,l=e.length,u=p.identity(l,l),c=[];1===s;){o=e[0][1],r=1;for(var h=n=0;h<l;h++)for(t=0;t<l;t++)h!=t&&o<g.abs(e[h][t])&&(o=g.abs(e[h][t]),n=h,r=t);for(i=e[n][n]===e[r][r]?0<e[n][r]?g.PI/4:-g.PI/4:g.atan(2*e[n][r]/(e[n][n]-e[r][r]))/2,(a=p.identity(l,l))[n][n]=g.cos(i),a[n][r]=-g.sin(i),a[r][n]=g.sin(i),a[r][r]=g.cos(i),u=p.multiply(u,a),e=p.multiply(p.multiply(p.inv(a),e),a),s=0,h=1;h<l;h++)for(t=1;t<l;t++)h!=t&&.001<g.abs(e[h][t])&&(s=1)}for(h=0;h<l;h++)c.push(e[h][h]);return[u,c]},rungekutta:function(e,t,n,r,o,i){var a,s,l;if(2===i)for(;r<=n;)o+=((a=t*e(r,o))+(s=t*e(r+t,o+a)))/2,r+=t;if(4===i)for(;r<=n;)o+=((a=t*e(r,o))+2*(s=t*e(r+t/2,o+a/2))+2*(l=t*e(r+t/2,o+s/2))+t*e(r+t,o+l))/6,r+=t;return o},romberg:function(e,t,n,r){for(var o,i,a,s,l,u=0,c=(n-t)/2,h=[],d=[],f=[];u<r/2;){for(l=e(t),a=t,s=0;a<=n;a+=c,s++)h[s]=a;for(o=h.length,a=1;a<o-1;a++)l+=(a%2!=0?4:2)*e(h[a]);l=c/3*(l+e(n)),f[u]=l,c/=2,u++}for(i=f.length,o=1;1!==i;){for(a=0;a<i-1;a++)d[a]=(g.pow(4,o)*f[a+1]-f[a])/(g.pow(4,o)-1);i=d.length,f=d,d=[],o++}return f},richardson:function(e,t,n,r){function o(e,t){for(var n,r=0,o=e.length;r<o;r++)e[r]===t&&(n=r);return n}e.length;for(var i,a,s,l,u,c=g.abs(n-e[o(e,n)+1]),h=0,d=[],f=[];c<=r;)i=o(e,n+r),a=o(e,n),d[h]=(t[i]-2*t[a]+t[2*a-i])/(r*r),r/=2,h++;for(l=d.length,s=1;1!=l;){for(u=0;u<l-1;u++)f[u]=(g.pow(4,s)*d[u+1]-d[u])/(g.pow(4,s)-1);l=f.length,d=f,f=[],s++}return d},simpson:function(e,t,n,r){for(var o,i=(n-t)/r,a=e(t),s=[],l=t,u=0,c=1;l<=n;l+=i,u++)s[u]=l;for(o=s.length;c<o-1;c++)a+=(c%2!=0?4:2)*e(s[c]);return i/3*(a+e(n))},hermite:function(e,t,n,r){for(var o,i=e.length,a=0,s=0,l=[],u=[],c=[],h=[];s<i;s++){for(l[s]=1,o=0;o<i;o++)s!=o&&(l[s]*=(r-e[o])/(e[s]-e[o]));for(o=u[s]=0;o<i;o++)s!=o&&(u[s]+=1/(e[s]-e[o]));c[s]=(1-2*(r-e[s])*u[s])*(l[s]*l[s]),h[s]=(r-e[s])*(l[s]*l[s]),a+=c[s]*t[s]+h[s]*n[s]}return a},lagrange:function(e,t,n){for(var r,o,i=0,a=0,s=e.length;a<s;a++){for(o=t[a],r=0;r<s;r++)a!=r&&(o*=(n-e[r])/(e[a]-e[r]));i+=o}return i},cubic_spline:function(e,t,n){for(var r,o,i=e.length,a=0,s=[],l=[],u=[],c=[],h=[],d=[];a<i-1;a++)c[a]=e[a+1]-e[a];for(u[0]=0,a=1;a<i-1;a++)u[a]=3/c[a]*(t[a+1]-t[a])-3/c[a-1]*(t[a]-t[a-1]);for(a=1;a<i-1;a++)s[a]=[],l[a]=[],s[a][a-1]=c[a-1],s[a][a]=2*(c[a-1]+c[a]),s[a][a+1]=c[a],l[a][0]=u[a];for(o=p.multiply(p.inv(s),l),r=0;r<i-1;r++)h[r]=(t[r+1]-t[r])/c[r]-c[r]*(o[r+1][0]+2*o[r][0])/3,d[r]=(o[r+1][0]-o[r][0])/(3*c[r]);for(r=0;r<i&&!(e[r]>n);r++);return t[r-=1]+(n-e[r])*h[r]+p.sq(n-e[r])*o[r]+(n-e[r])*p.sq(n-e[r])*d[r]},gauss_quadrature:function(){throw new Error("gauss_quadrature not yet implemented")},PCA:function(e){var t,n,r,o,i,a=e.length,s=e[0].length,l=0,u=[],c=[],h=[],d=[],f=[],v=[],g=[];for(l=0;l<a;l++)u[l]=p.sum(e[l])/s;for(l=0;l<s;l++)for(f[l]=[],t=0;t<a;t++)f[l][t]=e[t][l]-u[t];for(f=p.transpose(f),l=0;l<a;l++)for(v[l]=[],t=0;t<a;t++)v[l][t]=p.dot([f[l]],[f[t]])/(s-1);for(i=(r=p.jacobi(v))[0],c=r[1],g=p.transpose(i),l=0;l<c.length;l++)for(t=l;t<c.length;t++)c[l]<c[t]&&(n=c[l],c[l]=c[t],c[t]=n,h=g[l],g[l]=g[t],g[t]=h);for(o=p.transpose(f),l=0;l<a;l++)for(d[l]=[],t=0;t<o.length;t++)d[l][t]=p.dot([g[l]],[o[t]]);return[e,c,g,d]}}),function(e){for(var t=0;t<e.length;t++)!function(r){p.fn[r]=function(e,t){var n=this;return t?(setTimeout(function(){t.call(n,p.fn[r].call(n,e))},15),this):"number"==typeof p[r](this,e)?p[r](this,e):p(p[r](this,e))}}(e[t])}("add divide multiply subtract dot pow exp log abs norm angle".split(" "))}(d,Math),function(u,c){var h=[].slice,a=u.utils.isNumber,n=u.utils.isArray;function i(e,t,n,r){if(1<e||1<n||e<=0||n<=0)throw new Error("Proportions should be greater than 0 and less than 1");var o=(e*t+n*r)/(t+r);return(e-n)/c.sqrt(o*(1-o)*(1/t+1/r))}u.extend({zscore:function(){var e=h.call(arguments);return a(e[1])?(e[0]-e[1])/e[2]:(e[0]-u.mean(e[1]))/u.stdev(e[1],e[2])},ztest:function(){var e,t=h.call(arguments);return n(t[1])?(e=u.zscore(t[0],t[1],t[3]),1===t[2]?u.normal.cdf(-c.abs(e),0,1):2*u.normal.cdf(-c.abs(e),0,1)):2<t.length?(e=u.zscore(t[0],t[1],t[2]),1===t[3]?u.normal.cdf(-c.abs(e),0,1):2*u.normal.cdf(-c.abs(e),0,1)):(e=t[0],1===t[1]?u.normal.cdf(-c.abs(e),0,1):2*u.normal.cdf(-c.abs(e),0,1))}}),u.extend(u.fn,{zscore:function(e,t){return(e-this.mean())/this.stdev(t)},ztest:function(e,t,n){var r=c.abs(this.zscore(e,n));return 1===t?u.normal.cdf(-r,0,1):2*u.normal.cdf(-r,0,1)}}),u.extend({tscore:function(){var e=h.call(arguments);return 4===e.length?(e[0]-e[1])/(e[2]/c.sqrt(e[3])):(e[0]-u.mean(e[1]))/(u.stdev(e[1],!0)/c.sqrt(e[1].length))},ttest:function(){var e,t=h.call(arguments);return 5===t.length?(e=c.abs(u.tscore(t[0],t[1],t[2],t[3])),1===t[4]?u.studentt.cdf(-e,t[3]-1):2*u.studentt.cdf(-e,t[3]-1)):a(t[1])?(e=c.abs(t[0]),1==t[2]?u.studentt.cdf(-e,t[1]-1):2*u.studentt.cdf(-e,t[1]-1)):(e=c.abs(u.tscore(t[0],t[1])),1==t[2]?u.studentt.cdf(-e,t[1].length-1):2*u.studentt.cdf(-e,t[1].length-1))}}),u.extend(u.fn,{tscore:function(e){return(e-this.mean())/(this.stdev(!0)/c.sqrt(this.cols()))},ttest:function(e,t){return 1===t?1-u.studentt.cdf(c.abs(this.tscore(e)),this.cols()-1):2*u.studentt.cdf(-c.abs(this.tscore(e)),this.cols()-1)}}),u.extend({anovafscore:function(){var e,t,n,r,o,i,a,s=h.call(arguments);if(1===s.length){o=new Array(s[0].length);for(var l=0;l<s[0].length;l++)o[l]=s[0][l];s=o}if(2===s.length)return u.variance(s[0])/u.variance(s[1]);for(t=new Array,l=0;l<s.length;l++)t=t.concat(s[l]);for(n=u.mean(t),l=e=0;l<s.length;l++)e+=s[l].length*c.pow(u.mean(s[l])-n,2);for(e/=s.length-1,l=i=0;l<s.length;l++)for(r=u.mean(s[l]),a=0;a<s[l].length;a++)i+=c.pow(s[l][a]-r,2);return e/(i/=t.length-s.length)},anovaftest:function(){var e,t,n,r=h.call(arguments);if(a(r[0]))return 1-u.centralF.cdf(r[0],r[1],r[2]);anovafscore=u.anovafscore(r),e=r.length-1;for(var o=n=0;o<r.length;o++)n+=r[o].length;return t=n-e-1,1-u.centralF.cdf(anovafscore,e,t)},ftest:function(e,t,n){return 1-u.centralF.cdf(e,t,n)}}),u.extend(u.fn,{anovafscore:function(){return u.anovafscore(this.toArray())},anovaftes:function(){for(var e=0,t=0;t<this.length;t++)e+=this[t].length;return u.ftest(this.anovafscore(),this.length-1,e-this.length)}}),u.extend({qscore:function(){var e,t,n,r,o,i=h.call(arguments);return o=a(i[0])?(e=i[0],t=i[1],n=i[2],r=i[3],i[4]):(e=u.mean(i[0]),t=u.mean(i[1]),n=i[0].length,r=i[1].length,i[2]),c.abs(e-t)/(o*c.sqrt((1/n+1/r)/2))},qtest:function(){var e,t=h.call(arguments),n=(t=3===t.length?(e=t[0],t.slice(1)):7===t.length?(e=u.qscore(t[0],t[1],t[2],t[3],t[4]),t.slice(5)):(e=u.qscore(t[0],t[1],t[2]),t.slice(3)))[0],r=t[1];return 1-u.tukey.cdf(e,r,n-r)},tukeyhsd:function(e){for(var t=u.pooledstdev(e),n=e.map(function(e){return u.mean(e)}),r=e.reduce(function(e,t){return e+t.length},0),o=[],i=0;i<e.length;++i)for(var a=i+1;a<e.length;++a){var s=u.qtest(n[i],n[a],e[i].length,e[a].length,t,r,e.length);o.push([[i,a],s])}return o}}),u.extend({normalci:function(){var e,t=h.call(arguments),n=new Array(2);return e=4===t.length?c.abs(u.normal.inv(t[1]/2,0,1)*t[2]/c.sqrt(t[3])):c.abs(u.normal.inv(t[1]/2,0,1)*u.stdev(t[2])/c.sqrt(t[2].length)),n[0]=t[0]-e,n[1]=t[0]+e,n},tci:function(){var e,t=h.call(arguments),n=new Array(2);return e=4===t.length?c.abs(u.studentt.inv(t[1]/2,t[3]-1)*t[2]/c.sqrt(t[3])):c.abs(u.studentt.inv(t[1]/2,t[2].length-1)*u.stdev(t[2],!0)/c.sqrt(t[2].length)),n[0]=t[0]-e,n[1]=t[0]+e,n},significant:function(e,t){return e<t}}),u.extend(u.fn,{normalci:function(e,t){return u.normalci(e,t,this.toArray())},tci:function(e,t){return u.tci(e,t,this.toArray())}}),u.extend(u.fn,{oneSidedDifferenceOfProportions:function(e,t,n,r){var o=i(e,t,n,r);return u.ztest(o,1)},twoSidedDifferenceOfProportions:function(e,t,n,r){var o=i(e,t,n,r);return u.ztest(o,2)}})}(d,Math),d.models=function(){function l(e,t){var n=e.length,r=t[0].length-1,o=n-r-1,i=d.lstsq(t,e),a=d.multiply(t,i.map(function(e){return[e]})).map(function(e){return e[0]}),s=d.subtract(e,a),l=d.mean(e),u=d.sum(a.map(function(e){return Math.pow(e-l,2)})),c=d.sum(e.map(function(e,t){return Math.pow(e-a[t],2)})),h=u+c;return{exog:t,endog:e,nobs:n,df_model:r,df_resid:o,coef:i,predict:a,resid:s,ybar:l,SST:h,SSE:u,SSR:c,R2:u/h}}function a(n){var e=function(n){var r=n[0].length;return d.arange(r).map(function(t){var e=d.arange(r).filter(function(e){return e!==t});return l(d.col(n,t).map(function(e){return e[0]}),d.col(n,e))})}(n.exog),r=Math.sqrt(n.SSR/n.df_resid),o=e.map(function(e){var t=e.SST,n=e.R2;return r/Math.sqrt(t*(1-n))}),t=n.coef.map(function(e,t){return(e-0)/o[t]}),i=t.map(function(e){var t=d.studentt.cdf(e,n.df_resid);return 2*(.5<t?1-t:t)}),a=d.studentt.inv(.975,n.df_resid),s=n.coef.map(function(e,t){var n=a*o[t];return[e-n,e+n]});return{se:o,t:t,p:i,sigmaHat:r,interval95:s}}return{ols:function(e,t){var n=l(e,t),r=a(n),o=function(e){var t,n,r,o=e.R2/e.df_model/((1-e.R2)/e.df_resid);return{F_statistic:o,pvalue:1-(t=o,n=e.df_model,r=e.df_resid,d.beta.cdf(t/(r/n+t),n/2,r/2))}}(n),i=1-(1-n.R2)*((n.nobs-1)/n.df_resid);return n.t=r,n.f=o,n.adjust_R2=i,n}}}(),d)},function(e,t,n){var r=n(1),l=n(0);t.UNIQUE=function(){for(var e=[],t=0;t<arguments.length;++t){for(var n=!1,r=arguments[t],o=0;o<e.length&&!(n=e[o]===r);++o);n||e.push(r)}return e},t.FLATTEN=r.flatten,t.ARGS2ARRAY=function(){return Array.prototype.slice.call(arguments,0)},t.REFERENCE=function(e,t){if(!arguments.length)return l.error;try{for(var n=t.split("."),r=e,o=0;o<n.length;++o){var i=n[o];if("]"===i[i.length-1]){var a=i.indexOf("["),s=i.substring(a+1,i.length-1);r=r[i.substring(0,a)][s]}else r=r[i]}return r}catch(e){}},t.JOIN=function(e,t){return e.join(t)},t.NUMBERS=function(){return r.flatten(arguments).filter(function(e){return"number"==typeof e})}},function(e,c,t){var C=t(0),n=t(10),i=t(6),E=t(1),r=t(26);function o(e){return/^[01]{1,10}$/.test(e)}c.BESSELI=function(e,t){return e=E.parseNumber(e),t=E.parseNumber(t),E.anyIsError(e,t)?C.value:r.besseli(e,t)},c.BESSELJ=function(e,t){return e=E.parseNumber(e),t=E.parseNumber(t),E.anyIsError(e,t)?C.value:r.besselj(e,t)},c.BESSELK=function(e,t){return e=E.parseNumber(e),t=E.parseNumber(t),E.anyIsError(e,t)?C.value:r.besselk(e,t)},c.BESSELY=function(e,t){return e=E.parseNumber(e),t=E.parseNumber(t),E.anyIsError(e,t)?C.value:r.bessely(e,t)},c.BIN2DEC=function(e){if(!o(e))return C.num;var t=parseInt(e,2),n=e.toString();return 10===n.length&&"1"===n.substring(0,1)?parseInt(n.substring(1),2)-512:t},c.BIN2HEX=function(e,t){if(!o(e))return C.num;var n=e.toString();if(10===n.length&&"1"===n.substring(0,1))return(0xfffffffe00+parseInt(n.substring(1),2)).toString(16);var r=parseInt(e,2).toString(16);return void 0===t?r:isNaN(t)?C.value:t<0?C.num:(t=Math.floor(t))>=r.length?i.REPT("0",t-r.length)+r:C.num},c.BIN2OCT=function(e,t){if(!o(e))return C.num;var n=e.toString();if(10===n.length&&"1"===n.substring(0,1))return(1073741312+parseInt(n.substring(1),2)).toString(8);var r=parseInt(e,2).toString(8);return void 0===t?r:isNaN(t)?C.value:t<0?C.num:(t=Math.floor(t))>=r.length?i.REPT("0",t-r.length)+r:C.num},c.BITAND=function(e,t){return e=E.parseNumber(e),t=E.parseNumber(t),E.anyIsError(e,t)?C.value:e<0||t<0?C.num:Math.floor(e)!==e||Math.floor(t)!==t?C.num:0xffffffffffff<e||0xffffffffffff<t?C.num:e&t},c.BITLSHIFT=function(e,t){return e=E.parseNumber(e),t=E.parseNumber(t),E.anyIsError(e,t)?C.value:e<0?C.num:Math.floor(e)!==e?C.num:0xffffffffffff<e?C.num:53<Math.abs(t)?C.num:0<=t?e<<t:e>>-t},c.BITOR=function(e,t){return e=E.parseNumber(e),t=E.parseNumber(t),E.anyIsError(e,t)?C.value:e<0||t<0?C.num:Math.floor(e)!==e||Math.floor(t)!==t?C.num:0xffffffffffff<e||0xffffffffffff<t?C.num:e|t},c.BITRSHIFT=function(e,t){return e=E.parseNumber(e),t=E.parseNumber(t),E.anyIsError(e,t)?C.value:e<0?C.num:Math.floor(e)!==e?C.num:0xffffffffffff<e?C.num:53<Math.abs(t)?C.num:0<=t?e>>t:e<<-t},c.BITXOR=function(e,t){return e=E.parseNumber(e),t=E.parseNumber(t),E.anyIsError(e,t)?C.value:e<0||t<0?C.num:Math.floor(e)!==e||Math.floor(t)!==t?C.num:0xffffffffffff<e||0xffffffffffff<t?C.num:e^t},c.COMPLEX=function(e,t,n){if(e=E.parseNumber(e),t=E.parseNumber(t),E.anyIsError(e,t))return e;if("i"!==(n=void 0===n?"i":n)&&"j"!==n)return C.value;if(0===e&&0===t)return 0;if(0===e)return 1===t?n:t.toString()+n;if(0===t)return e.toString();var r=0<t?"+":"";return e.toString()+r+(1===t?n:t.toString()+n)},c.CONVERT=function(e,t,n){if((e=E.parseNumber(e))instanceof Error)return e;for(var r,o=[["a.u. of action","?",null,"action",!1,!1,105457168181818e-48],["a.u. of charge","e",null,"electric_charge",!1,!1,160217653141414e-33],["a.u. of energy","Eh",null,"energy",!1,!1,435974417757576e-32],["a.u. of length","a?",null,"length",!1,!1,529177210818182e-25],["a.u. of mass","m?",null,"mass",!1,!1,910938261616162e-45],["a.u. of time","?/Eh",null,"time",!1,!1,241888432650516e-31],["admiralty knot","admkn",null,"speed",!1,!0,.514773333],["ampere","A",null,"electric_current",!0,!1,1],["ampere per meter","A/m",null,"magnetic_field_intensity",!0,!1,1],["ångström","Å",["ang"],"length",!1,!0,1e-10],["are","ar",null,"area",!1,!0,100],["astronomical unit","ua",null,"length",!1,!1,149597870691667e-25],["bar","bar",null,"pressure",!1,!1,1e5],["barn","b",null,"area",!1,!1,1e-28],["becquerel","Bq",null,"radioactivity",!0,!1,1],["bit","bit",["b"],"information",!1,!0,1],["btu","BTU",["btu"],"energy",!1,!0,1055.05585262],["byte","byte",null,"information",!1,!0,8],["candela","cd",null,"luminous_intensity",!0,!1,1],["candela per square metre","cd/m?",null,"luminance",!0,!1,1],["coulomb","C",null,"electric_charge",!0,!1,1],["cubic ångström","ang3",["ang^3"],"volume",!1,!0,1e-30],["cubic foot","ft3",["ft^3"],"volume",!1,!0,.028316846592],["cubic inch","in3",["in^3"],"volume",!1,!0,16387064e-12],["cubic light-year","ly3",["ly^3"],"volume",!1,!0,846786664623715e-61],["cubic metre","m?",null,"volume",!0,!0,1],["cubic mile","mi3",["mi^3"],"volume",!1,!0,4168181825.44058],["cubic nautical mile","Nmi3",["Nmi^3"],"volume",!1,!0,6352182208],["cubic Pica","Pica3",["Picapt3","Pica^3","Picapt^3"],"volume",!1,!0,7.58660370370369e-8],["cubic yard","yd3",["yd^3"],"volume",!1,!0,.764554857984],["cup","cup",null,"volume",!1,!0,.0002365882365],["dalton","Da",["u"],"mass",!1,!1,166053886282828e-41],["day","d",["day"],"time",!1,!0,86400],["degree","°",null,"angle",!1,!1,.0174532925199433],["degrees Rankine","Rank",null,"temperature",!1,!0,.555555555555556],["dyne","dyn",["dy"],"force",!1,!0,1e-5],["electronvolt","eV",["ev"],"energy",!1,!0,1.60217656514141],["ell","ell",null,"length",!1,!0,1.143],["erg","erg",["e"],"energy",!1,!0,1e-7],["farad","F",null,"electric_capacitance",!0,!1,1],["fluid ounce","oz",null,"volume",!1,!0,295735295625e-16],["foot","ft",null,"length",!1,!0,.3048],["foot-pound","flb",null,"energy",!1,!0,1.3558179483314],["gal","Gal",null,"acceleration",!1,!1,.01],["gallon","gal",null,"volume",!1,!0,.003785411784],["gauss","G",["ga"],"magnetic_flux_density",!1,!0,1],["grain","grain",null,"mass",!1,!0,647989e-10],["gram","g",null,"mass",!1,!0,.001],["gray","Gy",null,"absorbed_dose",!0,!1,1],["gross registered ton","GRT",["regton"],"volume",!1,!0,2.8316846592],["hectare","ha",null,"area",!1,!0,1e4],["henry","H",null,"inductance",!0,!1,1],["hertz","Hz",null,"frequency",!0,!1,1],["horsepower","HP",["h"],"power",!1,!0,745.69987158227],["horsepower-hour","HPh",["hh","hph"],"energy",!1,!0,2684519.538],["hour","h",["hr"],"time",!1,!0,3600],["imperial gallon (U.K.)","uk_gal",null,"volume",!1,!0,.00454609],["imperial hundredweight","lcwt",["uk_cwt","hweight"],"mass",!1,!0,50.802345],["imperial quart (U.K)","uk_qt",null,"volume",!1,!0,.0011365225],["imperial ton","brton",["uk_ton","LTON"],"mass",!1,!0,1016.046909],["inch","in",null,"length",!1,!0,.0254],["international acre","uk_acre",null,"area",!1,!0,4046.8564224],["IT calorie","cal",null,"energy",!1,!0,4.1868],["joule","J",null,"energy",!0,!0,1],["katal","kat",null,"catalytic_activity",!0,!1,1],["kelvin","K",["kel"],"temperature",!0,!0,1],["kilogram","kg",null,"mass",!0,!0,1],["knot","kn",null,"speed",!1,!0,.514444444444444],["light-year","ly",null,"length",!1,!0,9460730472580800],["litre","L",["l","lt"],"volume",!1,!0,.001],["lumen","lm",null,"luminous_flux",!0,!1,1],["lux","lx",null,"illuminance",!0,!1,1],["maxwell","Mx",null,"magnetic_flux",!1,!1,1e-18],["measurement ton","MTON",null,"volume",!1,!0,1.13267386368],["meter per hour","m/h",["m/hr"],"speed",!1,!0,.00027777777777778],["meter per second","m/s",["m/sec"],"speed",!0,!0,1],["meter per second squared","m?s??",null,"acceleration",!0,!1,1],["parsec","pc",["parsec"],"length",!1,!0,0x6da012f958ee1c],["meter squared per second","m?/s",null,"kinematic_viscosity",!0,!1,1],["metre","m",null,"length",!0,!0,1],["miles per hour","mph",null,"speed",!1,!0,.44704],["millimetre of mercury","mmHg",null,"pressure",!1,!1,133.322],["minute","?",null,"angle",!1,!1,.000290888208665722],["minute","min",["mn"],"time",!1,!0,60],["modern teaspoon","tspm",null,"volume",!1,!0,5e-6],["mole","mol",null,"amount_of_substance",!0,!1,1],["morgen","Morgen",null,"area",!1,!0,2500],["n.u. of action","?",null,"action",!1,!1,105457168181818e-48],["n.u. of mass","m?",null,"mass",!1,!1,910938261616162e-45],["n.u. of speed","c?",null,"speed",!1,!1,299792458],["n.u. of time","?/(me?c??)",null,"time",!1,!1,128808866778687e-35],["nautical mile","M",["Nmi"],"length",!1,!0,1852],["newton","N",null,"force",!0,!0,1],["œrsted","Oe ",null,"magnetic_field_intensity",!1,!1,79.5774715459477],["ohm","Ω",null,"electric_resistance",!0,!1,1],["ounce mass","ozm",null,"mass",!1,!0,.028349523125],["pascal","Pa",null,"pressure",!0,!1,1],["pascal second","Pa?s",null,"dynamic_viscosity",!0,!1,1],["pferdestärke","PS",null,"power",!1,!0,735.49875],["phot","ph",null,"illuminance",!1,!1,1e-4],["pica (1/6 inch)","pica",null,"length",!1,!0,.00035277777777778],["pica (1/72 inch)","Pica",["Picapt"],"length",!1,!0,.00423333333333333],["poise","P",null,"dynamic_viscosity",!1,!1,.1],["pond","pond",null,"force",!1,!0,.00980665],["pound force","lbf",null,"force",!1,!0,4.4482216152605],["pound mass","lbm",null,"mass",!1,!0,.45359237],["quart","qt",null,"volume",!1,!0,.000946352946],["radian","rad",null,"angle",!0,!1,1],["second","?",null,"angle",!1,!1,484813681109536e-20],["second","s",["sec"],"time",!0,!0,1],["short hundredweight","cwt",["shweight"],"mass",!1,!0,45.359237],["siemens","S",null,"electrical_conductance",!0,!1,1],["sievert","Sv",null,"equivalent_dose",!0,!1,1],["slug","sg",null,"mass",!1,!0,14.59390294],["square ångström","ang2",["ang^2"],"area",!1,!0,1e-20],["square foot","ft2",["ft^2"],"area",!1,!0,.09290304],["square inch","in2",["in^2"],"area",!1,!0,64516e-8],["square light-year","ly2",["ly^2"],"area",!1,!0,895054210748189e17],["square meter","m?",null,"area",!0,!0,1],["square mile","mi2",["mi^2"],"area",!1,!0,2589988.110336],["square nautical mile","Nmi2",["Nmi^2"],"area",!1,!0,3429904],["square Pica","Pica2",["Picapt2","Pica^2","Picapt^2"],"area",!1,!0,1792111111111e-17],["square yard","yd2",["yd^2"],"area",!1,!0,.83612736],["statute mile","mi",null,"length",!1,!0,1609.344],["steradian","sr",null,"solid_angle",!0,!1,1],["stilb","sb",null,"luminance",!1,!1,1e-4],["stokes","St",null,"kinematic_viscosity",!1,!1,1e-4],["stone","stone",null,"mass",!1,!0,6.35029318],["tablespoon","tbs",null,"volume",!1,!0,147868e-10],["teaspoon","tsp",null,"volume",!1,!0,492892e-11],["tesla","T",null,"magnetic_flux_density",!0,!0,1],["thermodynamic calorie","c",null,"energy",!1,!0,4.184],["ton","ton",null,"mass",!1,!0,907.18474],["tonne","t",null,"mass",!1,!1,1e3],["U.K. pint","uk_pt",null,"volume",!1,!0,.00056826125],["U.S. bushel","bushel",null,"volume",!1,!0,.03523907],["U.S. oil barrel","barrel",null,"volume",!1,!0,.158987295],["U.S. pint","pt",["us_pt"],"volume",!1,!0,.000473176473],["U.S. survey mile","survey_mi",null,"length",!1,!0,1609.347219],["U.S. survey/statute acre","us_acre",null,"area",!1,!0,4046.87261],["volt","V",null,"voltage",!0,!1,1],["watt","W",null,"power",!0,!0,1],["watt-hour","Wh",["wh"],"energy",!1,!0,3600],["weber","Wb",null,"magnetic_flux",!0,!1,1],["yard","yd",null,"length",!1,!0,.9144],["year","yr",null,"time",!1,!0,31557600]],i={Yi:["yobi",80,12089258196146292e8,"Yi","yotta"],Zi:["zebi",70,11805916207174113e5,"Zi","zetta"],Ei:["exbi",60,0x1000000000000000,"Ei","exa"],Pi:["pebi",50,0x4000000000000,"Pi","peta"],Ti:["tebi",40,1099511627776,"Ti","tera"],Gi:["gibi",30,1073741824,"Gi","giga"],Mi:["mebi",20,1048576,"Mi","mega"],ki:["kibi",10,1024,"ki","kilo"]},a={Y:["yotta",1e24,"Y"],Z:["zetta",1e21,"Z"],E:["exa",1e18,"E"],P:["peta",1e15,"P"],T:["tera",1e12,"T"],G:["giga",1e9,"G"],M:["mega",1e6,"M"],k:["kilo",1e3,"k"],h:["hecto",100,"h"],e:["dekao",10,"e"],d:["deci",.1,"d"],c:["centi",.01,"c"],m:["milli",.001,"m"],u:["micro",1e-6,"u"],n:["nano",1e-9,"n"],p:["pico",1e-12,"p"],f:["femto",1e-15,"f"],a:["atto",1e-18,"a"],z:["zepto",1e-21,"z"],y:["yocto",1e-24,"y"]},s=null,l=null,u=t,c=n,h=1,d=1,f=0;f<o.length;f++)r=null===o[f][2]?[]:o[f][2],(o[f][1]===u||0<=r.indexOf(u))&&(s=o[f]),(o[f][1]===c||0<=r.indexOf(c))&&(l=o[f]);if(null===s){var v=i[t.substring(0,2)],g=a[t.substring(0,1)];"da"===t.substring(0,2)&&(g=["dekao",10,"da"]),v?(h=v[2],u=t.substring(2)):g&&(h=g[1],u=t.substring(g[2].length));for(var p=0;p<o.length;p++)r=null===o[p][2]?[]:o[p][2],(o[p][1]===u||0<=r.indexOf(u))&&(s=o[p])}if(null===l){var m=i[n.substring(0,2)],y=a[n.substring(0,1)];"da"===n.substring(0,2)&&(y=["dekao",10,"da"]),m?(d=m[2],c=n.substring(2)):y&&(d=y[1],c=n.substring(y[2].length));for(var w=0;w<o.length;w++)r=null===o[w][2]?[]:o[w][2],(o[w][1]===c||0<=r.indexOf(c))&&(l=o[w])}return null===s||null===l?C.na:s[3]!==l[3]?C.na:e*s[6]*h/(l[6]*d)},c.DEC2BIN=function(e,t){if((e=E.parseNumber(e))instanceof Error)return e;if(!/^-?[0-9]{1,3}$/.test(e)||e<-512||511<e)return C.num;if(e<0)return"1"+i.REPT("0",9-(512+e).toString(2).length)+(512+e).toString(2);var n=parseInt(e,10).toString(2);return void 0===t?n:isNaN(t)?C.value:t<0?C.num:(t=Math.floor(t))>=n.length?i.REPT("0",t-n.length)+n:C.num},c.DEC2HEX=function(e,t){if((e=E.parseNumber(e))instanceof Error)return e;if(!/^-?[0-9]{1,12}$/.test(e)||e<-549755813888||549755813887<e)return C.num;if(e<0)return(1099511627776+e).toString(16);var n=parseInt(e,10).toString(16);return void 0===t?n:isNaN(t)?C.value:t<0?C.num:(t=Math.floor(t))>=n.length?i.REPT("0",t-n.length)+n:C.num},c.DEC2OCT=function(e,t){if((e=E.parseNumber(e))instanceof Error)return e;if(!/^-?[0-9]{1,9}$/.test(e)||e<-536870912||536870911<e)return C.num;if(e<0)return(1073741824+e).toString(8);var n=parseInt(e,10).toString(8);return void 0===t?n:isNaN(t)?C.value:t<0?C.num:(t=Math.floor(t))>=n.length?i.REPT("0",t-n.length)+n:C.num},c.DELTA=function(e,t){return t=void 0===t?0:t,e=E.parseNumber(e),t=E.parseNumber(t),E.anyIsError(e,t)?C.value:e===t?1:0},c.ERF=function(e,t){return t=void 0===t?0:t,e=E.parseNumber(e),t=E.parseNumber(t),E.anyIsError(e,t)?C.value:n.erf(e)},c.ERF.PRECISE=function(){throw new Error("ERF.PRECISE is not implemented")},c.ERFC=function(e){return isNaN(e)?C.value:n.erfc(e)},c.ERFC.PRECISE=function(){throw new Error("ERFC.PRECISE is not implemented")},c.GESTEP=function(e,t){return t=t||0,e=E.parseNumber(e),E.anyIsError(t,e)?e:t<=e?1:0},c.HEX2BIN=function(e,t){if(!/^[0-9A-Fa-f]{1,10}$/.test(e))return C.num;var n=10===e.length&&"f"===e.substring(0,1).toLowerCase(),r=n?parseInt(e,16)-1099511627776:parseInt(e,16);if(r<-512||511<r)return C.num;if(n)return"1"+i.REPT("0",9-(512+r).toString(2).length)+(512+r).toString(2);var o=r.toString(2);return void 0===t?o:isNaN(t)?C.value:t<0?C.num:(t=Math.floor(t))>=o.length?i.REPT("0",t-o.length)+o:C.num},c.HEX2DEC=function(e){if(!/^[0-9A-Fa-f]{1,10}$/.test(e))return C.num;var t=parseInt(e,16);return 549755813888<=t?t-1099511627776:t},c.HEX2OCT=function(e,t){if(!/^[0-9A-Fa-f]{1,10}$/.test(e))return C.num;var n=parseInt(e,16);if(536870911<n&&n<0xffe0000000)return C.num;if(0xffe0000000<=n)return(n-0xffc0000000).toString(8);var r=n.toString(8);return void 0===t?r:isNaN(t)?C.value:t<0?C.num:(t=Math.floor(t))>=r.length?i.REPT("0",t-r.length)+r:C.num},c.IMABS=function(e){var t=c.IMREAL(e),n=c.IMAGINARY(e);return E.anyIsError(t,n)?C.value:Math.sqrt(Math.pow(t,2)+Math.pow(n,2))},c.IMAGINARY=function(e){if(void 0===e||!0===e||!1===e)return C.value;if(0===e||"0"===e)return 0;if(0<=["i","j"].indexOf(e))return 1;var t=(e=e.replace("+i","+1i").replace("-i","-1i").replace("+j","+1j").replace("-j","-1j")).indexOf("+"),n=e.indexOf("-");0===t&&(t=e.indexOf("+",1)),0===n&&(n=e.indexOf("-",1));var r=e.substring(e.length-1,e.length),o="i"===r||"j"===r;return 0<=t||0<=n?o?0<=t?isNaN(e.substring(0,t))||isNaN(e.substring(t+1,e.length-1))?C.num:Number(e.substring(t+1,e.length-1)):isNaN(e.substring(0,n))||isNaN(e.substring(n+1,e.length-1))?C.num:-Number(e.substring(n+1,e.length-1)):C.num:o?isNaN(e.substring(0,e.length-1))?C.num:e.substring(0,e.length-1):isNaN(e)?C.num:0},c.IMARGUMENT=function(e){var t=c.IMREAL(e),n=c.IMAGINARY(e);return E.anyIsError(t,n)?C.value:0===t&&0===n?C.div0:0===t&&0<n?Math.PI/2:0===t&&n<0?-Math.PI/2:0===n&&0<t?0:0===n&&t<0?-Math.PI:0<t?Math.atan(n/t):t<0&&0<=n?Math.atan(n/t)+Math.PI:Math.atan(n/t)-Math.PI},c.IMCONJUGATE=function(e){var t=c.IMREAL(e),n=c.IMAGINARY(e);if(E.anyIsError(t,n))return C.value;var r=e.substring(e.length-1);return r="i"===r||"j"===r?r:"i",0!==n?c.COMPLEX(t,-n,r):e},c.IMCOS=function(e){var t=c.IMREAL(e),n=c.IMAGINARY(e);if(E.anyIsError(t,n))return C.value;var r=e.substring(e.length-1);return r="i"===r||"j"===r?r:"i",c.COMPLEX(Math.cos(t)*(Math.exp(n)+Math.exp(-n))/2,-Math.sin(t)*(Math.exp(n)-Math.exp(-n))/2,r)},c.IMCOSH=function(e){var t=c.IMREAL(e),n=c.IMAGINARY(e);if(E.anyIsError(t,n))return C.value;var r=e.substring(e.length-1);return r="i"===r||"j"===r?r:"i",c.COMPLEX(Math.cos(n)*(Math.exp(t)+Math.exp(-t))/2,Math.sin(n)*(Math.exp(t)-Math.exp(-t))/2,r)},c.IMCOT=function(e){var t=c.IMREAL(e),n=c.IMAGINARY(e);return E.anyIsError(t,n)?C.value:c.IMDIV(c.IMCOS(e),c.IMSIN(e))},c.IMDIV=function(e,t){var n=c.IMREAL(e),r=c.IMAGINARY(e),o=c.IMREAL(t),i=c.IMAGINARY(t);if(E.anyIsError(n,r,o,i))return C.value;var a=e.substring(e.length-1),s=t.substring(t.length-1),l="i";if("j"===a?l="j":"j"===s&&(l="j"),0===o&&0===i)return C.num;var u=o*o+i*i;return c.COMPLEX((n*o+r*i)/u,(r*o-n*i)/u,l)},c.IMEXP=function(e){var t=c.IMREAL(e),n=c.IMAGINARY(e);if(E.anyIsError(t,n))return C.value;var r=e.substring(e.length-1);r="i"===r||"j"===r?r:"i";var o=Math.exp(t);return c.COMPLEX(o*Math.cos(n),o*Math.sin(n),r)},c.IMLN=function(e){var t=c.IMREAL(e),n=c.IMAGINARY(e);if(E.anyIsError(t,n))return C.value;var r=e.substring(e.length-1);return r="i"===r||"j"===r?r:"i",c.COMPLEX(Math.log(Math.sqrt(t*t+n*n)),Math.atan(n/t),r)},c.IMLOG10=function(e){var t=c.IMREAL(e),n=c.IMAGINARY(e);if(E.anyIsError(t,n))return C.value;var r=e.substring(e.length-1);return r="i"===r||"j"===r?r:"i",c.COMPLEX(Math.log(Math.sqrt(t*t+n*n))/Math.log(10),Math.atan(n/t)/Math.log(10),r)},c.IMLOG2=function(e){var t=c.IMREAL(e),n=c.IMAGINARY(e);if(E.anyIsError(t,n))return C.value;var r=e.substring(e.length-1);return r="i"===r||"j"===r?r:"i",c.COMPLEX(Math.log(Math.sqrt(t*t+n*n))/Math.log(2),Math.atan(n/t)/Math.log(2),r)},c.IMPOWER=function(e,t){t=E.parseNumber(t);var n=c.IMREAL(e),r=c.IMAGINARY(e);if(E.anyIsError(t,n,r))return C.value;var o=e.substring(e.length-1);o="i"===o||"j"===o?o:"i";var i=Math.pow(c.IMABS(e),t),a=c.IMARGUMENT(e);return c.COMPLEX(i*Math.cos(t*a),i*Math.sin(t*a),o)},c.IMPRODUCT=function(){var e=arguments[0];if(!arguments.length)return C.value;for(var t=1;t<arguments.length;t++){var n=c.IMREAL(e),r=c.IMAGINARY(e),o=c.IMREAL(arguments[t]),i=c.IMAGINARY(arguments[t]);if(E.anyIsError(n,r,o,i))return C.value;e=c.COMPLEX(n*o-r*i,n*i+r*o)}return e},c.IMREAL=function(e){if(void 0===e||!0===e||!1===e)return C.value;if(0===e||"0"===e)return 0;if(0<=["i","+i","1i","+1i","-i","-1i","j","+j","1j","+1j","-j","-1j"].indexOf(e))return 0;var t=e.indexOf("+"),n=e.indexOf("-");0===t&&(t=e.indexOf("+",1)),0===n&&(n=e.indexOf("-",1));var r=e.substring(e.length-1,e.length),o="i"===r||"j"===r;return 0<=t||0<=n?o?0<=t?isNaN(e.substring(0,t))||isNaN(e.substring(t+1,e.length-1))?C.num:Number(e.substring(0,t)):isNaN(e.substring(0,n))||isNaN(e.substring(n+1,e.length-1))?C.num:Number(e.substring(0,n)):C.num:o?isNaN(e.substring(0,e.length-1))?C.num:0:isNaN(e)?C.num:e},c.IMSEC=function(e){if(!0===e||!1===e)return C.value;var t=c.IMREAL(e),n=c.IMAGINARY(e);return E.anyIsError(t,n)?C.value:c.IMDIV("1",c.IMCOS(e))},c.IMSECH=function(e){var t=c.IMREAL(e),n=c.IMAGINARY(e);return E.anyIsError(t,n)?C.value:c.IMDIV("1",c.IMCOSH(e))},c.IMSIN=function(e){var t=c.IMREAL(e),n=c.IMAGINARY(e);if(E.anyIsError(t,n))return C.value;var r=e.substring(e.length-1);return r="i"===r||"j"===r?r:"i",c.COMPLEX(Math.sin(t)*(Math.exp(n)+Math.exp(-n))/2,Math.cos(t)*(Math.exp(n)-Math.exp(-n))/2,r)},c.IMSINH=function(e){var t=c.IMREAL(e),n=c.IMAGINARY(e);if(E.anyIsError(t,n))return C.value;var r=e.substring(e.length-1);return r="i"===r||"j"===r?r:"i",c.COMPLEX(Math.cos(n)*(Math.exp(t)-Math.exp(-t))/2,Math.sin(n)*(Math.exp(t)+Math.exp(-t))/2,r)},c.IMSQRT=function(e){var t=c.IMREAL(e),n=c.IMAGINARY(e);if(E.anyIsError(t,n))return C.value;var r=e.substring(e.length-1);r="i"===r||"j"===r?r:"i";var o=Math.sqrt(c.IMABS(e)),i=c.IMARGUMENT(e);return c.COMPLEX(o*Math.cos(i/2),o*Math.sin(i/2),r)},c.IMCSC=function(e){if(!0===e||!1===e)return C.value;var t=c.IMREAL(e),n=c.IMAGINARY(e);return E.anyIsError(t,n)?C.num:c.IMDIV("1",c.IMSIN(e))},c.IMCSCH=function(e){if(!0===e||!1===e)return C.value;var t=c.IMREAL(e),n=c.IMAGINARY(e);return E.anyIsError(t,n)?C.num:c.IMDIV("1",c.IMSINH(e))},c.IMSUB=function(e,t){var n=this.IMREAL(e),r=this.IMAGINARY(e),o=this.IMREAL(t),i=this.IMAGINARY(t);if(E.anyIsError(n,r,o,i))return C.value;var a=e.substring(e.length-1),s=t.substring(t.length-1),l="i";return"j"===a?l="j":"j"===s&&(l="j"),this.COMPLEX(n-o,r-i,l)},c.IMSUM=function(){if(!arguments.length)return C.value;for(var e=E.flatten(arguments),t=e[0],n=1;n<e.length;n++){var r=this.IMREAL(t),o=this.IMAGINARY(t),i=this.IMREAL(e[n]),a=this.IMAGINARY(e[n]);if(E.anyIsError(r,o,i,a))return C.value;t=this.COMPLEX(r+i,o+a)}return t},c.IMTAN=function(e){if(!0===e||!1===e)return C.value;var t=c.IMREAL(e),n=c.IMAGINARY(e);return E.anyIsError(t,n)?C.value:this.IMDIV(this.IMSIN(e),this.IMCOS(e))},c.OCT2BIN=function(e,t){if(!/^[0-7]{1,10}$/.test(e))return C.num;var n=10===e.length&&"7"===e.substring(0,1),r=n?parseInt(e,8)-1073741824:parseInt(e,8);if(r<-512||511<r)return C.num;if(n)return"1"+i.REPT("0",9-(512+r).toString(2).length)+(512+r).toString(2);var o=r.toString(2);return void 0===t?o:isNaN(t)?C.value:t<0?C.num:(t=Math.floor(t))>=o.length?i.REPT("0",t-o.length)+o:C.num},c.OCT2DEC=function(e){if(!/^[0-7]{1,10}$/.test(e))return C.num;var t=parseInt(e,8);return 536870912<=t?t-1073741824:t},c.OCT2HEX=function(e,t){if(!/^[0-7]{1,10}$/.test(e))return C.num;var n=parseInt(e,8);if(536870912<=n)return"ff"+(n+3221225472).toString(16);var r=n.toString(16);return void 0===t?r:isNaN(t)?C.value:t<0?C.num:(t=Math.floor(t))>=r.length?i.REPT("0",t-r.length)+r:C.num}},function(e,t,n){"use strict";t.__esModule=!0;t.default=["ABS","ACCRINT","ACOS","ACOSH","ACOT","ACOTH","ADD","AGGREGATE","AND","ARABIC","ARGS2ARRAY","ASIN","ASINH","ATAN","ATAN2","ATANH","AVEDEV","AVERAGE","AVERAGEA","AVERAGEIF","AVERAGEIFS","BASE","BESSELI","BESSELJ","BESSELK","BESSELY","BETA.DIST","BETA.INV","BETADIST","BETAINV","BIN2DEC","BIN2HEX","BIN2OCT","BINOM.DIST","BINOM.DIST.RANGE","BINOM.INV","BINOMDIST","BITAND","BITLSHIFT","BITOR","BITRSHIFT","BITXOR","CEILING","CEILINGMATH","CEILINGPRECISE","CHAR","CHISQ.DIST","CHISQ.DIST.RT","CHISQ.INV","CHISQ.INV.RT","CHOOSE","CHOOSE","CLEAN","CODE","COLUMN","COLUMNS","COMBIN","COMBINA","COMPLEX","CONCATENATE","CONFIDENCE","CONFIDENCE.NORM","CONFIDENCE.T","CONVERT","CORREL","COS","COSH","COT","COTH","COUNT","COUNTA","COUNTBLANK","COUNTIF","COUNTIFS","COUNTIN","COUNTUNIQUE","COVARIANCE.P","COVARIANCE.S","CSC","CSCH","CUMIPMT","CUMPRINC","DATE","DATEVALUE","DAY","DAYS","DAYS360","DB","DDB","DEC2BIN","DEC2HEX","DEC2OCT","DECIMAL","DEGREES","DELTA","DEVSQ","DIVIDE","DOLLARDE","DOLLARFR","E","EDATE","EFFECT","EOMONTH","EQ","ERF","ERFC","EVEN","EXACT","EXP","EXPON.DIST","EXPONDIST","F.DIST","F.DIST.RT","F.INV","F.INV.RT","FACT","FACTDOUBLE","FALSE","FDIST","FDISTRT","FIND","FINV","FINVRT","FISHER","FISHERINV","FLATTEN","FLOOR","FORECAST","FREQUENCY","FV","FVSCHEDULE","GAMMA","GAMMA.DIST","GAMMA.INV","GAMMADIST","GAMMAINV","GAMMALN","GAMMALN.PRECISE","GAUSS","GCD","GEOMEAN","GESTEP","GROWTH","GTE","HARMEAN","HEX2BIN","HEX2DEC","HEX2OCT","HOUR","HTML2TEXT","HYPGEOM.DIST","HYPGEOMDIST","IF","IMABS","IMAGINARY","IMARGUMENT","IMCONJUGATE","IMCOS","IMCOSH","IMCOT","IMCSC","IMCSCH","IMDIV","IMEXP","IMLN","IMLOG10","IMLOG2","IMPOWER","IMPRODUCT","IMREAL","IMSEC","IMSECH","IMSIN","IMSINH","IMSQRT","IMSUB","IMSUM","IMTAN","INT","INTERCEPT","INTERVAL","IPMT","IRR","ISBINARY","ISBLANK","ISEVEN","ISLOGICAL","ISNONTEXT","ISNUMBER","ISODD","ISODD","ISOWEEKNUM","ISPMT","ISTEXT","JOIN","KURT","LARGE","LCM","LEFT","LEN","LINEST","LN","LOG","LOG10","LOGEST","LOGNORM.DIST","LOGNORM.INV","LOGNORMDIST","LOGNORMINV","LOWER","LT","LTE","MATCH","MAX","MAXA","MEDIAN","MID","MIN","MINA","MINUS","MINUTE","MIRR","MOD","MODE.MULT","MODE.SNGL","MODEMULT","MODESNGL","MONTH","MROUND","MULTINOMIAL","MULTIPLY","NE","NEGBINOM.DIST","NEGBINOMDIST","NETWORKDAYS","NOMINAL","NORM.DIST","NORM.INV","NORM.S.DIST","NORM.S.INV","NORMDIST","NORMINV","NORMSDIST","NORMSINV","NOT","NOW","NPER","NPV","NUMBERS","OCT2BIN","OCT2DEC","OCT2HEX","ODD","OR","PDURATION","PEARSON","PERCENTILEEXC","PERCENTILEINC","PERCENTRANKEXC","PERCENTRANKINC","PERMUT","PERMUTATIONA","PHI","PI","PMT","POISSON.DIST","POISSONDIST","POW","POWER","PPMT","PROB","PRODUCT","PROPER","PV","QUARTILE.EXC","QUARTILE.INC","QUARTILEEXC","QUARTILEINC","QUOTIENT","RADIANS","RAND","RANDBETWEEN","RANK.AVG","RANK.EQ","RANKAVG","RANKEQ","RATE","REFERENCE","REGEXEXTRACT","REGEXMATCH","REGEXREPLACE","REPLACE","REPT","RIGHT","ROMAN","ROUND","ROUNDDOWN","ROUNDUP","ROW","ROWS","RRI","RSQ","SEARCH","SEC","SECH","SECOND","SERIESSUM","SIGN","SIN","SINH","SKEW","SKEW.P","SKEWP","SLN","SLOPE","SMALL","SPLIT","SPLIT","SQRT","SQRTPI","STANDARDIZE","STDEV.P","STDEV.S","STDEVA","STDEVP","STDEVPA","STDEVS","STEYX","SUBSTITUTE","SUBTOTAL","SUM","SUMIF","SUMIFS","SUMPRODUCT","SUMSQ","SUMX2MY2","SUMX2PY2","SUMXMY2","SWITCH","SYD","T","T.DIST","T.DIST.2T","T.DIST.RT","T.INV","T.INV.2T","TAN","TANH","TBILLEQ","TBILLPRICE","TBILLYIELD","TDIST","TDIST2T","TDISTRT","TIME","TIMEVALUE","TINV","TINV2T","TODAY","TRANSPOSE","TREND","TRIM","TRIMMEAN","TRUE","TRUNC","UNICHAR","UNICODE","UNIQUE","UPPER","VAR.P","VAR.S","VARA","VARP","VARPA","VARS","WEEKDAY","WEEKNUM","WEIBULL.DIST","WEIBULLDIST","WORKDAY","XIRR","XNPV","XOR","YEAR","YEARFRAC"]},function(e,t,n){"use strict";function a(e){var t=parseInt(e,10);return t=isNaN(t)?-1:Math.max(t-1,-1)}function r(e){var t="";return 0<=e&&(t=""+(e+1)),t}t.__esModule=!0,t.rowLabelToIndex=a,t.rowIndexToLabel=r,t.columnLabelToIndex=s,t.columnIndexToLabel=l,t.extractLabel=function(e){if("string"!=typeof e||!u.test(e))return[];var t=e.toUpperCase().match(u),n=t[1],r=t[2],o=t[3],i=t[4];return[{index:a(i),label:i,isAbsolute:"$"===o},{index:s(r),label:r,isAbsolute:"$"===n}]},t.toLabel=function(e,t){var n=(e.isAbsolute?"$":"")+r(e.index);return(t.isAbsolute?"$":"")+l(t.index)+n};var o="ABCDEFGHIJKLMNOPQRSTUVWXYZ",i=o.length;function s(e){var t=0;if("string"==typeof e)for(var n=0,r=(e=e.toUpperCase()).length-1;n<e.length;n+=1,r-=1)t+=Math.pow(i,r)*(o.indexOf(e[n])+1);return--t}function l(e){for(var t="";0<=e;)t=String.fromCharCode(e%i+97)+t,e=Math.floor(e/i)-1;return t.toUpperCase()}var u=/^([$])?([A-Za-z]+)([$])?([0-9]+)$/},function(e,t,n){"use strict";t.__esModule=!0,t.rowLabelToIndex=t.rowIndexToLabel=t.columnLabelToIndex=t.columnIndexToLabel=t.toLabel=t.extractLabel=t.error=t.Parser=t.ERROR_VALUE=t.ERROR_REF=t.ERROR_NUM=t.ERROR_NULL=t.ERROR_NOT_AVAILABLE=t.ERROR_NAME=t.ERROR_DIV_ZERO=t.ERROR=t.SUPPORTED_FORMULAS=void 0;var r=l(n(16)),o=l(n(13)),i=n(2),a=l(i),s=n(14);function l(e){return e&&e.__esModule?e:{default:e}}t.SUPPORTED_FORMULAS=o.default,t.ERROR=i.ERROR,t.ERROR_DIV_ZERO=i.ERROR_DIV_ZERO,t.ERROR_NAME=i.ERROR_NAME,t.ERROR_NOT_AVAILABLE=i.ERROR_NOT_AVAILABLE,t.ERROR_NULL=i.ERROR_NULL,t.ERROR_NUM=i.ERROR_NUM,t.ERROR_REF=i.ERROR_REF,t.ERROR_VALUE=i.ERROR_VALUE,t.Parser=r.default,t.error=a.default,t.extractLabel=s.extractLabel,t.toLabel=s.toLabel,t.columnIndexToLabel=s.columnIndexToLabel,t.columnLabelToIndex=s.columnLabelToIndex,t.rowIndexToLabel=s.rowIndexToLabel,t.rowLabelToIndex=s.rowLabelToIndex},function(e,t,n){"use strict";t.__esModule=!0;var r=c(n(17)),i=c(n(18)),o=n(39),a=n(40),s=n(3),l=n(2),u=c(l),h=n(14);function c(e){return e&&e.__esModule?e:{default:e}}var d,f=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(v,d=r.default),v.prototype.parse=function(e){var t=null,n=null;try{t=""===e?"":this.parser.parse(e)}catch(e){var r=(0,u.default)(e.message);n=r||(0,u.default)(l.ERROR)}return t instanceof Error&&(n=(0,u.default)(t.message)||(0,u.default)(l.ERROR),t=null),{error:n,result:t}},v.prototype.setVariable=function(e,t){return this.variables[e]=t,this},v.prototype.getVariable=function(e){return this.variables[e]},v.prototype._callVariable=function(e){var t=this.getVariable(e);if(this.emit("callVariable",e,function(e){void 0!==e&&(t=e)}),void 0===t)throw Error(l.ERROR_NAME);return t},v.prototype.setFunction=function(e,t){return this.functions[e]=t,this},v.prototype.getFunction=function(e){return this.functions[e]},v.prototype._callFunction=function(e,t){var n=1<arguments.length&&void 0!==t?t:[],r=this.getFunction(e),o=void 0;return r&&(o=r(n)),this.emit("callFunction",e,n,function(e){void 0!==e&&(o=e)}),void 0===o?(0,i.default)(e,n):o},v.prototype._callCellValue=function(e){e=e.toUpperCase();var t=(0,h.extractLabel)(e),n=t[0],r=t[1],o=void 0;return this.emit("callCellValue",{label:e,row:n,column:r},function(e){o=e}),o},v.prototype._callRangeValue=function(e,t){e=e.toUpperCase(),t=t.toUpperCase();var n=(0,h.extractLabel)(e),r=n[0],o=n[1],i=(0,h.extractLabel)(t),a=i[0],s=i[1],l={},u={};r.index<=a.index?(l.row=r,u.row=a):(l.row=a,u.row=r),o.index<=s.index?(l.column=o,u.column=s):(l.column=s,u.column=o),l.label=(0,h.toLabel)(l.row,l.column),u.label=(0,h.toLabel)(u.row,u.column);var c=[];return this.emit("callRangeValue",l,u,function(){c=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]}),c},v.prototype._throwError=function(e){if((0,l.isValidStrict)(e))throw Error(e);throw Error(l.ERROR)},v);function v(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,d.call(this));return n.parser=new o.Parser,n.parser.yy={toNumber:s.toNumber,trimEdges:a.trimEdges,invertNumber:s.invertNumber,throwError:function(e){return n._throwError(e)},callVariable:function(e){return n._callVariable(e)},evaluateByOperator:i.default,callFunction:function(e,t){return n._callFunction(e,t)},cellValue:function(e){return n._callCellValue(e)},rangeValue:function(e,t){return n._callRangeValue(e,t)}},n.variables=Object.create(null),n.functions=Object.create(null),n.setVariable("TRUE",!0).setVariable("FALSE",!1).setVariable("NULL",null),n}t.default=f},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,a=r.length;i<a;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=n},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];if(e=e.toUpperCase(),y[e])return y[e].apply(y,t);throw Error(p.ERROR_NAME)},t.registerOperation=w;var r=m(n(19)),o=m(n(20)),i=m(n(21)),a=m(n(22)),s=m(n(23)),l=m(n(31)),u=m(n(32)),c=m(n(33)),h=m(n(34)),d=m(n(35)),f=m(n(36)),v=m(n(37)),g=m(n(38)),p=n(2);function m(e){return e&&e.__esModule?e:{default:e}}var y=Object.create(null);function w(e,t){Array.isArray(e)||(e=[e.toUpperCase()]),e.forEach(function(e){t.isFactory?y[e]=t(e):y[e]=t})}w(r.default.SYMBOL,r.default),w(o.default.SYMBOL,o.default),w(i.default.SYMBOL,i.default),w(a.default.SYMBOL,a.default),w(g.default.SYMBOL,g.default),w(s.default.SYMBOL,s.default),w(l.default.SYMBOL,l.default),w(u.default.SYMBOL,u.default),w(c.default.SYMBOL,c.default),w(h.default.SYMBOL,h.default),w(f.default.SYMBOL,f.default),w(v.default.SYMBOL,v.default),w(d.default.SYMBOL,d.default)},function(e,t,n){"use strict";t.__esModule=!0,t.SYMBOL=void 0,t.default=o;var i=n(3),a=n(2),r=t.SYMBOL="+";function o(e){for(var t=arguments.length,n=Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=n.reduce(function(e,t){return e+(0,i.toNumber)(t)},(0,i.toNumber)(e));if(isNaN(o))throw Error(a.ERROR_VALUE);return o}o.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.default=o;var r=t.SYMBOL="&";function o(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(function(e,t){return e+t.toString()},"")}o.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.SYMBOL=void 0,t.default=o;var i=n(3),a=n(2),r=t.SYMBOL="/";function o(e){for(var t=arguments.length,n=Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=n.reduce(function(e,t){return e/(0,i.toNumber)(t)},(0,i.toNumber)(e));if(o===1/0)throw Error(a.ERROR_DIV_ZERO);if(isNaN(o))throw Error(a.ERROR_VALUE);return o}o.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.default=o;var r=t.SYMBOL="=";function o(e,t){return e===t}o.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.SYMBOL=void 0,t.default=u;var r,s=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}}(n(24)),o=n(13),i=(r=o)&&r.__esModule?r:{default:r},l=n(2);var a=t.SYMBOL=i.default;function u(a){return function(){var e=(a=a.toUpperCase()).split("."),t=!1,n=void 0;if(1===e.length)s[e[0]]&&(t=!0,n=s[e[0]].apply(s,arguments));else{for(var r=e.length,o=0,i=s;o<r;)if(i=i[e[o]],o++,!i){i=null;break}i&&(t=!0,n=i.apply(void 0,arguments))}if(!t)throw Error(l.ERROR_NAME);return n}}u.isFactory=!0,u.SYMBOL=a},function(e,t,n){var r=[n(25),n(27),n(12),n(28),n(4),n(6),n(9),n(29),n(8),n(30),n(5),n(11)];for(var o in r){var i=r[o];for(var a in i)t[a]=t[a]||i[a]}},function(e,t,n){var r=n(4),o=n(5),i=n(12),a=n(9);function s(e,t){if(t)for(var n in t)e[n]=t[n];return e}t.BETADIST=o.BETA.DIST,t.BETAINV=o.BETA.INV,t.BINOMDIST=o.BINOM.DIST,t.CEILING=t.ISOCEILING=s(r.CEILING.MATH,r.CEILING),t.CEILINGMATH=r.CEILING.MATH,t.CEILINGPRECISE=r.CEILING.PRECISE,t.CHIDIST=o.CHISQ.DIST,t.CHIDISTRT=o.CHISQ.DIST.RT,t.CHIINV=o.CHISQ.INV,t.CHIINVRT=o.CHISQ.INV.RT,t.CHITEST=o.CHISQ.TEST,t.CONFIDENCE=s(o.CONFIDENCE.NORM,o.CONFIDENCE),t.COVAR=o.COVARIANCE.P,t.COVARIANCEP=o.COVARIANCE.P,t.COVARIANCES=o.COVARIANCE.S,t.CRITBINOM=o.BINOM.INV,t.EXPONDIST=o.EXPON.DIST,t.ERFCPRECISE=i.ERFC.PRECISE,t.ERFPRECISE=i.ERF.PRECISE,t.FDIST=o.F.DIST,t.FDISTRT=o.F.DIST.RT,t.FINVRT=o.F.INV.RT,t.FINV=o.F.INV,t.FLOOR=s(r.FLOOR.MATH,r.FLOOR),t.FLOORMATH=r.FLOOR.MATH,t.FLOORPRECISE=r.FLOOR.PRECISE,t.FTEST=o.F.TEST,t.GAMMADIST=o.GAMMA.DIST,t.GAMMAINV=o.GAMMA.INV,t.GAMMALNPRECISE=o.GAMMALN.PRECISE,t.HYPGEOMDIST=o.HYPGEOM.DIST,t.LOGINV=o.LOGNORM.INV,t.LOGNORMINV=o.LOGNORM.INV,t.LOGNORMDIST=o.LOGNORM.DIST,t.MODE=s(o.MODE.SNGL,o.MODE),t.MODEMULT=o.MODE.MULT,t.MODESNGL=o.MODE.SNGL,t.NEGBINOMDIST=o.NEGBINOM.DIST,t.NETWORKDAYSINTL=a.NETWORKDAYS.INTL,t.NORMDIST=o.NORM.DIST,t.NORMINV=o.NORM.INV,t.NORMSDIST=o.NORM.S.DIST,t.NORMSINV=o.NORM.S.INV,t.PERCENTILE=s(o.PERCENTILE.EXC,o.PERCENTILE),t.PERCENTILEEXC=o.PERCENTILE.EXC,t.PERCENTILEINC=o.PERCENTILE.INC,t.PERCENTRANK=s(o.PERCENTRANK.INC,o.PERCENTRANK),t.PERCENTRANKEXC=o.PERCENTRANK.EXC,t.PERCENTRANKINC=o.PERCENTRANK.INC,t.POISSON=s(o.POISSON.DIST,o.POISSON),t.POISSONDIST=o.POISSON.DIST,t.QUARTILE=s(o.QUARTILE.INC,o.QUARTILE),t.QUARTILEEXC=o.QUARTILE.EXC,t.QUARTILEINC=o.QUARTILE.INC,t.RANK=s(o.RANK.EQ,o.RANK),t.RANKAVG=o.RANK.AVG,t.RANKEQ=o.RANK.EQ,t.SKEWP=o.SKEW.P,t.STDEV=s(o.STDEV.S,o.STDEV),t.STDEVP=o.STDEV.P,t.STDEVS=o.STDEV.S,t.TDIST=o.T.DIST,t.TDISTRT=o.T.DIST.RT,t.TINV=o.T.INV,t.TTEST=o.T.TEST,t.VAR=s(o.VAR.S,o.VAR),t.VARP=o.VAR.P,t.VARS=o.VAR.S,t.WEIBULL=s(o.WEIBULL.DIST,o.WEIBULL),t.WEIBULLDIST=o.WEIBULL.DIST,t.WORKDAYINTL=a.WORKDAY.INTL,t.ZTEST=o.Z.TEST},function(e,t,n){var c=Math;function u(e,n){return e.reduce(function(e,t){return n*e+t},0)}function h(e,t,n,r,o){o=o||-1;var i,a=2/e;if(0===t)return n;if(1===t)return r;for(var s=1;s!=t;++s)i=r*s*a+o*n,n=r,r=i;return r}function r(n,r,o,i,a){return function(e,t){if(0===t)return n(e);if(1===t)return r(e);if(t<0)throw o+": Order ("+t+") must be nonnegative";if(1==i&&0===e)throw o+": Undefined when x == 0";if(2==i&&e<=0)throw o+": Undefined when x <= 0";return h(e,t,n(e),r(e),a)}}var i,a,s,l,d,f,v,g,p=(i=[57568490574,-13362590354,651619640.7,-11214424.18,77392.33017,-184.9052456].reverse(),a=[57568490411,1029532985,9494680.718,59272.64853,267.8532712,1].reverse(),s=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),l=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34935152e-8].reverse(),d=[72362614232,-7895059235,242396853.1,-2972611.439,15704.4826,-30.16036606].reverse(),f=[144725228442,2300535178,18583304.74,99447.43394,376.9991397,1].reverse(),v=[1,.00183105,-3516396496e-14,2457520174e-15,-2.40337019e-7].reverse(),g=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse(),function(e,t){if(0===(t=Math.round(t)))return m(c.abs(e));if(1===t)return y(c.abs(e));if(t<0)throw"BESSELJ: Order ("+t+") must be nonnegative";if(0===c.abs(e))return 0;var n,r,o,i,a,s,l,u=2/c.abs(e);if(c.abs(e)>t)n=h(e,t,m(c.abs(e)),y(c.abs(e)),-1);else{for(a=n=i=o=0,s=1,r=2*c.floor((t+c.floor(c.sqrt(40*t)))/2);0<r;r--)l=r*u*s-a,a=s,s=l,1e10<c.abs(s)&&(s*=1e-10,a*=1e-10,n*=1e-10,i*=1e-10),o&&(i+=s),o=!o,r==t&&(n=a);n/=i=2*i-s}return e<0&&t%2?-n:n});function m(e){var t,n,r=e*e,o=c.abs(e)-.785398164;return c.abs(e)<8?(t=u(i,r))/(n=u(a,r)):(t=u(s,r=64/r),n=u(l,r),c.sqrt(.636619772/c.abs(e))*(c.cos(o)*t-c.sin(o)*n*8/c.abs(e)))}function y(e){var t,n,r,o=e*e,i=c.abs(e)-2.356194491;return Math.abs(e)<8?t=(n=e*u(d,o))/(r=u(f,o)):(n=u(v,o=64/o),r=u(g,o),t=c.sqrt(.636619772/c.abs(e))*(c.cos(i)*n-c.sin(i)*r*8/c.abs(e)),e<0&&(t=-t)),t}var w,C,E,S,b,R,T,O,k,M,N,_,A,o,I,D,L,H=(w=[-2957821389,7062834065,-512359803.6,10879881.29,-86327.92757,228.4622733].reverse(),C=[40076544269,745249964.8,7189466.438,47447.2647,226.1030244,1].reverse(),E=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),S=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34945152e-8].reverse(),b=.636619772,R=[-4900604943e3,127527439e4,-51534381390,734926455.1,-4237922.726,8511.937935].reverse(),T=[249958057e5,424441966400,3733650367,22459040.02,102042.605,354.9632885,1].reverse(),O=[1,.00183105,-3516396496e-14,2457520174e-15,-2.40337019e-7].reverse(),k=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse(),r(function(e){var t,n,r=e*e,o=e-.785398164;return e<8?(t=u(w,r))/(n=u(C,r))+b*p(e,0)*c.log(e):(t=u(E,r=64/r),n=u(S,r),c.sqrt(b/e)*(c.sin(o)*t+c.cos(o)*n*8/e))},function(e){var t,n,r=e*e,o=e-2.356194491;return e<8?(t=e*u(R,r))/(n=u(T,r))+b*(p(e,1)*c.log(e)-1/e):(t=u(O,r=64/r),n=u(k,r),c.sqrt(b/e)*(c.sin(o)*t+c.cos(o)*n*8/e))},"BESSELY",1,-1)),x=(M=[1,3.5156229,3.0899424,1.2067492,.2659732,.0360768,.0045813].reverse(),N=[.39894228,.01328592,.00225319,-.00157565,.00916281,-.02057706,.02635537,-.01647633,.00392377].reverse(),_=[.5,.87890594,.51498869,.15084934,.02658733,.00301532,32411e-8].reverse(),A=[.39894228,-.03988024,-.00362018,.00163801,-.01031555,.02282967,-.02895312,.01787654,-.00420059].reverse(),function e(t,n){if(0===(n=Math.round(n)))return function(e){return e<=3.75?u(M,e*e/14.0625):c.exp(c.abs(e))/c.sqrt(c.abs(e))*u(N,3.75/c.abs(e))}(t);if(1==n)return function(e){return e<3.75?e*u(_,e*e/14.0625):(e<0?-1:1)*c.exp(c.abs(e))/c.sqrt(c.abs(e))*u(A,3.75/c.abs(e))}(t);if(n<0)throw"BESSELI Order ("+n+") must be nonnegative";if(0===c.abs(t))return 0;var r,o,i,a,s,l=2/c.abs(t);for(i=r=0,a=1,o=2*c.round((n+c.round(c.sqrt(40*n)))/2);0<o;o--)s=o*l*a+i,i=a,a=s,1e10<c.abs(a)&&(a*=1e-10,i*=1e-10,r*=1e-10),o==n&&(r=i);return r*=e(t,0)/a,t<0&&n%2?-r:r}),P=(o=[-.57721566,.4227842,.23069756,.0348859,.00262698,1075e-7,74e-7].reverse(),I=[1.25331414,-.07832358,.02189568,-.01062446,.00587872,-.0025154,53208e-8].reverse(),D=[1,.15443144,-.67278579,-.18156897,-.01919402,-.00110404,-4686e-8].reverse(),L=[1.25331414,.23498619,-.0365562,.01504268,-.00780353,.00325614,-68245e-8].reverse(),r(function(e){return e<=2?-c.log(e/2)*x(e,0)+u(o,e*e/4):c.exp(-e)/c.sqrt(e)*u(I,2/e)},function(e){return e<=2?c.log(e/2)*x(e,1)+1/e*u(D,e*e/4):c.exp(-e)/c.sqrt(e)*u(L,2/e)},"BESSELK",2,1));t.besselj=p,t.bessely=H,t.besseli=x,t.besselk=P},function(e,l,t){var u=t(0),s=t(5),c=t(4),h=t(1),m=t(7);function d(e){var t=[];return h.arrayEach(e,function(e){e&&t.push(e)}),t}function f(e,t){for(var n={},r=1;r<e[0].length;++r)n[r]=!0;var o=t[0].length;for(r=1;r<t.length;++r)t[r].length>o&&(o=t[r].length);for(var i=1;i<e.length;++i)for(var a=1;a<e[i].length;++a){for(var s=!1,l=!1,u=0;u<t.length;++u){var c=t[u];if(!(c.length<o)){var h=c[0];if(e[i][0]===h){l=!0;for(var d=1;d<c.length;++d){if(!s)if(void 0===c[d]||"*"===c[d])s=!0;else{var f=m.parse(c[d]+""),v=[m.createToken(e[i][a],m.TOKEN_TYPE_LITERAL)].concat(f);s=m.compute(v)}}}}}l&&(n[a]=n[a]&&s)}for(var g=[],p=0;p<e[0].length;++p)n[p]&&g.push(p-1);return g}l.FINDFIELD=function(e,n){var r=null;return h.arrayEach(e,function(e,t){if(e[0]===n)return r=t,!1}),null==r?u.value:r},l.DAVERAGE=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return u.value;var r=f(e,n),o=[];if("string"==typeof t){var i=l.FINDFIELD(e,t);o=h.rest(e[i])}else o=h.rest(e[t]);var a=0;return h.arrayEach(r,function(e){a+=o[e]}),0===r.length?u.div0:a/r.length},l.DCOUNT=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return u.value;var r=f(e,n),o=[];if("string"==typeof t){var i=l.FINDFIELD(e,t);o=h.rest(e[i])}else o=h.rest(e[t]);var a=[];return h.arrayEach(r,function(e){a.push(o[e])}),s.COUNT(a)},l.DCOUNTA=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return u.value;var r=f(e,n),o=[];if("string"==typeof t){var i=l.FINDFIELD(e,t);o=h.rest(e[i])}else o=h.rest(e[t]);var a=[];return h.arrayEach(r,function(e){a.push(o[e])}),s.COUNTA(a)},l.DGET=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return u.value;var r=f(e,n),o=[];if("string"==typeof t){var i=l.FINDFIELD(e,t);o=h.rest(e[i])}else o=h.rest(e[t]);return 0===r.length?u.value:1<r.length?u.num:o[r[0]]},l.DMAX=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return u.value;var r=f(e,n),o=[];if("string"==typeof t){var i=l.FINDFIELD(e,t);o=h.rest(e[i])}else o=h.rest(e[t]);var a=o[r[0]];return h.arrayEach(r,function(e){a<o[e]&&(a=o[e])}),a},l.DMIN=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return u.value;var r=f(e,n),o=[];if("string"==typeof t){var i=l.FINDFIELD(e,t);o=h.rest(e[i])}else o=h.rest(e[t]);var a=o[r[0]];return h.arrayEach(r,function(e){a>o[e]&&(a=o[e])}),a},l.DPRODUCT=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return u.value;var r=f(e,n),o=[];if("string"==typeof t){var i=l.FINDFIELD(e,t);o=h.rest(e[i])}else o=h.rest(e[t]);var a=[];h.arrayEach(r,function(e){a.push(o[e])}),a=d(a);var s=1;return h.arrayEach(a,function(e){s*=e}),s},l.DSTDEV=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return u.value;var r=f(e,n),o=[];if("string"==typeof t){var i=l.FINDFIELD(e,t);o=h.rest(e[i])}else o=h.rest(e[t]);var a=[];return h.arrayEach(r,function(e){a.push(o[e])}),a=d(a),s.STDEV.S(a)},l.DSTDEVP=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return u.value;var r=f(e,n),o=[];if("string"==typeof t){var i=l.FINDFIELD(e,t);o=h.rest(e[i])}else o=h.rest(e[t]);var a=[];return h.arrayEach(r,function(e){a.push(o[e])}),a=d(a),s.STDEV.P(a)},l.DSUM=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return u.value;var r=f(e,n),o=[];if("string"==typeof t){var i=l.FINDFIELD(e,t);o=h.rest(e[i])}else o=h.rest(e[t]);var a=[];return h.arrayEach(r,function(e){a.push(o[e])}),c.SUM(a)},l.DVAR=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return u.value;var r=f(e,n),o=[];if("string"==typeof t){var i=l.FINDFIELD(e,t);o=h.rest(e[i])}else o=h.rest(e[t]);var a=[];return h.arrayEach(r,function(e){a.push(o[e])}),s.VAR.S(a)},l.DVARP=function(e,t,n){if(isNaN(t)&&"string"!=typeof t)return u.value;var r=f(e,n),o=[];if("string"==typeof t){var i=l.FINDFIELD(e,t);o=h.rest(e[i])}else o=h.rest(e[t]);var a=[];return h.arrayEach(r,function(e){a.push(o[e])}),s.VAR.P(a)}},function(e,t,n){var l=n(0),r=n(1),o=n(8);t.AND=function(){for(var e=r.flatten(arguments),t=!0,n=0;n<e.length;n++)e[n]||(t=!1);return t},t.CHOOSE=function(){if(arguments.length<2)return l.na;var e=arguments[0];return e<1||254<e?l.value:arguments.length<e+1?l.value:arguments[e]},t.FALSE=function(){return!1},t.IF=function(e,t,n){return e?t:n},t.IFERROR=function(e,t){return o.ISERROR(e)?t:e},t.IFNA=function(e,t){return e===l.na?t:e},t.NOT=function(e){return!e},t.OR=function(){for(var e=r.flatten(arguments),t=!1,n=0;n<e.length;n++)e[n]&&(t=!0);return t},t.TRUE=function(){return!0},t.XOR=function(){for(var e=r.flatten(arguments),t=0,n=0;n<e.length;n++)e[n]&&t++;return!!(1&Math.floor(Math.abs(t)))},t.SWITCH=function(){var e;if(0<arguments.length){var t=arguments[0],n=arguments.length-1,r=Math.floor(n/2),o=!1,i=n%2!=0,a=n%2==0?null:arguments[arguments.length-1];if(r)for(var s=0;s<r;s++)if(t===arguments[2*s+1]){e=arguments[2*s+2],o=!0;break}o||(e=i?a:l.na)}else e=l.value;return e}},function(e,u,t){var f=t(0),s=t(9),v=t(1);function l(e){return e&&e.getTime&&!isNaN(e.getTime())}function c(e){return e instanceof Date?e:new Date(e)}u.ACCRINT=function(e,t,n,r,o,i,a){return e=c(e),t=c(t),n=c(n),l(e)&&l(t)&&l(n)?r<=0||o<=0?f.num:-1===[1,2,4].indexOf(i)?f.num:-1===[0,1,2,3,4].indexOf(a)?f.num:n<=e?f.num:(a=a||0,(o=o||0)*r*s.YEARFRAC(e,n,a)):f.value},u.ACCRINTM=function(){throw new Error("ACCRINTM is not implemented")},u.AMORDEGRC=function(){throw new Error("AMORDEGRC is not implemented")},u.AMORLINC=function(){throw new Error("AMORLINC is not implemented")},u.COUPDAYBS=function(){throw new Error("COUPDAYBS is not implemented")},u.COUPDAYS=function(){throw new Error("COUPDAYS is not implemented")},u.COUPDAYSNC=function(){throw new Error("COUPDAYSNC is not implemented")},u.COUPNCD=function(){throw new Error("COUPNCD is not implemented")},u.COUPNUM=function(){throw new Error("COUPNUM is not implemented")},u.COUPPCD=function(){throw new Error("COUPPCD is not implemented")},u.CUMIPMT=function(e,t,n,r,o,i){if(e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),v.anyIsError(e,t,n))return f.value;if(e<=0||t<=0||n<=0)return f.num;if(r<1||o<1||o<r)return f.num;if(0!==i&&1!==i)return f.num;var a=u.PMT(e,t,n,0,i),s=0;1===r&&0===i&&(s=-n,r++);for(var l=r;l<=o;l++)s+=1===i?u.FV(e,l-2,a,n,1)-a:u.FV(e,l-1,a,n,0);return s*=e},u.CUMPRINC=function(e,t,n,r,o,i){if(e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),v.anyIsError(e,t,n))return f.value;if(e<=0||t<=0||n<=0)return f.num;if(r<1||o<1||o<r)return f.num;if(0!==i&&1!==i)return f.num;var a=u.PMT(e,t,n,0,i),s=0;1===r&&(s=0===i?a+n*e:a,r++);for(var l=r;l<=o;l++)s+=0<i?a-(u.FV(e,l-2,a,n,1)-a)*e:a-u.FV(e,l-1,a,n,0)*e;return s},u.DB=function(e,t,n,r,o){if(o=void 0===o?12:o,e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),r=v.parseNumber(r),o=v.parseNumber(o),v.anyIsError(e,t,n,r,o))return f.value;if(e<0||t<0||n<0||r<0)return f.num;if(-1===[1,2,3,4,5,6,7,8,9,10,11,12].indexOf(o))return f.num;if(n<r)return f.num;if(e<=t)return 0;for(var i=(1-Math.pow(t/e,1/n)).toFixed(3),a=e*i*o/12,s=a,l=0,u=r===n?n-1:r,c=2;c<=u;c++)s+=l=(e-s)*i;return 1===r?a:r===n?(e-s)*i:l},u.DDB=function(e,t,n,r,o){if(o=void 0===o?2:o,e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),r=v.parseNumber(r),o=v.parseNumber(o),v.anyIsError(e,t,n,r,o))return f.value;if(e<0||t<0||n<0||r<0||o<=0)return f.num;if(n<r)return f.num;if(e<=t)return 0;for(var i=0,a=0,s=1;s<=r;s++)i+=a=Math.min(o/n*(e-i),e-t-i);return a},u.DISC=function(){throw new Error("DISC is not implemented")},u.DOLLARDE=function(e,t){if(e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t))return f.value;if(t<0)return f.num;if(0<=t&&t<1)return f.div0;t=parseInt(t,10);var n=parseInt(e,10);n+=e%1*Math.pow(10,Math.ceil(Math.log(t)/Math.LN10))/t;var r=Math.pow(10,Math.ceil(Math.log(t)/Math.LN2)+1);return n=Math.round(n*r)/r},u.DOLLARFR=function(e,t){if(e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t))return f.value;if(t<0)return f.num;if(0<=t&&t<1)return f.div0;t=parseInt(t,10);var n=parseInt(e,10);return n+=e%1*Math.pow(10,-Math.ceil(Math.log(t)/Math.LN10))*t},u.DURATION=function(){throw new Error("DURATION is not implemented")},u.EFFECT=function(e,t){return e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?f.value:e<=0||t<1?f.num:(t=parseInt(t,10),Math.pow(1+e/t,t)-1)},u.FV=function(e,t,n,r,o){if(r=r||0,o=o||0,e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),r=v.parseNumber(r),o=v.parseNumber(o),v.anyIsError(e,t,n,r,o))return f.value;var i;if(0===e)i=r+n*t;else{var a=Math.pow(1+e,t);i=1===o?r*a+n*(1+e)*(a-1)/e:r*a+n*(a-1)/e}return-i},u.FVSCHEDULE=function(e,t){if(e=v.parseNumber(e),t=v.parseNumberArray(v.flatten(t)),v.anyIsError(e,t))return f.value;for(var n=t.length,r=e,o=0;o<n;o++)r*=1+t[o];return r},u.INTRATE=function(){throw new Error("INTRATE is not implemented")},u.IPMT=function(e,t,n,r,o,i){if(o=o||0,i=i||0,e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),r=v.parseNumber(r),o=v.parseNumber(o),i=v.parseNumber(i),v.anyIsError(e,t,n,r,o,i))return f.value;var a=u.PMT(e,n,r,o,i);return(1===t?1===i?0:-r:1===i?u.FV(e,t-2,a,r,1)-a:u.FV(e,t-1,a,r,0))*e},u.IRR=function(e,t){if(t=t||0,e=v.parseNumberArray(v.flatten(e)),t=v.parseNumber(t),v.anyIsError(e,t))return f.value;function n(e,t,n){for(var r=n+1,o=e[0],i=1;i<e.length;i++)o+=e[i]/Math.pow(r,(t[i]-t[0])/365);return o}function r(e,t,n){for(var r=n+1,o=0,i=1;i<e.length;i++){var a=(t[i]-t[0])/365;o-=a*e[i]/Math.pow(r,1+a)}return o}for(var o=[],i=!1,a=!1,s=0;s<e.length;s++)o[s]=0===s?0:o[s-1]+365,0<e[s]&&(i=!0),e[s]<0&&(a=!0);if(!i||!a)return f.num;for(var l,u,c,h=t=void 0===t?.1:t;l=h-(c=n(e,o,h))/r(e,o,h),u=Math.abs(l-h),h=l,1e-10<u&&1e-10<Math.abs(c););return h},u.ISPMT=function(e,t,n,r){return e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),r=v.parseNumber(r),v.anyIsError(e,t,n,r)?f.value:r*e*(t/n-1)},u.MDURATION=function(){throw new Error("MDURATION is not implemented")},u.MIRR=function(e,t,n){if(e=v.parseNumberArray(v.flatten(e)),t=v.parseNumber(t),n=v.parseNumber(n),v.anyIsError(e,t,n))return f.value;for(var r=e.length,o=[],i=[],a=0;a<r;a++)e[a]<0?o.push(e[a]):i.push(e[a]);var s=-u.NPV(n,i)*Math.pow(1+n,r-1),l=u.NPV(t,o)*(1+t);return Math.pow(s/l,1/(r-1))-1},u.NOMINAL=function(e,t){return e=v.parseNumber(e),t=v.parseNumber(t),v.anyIsError(e,t)?f.value:e<=0||t<1?f.num:(t=parseInt(t,10),(Math.pow(e+1,1/t)-1)*t)},u.NPER=function(e,t,n,r,o){if(o=void 0===o?0:o,r=void 0===r?0:r,e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),r=v.parseNumber(r),o=v.parseNumber(o),v.anyIsError(e,t,n,r,o))return f.value;var i=t*(1+e*o)-r*e,a=n*e+t*(1+e*o);return Math.log(i/a)/Math.log(1+e)},u.NPV=function(){var e=v.parseNumberArray(v.flatten(arguments));if(e instanceof Error)return e;for(var t=e[0],n=0,r=1;r<e.length;r++)n+=e[r]/Math.pow(1+t,r);return n},u.ODDFPRICE=function(){throw new Error("ODDFPRICE is not implemented")},u.ODDFYIELD=function(){throw new Error("ODDFYIELD is not implemented")},u.ODDLPRICE=function(){throw new Error("ODDLPRICE is not implemented")},u.ODDLYIELD=function(){throw new Error("ODDLYIELD is not implemented")},u.PDURATION=function(e,t,n){return e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),v.anyIsError(e,t,n)?f.value:e<=0?f.num:(Math.log(n)-Math.log(t))/Math.log(1+e)},u.PMT=function(e,t,n,r,o){if(r=r||0,o=o||0,e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),r=v.parseNumber(r),o=v.parseNumber(o),v.anyIsError(e,t,n,r,o))return f.value;var i;if(0===e)i=(n+r)/t;else{var a=Math.pow(1+e,t);i=1===o?(r*e/(a-1)+n*e/(1-1/a))/(1+e):r*e/(a-1)+n*e/(1-1/a)}return-i},u.PPMT=function(e,t,n,r,o,i){return o=o||0,i=i||0,e=v.parseNumber(e),n=v.parseNumber(n),r=v.parseNumber(r),o=v.parseNumber(o),i=v.parseNumber(i),v.anyIsError(e,n,r,o,i)?f.value:u.PMT(e,n,r,o,i)-u.IPMT(e,t,n,r,o,i)},u.PRICE=function(){throw new Error("PRICE is not implemented")},u.PRICEDISC=function(){throw new Error("PRICEDISC is not implemented")},u.PRICEMAT=function(){throw new Error("PRICEMAT is not implemented")},u.PV=function(e,t,n,r,o){return r=r||0,o=o||0,e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),r=v.parseNumber(r),o=v.parseNumber(o),v.anyIsError(e,t,n,r,o)?f.value:0===e?-n*t-r:((1-Math.pow(1+e,t))/e*n*(1+e*o)-r)/Math.pow(1+e,t)},u.RATE=function(e,t,n,r,o,i){if(i=void 0===i?.01:i,r=void 0===r?0:r,o=void 0===o?0:o,e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),r=v.parseNumber(r),o=v.parseNumber(o),i=v.parseNumber(i),v.anyIsError(e,t,n,r,o,i))return f.value;var a,s,l,u=0,c=0,h=0,d=i;for(Math.abs(d)<1e-10?n*(1+e*d)+t*(1+d*o)*e+r:n*(c=Math.exp(e*Math.log(1+d)))+t*(1/d+o)*(c-1)+r,a=n+t*e+r,s=n*c+t*(1/d+o)*(c-1)+r,h=l=0,u=d;1e-10<Math.abs(a-s)&&h<50;)d=(s*l-a*u)/(s-a),l=u,u=d,a=s,s=Math.abs(d)<1e-10?n*(1+e*d)+t*(1+d*o)*e+r:n*(c=Math.exp(e*Math.log(1+d)))+t*(1/d+o)*(c-1)+r,++h;return d},u.RECEIVED=function(){throw new Error("RECEIVED is not implemented")},u.RRI=function(e,t,n){return e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),v.anyIsError(e,t,n)?f.value:0===e||0===t?f.num:Math.pow(n/t,1/e)-1},u.SLN=function(e,t,n){return e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),v.anyIsError(e,t,n)?f.value:0===n?f.num:(e-t)/n},u.SYD=function(e,t,n,r){return e=v.parseNumber(e),t=v.parseNumber(t),n=v.parseNumber(n),r=v.parseNumber(r),v.anyIsError(e,t,n,r)?f.value:0===n?f.num:r<1||n<r?f.num:(e-t)*(n-(r=parseInt(r,10))+1)*2/(n*(n+1))},u.TBILLEQ=function(e,t,n){return e=v.parseDate(e),t=v.parseDate(t),n=v.parseNumber(n),v.anyIsError(e,t,n)?f.value:n<=0?f.num:t<e?f.num:31536e6<t-e?f.num:365*n/(360-n*s.DAYS360(e,t,!1))},u.TBILLPRICE=function(e,t,n){return e=v.parseDate(e),t=v.parseDate(t),n=v.parseNumber(n),v.anyIsError(e,t,n)?f.value:n<=0?f.num:t<e?f.num:31536e6<t-e?f.num:100*(1-n*s.DAYS360(e,t,!1)/360)},u.TBILLYIELD=function(e,t,n){return e=v.parseDate(e),t=v.parseDate(t),n=v.parseNumber(n),v.anyIsError(e,t,n)?f.value:n<=0?f.num:t<e?f.num:31536e6<t-e?f.num:360*(100-n)/(n*s.DAYS360(e,t,!1))},u.VDB=function(){throw new Error("VDB is not implemented")},u.XNPV=function(e,t,n){if(e=v.parseNumber(e),t=v.parseNumberArray(v.flatten(t)),n=v.parseDateArray(v.flatten(n)),v.anyIsError(e,t,n))return f.value;for(var r=0,o=0;o<t.length;o++)r+=t[o]/Math.pow(1+e,s.DAYS(n[o],n[0])/365);return r},u.YIELD=function(){throw new Error("YIELD is not implemented")},u.YIELDDISC=function(){throw new Error("YIELDDISC is not implemented")},u.YIELDMAT=function(){throw new Error("YIELDMAT is not implemented")}},function(e,t,n){var s=n(0),l=n(1);t.MATCH=function(e,t,n){if(!e&&!t)return s.na;if(2===arguments.length&&(n=1),!(t instanceof Array))return s.na;if(-1!==n&&0!==n&&1!==n)return s.na;for(var r,o,i=0;i<t.length;i++)if(1===n){if(t[i]===e)return i+1;t[i]<e&&(o?t[i]>o&&(r=i+1,o=t[i]):(r=i+1,o=t[i]))}else if(0===n){if("string"==typeof e){if(e=e.replace(/\?/g,"."),t[i].toLowerCase().match(e.toLowerCase()))return i+1}else if(t[i]===e)return i+1}else if(-1===n){if(t[i]===e)return i+1;t[i]>e&&(o?t[i]<o&&(r=i+1,o=t[i]):(r=i+1,o=t[i]))}return r||s.na},t.VLOOKUP=function(e,t,n,r){if(!e||!t||!n)return s.na;r=r||!1;for(var o=0;o<t.length;o++){var i=t[o];if(!r&&i[0]===e||i[0]===e||r&&"string"==typeof i[0]&&-1!==i[0].toLowerCase().indexOf(e.toLowerCase()))return n<i.length+1?i[n-1]:s.ref}return s.na},t.HLOOKUP=function(e,t,n,r){if(!e||!t||!n)return s.na;r=r||!1;for(var o=l.transpose(t),i=0;i<o.length;i++){var a=o[i];if(!r&&a[0]===e||a[0]===e||r&&"string"==typeof a[0]&&-1!==a[0].toLowerCase().indexOf(e.toLowerCase()))return n<a.length+1?a[n-1]:s.ref}return s.na}},function(e,t,n){"use strict";t.__esModule=!0,t.default=o;var r=t.SYMBOL=">";function o(e,t){return t<e}o.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.default=o;var r=t.SYMBOL=">=";function o(e,t){return t<=e}o.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.default=o;var r=t.SYMBOL="<";function o(e,t){return e<t}o.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.default=o;var r=t.SYMBOL="<=";function o(e,t){return e<=t}o.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.SYMBOL=void 0,t.default=o;var i=n(3),a=n(2),r=t.SYMBOL="-";function o(e){for(var t=arguments.length,n=Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=n.reduce(function(e,t){return e-(0,i.toNumber)(t)},(0,i.toNumber)(e));if(isNaN(o))throw Error(a.ERROR_VALUE);return o}o.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.SYMBOL=void 0,t.default=o;var i=n(3),a=n(2),r=t.SYMBOL="*";function o(e){for(var t=arguments.length,n=Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=n.reduce(function(e,t){return e*(0,i.toNumber)(t)},(0,i.toNumber)(e));if(isNaN(o))throw Error(a.ERROR_VALUE);return o}o.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.default=o;var r=t.SYMBOL="<>";function o(e,t){return e!==t}o.SYMBOL=r},function(e,t,n){"use strict";t.__esModule=!0,t.SYMBOL=void 0,t.default=a;var r=n(3),o=n(2),i=t.SYMBOL="^";function a(e,t){var n=Math.pow((0,r.toNumber)(e),(0,r.toNumber)(t));if(isNaN(n))throw Error(o.ERROR_VALUE);return n}a.SYMBOL=i},function(e,t,n){var r,o,i,a,s,l,u,c,h,d,f,v,g,p,m,y,w,C,E,S,b,R,T,O,k,M,N,_,A,I,D=(T=[5,9,10,11,13,14,15,16,17,18,19,20,29,30,32],O=[5,9,10,11,13,14,15,16,17,18,19,20,29,30,34],k=[5,10,11,13,14,15,16,17,29,30],M=[5,10,13,14,15,16,29,30],N=[5,10,11,13,14,15,16,17,18,19,29,30],_=[13,29,30],A={trace:function(){},yy:{},symbols_:{error:2,expressions:3,expression:4,EOF:5,variableSequence:6,number:7,STRING:8,"&":9,"=":10,"+":11,"(":12,")":13,"<":14,">":15,NOT:16,"-":17,"*":18,"/":19,"^":20,FUNCTION:21,expseq:22,cell:23,ABSOLUTE_CELL:24,RELATIVE_CELL:25,MIXED_CELL:26,":":27,ARRAY:28,";":29,",":30,VARIABLE:31,DECIMAL:32,NUMBER:33,"%":34,ERROR:35,$accept:0,$end:1},terminals_:{5:"EOF",8:"STRING",9:"&",10:"=",11:"+",12:"(",13:")",14:"<",15:">",16:"NOT",17:"-",18:"*",19:"/",20:"^",21:"FUNCTION",24:"ABSOLUTE_CELL",25:"RELATIVE_CELL",26:"MIXED_CELL",27:":",28:"ARRAY",29:";",30:",",31:"VARIABLE",32:"DECIMAL",33:"NUMBER",34:"%",35:"ERROR"},productions_:[0,[3,2],[4,1],[4,1],[4,1],[4,3],[4,3],[4,3],[4,3],[4,4],[4,4],[4,4],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,2],[4,2],[4,3],[4,4],[4,1],[4,1],[4,2],[23,1],[23,1],[23,1],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[23,3],[22,1],[22,1],[22,3],[22,3],[6,1],[6,3],[7,1],[7,3],[7,2],[2,1]],performAction:function(e,t,n,r,o,i,a){var s=i.length-1;switch(o){case 1:return i[s-1];case 2:this.$=r.callVariable(i[s][0]);break;case 3:this.$=r.toNumber(i[s]);break;case 4:this.$=r.trimEdges(i[s]);break;case 5:this.$=r.evaluateByOperator("&",[i[s-2],i[s]]);break;case 6:this.$=r.evaluateByOperator("=",[i[s-2],i[s]]);break;case 7:this.$=r.evaluateByOperator("+",[i[s-2],i[s]]);break;case 8:this.$=i[s-1];break;case 9:this.$=r.evaluateByOperator("<=",[i[s-3],i[s]]);break;case 10:this.$=r.evaluateByOperator(">=",[i[s-3],i[s]]);break;case 11:this.$=r.evaluateByOperator("<>",[i[s-3],i[s]]);break;case 12:this.$=r.evaluateByOperator("NOT",[i[s-2],i[s]]);break;case 13:this.$=r.evaluateByOperator(">",[i[s-2],i[s]]);break;case 14:this.$=r.evaluateByOperator("<",[i[s-2],i[s]]);break;case 15:this.$=r.evaluateByOperator("-",[i[s-2],i[s]]);break;case 16:this.$=r.evaluateByOperator("*",[i[s-2],i[s]]);break;case 17:this.$=r.evaluateByOperator("/",[i[s-2],i[s]]);break;case 18:this.$=r.evaluateByOperator("^",[i[s-2],i[s]]);break;case 19:var l=r.invertNumber(i[s]);this.$=l,isNaN(this.$)&&(this.$=0);break;case 20:l=r.toNumber(i[s]);this.$=l,isNaN(this.$)&&(this.$=0);break;case 21:this.$=r.callFunction(i[s-2]);break;case 22:this.$=r.callFunction(i[s-3],i[s-1]);break;case 26:case 27:case 28:this.$=r.cellValue(i[s]);break;case 29:case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:this.$=r.rangeValue(i[s-2],i[s]);break;case 38:case 42:this.$=[i[s]];break;case 39:this.$=r.trimEdges(e).split(",");break;case 40:case 41:i[s-2].push(i[s]),this.$=i[s-2];break;case 43:this.$=Array.isArray(i[s-2])?i[s-2]:[i[s-2]],this.$.push(i[s]);break;case 44:this.$=i[s];break;case 45:this.$=1*(i[s-2]+"."+i[s]);break;case 46:this.$=.01*i[s-1];break;case 47:this.$=r.throwError(i[s])}},table:[{2:11,3:1,4:2,6:3,7:4,8:r=[1,5],11:o=[1,8],12:i=[1,6],17:a=[1,7],21:s=[1,9],23:10,24:l=[1,14],25:u=[1,15],26:c=[1,16],31:h=[1,12],33:d=[1,13],35:f=[1,17]},{1:[3]},{5:[1,18],9:v=[1,19],10:g=[1,20],11:p=[1,21],14:m=[1,22],15:y=[1,23],16:w=[1,24],17:C=[1,25],18:E=[1,26],19:S=[1,27],20:b=[1,28]},L(R=[5,9,10,11,13,14,15,16,17,18,19,20,29,30],[2,2],{32:[1,29]}),L(R,[2,3],{34:[1,30]}),L(R,[2,4]),{2:11,4:31,6:3,7:4,8:r,11:o,12:i,17:a,21:s,23:10,24:l,25:u,26:c,31:h,33:d,35:f},{2:11,4:32,6:3,7:4,8:r,11:o,12:i,17:a,21:s,23:10,24:l,25:u,26:c,31:h,33:d,35:f},{2:11,4:33,6:3,7:4,8:r,11:o,12:i,17:a,21:s,23:10,24:l,25:u,26:c,31:h,33:d,35:f},{12:[1,34]},L(R,[2,23]),L(R,[2,24],{2:35,35:f}),L(T,[2,42]),L(O,[2,44],{32:[1,36]}),L(R,[2,26],{27:[1,37]}),L(R,[2,27],{27:[1,38]}),L(R,[2,28],{27:[1,39]}),L([5,9,10,11,13,14,15,16,17,18,19,20,29,30,35],[2,47]),{1:[2,1]},{2:11,4:40,6:3,7:4,8:r,11:o,12:i,17:a,21:s,23:10,24:l,25:u,26:c,31:h,33:d,35:f},{2:11,4:41,6:3,7:4,8:r,11:o,12:i,17:a,21:s,23:10,24:l,25:u,26:c,31:h,33:d,35:f},{2:11,4:42,6:3,7:4,8:r,11:o,12:i,17:a,21:s,23:10,24:l,25:u,26:c,31:h,33:d,35:f},{2:11,4:45,6:3,7:4,8:r,10:[1,43],11:o,12:i,15:[1,44],17:a,21:s,23:10,24:l,25:u,26:c,31:h,33:d,35:f},{2:11,4:47,6:3,7:4,8:r,10:[1,46],11:o,12:i,17:a,21:s,23:10,24:l,25:u,26:c,31:h,33:d,35:f},{2:11,4:48,6:3,7:4,8:r,11:o,12:i,17:a,21:s,23:10,24:l,25:u,26:c,31:h,33:d,35:f},{2:11,4:49,6:3,7:4,8:r,11:o,12:i,17:a,21:s,23:10,24:l,25:u,26:c,31:h,33:d,35:f},{2:11,4:50,6:3,7:4,8:r,11:o,12:i,17:a,21:s,23:10,24:l,25:u,26:c,31:h,33:d,35:f},{2:11,4:51,6:3,7:4,8:r,11:o,12:i,17:a,21:s,23:10,24:l,25:u,26:c,31:h,33:d,35:f},{2:11,4:52,6:3,7:4,8:r,11:o,12:i,17:a,21:s,23:10,24:l,25:u,26:c,31:h,33:d,35:f},{31:[1,53]},L(O,[2,46]),{9:v,10:g,11:p,13:[1,54],14:m,15:y,16:w,17:C,18:E,19:S,20:b},L(k,[2,19],{9:v,18:E,19:S,20:b}),L(k,[2,20],{9:v,18:E,19:S,20:b}),{2:11,4:57,6:3,7:4,8:r,11:o,12:i,13:[1,55],17:a,21:s,22:56,23:10,24:l,25:u,26:c,28:[1,58],31:h,33:d,35:f},L(R,[2,25]),{33:[1,59]},{24:[1,60],25:[1,61],26:[1,62]},{24:[1,63],25:[1,64],26:[1,65]},{24:[1,66],25:[1,67],26:[1,68]},L(R,[2,5]),L([5,10,13,29,30],[2,6],{9:v,11:p,14:m,15:y,16:w,17:C,18:E,19:S,20:b}),L(k,[2,7],{9:v,18:E,19:S,20:b}),{2:11,4:69,6:3,7:4,8:r,11:o,12:i,17:a,21:s,23:10,24:l,25:u,26:c,31:h,33:d,35:f},{2:11,4:70,6:3,7:4,8:r,11:o,12:i,17:a,21:s,23:10,24:l,25:u,26:c,31:h,33:d,35:f},L(M,[2,14],{9:v,11:p,17:C,18:E,19:S,20:b}),{2:11,4:71,6:3,7:4,8:r,11:o,12:i,17:a,21:s,23:10,24:l,25:u,26:c,31:h,33:d,35:f},L(M,[2,13],{9:v,11:p,17:C,18:E,19:S,20:b}),L([5,10,13,16,29,30],[2,12],{9:v,11:p,14:m,15:y,17:C,18:E,19:S,20:b}),L(k,[2,15],{9:v,18:E,19:S,20:b}),L(N,[2,16],{9:v,20:b}),L(N,[2,17],{9:v,20:b}),L([5,10,11,13,14,15,16,17,18,19,20,29,30],[2,18],{9:v}),L(T,[2,43]),L(R,[2,8]),L(R,[2,21]),{13:[1,72],29:[1,73],30:[1,74]},L(_,[2,38],{9:v,10:g,11:p,14:m,15:y,16:w,17:C,18:E,19:S,20:b}),L(_,[2,39]),L(O,[2,45]),L(R,[2,29]),L(R,[2,30]),L(R,[2,31]),L(R,[2,32]),L(R,[2,33]),L(R,[2,34]),L(R,[2,35]),L(R,[2,36]),L(R,[2,37]),L(M,[2,9],{9:v,11:p,17:C,18:E,19:S,20:b}),L(M,[2,11],{9:v,11:p,17:C,18:E,19:S,20:b}),L(M,[2,10],{9:v,11:p,17:C,18:E,19:S,20:b}),L(R,[2,22]),{2:11,4:75,6:3,7:4,8:r,11:o,12:i,17:a,21:s,23:10,24:l,25:u,26:c,31:h,33:d,35:f},{2:11,4:76,6:3,7:4,8:r,11:o,12:i,17:a,21:s,23:10,24:l,25:u,26:c,31:h,33:d,35:f},L(_,[2,40],{9:v,10:g,11:p,14:m,15:y,16:w,17:C,18:E,19:S,20:b}),L(_,[2,41],{9:v,10:g,11:p,14:m,15:y,16:w,17:C,18:E,19:S,20:b})],defaultActions:{18:[2,1]},parseError:function(e,t){if(!t.recoverable){var n=new Error(e);throw n.hash=t,n}this.trace(e)},parse:function(e){var t=this,r=[0],n=[null],o=[],i=this.table,a="",s=0,l=0,u=0,c=2,h=o.slice.call(arguments,1),d=Object.create(this.lexer),f={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(f.yy[v]=this.yy[v]);d.setInput(e,f.yy),f.yy.lexer=d,f.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;o.push(g);var p=d.options&&d.options.ranges;"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,y,w,C,E,S,b,R,T,O,k=function(){var e;return"number"!=typeof(e=d.lex()||1)&&(e=t.symbols_[e]||e),e},M={};;){if(w=r[r.length-1],void 0===(C=this.defaultActions[w]?this.defaultActions[w]:(null==m&&(m=k()),i[w]&&i[w][m]))||!C.length||!C[0]){var N,_="";function A(e){for(var t=r.length-1,n=0;;){if(c.toString()in i[e])return n;if(0===e||t<2)return!1;e=r[t-=2],++n}}if(u)1!==y&&(N=A(w));else{for(S in N=A(w),T=[],i[w])this.terminals_[S]&&c<S&&T.push("'"+this.terminals_[S]+"'");_=d.showPosition?"Parse error on line "+(s+1)+":\n"+d.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(_,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:g,expected:T,recoverable:!1!==N})}if(3==u){if(1===m||1===y)throw new Error(_||"Parsing halted while starting to recover from another error.");l=d.yyleng,a=d.yytext,s=d.yylineno,g=d.yylloc,m=k()}if(!1===N)throw new Error(_||"Parsing halted. No suitable error recovery rule available.");O=N,r.length=r.length-2*O,n.length=n.length-O,o.length=o.length-O,y=m==c?null:m,m=c,w=r[r.length-1],C=i[w]&&i[w][c],u=3}if(C[0]instanceof Array&&1<C.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+m);switch(C[0]){case 1:r.push(m),n.push(d.yytext),o.push(d.yylloc),r.push(C[1]),m=null,y?(m=y,y=null):(l=d.yyleng,a=d.yytext,s=d.yylineno,g=d.yylloc,0<u&&u--);break;case 2:if(b=this.productions_[C[1]][1],M.$=n[n.length-b],M._$={first_line:o[o.length-(b||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(b||1)].first_column,last_column:o[o.length-1].last_column},p&&(M._$.range=[o[o.length-(b||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[a,l,s,f.yy,C[1],n,o].concat(h))))return E;b&&(r=r.slice(0,-1*b*2),n=n.slice(0,-1*b),o=o.slice(0,-1*b)),r.push(this.productions_[C[1]][0]),n.push(M.$),o.push(M._$),R=i[r[r.length-2]][r[r.length-1]],r.push(R);break;case 3:return!0}}return!0}},I={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var o=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,r,o;if(this.options.backtrack_lexer&&(o={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(o.yylloc.range=this.yylloc.range.slice(0))),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var i in o)this[i]=o[i];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),i=0;i<o.length;i++)if((n=this._input.match(this.rules[o[i]]))&&(!t||n[0].length>t[0].length)){if(t=n,r=i,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,o[i])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,o[r]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,n,r){switch(n){case 0:break;case 1:case 2:return 8;case 3:return 21;case 4:return 35;case 5:return 24;case 6:case 7:return 26;case 8:return 25;case 9:return 21;case 10:case 11:return 31;case 12:return 33;case 13:return 28;case 14:return 9;case 15:return" ";case 16:return 32;case 17:return 27;case 18:return 29;case 19:return 30;case 20:return 18;case 21:return 19;case 22:return 17;case 23:return 11;case 24:return 20;case 25:return 12;case 26:return 13;case 27:return 15;case 28:return 14;case 29:return 16;case 30:return'"';case 31:return"'";case 32:return"!";case 33:return 10;case 34:return 34;case 35:return"#";case 36:return 5}},rules:[/^(?:\s+)/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:[A-Za-z]{1,}[A-Za-z_0-9\.]+(?=[(]))/,/^(?:#[A-Z0-9\/]+(!|\?)?)/,/^(?:\$[A-Za-z]+\$[0-9]+)/,/^(?:\$[A-Za-z]+[0-9]+)/,/^(?:[A-Za-z]+\$[0-9]+)/,/^(?:[A-Za-z]+[0-9]+)/,/^(?:[A-Za-z\.]+(?=[(]))/,/^(?:[A-Za-z]{1,}[A-Za-z_0-9]+)/,/^(?:[A-Za-z_]+)/,/^(?:[0-9]+)/,/^(?:\[(.*)?\])/,/^(?:&)/,/^(?: )/,/^(?:[.])/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\/)/,/^(?:-)/,/^(?:\+)/,/^(?:\^)/,/^(?:\()/,/^(?:\))/,/^(?:>)/,/^(?:<)/,/^(?:NOT\b)/,/^(?:")/,/^(?:')/,/^(?:!)/,/^(?:=)/,/^(?:%)/,/^(?:[#])/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],inclusive:!0}}},A.lexer=I,new((H.prototype=A).Parser=H));function L(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n}function H(){this.yy={}}t.parser=D,t.Parser=D.Parser,t.parse=function(){return D.parse.apply(D,arguments)}},function(e,t,n){"use strict";t.__esModule=!0,t.trimEdges=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;return e=e.substring(t,e.length-t)}}],o.c=a,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=15);function o(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var n,a},e.exports=o()},function(e,t,n){"use strict";var r=n(0);n(12),n(131),n(39),n(46),n(138),t.__esModule=!0,t.default=void 0;var v=r(n(18)),o=r(n(1)),i=r(n(2)),g=n(111),s=n(3),a=n(4),l=r(n(58)),u=n(84),c=/^\$?[A-Z]+\$?\d+$/,h=/\$?[A-Z]+\$?\d+/,d=/(?:[^0-9A-Z$: ]|^)\s*(\$?[A-Z]+\$?\d+)\s*(?![0-9A-Z_: ])/g,p=/\$?[A-Z]+\$?\d+\s*:\s*\$?[A-Z]+\$?\d+/g,f=/((?:[^0-9A-Z$: ]|^)\s*(\$?[A-Z]+\$?\d+)\s*(?![0-9A-Z_: ]))|(\$?[A-Z]+\$?\d+\s*:\s*\$?[A-Z]+\$?\d+)/g,m=function(){function t(e){(0,o.default)(this,t),this.expression="",this.cells=[],this.customModifier=null,"string"==typeof e&&this.setExpression(e)}return(0,i.default)(t,[{key:"setExpression",value:function(e){return this.cells.length=0,this.expression=(0,u.toUpperCaseFormula)(e),this._extractCells(),this._extractCellsRange(),this}},{key:"useCustomModifier",value:function(e){this.customModifier=e}},{key:"translate",value:function(e,t){var n=this,r=e.row,o=e.column,i=1<arguments.length&&void 0!==t?t:{};return(0,s.arrayEach)(this.cells,function(e){null!=r&&n._translateCell(e,"row",r,i.row),null!=o&&n._translateCell(e,"column",o,i.column)}),this}},{key:"toString",value:function(){var l=this,e=this.expression.replace(f,function(e,t,n){var r=-1===e.indexOf(":"),o=e,i=e,a=null;r&&(i=c.test(t)?t:n);var s=l._searchCell(i);return s&&(a=s.refError?(0,g.error)(g.ERROR_REF):s.toLabel(),o=r?e.replace(i,a):a),o});return e.startsWith("=")||(e="=".concat(e)),e}},{key:"_translateCell",value:function(e,t,n,r){var o=e.start,i=e.end,a=o[t].index,s=i[t].index,l=n,u=n,c=!1;if(this.customModifier){var h=this.customModifier(e,t,n,r),d=(0,v.default)(h,3);l=d[0],u=d[1],c=d[2]}else o[t].isAbsolute&&(l=0),i[t].isAbsolute&&(u=0);l&&!c&&(a+l<0&&(c=!0),o[t].index=Math.max(a+l,0)),u&&!c&&(s+u<0&&(c=!0),i[t].index=Math.max(s+u,0)),c&&(e.refError=!0)}},{key:"_extractCells",value:function(){var a=this,e=this.expression.match(d);e&&(0,s.arrayEach)(e,function(e){var t=e.match(h);if(t){var n=(0,g.extractLabel)(t[0]),r=(0,v.default)(n,2),o=r[0],i=r[1];a.cells.push(a._createCell({row:o,column:i},{row:o,column:i},t[0]))}})}},{key:"_extractCellsRange",value:function(){var f=this,e=this.expression.match(p);e&&(0,s.arrayEach)(e,function(e){var t=e.split(":"),n=(0,v.default)(t,2),r=n[0],o=n[1],i=(0,g.extractLabel)(r),a=(0,v.default)(i,2),s=a[0],l=a[1],u=(0,g.extractLabel)(o),c=(0,v.default)(u,2),h={row:s,column:l},d={row:c[0],column:c[1]};f.cells.push(f._createCell(h,d,e))})}},{key:"_searchCell",value:function(t){var e=(0,s.arrayFilter)(this.cells,function(e){return e.origLabel===t});return(0,v.default)(e,1)[0]||null}},{key:"_createCell",value:function(e,t,n){return{start:e,end:t,origLabel:n,type:-1===n.indexOf(":")?"cell":"range",refError:!1,toLabel:function(){var e=(0,g.toLabel)(this.start.row,this.start.column);return"range"===this.type&&(e+=":".concat((0,g.toLabel)(this.end.row,this.end.column))),e}}}}]),t}();(0,a.mixin)(m,l.default);var y=m;t.default=y},function(e,t,n){var r=n(47),o=n(94),i=n(95),a=n(69),s=n(96),l=n(48),u=n(175),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(e,t){if(e=a(e),t=s(t,!0),u)try{return c(e,t)}catch(e){}if(l(e,t))return i(!o.f.call(e,t),e[t])}},function(e,t,n){var r=n(29),o=n(77),i="".split;e.exports=r(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return"String"==o(e)?i.call(e,""):Object(e)}:Object},function(e,t){e.exports=!1},function(e,t,n){var r=n(97),o=n(117),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(87),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){function r(e,t){var n=s[a(e)];return n==u||n!=l&&("function"==typeof t?o(t):!!t)}var o=n(29),i=/#|\.prototype\./,a=r.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=r.data={},l=r.NATIVE="N",u=r.POLYFILL="P";e.exports=r},function(e,t,n){var r=n(49).f,o=n(48),i=n(35)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){function r(e){s(e,c,{value:{objectID:"O"+ ++h,weakData:{}}})}var o=n(98),i=n(42),a=n(48),s=n(49).f,l=n(117),u=n(388),c=l("meta"),h=0,d=Object.isExtensible||function(){return!0},f=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,c)){if(!d(e))return"F";if(!t)return"E";r(e)}return e[c].objectID},getWeakData:function(e,t){if(!a(e,c)){if(!d(e))return!0;if(!t)return!1;r(e)}return e[c].weakData},onFreeze:function(e){return u&&f.REQUIRED&&d(e)&&!a(e,c)&&r(e),e}};o[c]=!0},function(e,t,n){"use strict";var p=n(22),m=n(34),y=n(120),w=n(65),C=n(122),E=n(148),S=n(150),b=n(42),R=n(29),T=n(190),O=n(121),k=n(151);e.exports=function(r,e,t,o,i){function n(e){var n=s[e];w(s,e,"add"==e?function(e){return n.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(i&&!b(e))&&n.call(this,0===e?0:e)}:"get"==e?function(e){return i&&!b(e)?void 0:n.call(this,0===e?0:e)}:"has"==e?function(e){return!(i&&!b(e))&&n.call(this,0===e?0:e)}:function(e,t){return n.call(this,0===e?0:e,t),this})}var a=m[r],s=a&&a.prototype,l=a,u=o?"set":"add",c={};if(y(r,"function"!=typeof a||!(i||s.forEach&&!R(function(){(new a).entries().next()}))))l=t.getConstructor(e,r,o,u),C.REQUIRED=!0;else if(y(r,!0)){var h=new l,d=h[u](i?{}:-0,1)!=h,f=R(function(){h.has(1)}),v=T(function(e){new a(e)}),g=!i&&R(function(){for(var e=new a,t=5;t--;)e[u](t,t);return!e.has(-0)});v||(((l=e(function(e,t){S(e,l,r);var n=k(new a,e,l);return null!=t&&E(t,n[u],n,o),n})).prototype=s).constructor=l),(f||g)&&(n("delete"),n("has"),o&&n("get")),(g||d)&&n(u),i&&s.clear&&delete s.clear}return c[r]=l,p({global:!0,forced:l!=a},c),O(l,r),i||t.setStrong(l,r,o),l}},function(e,t,n){var r=n(77);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){"use strict";var r=n(29);e.exports=function(e,t){var n=[][e];return!n||!r(function(){n.call(null,t||function(){throw 1},1)})}},function(e,t,n){"use strict";var o=n(96),i=n(49),a=n(95);e.exports=function(e,t,n){var r=o(t);r in e?i.f(e,r,a(0,n)):e[r]=n}},function(e,t,n){"use strict";var h=n(63),d=n(65),f=n(29),v=n(35),g=n(154),p=v("species"),m=!f(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),y=!f(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]});e.exports=function(n,e,t,r){var o=v(n),i=!f(function(){var e={};return e[o]=function(){return 7},7!=""[n](e)}),a=i&&!f(function(){var e=!1,t=/a/;return t.exec=function(){return e=!0,null},"split"===n&&(t.constructor={},t.constructor[p]=function(){return t}),t[o](""),!e});if(!i||!a||"replace"===n&&!m||"split"===n&&!y){var s=/./[o],l=t(o,""[n],function(e,t,n,r,o){return t.exec===g?i&&!o?{done:!0,value:s.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),u=l[0],c=l[1];d(String.prototype,n,u),d(RegExp.prototype,o,2==e?function(e,t){return c.call(e,this,t)}:function(e){return c.call(e,this)}),r&&h(RegExp.prototype[o],"sham",!0)}}},function(e,t,n){var o=n(77),i=n(154);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==o(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){"use strict";var r=n(22),o=n(197);r({target:"String",proto:!0,forced:n(394)("trim")},{trim:function(){return o(this,3)}})},function(e,t,n){var r=n(47),o=n(34),i=n(120),a=n(151),s=n(49).f,l=n(99).f,u=n(155),c=n(153),h=n(65),d=n(29),f=n(194),v=n(35)("match"),g=o.RegExp,p=g.prototype,m=/a/g,y=/a/g,w=new g(m)!==m;if(i("RegExp",r&&(!w||d(function(){return y[v]=!1,g(m)!=m||g(y)==y||"/a/i"!=g(m,"i")})))){function C(t){t in E||s(E,t,{configurable:!0,get:function(){return g[t]},set:function(e){g[t]=e}})}for(var E=function(e,t){var n=this instanceof E,r=u(e),o=void 0===t;return!n&&r&&e.constructor===E&&o?e:a(w?new g(r&&!o?e.source:e,t):g((r=e instanceof E)?e.source:e,r&&o?c.call(e):t),n?this:p,E)},S=l(g),b=0;b<S.length;)C(S[b++]);(p.constructor=E).prototype=p,h(o,"RegExp",E)}f("RegExp")},function(e,t,n){"use strict";var r=n(127),h=n(45),d=n(50),o=n(59),f=n(156),v=n(128);r("match",1,function(r,u,c){return[function(e){var t=o(this),n=null==e?void 0:e[r];return void 0!==n?n.call(e,t):new RegExp(e)[r](String(t))},function(e){var t=c(u,e,this);if(t.done)return t.value;var n=h(e),r=String(this);if(!n.global)return v(n,r);for(var o,i=n.unicode,a=[],s=n.lastIndex=0;null!==(o=v(n,r));){var l=String(o[0]);""===(a[s]=l)&&(n.lastIndex=f(r,d(n.lastIndex),i)),s++}return 0===s?null:a}]})},function(e,t,n){"use strict";n(343),t.__esModule=!0,t.spreadsheetColumnLabel=l,t.spreadsheetColumnIndex=function(e){var t=0;if(e)for(var n=0,r=e.length-1;n<e.length;n+=1,r-=1)t+=Math.pow(s,r)*(o.indexOf(e[n])+1);return t-=1},t.createSpreadsheetData=function(){var e,t,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:100,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:4,o=[];for(e=0;e<n;e++){var i=[];for(t=0;t<r;t++)i.push(l(t)+(e+1));o.push(i)}return o},t.createSpreadsheetObjectData=function(){var e,t,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:100,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:4,o=[];for(e=0;e<n;e++){var i={};for(t=0;t<r;t++)i["prop".concat(t)]=l(t)+(e+1);o.push(i)}return o},t.createEmptySpreadsheetData=function(e,t){for(var n,r=[],o=0;o<e;o++){n=[];for(var i=0;i<t;i++)n.push("");r.push(n)}return r},t.translateRowsToColumns=function(e){var t,n,r,o,i=[],a=0;for(t=0,n=e.length;t<n;t++)for(r=0,o=e[t].length;r<o;r++)r===a&&(i.push([]),a+=1),i[r].push(e[t][r]);return i},t.cellMethodLookupFactory=function(r,e){var o=void 0===e||e;return function(e,t){return function e(t){if(t){if((0,a.hasOwnProperty)(t,r)&&void 0!==t[r])return t[r];if((0,a.hasOwnProperty)(t,"type")&&t.type){if("string"!=typeof t.type)throw new Error("Cell type must be a string ");var n=(0,i.getCellType)(t.type);if((0,a.hasOwnProperty)(n,r))return n[r];if(o)return}return e(Object.getPrototypeOf(t))}}("number"==typeof e?this.getCellMeta(e,t):e)}};var i=n(160),a=n(4),o="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s=o.length;function l(e){for(var t,n=e+1,r="";0<n;)t=(n-1)%s,r=String.fromCharCode(65+t)+r,n=parseInt((n-t)/s,10);return r}},function(e,t,n){"use strict";function o(e,t){var n=re[e]=I($[J]);return G(n,{type:j,tag:e,description:t}),f||(n.description=t),n}function r(e,t){O(e);for(var n,r=R(t=N(t)),o=0,i=r.length;o<i;)he(e,n=r[o++],t[n]);return e}function i(e){var t=te.call(this,e=_(e,!0));return!(this===ae&&h(re,e)&&!h(oe,e))&&(!(t||!h(this,e)||!h(re,e)||h(this,Y)&&this[Y][e])||t)}function a(e,t){if(e=N(e),t=_(t,!0),e!==ae||!h(re,t)||h(oe,t)){var n=X(e,t);return!n||!h(re,t)||h(e,Y)&&e[Y][t]||(n.enumerable=!0),n}}function s(e){for(var t,n=q(N(e)),r=[],o=0;n.length>o;)h(re,t=n[o++])||h(p,t)||r.push(t);return r}function l(e){for(var t,n=e===ae,r=q(n?oe:N(e)),o=[],i=0;r.length>i;)!h(re,t=r[i++])||n&&!h(ae,t)||o.push(re[t]);return o}var u=n(22),c=n(34),h=n(48),d=n(181),f=n(47),v=n(115),g=n(65),p=n(98),m=n(29),y=n(97),w=n(121),C=n(117),E=n(35),S=n(346),b=n(347),R=n(450),T=n(124),O=n(45),k=n(42),M=n(60),N=n(69),_=n(96),A=n(95),I=n(101),D=n(99),L=n(180),H=n(113),x=n(49),P=n(94),F=n(63),B=n(89),W=n(119),V=n(116),U=n(86),Y=V("hidden"),j="Symbol",G=U.set,z=U.getterFor(j),X=H.f,K=x.f,q=L.f,$=c.Symbol,Q=c.JSON,Z=Q&&Q.stringify,J="prototype",ee=E("toPrimitive"),te=P.f,ne=y("symbol-registry"),re=y("symbols"),oe=y("op-symbols"),ie=y("wks"),ae=Object[J],se=c.QObject,le=!se||!se[J]||!se[J].findChild,ue=f&&m(function(){return 7!=I(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=X(ae,t);r&&delete ae[t],K(e,t,n),r&&e!==ae&&K(ae,t,r)}:K,ce=d&&"symbol"==typeof $.iterator?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof $},he=function(e,t,n){return e===ae&&he(oe,t,n),O(e),t=_(t,!0),O(n),h(re,t)?(n.enumerable?(h(e,Y)&&e[Y][t]&&(e[Y][t]=!1),n=I(n,{enumerable:A(0,!1)})):(h(e,Y)||K(e,Y,A(1,{})),e[Y][t]=!0),ue(e,t,n)):K(e,t,n)};d||(g(($=function(e){if(this instanceof $)throw TypeError("Symbol is not a constructor");var t=void 0===e?void 0:String(e),n=C(t),r=function(e){this===ae&&r.call(oe,e),h(this,Y)&&h(this[Y],n)&&(this[Y][n]=!1),ue(this,n,A(1,e))};return f&&le&&ue(ae,n,{configurable:!0,set:r}),o(n,t)})[J],"toString",function(){return z(this).tag}),P.f=i,x.f=he,H.f=a,D.f=L.f=s,W.f=l,f&&(K($[J],"description",{configurable:!0,get:function(){return z(this).description}}),v||g(ae,"propertyIsEnumerable",i,{unsafe:!0})),S.f=function(e){return o(E(e),e)}),u({global:!0,wrap:!0,forced:!d,sham:!d},{Symbol:$});for(var de=B(ie),fe=0;de.length>fe;)b(de[fe++]);u({target:j,stat:!0,forced:!d},{for:function(e){return h(ne,e+="")?ne[e]:ne[e]=$(e)},keyFor:function(e){if(!ce(e))throw TypeError(e+" is not a symbol");for(var t in ne)if(ne[t]===e)return t},useSetter:function(){le=!0},useSimple:function(){le=!1}}),u({target:"Object",stat:!0,forced:!d,sham:!f},{create:function(e,t){return void 0===t?I(e):r(I(e),t)},defineProperty:he,defineProperties:r,getOwnPropertyDescriptor:a}),u({target:"Object",stat:!0,forced:!d},{getOwnPropertyNames:s,getOwnPropertySymbols:l}),u({target:"Object",stat:!0,forced:m(function(){W.f(1)})},{getOwnPropertySymbols:function(e){return W.f(M(e))}}),Q&&u({target:"JSON",stat:!0,forced:!d||m(function(){var e=$();return"[null]"!=Z([e])||"{}"!=Z({a:e})||"{}"!=Z(Object(e))})},{stringify:function(e){for(var t,n,r=[e],o=1;o<arguments.length;)r.push(arguments[o++]);if(n=t=r[1],(k(t)||void 0!==e)&&!ce(e))return T(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!ce(t))return t}),r[1]=t,Z.apply(Q,r)}}),$[J][ee]||F($[J],ee,$[J].valueOf),w($,j),p[Y]=!0},function(e,t,n){"use strict";var r=n(22),o=n(47),i=n(34),a=n(48),s=n(42),l=n(49).f,u=n(178),c=i.Symbol;if(o&&"function"==typeof c&&(!("description"in c.prototype)||void 0!==c().description)){var h={},d=function(e){var t=arguments.length<1||void 0===e?void 0:String(e),n=this instanceof d?new c(t):void 0===t?c():c(t);return""===t&&(h[n]=!0),n};u(d,c);var f=d.prototype=c.prototype;f.constructor=d;var v=f.toString,g="Symbol(test)"==String(c("test")),p=/^Symbol\((.*)\)[^)]+$/;l(f,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=v.call(e);if(a(h,e))return"";var n=g?t.slice(7,-1):t.replace(p,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:d})}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.registerLanguageDictionary=v,t.getLanguageDictionary=function(e){return g(e)?(0,o.deepClone)(h(e)):null},t.hasLanguageDictionary=g,t.getDefaultLanguageDictionary=function(){return s.default},t.getLanguagesDictionaries=function(){return f()},t.DEFAULT_LANGUAGE_CODE=void 0;var o=n(4),i=n(350),a=r(n(78)),s=r(n(451)),l=s.default.languageCode;t.DEFAULT_LANGUAGE_CODE=l;var u=(0,a.default)("languagesDictionaries"),c=u.register,h=u.getItem,d=u.hasItem,f=u.getValues;function v(e,t){var n=e,r=t;return(0,o.isObject)(e)&&(n=(r=e).languageCode),function(e,t){e!==l&&(0,i.extendNotExistingKeys)(t,h(l))}(n,r),c(n,(0,o.deepClone)(r)),(0,o.deepClone)(r)}function g(e){return d(e)}v(s.default)},function(e,t,n){"use strict";var r=n(0);n(56),n(16),n(10),n(82),n(14),n(17),t.__esModule=!0,t._getRefCount=function(){return l},t._resetState=u,t.isPressed=function(t){return Array.from(s.values()).some(function(e){return(0,i.isKey)(e,t)})},t.isPressedCtrlKey=function(){return Array.from(s.values()).some(function(e){return(0,i.isCtrlMetaKey)(e)})},t.startObserving=function(e){0===l&&(a.addEventListener(e,"keydown",function(e){s.has(e.keyCode)||s.add(e.keyCode)}),a.addEventListener(e,"keyup",function(e){s.has(e.keyCode)&&s.delete(e.keyCode)}),a.addEventListener(e,"visibilitychange",function(){e.hidden&&s.clear()}),a.addEventListener(e.defaultView,"blur",function(){s.clear()}));l+=1},t.stopObserving=function(){0<l&&(l-=1);0===l&&u()};var o=r(n(23)),i=n(52),a=new o.default,s=new Set,l=0;function u(){a.clearEvents(),s.clear(),l=0}},function(e,t,n){"use strict";var r=n(0);n(133),n(134),n(56),n(31),n(16),n(64),n(10),n(82),n(38),n(14),n(17),t.__esModule=!0,t.detectSelectionType=y,t.normalizeSelectionFactory=w,t.transformSelectionToColumnDistance=function(e){var t=y(e);if(t===c||t===h)return[];var i=w(t),a=new Set;(0,u.arrayEach)(e,function(e){var t=i(e),n=(0,s.default)(t,4),r=n[1],o=n[3]-r+1;(0,u.arrayEach)(Array.from(new Array(o),function(e,t){return r+t}),function(e){a.has(e)||a.add(e)})});var n=Array.from(a).sort(function(e,t){return e-t});return(0,u.arrayReduce)(n,function(e,t,n,r){return 0!==n&&t===r[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e},[])},t.transformSelectionToRowDistance=function(e){var t=y(e);if(t===c||t===h)return[];var i=w(t),a=new Set;(0,u.arrayEach)(e,function(e){var t=i(e),n=(0,s.default)(t,3),r=n[0],o=n[2]-r+1;(0,u.arrayEach)(Array.from(new Array(o),function(e,t){return r+t}),function(e){a.has(e)||a.add(e)})});var n=Array.from(a).sort(function(e,t){return e-t});return(0,u.arrayReduce)(n,function(e,t,n,r){return 0!==n&&t===r[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e},[])},t.isValidCoord=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1/0;return"number"==typeof e&&0<=e&&e<t},t.SELECTION_TYPES=t.SELECTION_TYPE_OBJECT=t.SELECTION_TYPE_ARRAY=t.SELECTION_TYPE_EMPTY=t.SELECTION_TYPE_UNRECOGNIZED=void 0;var s=r(n(18)),a=r(n(44)),l=n(25),u=n(3),f=n(27),c=0;t.SELECTION_TYPE_UNRECOGNIZED=c;var h=1;t.SELECTION_TYPE_EMPTY=h;var d=2;t.SELECTION_TYPE_ARRAY=d;var v=3,o=[t.SELECTION_TYPE_OBJECT=v,d];t.SELECTION_TYPES=o;var g=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],p=Symbol("root"),m=Symbol("child");function y(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:p;if(t!==p&&t!==m)throw new Error("The second argument is used internally only and cannot be overwritten.");var n=Array.isArray(e),r=t===p,o=c;if(n){var i=e[0];if(0===e.length)o=h;else if(r&&i instanceof l.CellRange)o=v;else if(r&&Array.isArray(i))o=y(i,m);else if(2<=e.length&&e.length<=4){!e.some(function(e,t){return!g[t].includes((0,a.default)(e))})&&(o=d)}}return o}function w(c){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=e.keepDirection,h=void 0!==t&&t,d=e.propToCol;if(!o.includes(c))throw new Error("Unsupported selection ranges schema type was provided.");return function(e){var t=c===v,n=t?e.from.row:e[0],r=t?e.from.col:e[1],o=t?e.to.row:e[2],i=t?e.to.col:e[3];if("function"==typeof d&&("string"==typeof r&&(r=d(r)),"string"==typeof i&&(i=d(i))),(0,f.isUndefined)(o)&&(o=n),(0,f.isUndefined)(i)&&(i=r),!h){var a=n,s=r,l=o,u=i;n=Math.min(a,l),r=Math.min(s,u),o=Math.max(a,l),i=Math.max(s,u)}return[n,r,o,i]}}},function(e,t,n){"use strict";var r=n(22),i=n(50),a=n(157),o=n(158),s="startsWith",l=""[s];r({target:"String",proto:!0,forced:!o(s)},{startsWith:function(e,t){var n=a(this,e,s),r=i(Math.min(1<arguments.length?t:void 0,n.length)),o=String(e);return l?l.call(n,o,r):n.slice(r,r+o.length)===o}})},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(3),s=n(4),l=r(n(58)),u=r(n(579)),c=function(){function t(e){(0,o.default)(this,t),this.hot=e,this.elements=[],this.hidden=!1}return(0,i.default)(t,[{key:"reset",value:function(){(0,a.arrayEach)(this.elements,function(e){return e.reset()})}},{key:"hide",value:function(){this.hidden=!0}},{key:"show",value:function(){this.hidden=!1}},{key:"isHidden",value:function(){return this.hidden}},{key:"destroy",value:function(){this.clearLocalHooks(),(0,a.arrayEach)(this.elements,function(e){return e.destroy()}),this.elements=null,this.hot=null}}]),t}();(0,s.mixin)(c,l.default),(0,s.mixin)(c,u.default);var h=c;t.default=h},function(e,t,n){var r=n(34),o=n(42),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){var r=n(34),o=n(63);e.exports=function(t,n){try{o(r,t,n)}catch(e){r[t]=n}return n}},function(e,t,n){var l=n(69),u=n(50),c=n(118);e.exports=function(s){return function(e,t,n){var r,o=l(e),i=u(o.length),a=c(n,i);if(s&&t!=t){for(;a<i;)if((r=o[a++])!=r)return!0}else for(;a<i;a++)if((s||a in o)&&o[a]===t)return s||a||0;return!s&&-1}}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){"use strict";function m(){return this}var y=n(22),w=n(385),C=n(145),E=n(185),S=n(121),b=n(63),R=n(65),r=n(35),T=n(115),O=n(102),o=n(183),k=o.IteratorPrototype,M=o.BUGGY_SAFARI_ITERATORS,N=r("iterator"),_="values";e.exports=function(e,t,n,r,o,i,a){w(n,t,r);function s(e){if(e===o&&g)return g;if(!M&&e in f)return f[e];switch(e){case"keys":case _:case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}}var l,u,c,h=t+" Iterator",d=!1,f=e.prototype,v=f[N]||f["@@iterator"]||o&&f[o],g=!M&&v||s(o),p="Array"==t&&f.entries||v;if(p&&(l=C(p.call(new e)),k!==Object.prototype&&l.next&&(T||C(l)===k||(E?E(l,k):"function"!=typeof l[N]&&b(l,N,m)),S(l,h,!0,!0),T&&(O[h]=m))),o==_&&v&&v.name!==_&&(d=!0,g=function(){return v.call(this)}),T&&!a||f[N]===g||b(f,N,g),O[t]=g,o)if(u={values:s(_),keys:i?g:s("keys"),entries:s("entries")},a)for(c in u)!M&&!d&&c in f||R(f,c,u[c]);else y({target:t,proto:!0,forced:M||d},u);return u}},function(e,t,n){var r=n(48),o=n(60),i=n(116),a=n(184),s=i("IE_PROTO"),l=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=o(e),r(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},function(e,t,n){var l=n(87),u=n(59);e.exports=function(e,t,n){var r,o,i=String(u(e)),a=l(t),s=i.length;return a<0||s<=a?n?"":void 0:(r=i.charCodeAt(a))<55296||56319<r||a+1===s||(o=i.charCodeAt(a+1))<56320||57343<o?n?i.charAt(a):r:n?i.slice(a,a+2):o-56320+(r-55296<<10)+65536}},function(e,t,n){var o=n(65);e.exports=function(e,t,n){for(var r in t)o(e,r,t[r],n);return e}},function(e,t,n){var h=n(45),d=n(187),f=n(50),v=n(103),g=n(188),p=n(189),m={};(e.exports=function(e,t,n,r,o){var i,a,s,l,u,c=v(t,n,r?2:1);if(o)i=e;else{if("function"!=typeof(a=g(e)))throw TypeError("Target is not iterable");if(d(a)){for(s=0,l=f(e.length);s<l;s++)if((r?c(h(u=e[s])[0],u[1]):c(e[s]))===m)return m;return}i=a.call(e)}for(;!(u=i.next()).done;)if(p(i,c,u.value,r)===m)return m}).BREAK=m},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){var i=n(42),a=n(185);e.exports=function(e,t,n){var r,o=t.constructor;return o!==n&&"function"==typeof o&&(r=o.prototype)!==n.prototype&&i(r)&&a&&a(e,r),e}},function(e,t,n){var r=n(42),o=n(124),i=n(35)("species");e.exports=function(e,t){var n;return o(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!o(n.prototype)?r(n)&&null===(n=n[i])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t,n){"use strict";var r=n(45);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var r,o,i=n(153),a=RegExp.prototype.exec,s=String.prototype.replace,l=a,u=(r=/a/,o=/b*/g,a.call(r,"a"),a.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),c=void 0!==/()??/.exec("")[1];(u||c)&&(l=function(e){var t,n,r,o;return c&&(n=new RegExp("^"+this.source+"$(?!\\s)",i.call(this))),u&&(t=this.lastIndex),r=a.call(this,e),u&&r&&(this.lastIndex=this.global?r.index+r[0].length:t),c&&r&&1<r.length&&s.call(r[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)}),r}),e.exports=l},function(e,t,n){var r=n(42),o=n(77),i=n(35)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},function(e,t,n){"use strict";var r=n(146);e.exports=function(e,t,n){return t+(n?r(e,t,!0).length:1)}},function(e,t,n){var r=n(155),o=n(59);e.exports=function(e,t,n){if(r(t))throw TypeError("String.prototype."+n+" doesn't accept regex");return String(o(e))}},function(e,t,n){var r=n(35)("match");e.exports=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[r]=!1,"/./"[t](n)}catch(e){}}return!1}},function(e,t,n){"use strict";var r=n(22),o=n(90),i=n(100),a=o(5),s=!0;"find"in[]&&Array(1).find(function(){s=!1}),r({target:"Array",proto:!0,forced:s},{find:function(e,t){return a(this,e,1<arguments.length?t:void 0)}}),i("find")},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.registerCellType=b,t.getCellType=function(e){if(C(e))return w(e);throw Error('You declared cell type "'.concat(e,'" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by "Handsontable.cellTypes.registerCellType" method'))},t.getRegisteredCellTypes=t.getRegisteredCellTypeNames=t.hasCellType=void 0;var o=r(n(78)),i=n(55),a=n(41),s=n(79),l=r(n(432)),u=r(n(433)),c=r(n(434)),h=r(n(435)),d=r(n(436)),f=r(n(437)),v=r(n(438)),g=r(n(439)),p=r(n(440)),m=(0,o.default)("cellTypes"),y=m.register,w=m.getItem,C=m.hasItem,E=m.getNames,S=m.getValues;function b(e,t){var n=t.editor,r=t.renderer,o=t.validator;n&&(0,i.registerEditor)(e,n),r&&(0,a.registerRenderer)(e,r),o&&(0,s.registerValidator)(e,o),y(e,t)}t.getRegisteredCellTypes=S,t.getRegisteredCellTypeNames=E,t.hasCellType=C,b("autocomplete",l.default),b("checkbox",u.default),b("date",c.default),b("dropdown",h.default),b("handsontable",d.default),b("numeric",f.default),b("password",v.default),b("text",g.default),b("time",p.default)},function(e,t,n){"use strict";var r=n(0);n(19),n(56),n(12),n(64),n(30),n(80),n(81),n(14),n(39),n(442),n(32),t.__esModule=!0,t.default=function(e,t){var B,m,c,y,g,d=this,n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],f=!1,W=this,p=function(){},r=new u.default(W);(0,j.extend)(p.prototype,q.default.prototype),(0,j.extend)(p.prototype,t),(0,j.extend)(p.prototype,b(t)),(0,J.applyLanguageSetting)(p.prototype,t.language),(0,z.hasValidParameter)(n)&&(0,z.registerAsRootInstance)(this);this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,(0,ee.startObserving)(this.rootDocument),this.isDestroyed=!1,this.isHotTableEnv=(0,T.isChildOfWebComponentTable)(this.rootElement),u.default.isHotTableEnv=this.isHotTableEnv,this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),(0,z.isRootInstance)(this)&&(0,Y._injectProductInfo)(t.licenseKey,e);this.guid="ht_".concat((0,L.randomString)());var w=(0,F.getTranslator)(W);c=new P.default(W),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);B={cellSettings:[],columnSettings:[],columnsSettingConflicts:["data","width","language"],settings:new p,selRange:null,isPopulated:null,scrollable:null,firstRun:!0};var C=new te.Selection(B.settings,{countCols:function(){return W.countCols()},countRows:function(){return W.countRows()},propToCol:function(e){return m.propToCol(e)},isEditorOpened:function(){return!!W.getActiveEditor()&&W.getActiveEditor().isOpened()}});function E(){var e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue:function(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue:function(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty:function(){},checkIfQueueIsEmpty:function(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function h(o,e,t){if(o.length){var n=W.runHooks("beforeChange",o,e||"edit");if((0,k.isFunction)(n))(0,M.warn)("Your beforeChange callback returns a function. It's not supported since Handsontable 0.12.1 (and the returned function will not be executed).");else if(!1===n){var r=W.getActiveEditor();return void(r&&r.cancelChanges())}var i,a,s,l=new E;l.onQueueEmpty=t;for(var u=o.length-1;0<=u;u--)if(null===o[u])o.splice(u,1);else{var c=(0,R.default)(o[u],4),h=c[0],d=c[1],f=c[3],v=m.propToCol(d),g=W.getCellMeta(h,v);"numeric"===g.type&&"string"==typeof f&&(0<(s=f).length&&/^\s*[+-.]?\s*(?:(?:\d+(?:(\.|,)\d+)?(?:e[+-]?\d+)?)|(?:0x[a-f\d]+))\s*$/.test(s))&&(o[u][3]=(void 0,a=(i=f).replace(",","."),!1===isNaN(parseFloat(a))?parseFloat(a):i)),W.getCellValidator(g)&&(l.addValidatorToQueue(),W.validateCell(o[u][3],g,function(n,r){return function(e){if("boolean"!=typeof e)throw new Error("Validation error: result is not boolean");if(!1===e&&!1===r.allowInvalid){o.splice(n,1),r.valid=!0;var t=W.getCell(r.visualRow,r.visualCol);null!==t&&(0,T.removeClass)(t,W.getSettings().invalidCellClassName)}l.removeValidatorFormQueue()}}(u,g),e))}l.checkIfQueueIsEmpty()}}function v(e,t){var n=e.length-1;if(!(n<0)){for(;0<=n;n--){var r=!1;if(null!==e[n]){if(null!==e[n][2]&&void 0!==e[n][2]||null!==e[n][3]&&void 0!==e[n][3]){if(B.settings.allowInsertRow)for(;e[n][0]>W.countRows()-1;){if(0===m.createRow(void 0,void 0,t)){r=!0;break}}if("array"===W.dataType&&(!B.settings.columns||0===B.settings.columns.length)&&B.settings.allowInsertColumn)for(;m.propToCol(e[n][1])>W.countCols()-1;){if(0===m.createCol(void 0,void 0,t)){r=!0;break}}r||m.set(e[n][0],e[n][1],e[n][3])}}else e.splice(n,1)}W.forceFullRender=!0,y.adjustRowsAndCols(),W.runHooks("beforeChangeRender",e,t),g.lockEditor(),W._refreshBorders(null),g.unlockEditor(),W.view.wt.wtOverlays.adjustElementsSize(),W.runHooks("afterChange",e,t||"edit");var o=W.getActiveEditor();o&&(0,Y.isDefined)(o.refreshValue)&&o.refreshValue()}}function S(e,t,n){return"object"===(0,V.default)(e)?e:[[e,t,n]]}function b(e){if((0,j.hasOwnProperty)(e,"type")){var t,n={};for(var r in"object"===(0,V.default)(e.type)?t=e.type:"string"==typeof e.type&&(t=(0,$.getCellType)(e.type)),t)(0,j.hasOwnProperty)(t,r)&&!(0,j.hasOwnProperty)(e,r)&&(n[r]=t[r]);return n}}this.selection=C,this.selection.addLocalHook("beforeSetRangeStart",function(e){d.runHooks("beforeSetRangeStart",e)}),this.selection.addLocalHook("beforeSetRangeStartOnly",function(e){d.runHooks("beforeSetRangeStartOnly",e)}),this.selection.addLocalHook("beforeSetRangeEnd",function(e){d.runHooks("beforeSetRangeEnd",e),e.row<0&&(e.row=d.view.wt.wtTable.getFirstVisibleRow()),e.col<0&&(e.col=d.view.wt.wtTable.getFirstVisibleColumn())}),this.selection.addLocalHook("afterSetRangeEnd",function(e){var t=(0,j.createObjectPropListener)(!1),n=d.selection.getSelectedRange(),r=n.current(),o=r.from,i=r.to,a=n.size()-1;d.runHooks("afterSelection",o.row,o.col,i.row,i.col,t,a),d.runHooks("afterSelectionByProp",o.row,W.colToProp(o.col),i.row,W.colToProp(i.col),t,a);var s=d.selection.isSelectedByAnyHeader(),l=d.selection.selectedRange.current(),u=!0;f&&(u=!1),t.isTouched()&&(u=!t.value);var c=d.selection.isSelectedByRowHeader(),h=d.selection.isSelectedByColumnHeader();!1!==u&&(s?c?d.view.scrollViewportVertically(e.row):h&&d.view.scrollViewportHorizontally(e.col):l&&!d.selection.isMultiple()?d.view.scrollViewport(l.from):d.view.scrollViewport(e)),c&&h?(0,T.addClass)(d.rootElement,["ht__selection--rows","ht__selection--columns"]):c?((0,T.removeClass)(d.rootElement,"ht__selection--columns"),(0,T.addClass)(d.rootElement,"ht__selection--rows")):h?((0,T.removeClass)(d.rootElement,"ht__selection--rows"),(0,T.addClass)(d.rootElement,"ht__selection--columns")):(0,T.removeClass)(d.rootElement,["ht__selection--rows","ht__selection--columns"]),d._refreshBorders(null)}),this.selection.addLocalHook("afterSelectionFinished",function(e){var t=e.length-1,n=e[t],r=n.from,o=n.to;d.runHooks("afterSelectionEnd",r.row,r.col,o.row,o.col,t),d.runHooks("afterSelectionEndByProp",r.row,W.colToProp(r.col),o.row,W.colToProp(o.col),t)}),this.selection.addLocalHook("afterIsMultipleSelection",function(e){var t=d.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)}),this.selection.addLocalHook("beforeModifyTransformStart",function(e){d.runHooks("modifyTransformStart",e)}),this.selection.addLocalHook("afterModifyTransformStart",function(e,t,n){d.runHooks("afterModifyTransformStart",e,t,n)}),this.selection.addLocalHook("beforeModifyTransformEnd",function(e){d.runHooks("modifyTransformEnd",e)}),this.selection.addLocalHook("afterModifyTransformEnd",function(e,t,n){d.runHooks("afterModifyTransformEnd",e,t,n)}),this.selection.addLocalHook("afterDeselect",function(){g.destroyEditor(),d._refreshBorders(),(0,T.removeClass)(d.rootElement,["ht__selection--rows","ht__selection--columns"]),d.runHooks("afterDeselect")}),this.selection.addLocalHook("insertRowRequire",function(e){d.alter("insert_row",e,1,"auto")}),this.selection.addLocalHook("insertColRequire",function(e){d.alter("insert_col",e,1,"auto")}),y={alter:function(e,t,n,r,o){var i,u=2<arguments.length&&void 0!==n?n:1,c=3<arguments.length?r:void 0,a=4<arguments.length?o:void 0;function s(e,t,n,r){var o=(0,N.arrayMap)(new Array(n),function(){return function(){var e;return"array"===r?e=[]:"object"===r&&(e={}),e}()});o.unshift(t,0),e.splice.apply(e,(0,U.default)(o))}function l(e){if(0===e.length)return[];var t=(0,U.default)(e);return t.sort(function(e,t){var n=(0,R.default)(e,1)[0],r=(0,R.default)(t,1)[0];return n===r?0:r<n?1:-1}),(0,N.arrayReduce)(t,function(e,t){var n=(0,R.default)(t,2),r=n[0],o=n[1],i=e[e.length-1],a=(0,R.default)(i,2),s=a[0]+a[1];if(r<=s){var l=Math.max(o-(s-r),0);i[1]+=l}else e.push([r,o]);return e},[t[0]])}switch(e){case"insert_row":var h=W.countSourceRows();if(W.getSettings().maxRows===h)return;t=(0,Y.isDefined)(t)?t:h,i=m.createRow(t,u,c),s(B.cellSettings,t,u,"array"),i&&(C.isSelected()&&C.selectedRange.current().from.row>=t?(C.selectedRange.current().from.row+=i,C.transformEnd(i,0)):W._refreshBorders());break;case"insert_col":i=m.createCol(t,u,c);for(var d=0,f=W.countSourceRows();d<f;d++)B.cellSettings[d]&&s(B.cellSettings[d],t,u);if(i){if(Array.isArray(W.getSettings().colHeaders)){var v=[t,0];v.length+=i,Array.prototype.splice.apply(W.getSettings().colHeaders,v)}C.isSelected()&&C.selectedRange.current().from.col>=t?(C.selectedRange.current().from.col+=i,C.transformEnd(0,i)):W._refreshBorders()}break;case"remove_row":var g=function(e){var l=0;(0,N.arrayEach)(e,function(e){var t=(0,R.default)(e,2),n=t[0],r=t[1],o=(0,Y.isEmpty)(n)?W.countRows()-1:Math.max(n-l,0);Number.isInteger(n)&&(n=Math.max(n-l,0)),m.removeRow(n,r,c),B.cellSettings.splice(o,u);var i=W.countRows(),a=W.getSettings().fixedRowsTop;o+1<=a&&(W.getSettings().fixedRowsTop-=Math.min(r,a-o));var s=W.getSettings().fixedRowsBottom;s&&i-s<=o&&(W.getSettings().fixedRowsBottom-=Math.min(r,s)),l+=r})};Array.isArray(t)?g(l(t)):g([[t,u]]),y.adjustRowsAndCols(),W._refreshBorders();break;case"remove_col":var p=function(e){var u=0;(0,N.arrayEach)(e,function(e){var t=(0,R.default)(e,2),n=t[0],r=t[1],o=(0,Y.isEmpty)(n)?W.countCols()-1:Math.max(n-u,0),i=w.toPhysicalColumn(o);Number.isInteger(n)&&(n=Math.max(n-u,0)),m.removeCol(n,r,c);for(var a=0,s=W.countSourceRows();a<s;a++)B.cellSettings[a]&&B.cellSettings[a].splice(i,r);var l=W.getSettings().fixedColumnsLeft;o+1<=l&&(W.getSettings().fixedColumnsLeft-=Math.min(r,l-o)),Array.isArray(W.getSettings().colHeaders)&&(void 0===i&&(i=-1),W.getSettings().colHeaders.splice(i,r)),u+=r})};Array.isArray(t)?p(l(t)):p([[t,u]]),y.adjustRowsAndCols(),W._refreshBorders();break;default:throw new Error('There is no such action "'.concat(e,'"'))}a||y.adjustRowsAndCols()},adjustRowsAndCols:function(){if(B.settings.minRows){var e=W.countRows();if(e<B.settings.minRows)for(var t=0,n=B.settings.minRows;t<n-e;t++)m.createRow(W.countRows(),1,"auto")}if(B.settings.minSpareRows){var r=W.countEmptyRows(!0);if(r<B.settings.minSpareRows)for(;r<B.settings.minSpareRows&&W.countSourceRows()<B.settings.maxRows;r++)m.createRow(W.countRows(),1,"auto")}var o;if((B.settings.minCols||B.settings.minSpareCols)&&(o=W.countEmptyCols(!0)),B.settings.minCols&&!B.settings.columns&&W.countCols()<B.settings.minCols)for(;W.countCols()<B.settings.minCols;o++)m.createCol(W.countCols(),1,"auto");if(B.settings.minSpareCols&&!B.settings.columns&&"array"===W.dataType&&o<B.settings.minSpareCols)for(;o<B.settings.minSpareCols&&W.countCols()<B.settings.maxCols;o++)m.createCol(W.countCols(),1,"auto");var a=W.countRows(),s=W.countCols();0!==a&&0!==s||C.deselect(),C.isSelected()&&(0,N.arrayEach)(C.selectedRange,function(e){var t=!1,n=e.from.row,r=e.from.col,o=e.to.row,i=e.to.col;a-1<n?(t=!0,(n=a-1)<o&&(o=n)):a-1<o&&(t=!0,(o=a-1)<n&&(n=o)),s-1<r?(t=!0,(r=s-1)<i&&(i=r)):s-1<i&&(t=!0,(i=s-1)<r&&(r=i)),t&&W.selectCell(n,r,o,i)}),W.view&&W.view.wt.wtOverlays.adjustElementsSize()},populateFromArray:function(e,o,t,n,r,i,a){var s,l,u,c,h,d,f,v,g=[],p={};if(0===(l=o.length))return!1;switch(r){case"shift_down":for(h=t?t.col-e.col+1:0,d=t?t.row-e.row+1:0,c=(o=(u=0,G.translateRowsToColumns)(o)).length,f=Math.max(c,h);u<f;u++)if(u<c){var m;for(s=0,l=o[u].length;s<d-l;s++)o[u].push(o[u][s%l]);o[u].unshift(e.col+u,e.row,0),(m=W).spliceCol.apply(m,(0,U.default)(o[u]))}else{var y;o[u%c][0]=e.col+u,(y=W).spliceCol.apply(y,(0,U.default)(o[u%c]))}break;case"shift_right":for(h=t?t.col-e.col+1:0,d=t?t.row-e.row+1:0,s=0,l=o.length,v=Math.max(l,d);s<v;s++)if(s<l){var w;for(u=0,c=o[s].length;u<h-c;u++)o[s].push(o[s][u%c]);o[s].unshift(e.row+s,e.col,0),(w=W).spliceRow.apply(w,(0,U.default)(o[s]))}else{var C;o[s%l][0]=e.row+s,(C=W).spliceRow.apply(C,(0,U.default)(o[s%l]))}break;case"overwrite":default:p.row=e.row,p.col=e.col;var E,S={row:t&&e?t.row-e.row+1:1,col:t&&e?t.col-e.col+1:1},b=0,R=0,T=!0,O=function(e,t){var n=1<arguments.length&&void 0!==t?t:null,r=o[e%o.length];return null!==n?r[n%r.length]:r},k=o.length,M=t?t.row-e.row+1:0;for(l=t?M:Math.max(k,M),s=0;s<l&&!(t&&p.row>t.row&&k<M||!B.settings.allowInsertRow&&p.row>W.countRows()-1||p.row>=B.settings.maxRows);s++){var N=s-b,_=O(N).length,A=t?t.col-e.col+1:0;if(c=t?A:Math.max(_,A),p.col=e.col,E=W.getCellMeta(p.row,p.col),"CopyPaste.paste"!==n&&"Autofill.fill"!==n||!E.skipRowOnPaste){for(u=R=0;u<c&&!(t&&p.col>t.col&&_<A||!B.settings.allowInsertColumn&&p.col>W.countCols()-1||p.col>=B.settings.maxCols);u++)if(E=W.getCellMeta(p.row,p.col),"CopyPaste.paste"!==n&&"Autofill.fill"!==n||!E.skipColumnOnPaste)if(E.readOnly)p.col+=1;else{var I=u-R,D=O(N,I),L=W.getDataAtCell(p.row,p.col),H={row:N,col:I};if("Autofill.fill"===n){var x=W.runHooks("beforeAutofillInsidePopulate",H,i,o,a,{},S);x&&(D=(0,Y.isUndefined)(x.value)?D:x.value)}if(null!==D&&"object"===(0,V.default)(D))if(Array.isArray(D)&&null===L&&(L=[]),null===L||"object"!==(0,V.default)(L))T=!1;else{var P=(0,j.duckSchema)(Array.isArray(L)?L:L[0]||L),F=(0,j.duckSchema)(Array.isArray(D)?D:D[0]||D);(0,j.isObjectEqual)(P,F)?D=(0,j.deepClone)(D):T=!1}else null!==L&&"object"===(0,V.default)(L)&&(T=!1);T&&g.push([p.row,p.col,D]),T=!0,p.col+=1}else R+=1,p.col+=1,c+=1;p.row+=1}else b+=1,p.row+=1,l+=1}W.setDataAtCell(g,null,null,n||"populateFromArray")}}},this.init=function(){c.setData(B.settings.data),W.runHooks("beforeInit"),(0,a.isMobileBrowser)()&&(0,T.addClass)(W.rootElement,"mobile"),this.updateSettings(B.settings,!0),this.view=new x.default(this),g=l.default.getInstance(W,B,C,m),this.forceFullRender=!0,W.runHooks("init"),this.view.render(),"object"===(0,V.default)(B.firstRun)&&(W.runHooks("afterChange",B.firstRun[0],B.firstRun[1]),B.firstRun=!1),W.runHooks("afterInit")},this.validateCell=function(t,i,a,n){var r,e=W.getCellValidator(i);function o(e,t){if((!(1<arguments.length&&void 0!==t)||t)&&!0!==i.hidden){var n=i.visualCol,r=i.visualRow,o=W.getCell(r,n,!0);o&&"TH"!==o.nodeName&&W.view.wt.wtSettings.settings.cellRenderer(r,n,o),a(e)}else a(e)}(0,Y.isRegExp)(e)&&(r=e,e=function(e,t){t(r.test(e))}),(0,k.isFunction)(e)?(t=W.runHooks("beforeValidate",t,i.visualRow,i.prop,n),W._registerImmediate(function(){e.call(i,t,function(e){W&&(e=W.runHooks("afterValidate",e,t,i.visualRow,i.prop,n),o(i.valid=e),W.runHooks("postAfterValidate",e,t,i.visualRow,i.prop,n))})})):W._registerImmediate(function(){i.valid=!0,o(i.valid,!1)})},this.setDataAtCell=function(e,t,n,r){var o,i,a,s=S(e,t,n),l=[],u=r;for(o=0,i=s.length;o<i;o++){if("object"!==(0,V.default)(s[o]))throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof s[o][1])throw new Error("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");a=m.colToProp(s[o][1]),l.push([s[o][0],a,c.getAtCell(w.toPhysicalRow(s[o][0]),s[o][1]),s[o][2]])}u||"object"!==(0,V.default)(e)||(u=t),W.runHooks("afterSetDataAtCell",l,u),h(l,u,function(){v(l,u)})},this.setDataAtRowProp=function(e,t,n,r){var o,i,a=S(e,t,n),s=[],l=r;for(o=0,i=a.length;o<i;o++)s.push([a[o][0],a[o][1],c.getAtCell(w.toPhysicalRow(a[o][0]),a[o][1]),a[o][2]]);l||"object"!==(0,V.default)(e)||(l=t),W.runHooks("afterSetDataAtRowProp",s,l),h(s,l,function(){v(s,l)})},this.listen=function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],t=W.rootDocument;if(e){var n=!t.activeElement||t.activeElement&&void 0===t.activeElement.nodeName;t.activeElement&&t.activeElement!==t.body&&!n?t.activeElement.blur():n&&t.body.focus()}W&&!W.isListening()&&(ne=W.guid,W.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(ne=null,W.runHooks("afterUnlisten"))},this.isListening=function(){return ne===W.guid},this.destroyEditor=function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];W._refreshBorders(e,t)},this.populateFromArray=function(e,t,n,r,o,i,a,s,l){if("object"!==(0,V.default)(n)||"object"!==(0,V.default)(n[0]))throw new Error("populateFromArray parameter `input` must be an array of arrays");var u="number"==typeof r?new X.CellCoords(r,o):null;return y.populateFromArray(new X.CellCoords(e,t),n,u,i,a,s,l)},this.spliceCol=function(e,t,n){for(var r,o=arguments.length,i=new Array(3<o?o-3:0),a=3;a<o;a++)i[a-3]=arguments[a];return(r=m).spliceCol.apply(r,[e,t,n].concat(i))},this.spliceRow=function(e,t,n){for(var r,o=arguments.length,i=new Array(3<o?o-3:0),a=3;a<o;a++)i[a-3]=arguments[a];return(r=m).spliceRow.apply(r,[e,t,n].concat(i))},this.getSelected=function(){if(C.isSelected())return(0,N.arrayMap)(C.getSelectedRange(),function(e){var t=e.from,n=e.to;return[t.row,t.col,n.row,n.col]})},this.getSelectedLast=function(){var e,t=this.getSelected();return t&&0<t.length&&(e=t[t.length-1]),e},this.getSelectedRange=function(){if(C.isSelected())return Array.from(C.getSelectedRange())},this.getSelectedRangeLast=function(){var e,t=this.getSelectedRange();return t&&0<t.length&&(e=t[t.length-1]),e},this.emptySelectedCells=function(){var o=this;if(C.isSelected()){var i=[];(0,N.arrayEach)(C.getSelectedRange(),function(e){var n=e.getTopLeftCorner(),r=e.getBottomRightCorner();(0,H.rangeEach)(n.row,r.row,function(t){(0,H.rangeEach)(n.col,r.col,function(e){o.getCellMeta(t,e).readOnly||i.push([t,e,""])})})}),0<i.length&&this.setDataAtCell(i)}},this.render=function(){W.view&&(W.renderCall=!0,W.forceFullRender=!0,g.lockEditor(),W._refreshBorders(null),g.unlockEditor())},this.refreshDimensions=function(){if(W.view){var e=W.view.getLastSize(),t=e.width,n=e.height,r=W.rootElement.getBoundingClientRect(),o=r.width,i=r.height,a=o!==t||i!==n;!1===W.runHooks("beforeRefreshDimensions",{width:t,height:n},{width:o,height:i},a)||(!a&&W.view.wt.wtOverlays.scrollableElement!==W.rootWindow||(W.view.setLastSize(o,i),W.render()),W.runHooks("afterRefreshDimensions",{width:t,height:n},{width:o,height:i},a))}},this.loadData=function(e){if(Array.isArray(B.settings.dataSchema)?W.dataType="array":(0,k.isFunction)(B.settings.dataSchema)?W.dataType="function":W.dataType="object",m&&m.destroy(),m=new s.default(W,B,p),"object"===(0,V.default)(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 (".concat((0,V.default)(e)," given)"));var t,n=m.getSchema();e=[];var r,o=0;for(o=0,r=B.settings.startRows;o<r;o++)if("object"!==W.dataType&&"function"!==W.dataType||!B.settings.dataSchema)if("array"===W.dataType)t=(0,j.deepClone)(n[0]),e.push(t);else{t=[];for(var i=0,a=B.settings.startCols;i<a;i++)t.push(null);e.push(t)}else t=(0,j.deepClone)(n),e.push(t)}B.isPopulated=!1,p.prototype.data=e,Array.isArray(e[0])&&(W.dataType="array"),m.dataSource=e,c.data=e,c.dataType=W.dataType,c.colToProp=m.colToProp.bind(m),c.propToCol=m.propToCol.bind(m),B.cellSettings.length=0,y.adjustRowsAndCols(),W.runHooks("afterLoadData",B.firstRun),B.firstRun?B.firstRun=[null,"loadData"]:(W.runHooks("afterChange",null,"loadData"),W.render()),B.isPopulated=!0},this.getData=function(e,t,n,r){return(0,Y.isUndefined)(e)?m.getAll():m.getRange(new X.CellCoords(e,t),new X.CellCoords(n,r),m.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,n,r){return m.getCopyableText(new X.CellCoords(e,t),new X.CellCoords(n,r))},this.getCopyableData=function(e,t){return m.getCopyable(e,m.colToProp(t))},this.getSchema=function(){return m.getSchema()},this.updateSettings=function(e){var t,n,r,o,i,a=1<arguments.length&&void 0!==arguments[1]&&arguments[1],s=!1;if((0,Y.isDefined)(e.rows))throw new Error('"rows" setting is no longer supported. do you mean startRows, minRows or maxRows?');if((0,Y.isDefined)(e.cols))throw new Error('"cols" setting is no longer supported. do you mean startCols, minCols or maxCols?');for(t in e)"data"!==t&&("language"!==t?-1<K.default.getSingleton().getRegistered().indexOf(t)?((0,k.isFunction)(e[t])||Array.isArray(e[t]))&&(e[t].initialHook=!0,W.addHook(t,e[t])):!a&&(0,j.hasOwnProperty)(e,t)&&(p.prototype[t]=e[t]):(o=e.language,void 0,i=(0,J.normalizeLanguageCode)(o),(0,Z.hasLanguageDictionary)(i)?(W.runHooks("beforeLanguageChange",i),p.prototype.language=i,W.runHooks("afterLanguageChange",i)):(0,J.warnUserAboutLanguageRegistration)(o)));void 0===e.data&&void 0===B.settings.data?W.loadData(null):void 0!==e.data?W.loadData(e.data):void 0!==e.columns&&m.createMap(),r=W.countCols();var l,u,c=e.columns||p.prototype.columns;if(c&&(0,k.isFunction)(c)&&(r=W.countSourceCols(),s=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||(B.cellSettings.length=0),0<r)for(n=t=0;t<r;t++)s&&!c(t)||(B.columnSettings[n]=(0,O.columnFactory)(p,B.columnsSettingConflicts),l=B.columnSettings[n].prototype,c&&(u=s?c(t):c[n])&&((0,j.extend)(l,u),(0,j.extend)(l,b(u))),n+=1);(0,Y.isDefined)(e.cell)&&(0,j.objectEach)(e.cell,function(e){W.setCellMetaObject(e.row,e.col,e)}),W.runHooks("afterCellMetaReset"),(0,Y.isDefined)(e.className)&&(p.prototype.className&&(0,T.removeClass)(W.rootElement,p.prototype.className),e.className&&(0,T.addClass)(W.rootElement,e.className));var h=W.rootElement.style.height;""!==h&&(h=parseInt(W.rootElement.style.height,10));var d=e.height;(0,k.isFunction)(d)&&(d=d()),!a||W.rootElement.getAttribute("style")&&W.rootElement.setAttribute("data-initialstyle",W.rootElement.getAttribute("style"));if(null===d){var f=W.rootElement.getAttribute("data-initialstyle");f&&(-1<f.indexOf("height")||-1<f.indexOf("overflow"))?W.rootElement.setAttribute("style",f):(W.rootElement.style.height="",W.rootElement.style.overflow="")}else void 0!==d&&(W.rootElement.style.height=isNaN(d)?"".concat(d):"".concat(d,"px"),W.rootElement.style.overflow="hidden");if(void 0!==e.width){var v=e.width;(0,k.isFunction)(v)&&(v=v()),W.rootElement.style.width=isNaN(v)?"".concat(v):"".concat(v,"px")}a||(m.clearLengthCache(),W.view&&W.view.wt.wtViewport.resetHasOversizedColumnHeadersMarked(),W.runHooks("afterUpdateSettings",e)),y.adjustRowsAndCols(),W.view&&!B.firstRun&&(W.forceFullRender=!0,g.lockEditor(),W._refreshBorders(null),g.unlockEditor()),a||!W.view||""!==h&&""!==d&&void 0!==d||h===d||W.view.wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){var e=W.getSelectedLast();if(p.prototype.getValue){if((0,k.isFunction)(p.prototype.getValue))return p.prototype.getValue.call(W);if(e)return W.getData()[e[0][0]][p.prototype.getValue]}else if(e)return W.getDataAtCell(e[0],e[1])},this.getSettings=function(){return B.settings},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,n,r,o){y.alter(e,t,n,r,o)},this.getCell=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];return W.view.getCellAtCoords(new X.CellCoords(e,t),n)},this.getCoords=function(e){return this.view.wt.wtTable.getCoords.call(this.view.wt.wtTable,e)},this.colToProp=function(e){return m.colToProp(e)},this.propToCol=function(e){return m.propToCol(e)},this.toVisualRow=function(e){return w.toVisualRow(e)},this.toVisualColumn=function(e){return w.toVisualColumn(e)},this.toPhysicalRow=function(e){return w.toPhysicalRow(e)},this.toPhysicalColumn=function(e){return w.toPhysicalColumn(e)},this.getDataAtCell=function(e,t){return m.get(e,m.colToProp(t))},this.getDataAtRowProp=function(e,t){return m.get(e,t)},this.getDataAtCol=function(e){var t;return(t=[]).concat.apply(t,(0,U.default)(m.getRange(new X.CellCoords(0,e),new X.CellCoords(B.settings.data.length-1,e),m.DESTINATION_RENDERER)))},this.getDataAtProp=function(e){var t,n=m.getRange(new X.CellCoords(0,m.propToCol(e)),new X.CellCoords(B.settings.data.length-1,m.propToCol(e)),m.DESTINATION_RENDERER);return(t=[]).concat.apply(t,(0,U.default)(n))},this.getSourceData=function(e,t,n,r){return void 0===e?c.getData():c.getByRange(new X.CellCoords(e,t),new X.CellCoords(n,r))},this.getSourceDataArray=function(e,t,n,r){return void 0===e?c.getData(!0):c.getByRange(new X.CellCoords(e,t),new X.CellCoords(n,r),!0)},this.getSourceDataAtCol=function(e){return c.getAtColumn(e)},this.getSourceDataAtRow=function(e){return c.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return c.getAtCell(e,t)},this.getDataAtRow=function(e){return m.getRange(new X.CellCoords(e,0),new X.CellCoords(e,this.countCols()-1),m.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,n,r){var o=this,i=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,n,r],a=i[0],s=i[1],l=i[2],u=i[3],c=null,h=null;void 0===l&&(l=a),void 0===u&&(u=s);var d="mixed";return(0,H.rangeEach)(Math.min(a,l),Math.max(a,l),function(n){var r=!0;return(0,H.rangeEach)(Math.min(s,u),Math.max(s,u),function(e){var t=o.getCellMeta(n,e);return h=t.type,c?r=c===h:c=h,r}),d=r?h:"mixed",r}),d},this.removeCellMeta=function(e,t,n){var r=w.toPhysical(e,t),o=(0,R.default)(r,2),i=o[0],a=o[1],s=B.cellSettings[i][a][n];!1!==W.runHooks("beforeRemoveCellMeta",e,t,n,s)&&(delete B.cellSettings[i][a][n],W.runHooks("afterRemoveCellMeta",e,t,n,s)),s=null},this.spliceCellsMeta=function(e,t){for(var n,r=arguments.length,o=new Array(2<r?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];(n=B.cellSettings).splice.apply(n,[e,t].concat(o))},this.setCellMetaObject=function(n,r,e){var o=this;"object"===(0,V.default)(e)&&(0,j.objectEach)(e,function(e,t){o.setCellMeta(n,r,t,e)})},this.setCellMeta=function(e,t,n,r){var o=w.toPhysical(e,t),i=(0,R.default)(o,2),a=i[0],s=i[1];B.columnSettings[s]||(B.columnSettings[s]=(0,O.columnFactory)(p,B.columnsSettingConflicts)),B.cellSettings[a]||(B.cellSettings[a]=[]),B.cellSettings[a][s]||(B.cellSettings[a][s]=new B.columnSettings[s]),B.cellSettings[a][s][n]=r,W.runHooks("afterSetCellMeta",e,t,n,r)},this.getCellsMeta=function(){return(0,N.arrayFlatten)(B.cellSettings)},this.getCellMeta=function(e,t){var n=m.colToProp(t),r=w.toPhysical(e,t),o=(0,R.default)(r,2),i=o[0],a=o[1],s=i;null===s&&(s=e),B.columnSettings[a]||(B.columnSettings[a]=(0,O.columnFactory)(p,B.columnsSettingConflicts)),B.cellSettings[s]||(B.cellSettings[s]=[]),B.cellSettings[s][a]||(B.cellSettings[s][a]=new B.columnSettings[a]);var l=B.cellSettings[s][a];if(l.row=s,l.col=a,l.visualRow=e,l.visualCol=t,l.prop=n,(l.instance=W).runHooks("beforeGetCellMeta",e,t,l),(0,j.extend)(l,b(l)),l.cells){var u=l.cells.call(l,s,a,n);u&&((0,j.extend)(l,u),(0,j.extend)(l,b(u)))}return W.runHooks("afterGetCellMeta",e,t,l),l},this.getCellMetaAtRow=function(e){return B.cellSettings[e]},this.isColumnModificationAllowed=function(){return!("object"===W.dataType||W.getSettings().columns)};var o=(0,G.cellMethodLookupFactory)("renderer");this.getCellRenderer=function(e,t){return(0,I.getRenderer)(o.call(this,e,t))},this.getCellEditor=(0,G.cellMethodLookupFactory)("editor");var i=(0,G.cellMethodLookupFactory)("validator");this.getCellValidator=function(e,t){var n=i.call(this,e,t);return"string"==typeof n&&(n=(0,D.getValidator)(n)),n},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){if(!Array.isArray(e))throw new Error("validateRows parameter `rows` must be an array");this._validateCells(t,e)},this.validateColumns=function(e,t){if(!Array.isArray(e))throw new Error("validateColumns parameter `columns` must be an array");this._validateCells(t,void 0,e)},this._validateCells=function(e,t,n){var r=new E;e&&(r.onQueueEmpty=e);for(var o=W.countRows()-1;0<=o;)if(void 0===t||-1!==t.indexOf(o)){for(var i=W.countCols()-1;0<=i;)(void 0===n||-1!==n.indexOf(i))&&(r.addValidatorToQueue(),W.validateCell(W.getDataAtCell(o,i),W.getCellMeta(o,i),function(e){if("boolean"!=typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(r.valid=!1),r.removeValidatorFormQueue()},"validateCells")),i-=1;o-=1}else o-=1;r.checkIfQueueIsEmpty()},this.getRowHeader=function(e){var t=B.settings.rowHeaders,n=e;return void 0!==n&&(n=W.runHooks("modifyRowHeader",n)),void 0===n?(t=[],(0,H.rangeEach)(W.countRows()-1,function(e){t.push(W.getRowHeader(e))})):Array.isArray(t)&&void 0!==t[n]?t=t[n]:(0,k.isFunction)(t)?t=t(n):t&&"string"!=typeof t&&"number"!=typeof t&&(t=n+1),t},this.hasRowHeaders=function(){return!!B.settings.rowHeaders},this.hasColHeaders=function(){if(void 0!==B.settings.colHeaders&&null!==B.settings.colHeaders)return!!B.settings.colHeaders;for(var e=0,t=W.countCols();e<t;e++)if(W.getColHeader(e))return!0;return!1},this.getColHeader=function(e){var t=B.settings.columns&&(0,k.isFunction)(B.settings.columns),n=W.runHooks("modifyColHeader",e),r=B.settings.colHeaders;if(void 0===n){for(var o=[],i=t?W.countSourceCols():W.countCols(),a=0;a<i;a++)o.push(W.getColHeader(a));r=o}else{var s=n,l=W.runHooks("modifyCol",s),u=function(e){for(var t=[],n=W.countSourceCols(),r=0;r<n;r++)(0,k.isFunction)(W.getSettings().columns)&&W.getSettings().columns(r)&&t.push(r);return t[e]}(l);!1===B.settings.colHeaders?r=null:B.settings.columns&&(0,k.isFunction)(B.settings.columns)&&B.settings.columns(u)&&B.settings.columns(u).title?r=B.settings.columns(u).title:B.settings.columns&&B.settings.columns[l]&&B.settings.columns[l].title?r=B.settings.columns[l].title:Array.isArray(B.settings.colHeaders)&&void 0!==B.settings.colHeaders[l]?r=B.settings.colHeaders[l]:(0,k.isFunction)(B.settings.colHeaders)?r=B.settings.colHeaders(l):B.settings.colHeaders&&"string"!=typeof B.settings.colHeaders&&"number"!=typeof B.settings.colHeaders&&(r=(0,G.spreadsheetColumnLabel)(s))}return r},this._getColWidthFromSettings=function(e){var t=W.getCellMeta(0,e),n=t.width;if(void 0!==n&&n!==B.settings.width||(n=t.colWidths),null!=n){switch((0,V.default)(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=W._getColWidthFromSettings(e);return void 0===(t=W.runHooks("modifyColWidth",t,e))&&(t=X.ViewportColumnsCalculator.DEFAULT_WIDTH),t},this._getRowHeightFromSettings=function(e){var t=B.settings.rowHeights;if(null!=t){switch((0,V.default)(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=W._getRowHeightFromSettings(e);return t=W.runHooks("modifyRowHeight",t,e)},this.countSourceRows=function(){return W.runHooks("modifySourceLength")||(W.getSourceData()?W.getSourceData().length:0)},this.countSourceCols=function(){var e=W.getSourceData()&&W.getSourceData()[0]?W.getSourceData()[0]:[];return(0,j.isObject)(e)?(0,j.deepObjectSize)(e):e.length||0},this.countRows=function(){return m.getLength()},this.countCols=function(){var e=this.getSettings().maxCols,t=!1,n=0;if("array"===W.dataType&&(t=B.settings.data&&B.settings.data[0]&&B.settings.data[0].length),t&&(n=B.settings.data[0].length),B.settings.columns)if((0,k.isFunction)(B.settings.columns))if("array"===W.dataType){for(var r=0,o=0;o<n;o++)B.settings.columns(o)&&(r+=1);n=r}else"object"!==W.dataType&&"function"!==W.dataType||(n=m.colToPropCache.length);else n=B.settings.columns.length;else"object"!==W.dataType&&"function"!==W.dataType||(n=m.colToPropCache.length);return Math.min(e,n)},this.rowOffset=function(){return W.view.wt.wtTable.getFirstRenderedRow()},this.colOffset=function(){return W.view.wt.wtTable.getFirstRenderedColumn()},this.countRenderedRows=function(){return W.view.wt.drawn?W.view.wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return W.view.wt.drawn?W.view.wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return W.view.wt.drawn?W.view.wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return W.view.wt.drawn?W.view.wt.wtTable.getVisibleColumnsCount():-1},this.countEmptyRows=function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],n=0;return(0,H.rangeEachReverse)(W.countRows()-1,function(e){if(W.isEmptyRow(e))n+=1;else if(!0===t)return!1}),n},this.countEmptyCols=function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if(W.countRows()<1)return 0;var n=0;return(0,H.rangeEachReverse)(W.countCols()-1,function(e){if(W.isEmptyCol(e))n+=1;else if(!0===t)return!1}),n},this.isEmptyRow=function(e){return B.settings.isEmptyRow.call(W,e)},this.isEmptyCol=function(e){return B.settings.isEmptyCol.call(W,e)},this.selectCell=function(e,t,n,r){var o=!(4<arguments.length&&void 0!==arguments[4])||arguments[4],i=!(5<arguments.length&&void 0!==arguments[5])||arguments[5];return!(0,Y.isUndefined)(e)&&!(0,Y.isUndefined)(t)&&this.selectCells([[e,t,n,r]],o,i)},this.selectCells=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[[]],t=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];!1===(!(1<arguments.length&&void 0!==arguments[1])||arguments[1])&&(f=!0);var n=C.selectCells(e);return n&&t&&W.listen(),f=!1,n},this.selectColumns=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e;return C.selectColumns(e,t)},this.selectRows=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e;return C.selectRows(e,t)},this.deselectCell=function(){C.deselect()},this.selectAll=function(){f=!0,C.selectAll(),f=!1},this.scrollViewportTo=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],r=3<arguments.length&&void 0!==arguments[3]&&arguments[3],o=!n,i=!r,a=!1;return void 0!==e&&void 0!==t&&(a=W.view.scrollViewport(new X.CellCoords(e,t),o,r,n,i)),"number"==typeof e&&"number"!=typeof t&&(a=W.view.scrollViewportVertically(e,o,n)),"number"==typeof t&&"number"!=typeof e&&(a=W.view.scrollViewportHorizontally(t,r,i)),a},this.destroy=function(){if(W._clearTimeouts(),W._clearImmediates(),W.view&&W.view.destroy(),c&&c.destroy(),c=null,(0,ee.stopObserving)(),(0,z.isRootInstance)(W)){var e=this.rootDocument.querySelector("#hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,T.empty)(W.rootElement),r.destroy(),g&&g.destroy(),W.runHooks("afterDestroy"),K.default.getSingleton().destroy(W),(0,j.objectEach)(W,function(e,t,n){(0,k.isFunction)(e)?n[t]=function(e){return function(){throw new Error('The "'.concat(e,'" method cannot be called because this Handsontable instance has been destroyed'))}}(t):"guid"!==t&&(n[t]=null)}),W.isDestroyed=!0,m&&m.destroy(),p=W=g=C=y=B=m=null},this.getActiveEditor=function(){return g.getActiveEditor()},this.getPlugin=function(e){return(0,A.getPlugin)(this,e)},this.getInstance=function(){return W},this.addHook=function(e,t){K.default.getSingleton().add(e,t,W)},this.hasHook=function(e){return K.default.getSingleton().has(e,W)},this.addHookOnce=function(e,t){K.default.getSingleton().once(e,t,W)},this.removeHook=function(e,t){K.default.getSingleton().remove(e,t,W)},this.runHooks=function(e,t,n,r,o,i,a){return K.default.getSingleton().run(W,e,t,n,r,o,i,a)},this.getTranslatedPhrase=function(e,t){return(0,Q.getTranslatedPhrase)(B.settings.language,e,t)},this.toHTML=function(){return(0,_.instanceToHTML)(d)},this.toTableElement=function(){var e=d.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,_.instanceToHTML)(d)),e.firstElementChild},this.timeouts=[],this._registerTimeout=function(e){var t=e;"function"==typeof t&&(t=setTimeout(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0)),this.timeouts.push(t)},this._clearTimeouts=function(){(0,N.arrayEach)(this.timeouts,function(e){clearTimeout(e)})},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,N.arrayEach)(this.immediates,function(e){clearImmediate(e)})},this._refreshBorders=function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];g.destroyEditor(e),W.view.render(),t&&C.isSelected()&&g.prepareEditor()},K.default.getSingleton().run(W,"construct")};var V=r(n(44)),R=r(n(18)),U=r(n(36)),T=n(5),O=n(162),k=n(75),M=n(57),Y=n(27),a=n(72),s=r(n(444)),l=r(n(446)),u=r(n(23)),j=n(4),N=n(3),_=n(163),A=n(20),I=n(41),D=n(79),L=n(68),H=n(15),x=r(n(448)),P=r(n(449)),G=n(132),F=n(91),z=n(345),X=n(25),K=r(n(43)),q=r(n(348)),$=n(160),Q=n(349),Z=n(135),J=n(350),ee=n(136),te=n(351),ne=null},function(e,t,n){"use strict";t.__esModule=!0,t.columnFactory=function(e,t){function n(){}(0,i.inherit)(n,e);for(var r=0,o=t.length;r<o;r++)n.prototype[t[r]]=void 0;return n};var i=n(4)},function(e,t,n){"use strict";var r=n(0);n(19),n(53),n(447),n(56),n(31),n(51),n(30),n(10),n(37),n(38),n(14),n(39),t.__esModule=!0,t.instanceToHTML=function(e){for(var t=e.hasColHeaders(),n=e.hasRowHeaders(),r=[t?-1:0,n?-1:0,e.countRows()-1,e.countCols()-1],o=e.getData.apply(e,r),i=o.length,a=0<i?o[0].length:0,s=["<table>","</table>"],l=t?["<thead>","</thead>"]:[],u=["<tbody>","</tbody>"],c=n?1:0,h=t?1:0,d=0;d<i;d+=1){for(var f=t&&0===d,v=[],g=0;g<a;g+=1){var p=!f&&n&&0===g,m="";if(f)m="<th>".concat(e.getColHeader(g-c),"</th>");else if(p)m="<th>".concat(e.getRowHeader(d-h),"</th>");else{var y=o[d][g],w=e.getCellMeta(d-c,g-h),C=w.hidden,E=w.rowspan,S=w.colspan;if(!C){var b=[];if(E&&b.push('rowspan="'.concat(E,'"')),S&&b.push('colspan="'.concat(S,'"')),(0,O.isEmpty)(y))m="<td ".concat(b.join(" "),"></td>");else{var R=y.toString().replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");m="<td ".concat(b.join(" "),">").concat(R,"</td>")}}}v.push(m)}var T=["<tr>"].concat(v,["</tr>"]).join("");f?l.splice(1,0,T):u.splice(-1,0,T)}return s.splice(1,0,l.join(""),u.join("")),s.join("")},t._dataToHTML=function(e){for(var t=e.length,n=["<table>"],r=0;r<t;r+=1){var o=e[r],i=o.length,a=[];0===r&&n.push("<tbody>");for(var s=0;s<i;s+=1){var l=o[s],u=(0,O.isEmpty)(l)?"":l.toString().replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");a.push("<td>".concat(u,"</td>"))}n.push.apply(n,["<tr>"].concat(a,["</tr>"])),r+1===t&&n.push("</tbody>")}return n.push("</table>"),n.join("")},t.htmlToGridSettings=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:document,n={},r=t.createDocumentFragment(),o=t.createElement("div");r.appendChild(o);var i=e;"string"==typeof i&&(o.insertAdjacentHTML("afterbegin","".concat(i)),i=o.querySelector("table"));if(!i||!function(e){return"TABLE"===(e&&e.nodeName||"")}(i))return;var a=o.querySelector("style"),s=null,c=[];a&&(t.body.appendChild(a),a.disabled=!0,s=a.sheet,c=s?Array.from(s.cssRules):[],t.body.removeChild(a));var h,d=o.querySelector('meta[name$="enerator"]'),l=null!==i.querySelector("tbody th"),u=Array.from(i.querySelector("tr").cells).reduce(function(e,t){return e+t.colSpan},0)-(l?1:0),f=i.tFoot&&Array.from(i.tFoot.rows)||[],v=[],g=!1,p=0;if(i.tHead){var m=Array.from(i.tHead.rows).filter(function(e){var t=null!==e.querySelector("td");return t&&v.push(e),!t});p=m.length,g=0<p,1<p?n.nestedHeaders=Array.from(m).reduce(function(e,t){var n=Array.from(t.cells).reduce(function(e,t,n){if(l&&0===n)return e;var r=t.colSpan,o=t.innerHTML,i=1<r?{label:o,colspan:r}:o;return e.push(i),e},[]);return e.push(n),e},[]):g&&(n.colHeaders=Array.from(m[0].children).reduce(function(e,t,n){return l&&0===n||e.push(t.innerHTML),e},[]))}v.length&&(n.fixedRowsTop=v.length);f.length&&(n.fixedRowsBottom=f.length);var y=[].concat(v,(0,N.default)(Array.from(i.tBodies).reduce(function(e,t){return e.push.apply(e,(0,N.default)(t.rows)),e},[])),(0,N.default)(f));h=y.length;for(var w=Array(h),C=0;C<h;C++)w[C]=Array(u);for(var E=[],S=[],b=0;b<h;b++)for(var R=y[b],T=Array.from(R.cells),O=T.length,k=function(e){var r=T[e],t=r.nodeName,n=r.innerHTML,o=r.rowSpan,i=r.colSpan,a=w[b].findIndex(function(e){return void 0===e});if("TD"===t){if(1<o||1<i){for(var s=b;s<b+o;s++)if(s<h)for(var l=a;l<a+i;l++)w[s][l]=null;var u=r.getAttribute("style");u&&u.includes("mso-ignore:colspan")||E.push({col:a,row:b,rowspan:o,colspan:i})}"nowrap"===c.reduce(function(e,t){if(t.selectorText&&_(r,t.selectorText)){var n=t.style.whiteSpace;n&&(e.whiteSpace=n)}return e},{}).whiteSpace?w[b][a]=n.replace(/[\r\n][\x20]{0,2}/gim," ").replace(/<br(\s*|\/)>/gim,"\r\n").replace(/(<([^>]+)>)/gi,"").replace(/&nbsp;/gi," "):d&&/excel/gi.test(d.content)?w[b][a]=n.replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,2}/gim,"\r\n").replace(/(<([^>]+)>)/gi,"").replace(/&nbsp;/gi," "):w[b][a]=n.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n").replace(/(<([^>]+)>)/gi,"").replace(/&nbsp;/gi," ")}else S.push(n)},M=0;M<O;M++)k(M);E.length&&(n.mergeCells=E);S.length&&(n.rowHeaders=S);w.length&&(n.data=w);return n};var N=r(n(36)),O=n(27);function _(e,t){var n;return e.msMatchesSelector?n=e.msMatchesSelector(t):e.matches&&(n=e.matches(t)),n}},function(e,t,n){"use strict";var r=n(0);n(129),n(355),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),c=n(5),h=n(3),a=function(){function t(e){(0,o.default)(this,t),this.hot=e,this.container=null,this.injected=!1,this.rows=[],this.columns=[],this.samples=null,this.settings={useHeaders:!0}}return(0,i.default)(t,[{key:"addRow",value:function(e,t){if(this.columns.length)throw new Error("Doesn't support multi-dimensional table");this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));var n={row:e};this.rows.push(n),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.table.tr.appendChild(this.createRow(e)),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}},{key:"addColumnHeadersRow",value:function(e){var t=this.hot.getColHeader(0);if(null!=t){var n={row:-1};this.rows.push(n),this.container=this.createContainer(this.hot.rootElement.className),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.table.tHead.appendChild(this.createColumnHeadersRow()),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}}},{key:"addColumn",value:function(e,t){if(this.rows.length)throw new Error("Doesn't support multi-dimensional table");this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));var n={col:e};this.columns.push(n),this.samples=t,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&null!==this.hot.getColHeader(e)&&this.hot.view.appendColHeader(e,this.table.th),this.table.tBody.appendChild(this.createCol(e)),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}},{key:"getHeights",value:function(t){this.injected||this.injectTable(),(0,h.arrayEach)(this.rows,function(e){t(e.row,(0,c.outerHeight)(e.table)-1)})}},{key:"getWidths",value:function(t){this.injected||this.injectTable(),(0,h.arrayEach)(this.columns,function(e){t(e.col,(0,c.outerWidth)(e.table))})}},{key:"setSettings",value:function(e){this.settings=e}},{key:"setSetting",value:function(e,t){this.settings||(this.settings={}),this.settings[e]=t}},{key:"getSettings",value:function(){return this.settings}},{key:"getSetting",value:function(e){return this.settings?this.settings[e]:null}},{key:"createColGroupsCol",value:function(){var t=this,n=this.hot.rootDocument.createDocumentFragment();return this.hot.hasRowHeaders()&&n.appendChild(this.createColElement(-1)),this.samples.forEach(function(e){(0,h.arrayEach)(e.strings,function(e){n.appendChild(t.createColElement(e.col))})}),n}},{key:"createRow",value:function(i){var a=this,s=this.hot.rootDocument,l=s.createDocumentFragment(),e=s.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(i,e),l.appendChild(e)),this.samples.forEach(function(e){(0,h.arrayEach)(e.strings,function(e){var t=e.col,n=a.hot.getCellMeta(i,t);n.col=t,n.row=i;var r=a.hot.getCellRenderer(n),o=s.createElement("td");o.setAttribute("ghost-table",1),r(a.hot,o,i,t,a.hot.colToProp(t),e.value,n),l.appendChild(o)})}),l}},{key:"createColumnHeadersRow",value:function(){var r=this,o=this.hot.rootDocument,i=o.createDocumentFragment();if(this.hot.hasRowHeaders()){var e=o.createElement("th");this.hot.view.appendColHeader(-1,e),i.appendChild(e)}return this.samples.forEach(function(e){(0,h.arrayEach)(e.strings,function(e){var t=e.col,n=o.createElement("th");r.hot.view.appendColHeader(t,n),i.appendChild(n)})}),i}},{key:"createCol",value:function(a){var s=this,l=this.hot.rootDocument,u=l.createDocumentFragment();return this.samples.forEach(function(e){(0,h.arrayEach)(e.strings,function(e){var t=e.row,n=s.hot.getCellMeta(t,a);n.col=a,n.row=t;var r=s.hot.getCellRenderer(n),o=l.createElement("td"),i=l.createElement("tr");o.setAttribute("ghost-table",1),r(s.hot,o,t,a,s.hot.colToProp(a),e.value,n),i.appendChild(o),u.appendChild(i)})}),u}},{key:"clean",value:function(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()}},{key:"injectTable",value:function(e){var t=0<arguments.length&&void 0!==e?e:null;this.injected||((t||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}},{key:"removeTable",value:function(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}},{key:"createColElement",value:function(e){var t=this.hot.rootDocument.createElement("col");return t.style.width="".concat(this.hot.view.wt.wtTable.getStretchedColumnWidth(e),"px"),t}},{key:"createTable",value:function(e){var t=0<arguments.length&&void 0!==e?e:"",n=this.hot.rootDocument,r=n.createDocumentFragment(),o=n.createElement("table"),i=n.createElement("thead"),a=n.createElement("tbody"),s=n.createElement("colgroup"),l=n.createElement("tr"),u=n.createElement("th");return this.isVertical()&&o.appendChild(s),this.isHorizontal()&&(l.appendChild(u),i.appendChild(l),o.style.tableLayout="auto",o.style.width="auto"),o.appendChild(i),this.isVertical()&&a.appendChild(l),o.appendChild(a),(0,c.addClass)(o,t),r.appendChild(o),{fragment:r,table:o,tHead:i,tBody:a,colGroup:s,tr:l,th:u}}},{key:"createContainer",value:function(e){var t=0<arguments.length&&void 0!==e?e:"",n=this.hot.rootDocument,r=n.createDocumentFragment(),o=n.createElement("div"),i="htGhostTable htAutoSize ".concat(t.trim());return(0,c.addClass)(o,i),r.appendChild(o),{fragment:r,container:o}}},{key:"isVertical",value:function(){return!(!this.rows.length||this.columns.length)}},{key:"isHorizontal",value:function(){return!(!this.columns.length||this.rows.length)}}]),t}();t.default=a},function(e,t,n){"use strict";var r=n(22),o=n(90),i=n(104),a=o(1);r({target:"Array",proto:!0,forced:!i("map")},{map:function(e,t){return a(this,e,t)}})},function(e,t,n){"use strict";n(56),n(31),n(12),n(16),n(165),n(80),n(81),n(10),n(82),n(14),n(17),t.__esModule=!0,t.areValidSortStates=function(e){if(!1===Array.isArray(e)||!1===e.every(function(e){return(0,o.isObject)(e)}))return!1;var t=e.map(function(e){return e.column});return new Set(t).size===t.length&&e.every(u)},t.getNextSortOrder=function(e){{if(e===s)return;if(e===a)return s}return a},t.getHeaderSpanElement=function(e){return e.querySelector(".".concat(l))},t.isFirstLevelColumnHeader=function(e,t){if(e<0||!t.parentNode)return!1;var n=t.parentNode.parentNode.childNodes;return-1==Array.from(n).indexOf(t.parentNode)-n.length},t.wasHeaderClickedProperly=function(e,t,n){return-1===e&&0<=t&&!1===(0,i.isRightClick)(n)},t.HEADER_SPAN_CLASS=t.DESC_SORT_STATE=t.ASC_SORT_STATE=void 0;var r=n(27),o=n(4),i=n(33),a="asc";t.ASC_SORT_STATE=a;var s="desc";t.DESC_SORT_STATE=s;var l="colHeader";function u(e){if((0,r.isUndefined)(e))return!1;var t=e.column,n=e.sortOrder;return Number.isInteger(t)&&[a,s].includes(n)}t.HEADER_SPAN_CLASS=l},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(){return{name:r}},t.KEY=void 0;var r="---------";t.KEY=r},function(e,t,n){"use strict";var r=n(0);n(19),n(54),n(76),n(10),n(130),n(37),n(39),t.__esModule=!0,t.default=void 0;var i=r(n(1)),a=r(n(2)),s=r(n(161)),v=n(5),l=n(3),u=r(n(505)),c=r(n(23)),g=n(4),h=n(27),d=n(75),f=n(62),p=n(52),o=r(n(58)),m=n(83),y=n(33),w=function(){function o(e,t){(0,i.default)(this,o),this.hot=e,this.options=t||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:215},this.eventManager=new c.default(this),this.container=this.createContainer(this.options.name),this.hotMenu=null,this.hotSubMenus={},this.parentMenu=this.options.parent||null,this.menuItems=null,this.origOutsideClickDeselects=null,this.keyEvent=!1,this.offset={above:0,below:0,left:0,right:0},this._afterScrollCallback=null,this.registerEvents()}return(0,a.default)(o,[{key:"registerEvents",value:function(){var t=this;this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"mousedown",function(e){return t.onDocumentMouseDown(e)})}},{key:"setMenuItems",value:function(e){this.menuItems=e}},{key:"setOffset",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:0;this.offset[e]=n}},{key:"isSubMenu",value:function(){return null!==this.parentMenu}},{key:"open",value:function(){var a=this;this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";var n=(0,d.debounce)(function(e){return a.openSubMenu(e)},300),t=this.options.minWidth||215,r=!1,o=(0,l.arrayFilter)(this.menuItems,function(e){return e.key===m.NO_ITEMS&&(r=!0),(0,f.isItemHidden)(e,a.hot)});if(o.length<1&&!r)o.push((0,m.predefinedItems)()[m.NO_ITEMS]);else if(0===o.length)return;var e={data:o=(0,f.filterSeparators)(o,m.SEPARATOR),colHeaders:!1,autoColumnSize:!0,modifyColWidth:function(e){return(0,h.isDefined)(e)&&e<t?t:e},autoRowSize:!1,readOnly:!0,copyPaste:!1,columns:[{data:"name",renderer:function(e,t,n,r,o,i){return a.menuItemRenderer(e,t,n,r,o,i)}}],renderAllRows:!0,fragmentSelection:"cell",disableVisualSelection:"area",beforeKeyDown:function(e){return a.onBeforeKeyDown(e)},afterOnCellMouseOver:function(e,t){a.isAllSubMenusClosed()?n(t.row):a.openSubMenu(t.row)},rowHeights:function(e){return o[e].name===m.SEPARATOR?1:23}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new s.default(this.container,e),this.hotMenu.addHook("afterInit",function(){return a.onAfterInit()}),this.hotMenu.addHook("afterSelection",function(){return a.onAfterSelection.apply(a,arguments)}),this.hotMenu.init(),this.hotMenu.listen(),this.blockMainTableCallbacks(),this.runLocalHooks("afterOpen")}},{key:"close",value:function(e){var t=0<arguments.length&&void 0!==e&&e;this.isOpened()&&(t&&this.parentMenu?this.parentMenu.close():(this.closeAllSubMenus(),this.container.style.display="none",this.releaseMainTableCallbacks(),this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.parentMenu&&this.parentMenu.hotMenu.listen()))}},{key:"openSubMenu",value:function(e){if(!this.hotMenu)return!1;var t=this.hotMenu.getCell(e,0);if(this.closeAllSubMenus(),!t||!(0,f.hasSubMenu)(t))return!1;var n=this.hotMenu.getSourceDataAtRow(e),r=new o(this.hot,{parent:this,name:n.name,className:this.options.className,keepInViewport:!0});return r.setMenuItems(n.submenu.items),r.open(),r.setPosition(t.getBoundingClientRect()),this.hotSubMenus[n.key]=r}},{key:"closeSubMenu",value:function(e){var t=this.hotMenu.getSourceDataAtRow(e),n=this.hotSubMenus[t.key];n&&(n.destroy(),delete this.hotSubMenus[t.key])}},{key:"closeAllSubMenus",value:function(){var n=this;(0,l.arrayEach)(this.hotMenu.getData(),function(e,t){return n.closeSubMenu(t)})}},{key:"isAllSubMenusClosed",value:function(){return 0===Object.keys(this.hotSubMenus).length}},{key:"destroy",value:function(){this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy()}},{key:"isOpened",value:function(){return null!==this.hotMenu}},{key:"executeCommand",value:function(e){if(this.isOpened()&&this.hotMenu.getSelectedLast()){var t=this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]);if(this.runLocalHooks("select",t,e),!1!==t.isCommand&&t.name!==m.SEPARATOR){var n=this.hot.getSelectedRange(),r=n?(0,f.normalizeSelection)(n):[],o=!0;(!0===t.disabled||"function"==typeof t.disabled&&!0===t.disabled.call(this.hot)||t.submenu)&&(o=!1),this.runLocalHooks("executeCommand",t.key,r,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,r,e),o&&this.close(!0)}}}},{key:"setPosition",value:function(e){var t=new u.default(e,this.hot.rootWindow);this.options.keepInViewport?(t.fitsBelow(this.container)?this.setPositionBelowCursor(t):t.fitsAbove(this.container)?this.setPositionAboveCursor(t):this.setPositionBelowCursor(t),t.fitsOnRight(this.container)?this.setPositionOnRightOfCursor(t):this.setPositionOnLeftOfCursor(t)):(this.setPositionBelowCursor(t),this.setPositionOnRightOfCursor(t))}},{key:"setPositionAboveCursor",value:function(e){var t=this.offset.above+e.top-this.container.offsetHeight;this.isSubMenu()&&(t=e.top+e.cellHeight-this.container.offsetHeight+3),this.container.style.top="".concat(t,"px")}},{key:"setPositionBelowCursor",value:function(e){var t=this.offset.below+e.top;this.isSubMenu()&&(t=e.top-1),this.container.style.top="".concat(t,"px")}},{key:"setPositionOnRightOfCursor",value:function(e){var t;t=this.isSubMenu()?1+e.left+e.cellWidth:this.offset.right+1+e.left,this.container.style.left="".concat(t,"px")}},{key:"setPositionOnLeftOfCursor",value:function(e){var t=this.offset.left+e.left-this.container.offsetWidth+(0,v.getScrollbarWidth)(this.hot.rootDocument)+4;this.container.style.left="".concat(t,"px")}},{key:"selectFirstCell",value:function(){var e=this.hotMenu.getCell(0,0);(0,f.isSeparator)(e)||(0,f.isDisabled)(e)||(0,f.isSelectionDisabled)(e)?this.selectNextCell(0,0):this.hotMenu.selectCell(0,0)}},{key:"selectLastCell",value:function(){var e=this.hotMenu.countRows()-1,t=this.hotMenu.getCell(e,0);(0,f.isSeparator)(t)||(0,f.isDisabled)(t)||(0,f.isSelectionDisabled)(t)?this.selectPrevCell(e,0):this.hotMenu.selectCell(e,0)}},{key:"selectNextCell",value:function(e,t){var n=e+1,r=n<this.hotMenu.countRows()?this.hotMenu.getCell(n,t):null;r&&((0,f.isSeparator)(r)||(0,f.isDisabled)(r)||(0,f.isSelectionDisabled)(r)?this.selectNextCell(n,t):this.hotMenu.selectCell(n,t))}},{key:"selectPrevCell",value:function(e,t){var n=e-1,r=0<=n?this.hotMenu.getCell(n,t):null;r&&((0,f.isSeparator)(r)||(0,f.isDisabled)(r)||(0,f.isSelectionDisabled)(r)?this.selectPrevCell(n,t):this.hotMenu.selectCell(n,t))}},{key:"menuItemRenderer",value:function(e,t,n,r,o,i){function a(e){return e.disableSelection}var s,l,u,c=this,h=e.getSourceDataAtRow(n),d=this.hot.rootDocument.createElement("div"),f=i;"function"==typeof f&&(f=f.call(this.hot)),(0,v.empty)(t),(0,v.addClass)(d,"htItemWrapper"),t.appendChild(d),s=h,new RegExp(m.SEPARATOR,"i").test(s.name)?(0,v.addClass)(t,"htSeparator"):"function"==typeof h.renderer?((0,v.addClass)(t,"htCustomMenuRenderer"),t.appendChild(h.renderer(e,d,n,r,o,f))):(0,v.fastInnerHTML)(d,f),!0===(u=h).disabled||"function"==typeof u.disabled&&!0===u.disabled.call(c.hot)?((0,v.addClass)(t,"htDisabled"),this.eventManager.addEventListener(t,"mouseenter",function(){return e.deselectCell()})):a(h)?((0,v.addClass)(t,"htSelectionDisabled"),this.eventManager.addEventListener(t,"mouseenter",function(){return e.deselectCell()})):(l=h,(0,g.hasOwnProperty)(l,"submenu")?(0,v.addClass)(t,"htSubmenu"):((0,v.removeClass)(t,"htSubmenu"),(0,v.removeClass)(t,"htDisabled")),a(h)?this.eventManager.addEventListener(t,"mouseenter",function(){return e.deselectCell()}):this.eventManager.addEventListener(t,"mouseenter",function(){return e.selectCell(n,r,void 0,void 0,!1,!1)}))}},{key:"createContainer",value:function(e){var t,n=0<arguments.length&&void 0!==e?e:null,r=this.hot.rootDocument,o=n;return(t=o?((0,d.isFunction)(o)&&(o=null===(o=o.call(this.hot))||(0,h.isUndefined)(o)?"":o.toString()),o=o.replace(/[^A-z0-9]/g,"_"),o="".concat(this.options.className,"Sub_").concat(o),r.querySelector(".".concat(this.options.className,".").concat(o))):r.querySelector(".".concat(this.options.className)))||(t=r.createElement("div"),(0,v.addClass)(t,"htMenu ".concat(this.options.className)),o&&(0,v.addClass)(t,o),r.getElementsByTagName("body")[0].appendChild(t)),t}},{key:"blockMainTableCallbacks",value:function(){this._afterScrollCallback=function(){},this.hot.addHook("afterScrollVertically",this._afterScrollCallback),this.hot.addHook("afterScrollHorizontally",this._afterScrollCallback)}},{key:"releaseMainTableCallbacks",value:function(){this._afterScrollCallback&&(this.hot.removeHook("afterScrollVertically",this._afterScrollCallback),this.hot.removeHook("afterScrollHorizontally",this._afterScrollCallback),this._afterScrollCallback=null)}},{key:"onBeforeKeyDown",value:function(e){var t=this.hotMenu.getSelectedLast(),n=!1;switch(this.keyEvent=!0,e.keyCode){case p.KEY_CODES.ESCAPE:this.close(),n=!0;break;case p.KEY_CODES.ENTER:t&&(this.hotMenu.getSourceDataAtRow(t[0]).submenu?n=!0:(this.executeCommand(e),this.close(!0)));break;case p.KEY_CODES.ARROW_DOWN:t?this.selectNextCell(t[0],t[1]):this.selectFirstCell(),n=!0;break;case p.KEY_CODES.ARROW_UP:t?this.selectPrevCell(t[0],t[1]):this.selectLastCell(),n=!0;break;case p.KEY_CODES.ARROW_RIGHT:if(t){var r=this.openSubMenu(t[0]);r&&r.selectFirstCell()}n=!0;break;case p.KEY_CODES.ARROW_LEFT:t&&this.isSubMenu()&&(this.close(),this.parentMenu&&this.parentMenu.hotMenu.listen(),n=!0)}n&&(e.preventDefault(),(0,y.stopImmediatePropagation)(e)),this.keyEvent=!1}},{key:"onAfterInit",value:function(){var e=this.hotMenu.view.wt.wtTable,t=this.hotMenu.getSettings().data,n=e.hider.style,r=e.holder.style,o=parseInt(n.width,10),i=(0,l.arrayReduce)(t,function(e,t){return e+(t.name===m.SEPARATOR?1:26)},0);r.width="".concat(o+22,"px"),r.height="".concat(i+4,"px"),n.height=r.height}},{key:"onAfterSelection",value:function(e,t,n,r,o){!1===this.keyEvent&&(o.value=!0)}},{key:"onDocumentMouseDown",value:function(e){this.isOpened()&&(this.container&&(0,v.isChildOf)(e.target,this.container)&&this.executeCommand(e),this.options.standalone&&this.hotMenu&&!(0,v.isChildOf)(e.target,this.hotMenu.rootElement)?this.close(!0):(this.isAllSubMenusClosed()||this.isSubMenu())&&!(0,v.isChildOf)(e.target,".htMenu")&&(0,v.isChildOf)(e.target,this.hot.rootDocument)&&this.close(!0))}}]),o}();(0,g.mixin)(w,o.default);var C=w;t.default=C},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(66)),i=r(n(1)),a=r(n(2)),s=n(25),l=n(67);function u(){var e=(0,o.default)(["The merged cell declared at [",", ",'] has "rowspan" or "colspan" declared as \n "0", which is not supported. It cannot be added to the collection.']);return u=function(){return e},e}function c(){var e=(0,o.default)(["The merged cell declared at [",", ",'] has both "rowspan" \n and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.']);return c=function(){return e},e}function h(){var e=(0,o.default)(["The merged cell declared at [",", ","] is positioned (or positioned partially) \n outside of the table range. It was not added to the table, please fix your setup."]);return h=function(){return e},e}function d(){var e=(0,o.default)(["The merged cell declared with {row: ",", col: ",", rowspan: \n ",", colspan: ","} contains negative values, which is not supported. It \n will not be added to the collection."]);return d=function(){return e},e}var f=function(){function o(e,t,n,r){(0,i.default)(this,o),this.row=e,this.col=t,this.rowspan=n,this.colspan=r,this.removed=!1}return(0,a.default)(o,[{key:"normalize",value:function(e){var t=e.countRows(),n=e.countCols();this.row<0?this.row=0:this.row>t-1&&(this.row=t-1),this.col<0?this.col=0:this.col>n-1&&(this.col=n-1),this.row+this.rowspan>t-1&&(this.rowspan=t-this.row),this.col+this.colspan>n-1&&(this.colspan=n-this.col)}},{key:"includes",value:function(e,t){return this.row<=e&&this.col<=t&&this.row+this.rowspan-1>=e&&this.col+this.colspan-1>=t}},{key:"includesHorizontally",value:function(e){return this.col<=e&&this.col+this.colspan-1>=e}},{key:"includesVertically",value:function(e){return this.row<=e&&this.row+this.rowspan-1>=e}},{key:"shift",value:function(e,t){var n=e[0]||e[1],r=t+Math.abs(e[0]||e[1])-1,o=e[0]?"colspan":"rowspan",i=e[0]?"col":"row",a=Math.min(t,r),s=Math.max(t,r),l=this[i],u=this[i]+this[o]-1;if(t<=l&&(this[i]+=n),0<n)t<=u&&l<t&&(this[o]+=n);else if(n<0){if(a<=l&&u<=s)return!(this.removed=!0);if(a<=l&&l<=s){var c=s-l+1,h=Math.abs(n)-c;this[i]-=h+n,this[o]-=c}else if(l<=a&&s<=u)this[o]+=n;else if(l<=a&&a<=u&&u<s){var d=u-a+1;this[o]-=d}}return!0}},{key:"isFarther",value:function(e,t){return!e||("down"===t?e.row+e.rowspan-1<this.row+this.rowspan-1:"up"===t?e.row>this.row:"right"===t?e.col+e.colspan-1<this.col+this.colspan-1:"left"===t?e.col>this.col:null)}},{key:"getLastRow",value:function(){return this.row+this.rowspan-1}},{key:"getLastColumn",value:function(){return this.col+this.colspan-1}},{key:"getRange",value:function(){return new s.CellRange(new s.CellCoords(this.row,this.col),new s.CellCoords(this.row,this.col),new s.CellCoords(this.getLastRow(),this.getLastColumn()))}}],[{key:"NEGATIVE_VALUES_WARNING",value:function(e){return(0,l.toSingleLine)(d(),e.row,e.col,e.rowspan,e.colspan)}},{key:"IS_OUT_OF_BOUNDS_WARNING",value:function(e){return(0,l.toSingleLine)(h(),e.row,e.col)}},{key:"IS_SINGLE_CELL",value:function(e){return(0,l.toSingleLine)(c(),e.row,e.col)}},{key:"ZERO_SPAN_WARNING",value:function(e){return(0,l.toSingleLine)(u(),e.row,e.col)}},{key:"containsNegativeValues",value:function(e){return e.row<0||e.col<0||e.rowspan<0||e.colspan<0}},{key:"isSingleCell",value:function(e){return 1===e.colspan&&1===e.rowspan}},{key:"containsZeroSpan",value:function(e){return 0===e.colspan||0===e.rowspan}},{key:"isOutOfBounds",value:function(e,t,n){return e.row<0||e.col<0||e.row>=t||e.row+e.rowspan-1>=t||e.col>=n||e.col+e.colspan-1>=n}}]),o}();t.default=f},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=function(e){var n=[],t=e;P[t]||(t=x);return(0,a.arrayEach)(P[t],function(e){var t;t=e===s.SEPARATOR?{name:s.SEPARATOR}:(0,i.clone)((0,l.getConditionDescriptor)(e)),n.push(t)}),n},t.TYPES=t.TYPE_DATE=t.TYPE_TEXT=t.TYPE_NUMERIC=void 0;var o=r(n(71)),i=n(4),a=n(3),s=n(83),l=n(28),u=n(580);t.CONDITION_NONE=u.CONDITION_NAME;var c=n(366);t.CONDITION_EMPTY=c.CONDITION_NAME;var h=n(581);t.CONDITION_NOT_EMPTY=h.CONDITION_NAME;var d=n(367);t.CONDITION_EQUAL=d.CONDITION_NAME;var f=n(582);t.CONDITION_NOT_EQUAL=f.CONDITION_NAME;var v=n(583);t.CONDITION_GREATER_THAN=v.CONDITION_NAME;var g=n(584);t.CONDITION_GREATER_THAN_OR_EQUAL=g.CONDITION_NAME;var p=n(585);t.CONDITION_LESS_THAN=p.CONDITION_NAME;var m=n(586);t.CONDITION_LESS_THAN_OR_EQUAL=m.CONDITION_NAME;var y=n(368);t.CONDITION_BETWEEN=y.CONDITION_NAME;var w=n(587);t.CONDITION_NOT_BETWEEN=w.CONDITION_NAME;var C=n(588);t.CONDITION_BEGINS_WITH=C.CONDITION_NAME;var E=n(589);t.CONDITION_ENDS_WITH=E.CONDITION_NAME;var S=n(371);t.CONDITION_CONTAINS=S.CONDITION_NAME;var b=n(591);t.CONDITION_NOT_CONTAINS=b.CONDITION_NAME;var R=n(370);t.CONDITION_DATE_BEFORE=R.CONDITION_NAME;var T=n(369);t.CONDITION_DATE_AFTER=T.CONDITION_NAME;var O=n(592);t.CONDITION_TOMORROW=O.CONDITION_NAME;var k=n(593);t.CONDITION_TODAY=k.CONDITION_NAME;var M=n(594);t.CONDITION_YESTERDAY=M.CONDITION_NAME;var N=n(595);t.CONDITION_BY_VALUE=N.CONDITION_NAME;var _=n(596);t.CONDITION_TRUE=_.CONDITION_NAME;var A=n(597);t.CONDITION_FALSE=A.CONDITION_NAME;var I=n(171);t.OPERATION_AND=I.OPERATION_ID;var D=n(372);t.OPERATION_OR=D.OPERATION_ID;var L,H=n(373);t.OPERATION_OR_THEN_VARIABLE=H.OPERATION_ID;t.TYPE_NUMERIC="numeric";var x="text";t.TYPE_TEXT=x;t.TYPE_DATE="date";var P=(L={},(0,o.default)(L,"numeric",[u.CONDITION_NAME,s.SEPARATOR,c.CONDITION_NAME,h.CONDITION_NAME,s.SEPARATOR,d.CONDITION_NAME,f.CONDITION_NAME,s.SEPARATOR,v.CONDITION_NAME,g.CONDITION_NAME,p.CONDITION_NAME,m.CONDITION_NAME,y.CONDITION_NAME,w.CONDITION_NAME]),(0,o.default)(L,x,[u.CONDITION_NAME,s.SEPARATOR,c.CONDITION_NAME,h.CONDITION_NAME,s.SEPARATOR,d.CONDITION_NAME,f.CONDITION_NAME,s.SEPARATOR,C.CONDITION_NAME,E.CONDITION_NAME,s.SEPARATOR,S.CONDITION_NAME,b.CONDITION_NAME]),(0,o.default)(L,"date",[u.CONDITION_NAME,s.SEPARATOR,c.CONDITION_NAME,h.CONDITION_NAME,s.SEPARATOR,d.CONDITION_NAME,f.CONDITION_NAME,s.SEPARATOR,R.CONDITION_NAME,T.CONDITION_NAME,y.CONDITION_NAME,s.SEPARATOR,O.CONDITION_NAME,k.CONDITION_NAME,M.CONDITION_NAME]),L);t.TYPES=P},function(e,t,n){"use strict";var r=n(9);t.__esModule=!0,t.operationResult=l,t.SHORT_NAME_FOR_COMPONENT=t.OPERATION_ID=void 0;var o=r(n(11)),i=n(109),a="conjunction";t.OPERATION_ID=a;var s=o.FILTERS_LABELS_CONJUNCTION;function l(e,t){return e.every(function(e){return e.func(t)})}t.SHORT_NAME_FOR_COMPONENT=s,(0,i.registerOperation)(a,s,l)},function(e,t,n){"use strict";var r=n(0);n(16),n(10),n(14),n(24),n(17),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(7)),a=r(n(26)),s=r(n(6)),l=r(n(13)),u=r(n(2)),c=r(n(8)),h=n(5),d=n(4),f=r(n(110)),v=new WeakMap,g=function(e){function r(e,t){var n;return(0,o.default)(this,r),n=(0,i.default)(this,(0,s.default)(r).call(this,e,(0,d.extend)(r.DEFAULTS,t))),v.set((0,a.default)(n),{}),n.registerHooks(),n}return(0,c.default)(r,e),(0,u.default)(r,null,[{key:"DEFAULTS",get:function(){return(0,d.clone)({placeholder:"",type:"text",tagName:"input"})}}]),(0,u.default)(r,[{key:"registerHooks",value:function(){var t=this;this.addLocalHook("click",function(){return t.onClick()}),this.addLocalHook("keyup",function(e){return t.onKeyup(e)})}},{key:"build",value:function(){(0,l.default)((0,s.default)(r.prototype),"build",this).call(this);var e=v.get(this),t=this.hot.rootDocument.createElement("div");e.input=this._element.firstChild,(0,h.addClass)(this._element,"htUIInput"),(0,h.addClass)(t,"htUIInputIcon"),this._element.appendChild(t),this.update()}},{key:"update",value:function(){if(this.isBuilt()){var e=v.get(this).input;e.type=this.options.type,e.placeholder=this.translateIfPossible(this.options.placeholder),e.value=this.translateIfPossible(this.options.value)}}},{key:"focus",value:function(){this.isBuilt()&&v.get(this).input.focus()}},{key:"onClick",value:function(){}},{key:"onKeyup",value:function(e){this.options.value=e.target.value}}]),r}(f.default);t.default=g},function(e,t,n){"use strict";n(19),n(54),n(10),n(37),t.__esModule=!0,t.getMixedMonthObject=function(e,t){return{name:e,days:r,daysBeforeFullWeeks:0,daysAfterFullWeeks:0,fullWeeks:1,index:t}},t.getMixedMonthName=function(e,t){var n=null,r=s(t[e].name),o=0<e?s(t[e-1].name):null,i=s(t[0].name),a=s(t[t.length-1].name);n=0<e?"".concat(o,"/").concat(r):e===t.length-1?"".concat(r,"/").concat(i):"".concat(a,"/").concat(r);return n},t.getShorthand=s,t.getStartDate=function(e){return o(Array.isArray(e)?e[1]:e.startDate)},t.getEndDate=function(e){return o(Array.isArray(e)?e[2]:e.endDate)},t.getAdditionalData=function(e){return Array.isArray(e)?e[3]:e.additionalData},t.setStartDate=function(e,t){Array.isArray(e)?e[1]=t:e.startDate=t},t.setEndDate=function(e,t){Array.isArray(e)?e[2]=t:e.endDate=t},t.parseDate=o,t.getDateYear=function(e){var t=o(e);return t?t.getFullYear():null},t.WEEK_LENGTH=t.DEC_LENGTH=void 0;t.DEC_LENGTH=31;var r=7;function s(e){return e.substring(0,3)}function o(e){var t=e;return null===t?null:t instanceof Date||"Invalid Date"!==(t=new Date(t)).toString()?t:null}t.WEEK_LENGTH=r},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;function o(e,t){(0,i.default)(this,o),this.hot=t,this.plugin=e}var i=r(n(1));t.default=o},function(e,t,n){var r=n(47),o=n(29),i=n(140);e.exports=!r&&!o(function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(97);e.exports=r("native-function-to-string",Function.toString)},function(e,t,n){var r=n(34),o=n(176),i=r.WeakMap;e.exports="function"==typeof i&&/native code/.test(o.call(i))},function(e,t,n){var s=n(48),l=n(380),u=n(113),c=n(49);e.exports=function(e,t){for(var n=l(t),r=c.f,o=u.f,i=0;i<n.length;i++){var a=n[i];s(e,a)||r(e,a,o(t,a))}}},function(e,t,n){var a=n(48),s=n(69),r=n(142),l=n(98),u=r(!1);e.exports=function(e,t){var n,r=s(e),o=0,i=[];for(n in r)!a(l,n)&&a(r,n)&&i.push(n);for(;t.length>o;)a(r,n=t[o++])&&(~u(i,n)||i.push(n));return i}},function(e,t,n){var r=n(69),o=n(99).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?function(e){try{return o(e)}catch(e){return a.slice()}}(e):o(r(e))}},function(e,t,n){var r=n(29);e.exports=!!Object.getOwnPropertySymbols&&!r(function(){return!String(Symbol())})},function(e,t,n){var r=n(34).document;e.exports=r&&r.documentElement},function(e,t,n){"use strict";var r,o,i,a=n(145),s=n(63),l=n(48),u=n(35),c=n(115),h=u("iterator"),d=!1;[].keys&&("next"in(i=[].keys())?(o=a(a(i)))!==Object.prototype&&(r=o):d=!0),null==r&&(r={}),c||l(r,h)||s(r,h,function(){return this}),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},function(e,t,n){var r=n(29);e.exports=!r(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},function(e,t,n){var o=n(386);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var n,r=!1,e={};try{(n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(e,[]),r=e instanceof Array}catch(e){}return function(e,t){return o(e,t),r?n.call(e,t):e.__proto__=t,e}}():void 0)},function(e,t,n){var o=n(77),i=n(35)("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){var r=n(35),o=n(102),i=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[i]===e)}},function(e,t,n){var r=n(186),o=n(102),i=n(35)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var i=n(45);e.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&i(o.call(t)),e}}},function(e,t,n){var o=n(35)("iterator"),i=!1;try{var r=0,a={next:function(){return{done:!!r++}},return:function(){i=!0}};a[o]=function(){return this},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var r={};r[o]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n}},function(e,t,n){"use strict";function l(e){return e.frozen||(e.frozen=new w)}function r(e,t){return a(e.entries,function(e){return e[0]===t})}var u=n(147),c=n(122).getWeakData,h=n(45),d=n(42),f=n(150),v=n(148),o=n(90),g=n(48),i=n(86),p=i.set,m=i.getterFor,a=o(5),s=o(6),y=0,w=function(){this.entries=[]};w.prototype={get:function(e){var t=r(this,e);if(t)return t[1]},has:function(e){return!!r(this,e)},set:function(e,t){var n=r(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(t){var e=s(this.entries,function(e){return e[0]===t});return~e&&this.entries.splice(e,1),!!~e}},e.exports={getConstructor:function(e,n,r,o){function i(e,t,n){var r=s(e),o=c(h(t),!0);return!0===o?l(r).set(t,n):o[r.id]=n,e}var a=e(function(e,t){f(e,a,n),p(e,{type:n,id:y++,frozen:void 0}),null!=t&&v(t,e[o],e,r)}),s=m(n);return u(a.prototype,{delete:function(e){var t=s(this);if(!d(e))return!1;var n=c(e);return!0===n?l(t).delete(e):n&&g(n,t.id)&&delete n[t.id]},has:function(e){var t=s(this);if(!d(e))return!1;var n=c(e);return!0===n?l(t).has(e):n&&g(n,t.id)}}),u(a.prototype,r?{get:function(e){var t=s(this);if(d(e)){var n=c(e);return!0===n?l(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return i(this,e,t)}}:{add:function(e){return i(this,e,!0)}}),a}}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){"use strict";var u=n(49).f,c=n(101),h=n(147),d=n(103),f=n(150),v=n(148),a=n(144),s=n(194),g=n(47),p=n(122).fastKey,r=n(86),m=r.set,y=r.getterFor;e.exports={getConstructor:function(e,n,r,o){function i(e,t,n){var r,o,i=s(e),a=l(e,t);return a?a.value=n:(i.last=a={index:o=p(t,!0),key:t,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=a),r&&(r.next=a),g?i.size++:e.size++,"F"!==o&&(i.index[o]=a)),e}var a=e(function(e,t){f(e,a,n),m(e,{type:n,index:c(null),first:void 0,last:void 0,size:0}),g||(e.size=0),null!=t&&v(t,e[o],e,r)}),s=y(n),l=function(e,t){var n,r=s(e),o=p(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==t)return n};return h(a.prototype,{clear:function(){for(var e=s(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,g?e.size=0:this.size=0},delete:function(e){var t=s(this),n=l(this,e);if(n){var r=n.next,o=n.previous;delete t.index[n.index],n.removed=!0,o&&(o.next=r),r&&(r.previous=o),t.first==n&&(t.first=r),t.last==n&&(t.last=o),g?t.size--:this.size--}return!!n},forEach:function(e,t){for(var n,r=s(this),o=d(e,1<arguments.length?t:void 0,3);n=n?n.next:r.first;)for(o(n.value,n.key,this);n&&n.removed;)n=n.previous},has:function(e){return!!l(this,e)}}),h(a.prototype,r?{get:function(e){var t=l(this,e);return t&&t.value},set:function(e,t){return i(this,0===e?0:e,t)}}:{add:function(e){return i(this,e=0===e?0:e,e)}}),g&&u(a.prototype,"size",{get:function(){return s(this).size}}),a},setStrong:function(e,t,n){var r=t+" Iterator",o=y(t),i=y(r);a(e,t,function(e,t){m(this,{type:r,target:e,state:o(e),kind:t,last:void 0})},function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:{value:e.target=void 0,done:!0}},n?"entries":"values",!n,!0),s(t)}}},function(e,t,n){"use strict";var r=n(389),o=n(49),i=n(35),a=n(47),s=i("species");e.exports=function(e){var t=r(e),n=o.f;a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){e.exports=n(34)},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t,n){var r=n(59),o="["+n(198)+"]",i=RegExp("^"+o+o+"*"),a=RegExp(o+o+"*$");e.exports=function(e,t){return e=String(r(e)),1&t&&(e=e.replace(i,"")),2&t&&(e=e.replace(a,"")),e}},function(e,t){e.exports="\t\n\v\f\r   \u2028\u2029\ufeff"},function(e,t,n){"use strict";var r=n(0);n(16),n(10),n(14),n(24),n(17),t.__esModule=!0,t.default=void 0;var u=r(n(1)),o=r(n(2)),d=new WeakMap,i=function(){function l(e,t,n,r,o,i,a){var s=7<arguments.length&&void 0!==arguments[7]?arguments[7]:function(e){return e};(0,u.default)(this,l),d.set(this,{viewportWidth:e,scrollOffset:t,totalColumns:n,columnWidthFn:r,overrideFn:o,onlyFullyVisible:i,stretchingColumnWidthFn: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()}return(0,o.default)(l,null,[{key:"DEFAULT_WIDTH",get:function(){return 50}}]),(0,o.default)(l,[{key:"calculate",value:function(){for(var e,t=0,n=!0,r=[],o=d.get(this),i=o.onlyFullyVisible,a=o.overrideFn,s=o.scrollOffset,l=o.totalColumns,u=o.viewportWidth,c=0;c<l;c++){if(e=this._getColumnWidth(c),t<=s&&!i&&(this.startColumn=c),s<=t&&t+e<=s+(0<s?u+1:u)&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=c),this.endColumn=c),r.push(t),t+=e,i||(this.endColumn=c),s+u<=t){n=!1;break}}if(this.endColumn===l-1&&n)for(this.startColumn=this.endColumn;0<this.startColumn;){var h=r[this.endColumn]+e-r[this.startColumn-1];if((h<=u||!i)&&(this.startColumn-=1),u<h)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)}},{key:"refreshStretching",value:function(e){if("none"!==this.stretch){var t=e;this.totalTargetWidth=t;for(var n=d.get(this),r=n.totalColumns,o=0,i=0;i<r;i++){var a=this._getColumnWidth(i),s=n.stretchingColumnWidthFn(void 0,i);"number"==typeof s?t-=s:o+=a}var l=t-o;if("all"===this.stretch&&0<l)this.stretchAllRatio=t/o,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===this.stretch&&t!==1/0){var u=this._getColumnWidth(r-1),c=l+u;this.stretchLastWidth=0<=c?c:u}}}},{key:"getStretchedColumnWidth",value: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}},{key:"_getStretchedAllColumnWidth",value:function(e,t){var n=0,r=d.get(this),o=r.totalColumns;if(!this.stretchAllColumnsWidth[e]){var i=Math.round(t*this.stretchAllRatio),a=r.stretchingColumnWidthFn(i,e);this.stretchAllColumnsWidth[e]=void 0===a?i:isNaN(a)?this._getColumnWidth(e):a}if(this.stretchAllColumnsWidth.length===o&&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]}},{key:"_getStretchedLastColumnWidth",value:function(e){return e===d.get(this).totalColumns-1?this.stretchLastWidth:null}},{key:"_getColumnWidth",value:function(e){var t=d.get(this).columnWidthFn(e);return isNaN(t)&&(t=l.DEFAULT_WIDTH),t}}]),l}();t.default=i},function(e,t,n){"use strict";var r=n(0);n(16),n(10),n(14),n(24),n(17),t.__esModule=!0,t.default=void 0;var s=r(n(1)),o=r(n(2)),g=new WeakMap,i=function(){function v(e,t,n,r,o,i,a){(0,s.default)(this,v),g.set(this,{viewportHeight:e,scrollOffset:t,totalRows:n,rowHeightFn:r,overrideFn:o,onlyFullyVisible:i,horizontalScrollbarHeight:a}),this.count=0,this.startRow=null,this.endRow=null,this.startPosition=null,this.calculate()}return(0,o.default)(v,null,[{key:"DEFAULT_HEIGHT",get:function(){return 23}}]),(0,o.default)(v,[{key:"calculate",value:function(){for(var e,t=0,n=!0,r=[],o=g.get(this),i=o.onlyFullyVisible,a=o.overrideFn,s=o.rowHeightFn,l=o.scrollOffset,u=o.totalRows,c=o.viewportHeight,h=o.horizontalScrollbarHeight||0,d=0;d<u;d++)if(e=s(d),isNaN(e)&&(e=v.DEFAULT_HEIGHT),t<=l&&!i&&(this.startRow=d),l<=t&&t+e<=l+c-h&&(null===this.startRow&&(this.startRow=d),this.endRow=d),r.push(t),t+=e,i||(this.endRow=d),l+c-h<=t){n=!1;break}if(this.endRow===u-1&&n)for(this.startRow=this.endRow;0<this.startRow;){var f=r[this.endRow]+e-r[this.startRow-1];if((f<=c-h||!i)&&(this.startRow-=1),c-h<=f)break}null!==this.startRow&&a&&a(this),this.startPosition=r[this.startRow],void 0===this.startPosition&&(this.startPosition=null),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}]),v}();t.default=i},function(e,t,n){"use strict";var r=n(0);n(31),n(12),n(38),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),d=r(n(106)),a=function(){function r(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:e;(0,o.default)(this,r),this.highlight=e,this.from=t,this.to=n}return(0,i.default)(r,[{key:"setHighlight",value:function(e){return this.highlight=e,this}},{key:"setFrom",value:function(e){return this.from=e,this}},{key:"setTo",value:function(e){return this.to=e,this}},{key:"isValid",value:function(e){return this.from.isValid(e)&&this.to.isValid(e)}},{key:"isSingle",value:function(){return this.from.row===this.to.row&&this.from.col===this.to.col}},{key:"getHeight",value:function(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1}},{key:"getWidth",value:function(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1}},{key:"includes",value:function(e){var t=e.row,n=e.col,r=this.getTopLeftCorner(),o=this.getBottomRightCorner();return r.row<=t&&o.row>=t&&r.col<=n&&o.col>=n}},{key:"includesRange",value:function(e){return this.includes(e.getTopLeftCorner())&&this.includes(e.getBottomRightCorner())}},{key:"isEqual",value: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)}},{key:"overlaps",value:function(e){return e.isSouthEastOf(this.getTopLeftCorner())&&e.isNorthWestOf(this.getBottomRightCorner())}},{key:"isSouthEastOf",value:function(e){return this.getTopLeftCorner().isSouthEastOf(e)||this.getBottomRightCorner().isSouthEastOf(e)}},{key:"isNorthWestOf",value:function(e){return this.getTopLeftCorner().isNorthWestOf(e)||this.getBottomRightCorner().isNorthWestOf(e)}},{key:"isOverlappingHorizontally",value:function(e){return this.getTopRightCorner().col>=e.getTopLeftCorner().col&&this.getTopRightCorner().col<=e.getTopRightCorner().col||this.getTopLeftCorner().col<=e.getTopRightCorner().col&&this.getTopLeftCorner().col>=e.getTopLeftCorner().col}},{key:"isOverlappingVertically",value:function(e){return this.getBottomRightCorner().row>=e.getTopRightCorner().row&&this.getBottomRightCorner().row<=e.getBottomRightCorner().row||this.getTopRightCorner().row<=e.getBottomRightCorner().row&&this.getTopRightCorner().row>=e.getTopRightCorner().row}},{key:"expand",value: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 d.default(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=new d.default(Math.max(n.row,e.row),Math.max(n.col,e.col)),!0)}},{key:"expandByRange",value:function(e){if(this.includesRange(e)||!this.overlaps(e))return!1;var t=this.getTopLeftCorner(),n=this.getBottomRightCorner(),r=this.getDirection(),o=e.getTopLeftCorner(),i=e.getBottomRightCorner(),a=Math.min(t.row,o.row),s=Math.min(t.col,o.col),l=Math.max(n.row,i.row),u=Math.max(n.col,i.col),c=new d.default(a,s),h=new d.default(l,u);return this.from=c,this.to=h,this.setDirection(r),this.highlight.row===this.getBottomRightCorner().row&&"N-S"===this.getVerticalDirection()&&this.flipDirectionVertically(),this.highlight.col===this.getTopRightCorner().col&&"W-E"===this.getHorizontalDirection()&&this.flipDirectionHorizontally(),!0}},{key:"getDirection",value: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}},{key:"setDirection",value:function(e){switch(e){case"NW-SE":var t=[this.getTopLeftCorner(),this.getBottomRightCorner()];this.from=t[0],this.to=t[1];break;case"NE-SW":var n=[this.getTopRightCorner(),this.getBottomLeftCorner()];this.from=n[0],this.to=n[1];break;case"SE-NW":var r=[this.getBottomRightCorner(),this.getTopLeftCorner()];this.from=r[0],this.to=r[1];break;case"SW-NE":var o=[this.getBottomLeftCorner(),this.getTopRightCorner()];this.from=o[0],this.to=o[1]}}},{key:"getVerticalDirection",value:function(){return-1<["NE-SW","NW-SE"].indexOf(this.getDirection())?"N-S":"S-N"}},{key:"getHorizontalDirection",value:function(){return-1<["NW-SE","SW-NE"].indexOf(this.getDirection())?"W-E":"E-W"}},{key:"flipDirectionVertically",value:function(){switch(this.getDirection()){case"NW-SE":this.setDirection("SW-NE");break;case"NE-SW":this.setDirection("SE-NW");break;case"SE-NW":this.setDirection("NE-SW");break;case"SW-NE":this.setDirection("NW-SE")}}},{key:"flipDirectionHorizontally",value:function(){switch(this.getDirection()){case"NW-SE":this.setDirection("NE-SW");break;case"NE-SW":this.setDirection("NW-SE");break;case"SE-NW":this.setDirection("SW-NE");break;case"SW-NE":this.setDirection("SE-NW")}}},{key:"getTopLeftCorner",value:function(){return new d.default(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}},{key:"getBottomRightCorner",value:function(){return new d.default(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}},{key:"getTopRightCorner",value:function(){return new d.default(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}},{key:"getBottomLeftCorner",value:function(){return new d.default(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}},{key:"isCorner",value:function(e,t){return!!(t&&t.includes(e)&&(this.getTopLeftCorner().isEqual(new d.default(t.from.row,t.from.col))||this.getTopRightCorner().isEqual(new d.default(t.from.row,t.to.col))||this.getBottomLeftCorner().isEqual(new d.default(t.to.row,t.from.col))||this.getBottomRightCorner().isEqual(new d.default(t.to.row,t.to.col))))||(e.isEqual(this.getTopLeftCorner())||e.isEqual(this.getTopRightCorner())||e.isEqual(this.getBottomLeftCorner())||e.isEqual(this.getBottomRightCorner()))}},{key:"getOppositeCorner",value:function(e,t){if(!(e instanceof d.default))return!1;if(t&&t.includes(e)){if(this.getTopLeftCorner().isEqual(new d.default(t.from.row,t.from.col)))return this.getBottomRightCorner();if(this.getTopRightCorner().isEqual(new d.default(t.from.row,t.to.col)))return this.getBottomLeftCorner();if(this.getBottomLeftCorner().isEqual(new d.default(t.to.row,t.from.col)))return this.getTopRightCorner();if(this.getBottomRightCorner().isEqual(new d.default(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}},{key:"getBordersSharedWith",value:function(e){if(!this.includesRange(e))return[];var t=Math.min(this.from.row,this.to.row),n=Math.max(this.from.row,this.to.row),r=Math.min(this.from.col,this.to.col),o=Math.max(this.from.col,this.to.col),i=Math.min(e.from.row,e.to.row),a=Math.max(e.from.row,e.to.row),s=Math.min(e.from.col,e.to.col),l=Math.max(e.from.col,e.to.col),u=[];return t===i&&u.push("top"),o===l&&u.push("right"),n===a&&u.push("bottom"),r===s&&u.push("left"),u}},{key:"getInner",value:function(){for(var e=this.getTopLeftCorner(),t=this.getBottomRightCorner(),n=[],r=e.row;r<=t.row;r++)for(var o=e.col;o<=t.col;o++)this.from.row===r&&this.from.col===o||this.to.row===r&&this.to.col===o||n.push(new d.default(r,o));return n}},{key:"getAll",value:function(){for(var e=this.getTopLeftCorner(),t=this.getBottomRightCorner(),n=[],r=e.row;r<=t.row;r++)for(var o=e.col;o<=t.col;o++)e.row===r&&e.col===o?n.push(e):t.row===r&&t.col===o?n.push(t):n.push(new d.default(r,o));return n}},{key:"forAll",value:function(e){for(var t=this.getTopLeftCorner(),n=this.getBottomRightCorner(),r=t.row;r<=n.row;r++)for(var o=t.col;o<=n.col;o++){if(!1===e(r,o))return}}},{key:"toObject",value:function(){return{from:this.from.toObject(),to:this.to.toObject()}}}]),r}();t.default=a},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=function(){function r(e,t,n){(0,o.default)(this,r),this.offset=e,this.total=t,this.countTH=n}return(0,i.default)(r,[{key:"offsetted",value:function(e){return e+this.offset}},{key:"unOffsetted",value:function(e){return e-this.offset}},{key:"renderedToSource",value:function(e){return this.offsetted(e)}},{key:"sourceToRendered",value:function(e){return this.unOffsetted(e)}},{key:"offsettedTH",value:function(e){return e-this.countTH}},{key:"unOffsettedTH",value:function(e){return e+this.countTH}},{key:"visibleRowHeadedColumnToSourceColumn",value:function(e){return this.renderedToSource(this.offsettedTH(e))}},{key:"sourceColumnToVisibleRowHeadedColumn",value:function(e){return this.unOffsettedTH(this.sourceToRendered(e))}}]),r}();t.default=a},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=function(){function r(e,t,n){(0,o.default)(this,r),this.offset=e,this.total=t,this.countTH=n}return(0,i.default)(r,[{key:"offsetted",value:function(e){return e+this.offset}},{key:"unOffsetted",value:function(e){return e-this.offset}},{key:"renderedToSource",value:function(e){return this.offsetted(e)}},{key:"sourceToRendered",value:function(e){return this.unOffsetted(e)}},{key:"offsettedTH",value:function(e){return e-this.countTH}},{key:"unOffsettedTH",value:function(e){return e+this.countTH}},{key:"visibleColHeadedRowToSourceRow",value:function(e){return this.renderedToSource(this.offsettedTH(e))}},{key:"sourceRowToVisibleColHeadedRow",value:function(e){return this.unOffsettedTH(this.sourceToRendered(e))}}]),r}();t.default=a},function(e,t,n){var r=n(34).navigator;e.exports=r&&r.userAgent||""},function(e,t,n){"use strict";var r=n(22),o=n(398);r({target:"String",proto:!0,forced:n(399)},{padStart:function(e,t){return o(this,e,1<arguments.length?t:void 0,!0)}})},function(e,t,n){"use strict";var o=n(87),i=n(59);e.exports="".repeat||function(e){var t=String(i(this)),n="",r=o(e);if(r<0||r==1/0)throw RangeError("Wrong number of repetitions");for(;0<r;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n}},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(0);n(12),t.__esModule=!0,t.default=void 0;var i=r(n(1)),a=r(n(2)),s=n(5),l=n(4),u=n(68),c=r(n(327)),h=r(n(328)),d=r(n(329)),f=r(n(330)),v=r(n(331)),g=r(n(335)),o=function(){function o(e){(0,i.default)(this,o);var n=[];if(this.guid="wt_".concat((0,u.randomString)()),this.rootDocument=e.table.ownerDocument,this.rootWindow=this.rootDocument.defaultView,e.cloneSource?(this.cloneSource=e.cloneSource,this.cloneOverlay=e.cloneOverlay,this.wtSettings=e.cloneSource.wtSettings,this.wtTable=new v.default(this,e.table,e.wtRootElement),this.wtScroll=new d.default(this),this.wtViewport=e.cloneSource.wtViewport,this.wtEvent=new c.default(this),this.selections=this.cloneSource.selections):(this.wtSettings=new f.default(this,e),this.wtTable=new v.default(this,e.table),this.wtScroll=new d.default(this),this.wtViewport=new g.default(this),this.wtEvent=new c.default(this),this.selections=this.getSetting("selections"),this.wtOverlays=new h.default(this),this.exportSettingsAsClassNames()),this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(var t=0,r=this.wtTable.THEAD.childNodes[0].childNodes.length;t<r;t++)n.push(this.wtTable.THEAD.childNodes[0].childNodes[t].innerHTML);this.getSetting("columnHeaders").length||this.update("columnHeaders",[function(e,t){(0,s.fastInnerText)(t,n[e])}])}this.drawn=!1,this.drawInterrupted=!1}return(0,a.default)(o,[{key:"draw",value:function(e){var t=0<arguments.length&&void 0!==e&&e;return this.drawInterrupted=!1,t||(0,s.isVisible)(this.wtTable.TABLE)?this.wtTable.draw(t):this.drawInterrupted=!0,this}},{key:"getCell",value:function(e,t){if(!(1<arguments.length&&void 0!==t&&t))return this.wtTable.getCell(e);var n=this.wtSettings.getSetting("totalRows"),r=this.wtSettings.getSetting("fixedRowsTop"),o=this.wtSettings.getSetting("fixedRowsBottom"),i=this.wtSettings.getSetting("fixedColumnsLeft");if(e.row<r&&e.col<i)return this.wtOverlays.topLeftCornerOverlay.clone.wtTable.getCell(e);if(e.row<r)return this.wtOverlays.topOverlay.clone.wtTable.getCell(e);if(e.col<i&&e.row>=n-o){if(this.wtOverlays.bottomLeftCornerOverlay&&this.wtOverlays.bottomLeftCornerOverlay.clone)return this.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell(e)}else{if(e.col<i)return this.wtOverlays.leftOverlay.clone.wtTable.getCell(e);if(e.row<n&&e.row>=n-o&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(e)}return this.wtTable.getCell(e)}},{key:"update",value:function(e,t){return this.wtSettings.update(e,t)}},{key:"scrollViewport",value:function(e,t,n,r,o){return this.wtScroll.scrollViewport(e,t,n,r,o)}},{key:"scrollViewportHorizontally",value:function(e,t,n){return this.wtScroll.scrollViewportHorizontally(e,t,n)}},{key:"scrollViewportVertically",value:function(e,t,n){return this.wtScroll.scrollViewportVertically(e,t,n)}},{key:"getViewport",value:function(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]}},{key:"getOverlayName",value:function(){return this.cloneOverlay?this.cloneOverlay.type:"master"}},{key:"isOverlayName",value:function(e){return!!this.cloneOverlay&&this.cloneOverlay.type===e}},{key:"exportSettingsAsClassNames",value:function(){var n=this,r=[],o=[];(0,l.objectEach)({rowHeaders:["array"],columnHeaders:["array"]},function(e,t){-1<e.indexOf("array")&&n.getSetting(t).length&&o.push("ht".concat((0,u.toUpperCaseFirst)(t))),r.push("ht".concat((0,u.toUpperCaseFirst)(t)))}),(0,s.removeClass)(this.wtTable.wtRootElement.parentNode,r),(0,s.addClass)(this.wtTable.wtRootElement.parentNode,o)}},{key:"getSetting",value:function(e,t,n,r,o){return this.wtSettings.getSetting(e,t,n,r,o)}},{key:"hasSetting",value:function(e){return this.wtSettings.has(e)}},{key:"destroy",value:function(){this.wtOverlays.destroy(),this.wtEvent.destroy()}}]),o}();t.default=o},function(e,t,n){"use strict";var r=n(0);n(31),n(16),n(10),n(14),n(24),n(17),n(32),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(5),s=n(75),l=n(73),u=n(72),c=r(n(23)),h=new WeakMap,d=function(){function t(e){(0,o.default)(this,t),this.instance=e,this.eventManager=new c.default(e),h.set(this,{selectedCellBeforeTouchEnd:void 0,dblClickTimeout:[null,null],dblClickOrigin:[null,null]}),this.registerEvents()}return(0,i.default)(t,[{key:"registerEvents",value:function(){var t=this;this.eventManager.addEventListener(this.instance.wtTable.holder,"contextmenu",function(e){return t.onContextMenu(e)}),this.eventManager.addEventListener(this.instance.wtTable.TABLE,"mouseover",function(e){return t.onMouseOver(e)}),this.eventManager.addEventListener(this.instance.wtTable.TABLE,"mouseout",function(e){return t.onMouseOut(e)});function e(){t.eventManager.addEventListener(t.instance.wtTable.holder,"touchstart",function(e){return t.onTouchStart(e)}),t.eventManager.addEventListener(t.instance.wtTable.holder,"touchend",function(e){return t.onTouchEnd(e)}),t.instance.momentumScrolling||(t.instance.momentumScrolling={}),t.eventManager.addEventListener(t.instance.wtTable.holder,"scroll",function(){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)})}(0,u.isMobileBrowser)()?e():((0,l.isTouchSupported)()&&e(),t.eventManager.addEventListener(t.instance.wtTable.holder,"mouseup",function(e){return t.onMouseUp(e)}),t.eventManager.addEventListener(t.instance.wtTable.holder,"mousedown",function(e){return t.onMouseDown(e)}))}},{key:"selectedCellWasTouched",value:function(e){var t=h.get(this),n=this.parentCell(e).coords;if(t.selectedCellBeforeTouchEnd&&n){var r=[n.row,t.selectedCellBeforeTouchEnd.from.row],o=r[0],i=r[1],a=[n.col,t.selectedCellBeforeTouchEnd.from.col];return o===i&&a[0]===a[1]}return!1}},{key:"parentCell",value:function(e){var t={},n=this.instance.wtTable.TABLE,r=(0,a.closestDown)(e,["TD","TH"],n);return r?(t.coords=this.instance.wtTable.getCoords(r),t.TD=r):(0,a.hasClass)(e,"wtBorder")&&(0,a.hasClass)(e,"current")?(t.coords=this.instance.selections.getCell().cellRange.highlight,t.TD=this.instance.wtTable.getCell(t.coords)):(0,a.hasClass)(e,"wtBorder")&&(0,a.hasClass)(e,"area")&&this.instance.selections.createOrGetArea().cellRange&&(t.coords=this.instance.selections.createOrGetArea().cellRange.to,t.TD=this.instance.wtTable.getCell(t.coords)),t}},{key:"onMouseDown",value:function(e){var t=h.get(this),n=this.instance.rootDocument.activeElement,r=(0,s.partial)(a.getParent,e.realTarget),o=e.realTarget;if(o!==n&&r(0)!==n&&r(1)!==n){var i=this.parentCell(o);(0,a.hasClass)(o,"corner")?this.instance.getSetting("onCellCornerMouseDown",e,o):i.TD&&this.instance.hasSetting("onCellMouseDown")&&this.instance.getSetting("onCellMouseDown",e,i.coords,i.TD,this.instance),2!==e.button&&i.TD&&(t.dblClickOrigin[0]=i.TD,clearTimeout(t.dblClickTimeout[0]),t.dblClickTimeout[0]=setTimeout(function(){t.dblClickOrigin[0]=null},1e3))}}},{key:"onContextMenu",value:function(e){if(this.instance.hasSetting("onCellContextMenu")){var t=this.parentCell(e.realTarget);t.TD&&this.instance.getSetting("onCellContextMenu",e,t.coords,t.TD,this.instance)}}},{key:"onMouseOver",value:function(e){if(this.instance.hasSetting("onCellMouseOver")){var t=this.instance.wtTable.TABLE,n=(0,a.closestDown)(e.realTarget,["TD","TH"],t),r=this.instance.cloneSource||this.instance;n&&n!==r.lastMouseOver&&(0,a.isChildOf)(n,t)&&(r.lastMouseOver=n,this.instance.getSetting("onCellMouseOver",e,this.instance.wtTable.getCoords(n),n,this.instance))}}},{key:"onMouseOut",value:function(e){if(this.instance.hasSetting("onCellMouseOut")){var t=this.instance.wtTable.TABLE,n=(0,a.closestDown)(e.realTarget,["TD","TH"],t),r=(0,a.closestDown)(e.relatedTarget,["TD","TH"],t);n&&n!==r&&(0,a.isChildOf)(n,t)&&this.instance.getSetting("onCellMouseOut",e,this.instance.wtTable.getCoords(n),n,this.instance)}}},{key:"onMouseUp",value:function(e){if(2!==e.button){var t=h.get(this),n=this.parentCell(e.realTarget);n.TD&&this.instance.hasSetting("onCellMouseUp")&&this.instance.getSetting("onCellMouseUp",e,n.coords,n.TD,this.instance),n.TD===t.dblClickOrigin[0]&&n.TD===t.dblClickOrigin[1]?((0,a.hasClass)(e.realTarget,"corner")?this.instance.getSetting("onCellCornerDblClick",e,n.coords,n.TD,this.instance):this.instance.getSetting("onCellDblClick",e,n.coords,n.TD,this.instance),t.dblClickOrigin[0]=null,t.dblClickOrigin[1]=null):n.TD===t.dblClickOrigin[0]&&(t.dblClickOrigin[1]=n.TD,clearTimeout(t.dblClickTimeout[1]),t.dblClickTimeout[1]=setTimeout(function(){t.dblClickOrigin[1]=null},500))}}},{key:"onTouchStart",value:function(e){h.get(this).selectedCellBeforeTouchEnd=this.instance.selections.getCell().cellRange,this.instance.touchApplied=!0,this.onMouseDown(e)}},{key:"onTouchEnd",value:function(e){var t=e.target;(this.instance.touchApplied=!1)===this.selectedCellWasTouched(t)&&["A","BUTTON","INPUT"].includes(t.tagName)&&e.preventDefault(),this.onMouseUp(e)}},{key:"destroy",value:function(){var e=h.get(this);clearTimeout(e.dblClickTimeout[0]),clearTimeout(e.dblClickTimeout[1]),this.eventManager.destroy()}}]),t}();t.default=d},function(e,t,n){"use strict";var r=n(0);n(32),t.__esModule=!0,t.default=void 0;var d=r(n(36)),l=r(n(1)),o=r(n(2)),u=n(5),i=n(3),a=n(52),f=n(72),c=r(n(23)),h=r(n(74)),s=function(){function s(e){(0,l.default)(this,s),this.wot=e;var t=this.wot,n=t.rootDocument,r=t.rootWindow,o=t.wtTable,i=parseInt(r.getComputedStyle(n.body).lineHeight,10),a=1.2*parseInt(r.getComputedStyle(n.body).fontSize,10);this.instance=this.wot,this.eventManager=new c.default(this.wot),this.scrollbarSize=(0,u.getScrollbarWidth)(n),this.wot.update("scrollbarWidth",this.scrollbarSize),this.wot.update("scrollbarHeight",this.scrollbarSize),"hidden"===r.getComputedStyle(o.wtRootElement.parentNode).getPropertyValue("overflow")?this.scrollableElement=o.holder:this.scrollableElement=(0,u.getScrollableElement)(o.TABLE),this.prepareOverlays(),this.hasScrollbarBottom=!1,this.hasScrollbarRight=!1,this.destroyed=!1,this.keyPressed=!1,this.spreaderLastSize={width:null,height:null},this.overlayScrollPositions={master:{top:0,left:0},top:{top:null,left:0},bottom:{top:null,left:0},left:{top:0,left:null}},this.pendingScrollCallbacks={master:{top:0,left:0},top:{left:0},bottom:{left:0},left:{top:0}},this.verticalScrolling=!1,this.horizontalScrolling=!1,this.delegatedScrollCallback=!1,this.registeredListeners=[],this.browserLineHeight=i||a,this.registerListeners(),this.lastScrollX=r.scrollX,this.lastScrollY=r.scrollY}return(0,o.default)(s,[{key:"prepareOverlays",value:function(){var e=!1;return this.topOverlay?e=this.topOverlay.updateStateOfRendering()||e:this.topOverlay=h.default.createOverlay(h.default.CLONE_TOP,this.wot),h.default.hasOverlay(h.default.CLONE_BOTTOM)||(this.bottomOverlay={needFullRender:!1,updateStateOfRendering:function(){return!1}}),h.default.hasOverlay(h.default.CLONE_BOTTOM_LEFT_CORNER)||(this.bottomLeftCornerOverlay={needFullRender:!1,updateStateOfRendering:function(){return!1}}),this.bottomOverlay?e=this.bottomOverlay.updateStateOfRendering()||e:this.bottomOverlay=h.default.createOverlay(h.default.CLONE_BOTTOM,this.wot),this.leftOverlay?e=this.leftOverlay.updateStateOfRendering()||e:this.leftOverlay=h.default.createOverlay(h.default.CLONE_LEFT,this.wot),this.topOverlay.needFullRender&&this.leftOverlay.needFullRender&&(this.topLeftCornerOverlay?e=this.topLeftCornerOverlay.updateStateOfRendering()||e:this.topLeftCornerOverlay=h.default.createOverlay(h.default.CLONE_TOP_LEFT_CORNER,this.wot)),this.bottomOverlay.needFullRender&&this.leftOverlay.needFullRender&&(this.bottomLeftCornerOverlay?e=this.bottomLeftCornerOverlay.updateStateOfRendering()||e:this.bottomLeftCornerOverlay=h.default.createOverlay(h.default.CLONE_BOTTOM_LEFT_CORNER,this.wot)),this.wot.getSetting("debug")&&!this.debug&&(this.debug=h.default.createOverlay(h.default.CLONE_DEBUG,this.wot)),e}},{key:"refreshAll",value:function(){this.wot.drawn&&(this.wot.wtTable.holder.parentNode?(this.wot.draw(!0),this.verticalScrolling&&this.leftOverlay.onScroll(),this.horizontalScrolling&&this.topOverlay.onScroll(),this.verticalScrolling=!1,this.horizontalScrolling=!1):this.destroy())}},{key:"registerListeners",value:function(){var t=this,e=this.wot,n=e.rootDocument,r=e.rootWindow,o=this.topOverlay.mainTableScrollableElement,i=this.leftOverlay.mainTableScrollableElement,a=[];a.push([n.documentElement,"keydown",function(e){return t.onKeyDown(e)}]),a.push([n.documentElement,"keyup",function(){return t.onKeyUp()}]),a.push([n,"visibilitychange",function(){return t.onKeyUp()}]),a.push([o,"scroll",function(e){return t.onTableScroll(e)},{passive:!0}]),o!==i&&a.push([i,"scroll",function(e){return t.onTableScroll(e)},{passive:!0}]);var s,l=r.devicePixelRatio&&1<r.devicePixelRatio,u=this.scrollableElement===r;for(l||!(0,f.isChrome)()?a.push([this.wot.wtTable.wtRootElement.parentNode,"wheel",function(e){return t.onCloneWheel(e)},{passive:u}]):(this.topOverlay.needFullRender&&a.push([this.topOverlay.clone.wtTable.holder,"wheel",function(e){return t.onCloneWheel(e)},{passive:u}]),this.bottomOverlay.needFullRender&&a.push([this.bottomOverlay.clone.wtTable.holder,"wheel",function(e){return t.onCloneWheel(e)},{passive:u}]),this.leftOverlay.needFullRender&&a.push([this.leftOverlay.clone.wtTable.holder,"wheel",function(e){return t.onCloneWheel(e)},{passive:u}]),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.needFullRender&&a.push([this.topLeftCornerOverlay.clone.wtTable.holder,"wheel",function(e){return t.onCloneWheel(e)},{passive:u}]),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.needFullRender&&a.push([this.bottomLeftCornerOverlay.clone.wtTable.holder,"wheel",function(e){return t.onCloneWheel(e)},{passive:u}])),a.push([r,"resize",function(){clearTimeout(s),s=setTimeout(function(){t.wot.getSetting("onWindowResize")},200)}]);a.length;){var c,h=a.pop();(c=this.eventManager).addEventListener.apply(c,(0,d.default)(h)),this.registeredListeners.push(h)}}},{key:"deregisterListeners",value:function(){for(;this.registeredListeners.length;){var e=this.registeredListeners.pop();this.eventManager.removeEventListener(e[0],e[1],e[2])}}},{key:"onTableScroll",value:function(e){var t=this.wot.rootWindow,n=this.leftOverlay.mainTableScrollableElement,r=this.topOverlay.mainTableScrollableElement,o=e.target;this.keyPressed&&(r!==t&&o!==t&&!e.target.contains(r)||n!==t&&o!==t&&!e.target.contains(n))||this.syncScrollPositions(e)}},{key:"onCloneWheel",value:function(e){var t=this.wot.rootWindow;this.scrollableElement!==t&&e.preventDefault();var n=this.leftOverlay.mainTableScrollableElement,r=this.topOverlay.mainTableScrollableElement,o=e.target,i=r!==t&&o!==t&&!o.contains(r),a=n!==t&&o!==t&&!o.contains(n);this.keyPressed&&(i||a)||this.translateMouseWheelToScroll(e)}},{key:"onKeyDown",value:function(e){this.keyPressed=(0,a.isKey)(e.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")}},{key:"onKeyUp",value:function(){this.keyPressed=!1}},{key:"translateMouseWheelToScroll",value:function(e){var t=this.browserLineHeight,n=isNaN(e.deltaY)?-1*e.wheelDeltaY:e.deltaY,r=isNaN(e.deltaX)?-1*e.wheelDeltaX:e.deltaX;1===e.deltaMode&&(r+=r*t,n+=n*t),this.scrollVertically(n),this.scrollHorizontally(r)}},{key:"scrollVertically",value:function(e){this.scrollableElement.scrollTop+=e}},{key:"scrollHorizontally",value:function(e){this.scrollableElement.scrollLeft+=e}},{key:"syncScrollPositions",value:function(){if(!this.destroyed){var e=this.wot.rootWindow,t=this.topOverlay.clone.wtTable.holder,n=this.leftOverlay.clone.wtTable.holder,r=[this.scrollableElement.scrollLeft,this.scrollableElement.scrollTop],o=r[0],i=r[1];if(this.horizontalScrolling=t.scrollLeft!==o||this.lastScrollX!==e.scrollX,this.verticalScrolling=n.scrollTop!==i||this.lastScrollY!==e.scrollY,this.lastScrollX=e.scrollX,this.lastScrollY=e.scrollY,this.horizontalScrolling){t.scrollLeft=o;var a=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;a&&(a.scrollLeft=o)}this.verticalScrolling&&(n.scrollTop=i),this.refreshAll()}}},{key:"syncScrollWithMaster",value:function(){var e=this.topOverlay.mainTableScrollableElement,t=e.scrollLeft,n=e.scrollTop;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=t),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=t),this.leftOverlay.needFullRender&&(this.leftOverlay.clone.wtTable.holder.scrollTop=n)}},{key:"updateMainScrollableElements",value:function(){this.deregisterListeners(),this.leftOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement();var e=this.wot,t=e.rootWindow,n=e.wtTable;"hidden"===t.getComputedStyle(n.wtRootElement.parentNode).getPropertyValue("overflow")?this.scrollableElement=n.holder:this.scrollableElement=(0,u.getScrollableElement)(n.TABLE),this.registerListeners()}},{key:"destroy",value:function(){this.eventManager.destroy(),this.topOverlay.destroy(),this.bottomOverlay.clone&&this.bottomOverlay.destroy(),this.leftOverlay.destroy(),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.destroy(),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.clone&&this.bottomLeftCornerOverlay.destroy(),this.debug&&this.debug.destroy(),this.destroyed=!0}},{key:"refresh",value:function(e){var t=0<arguments.length&&void 0!==e&&e;if(this.topOverlay.areElementSizesAdjusted&&this.leftOverlay.areElementSizesAdjusted){var n=this.wot.wtTable.wtRootElement.parentNode||this.wot.wtTable.wtRootElement,r=n.clientWidth,o=n.clientHeight;r===this.spreaderLastSize.width&&o===this.spreaderLastSize.height||(this.spreaderLastSize.width=r,this.spreaderLastSize.height=o,this.adjustElementsSize())}this.bottomOverlay.clone&&this.bottomOverlay.refresh(t),this.leftOverlay.refresh(t),this.topOverlay.refresh(t),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.refresh(t),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.clone&&this.bottomLeftCornerOverlay.refresh(t),this.debug&&this.debug.refresh(t)}},{key:"adjustElementsSize",value:function(e){var t=0<arguments.length&&void 0!==e&&e,n=this.wot,r=n.wtViewport,o=n.wtTable,i=this.wot.getSetting("totalColumns"),a=this.wot.getSetting("totalRows"),s=r.getRowHeaderWidth(),l=r.getColumnHeaderHeight(),u=o.hider.style;if(u.width="".concat(s+this.leftOverlay.sumCellSizes(0,i),"px"),u.height="".concat(l+this.topOverlay.sumCellSizes(0,a)+1,"px"),0<this.scrollbarSize){var c=o.wtRootElement,h=c.scrollHeight,d=c.scrollWidth,f=o.holder,v=f.scrollHeight,g=f.scrollWidth;this.hasScrollbarRight=h<v,this.hasScrollbarBottom=d<g,this.hasScrollbarRight&&o.hider.scrollWidth+this.scrollbarSize>d?this.hasScrollbarBottom=!0:this.hasScrollbarBottom&&o.hider.scrollHeight+this.scrollbarSize>h&&(this.hasScrollbarRight=!0)}this.topOverlay.adjustElementsSize(t),this.leftOverlay.adjustElementsSize(t),this.bottomOverlay.adjustElementsSize(t)}},{key:"applyToDOM",value:function(){this.topOverlay.areElementSizesAdjusted&&this.leftOverlay.areElementSizesAdjusted||this.adjustElementsSize(),this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.leftOverlay.applyToDOM()}},{key:"getParentOverlay",value:function(t){if(!t)return null;var e=[this.topOverlay,this.leftOverlay,this.bottomOverlay,this.topLeftCornerOverlay,this.bottomLeftCornerOverlay],n=null;return(0,i.arrayEach)(e,function(e){e&&e.clone&&e.clone.wtTable.TABLE.contains(t)&&(n=e.clone)}),n}}]),s}();t.default=s},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),f=n(5),v=n(15),a=function(){function t(e){(0,o.default)(this,t),this.wot=e,this.instance=e}return(0,i.default)(t,[{key:"scrollViewport",value:function(e,t,n,r,o){var i=this.scrollViewportHorizontally(e.col,n,o),a=this.scrollViewportVertically(e.row,t,r);return i||a}},{key:"scrollViewportHorizontally",value:function(e,t,n){if(!this.wot.drawn)return!1;var r=this._getVariables(),o=r.fixedColumnsLeft,i=r.leftOverlay,a=r.totalColumns,s=!1;return 0<=e&&e<=Math.max(a-1,0)&&(o<=e&&(e<this.getFirstVisibleColumn()||n)?s=i.scrollTo(e):(e>this.getLastVisibleColumn()||t)&&(s=i.scrollTo(e,!0))),s}},{key:"scrollViewportVertically",value:function(e,t,n){if(!this.wot.drawn)return!1;var r=this._getVariables(),o=r.fixedRowsBottom,i=r.fixedRowsTop,a=r.topOverlay,s=r.totalRows,l=!1;return 0<=e&&e<=Math.max(s-1,0)&&(i<=e&&(e<this.getFirstVisibleRow()||t)?l=a.scrollTo(e):(e>this.getLastVisibleRow()&&e<s-o||n)&&(l=a.scrollTo(e,!0))),l}},{key:"getFirstVisibleRow",value:function(){var e=this._getVariables(),t=e.topOverlay,n=e.wtTable,r=e.wtViewport,o=e.totalRows,i=e.fixedRowsTop,a=this.wot.rootWindow,s=n.getFirstVisibleRow();if(t.mainTableScrollableElement===a){var l=(0,f.offset)(n.wtRootElement),u=(0,f.innerHeight)(n.hider),c=(0,f.innerHeight)(a),h=(0,f.getScrollTop)(a,a);if(l.top+u-c<=h){var d=r.getColumnHeaderHeight();d+=t.sumCellSizes(0,i),(0,v.rangeEachReverse)(o,1,function(e){if(d+=t.sumCellSizes(e-1,e),l.top+u-d<=h)return s=e,!1})}}return s}},{key:"getLastVisibleRow",value:function(){var e=this._getVariables(),t=e.topOverlay,n=e.wtTable,r=e.wtViewport,o=e.totalRows,i=this.wot.rootWindow,a=n.getLastVisibleRow();if(t.mainTableScrollableElement===i){var s=(0,f.offset)(n.wtRootElement),l=(0,f.innerHeight)(i),u=(0,f.getScrollTop)(i,i);if(s.top>u){var c=r.getColumnHeaderHeight();(0,v.rangeEach)(1,o,function(e){if(c+=t.sumCellSizes(e-1,e),s.top+c-u>=l)return a=e-2,!1})}}return a}},{key:"getFirstVisibleColumn",value:function(){var e=this._getVariables(),t=e.leftOverlay,n=e.wtTable,r=e.wtViewport,o=e.totalColumns,i=this.wot.rootWindow,a=n.getFirstVisibleColumn();if(t.mainTableScrollableElement===i){var s=(0,f.offset)(n.wtRootElement),l=(0,f.innerWidth)(n.hider),u=(0,f.innerWidth)(i),c=(0,f.getScrollLeft)(i,i);if(s.left+l-u<=c){var h=r.getRowHeaderWidth();(0,v.rangeEachReverse)(o,1,function(e){if(h+=t.sumCellSizes(e-1,e),s.left+l-h<=c)return a=e,!1})}}return a}},{key:"getLastVisibleColumn",value:function(){var e=this._getVariables(),t=e.leftOverlay,n=e.wtTable,r=e.wtViewport,o=e.totalColumns,i=this.wot.rootWindow,a=n.getLastVisibleColumn();if(t.mainTableScrollableElement===i){var s=(0,f.offset)(n.wtRootElement),l=(0,f.innerWidth)(i),u=(0,f.getScrollLeft)(i,i);if(s.left>u){var c=r.getRowHeaderWidth();(0,v.rangeEach)(1,o,function(e){if(c+=t.sumCellSizes(e-1,e),s.left+c-u>=l)return a=e-2,!1})}}return a}},{key:"_getVariables",value:function(){var e=this.wot;return{topOverlay:e.wtOverlays.topOverlay,leftOverlay:e.wtOverlays.leftOverlay,wtTable:e.wtTable,wtViewport:e.wtViewport,totalRows:e.getSetting("totalRows"),totalColumns:e.getSetting("totalColumns"),fixedRowsTop:e.getSetting("fixedRowsTop"),fixedRowsBottom:e.getSetting("fixedRowsBottom"),fixedColumnsLeft:e.getSetting("fixedColumnsLeft")}}}]),t}();t.default=a},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var i=r(n(1)),o=r(n(2)),a=n(5),s=n(4),l=function(){function t(e,n){var o=this;(0,i.default)(this,t),this.wot=e,this.instance=e,this.defaults={table:void 0,debug:!1,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,preventOverflow:function(){return!1},data:void 0,freezeOverlays:!1,fixedColumnsLeft:0,fixedRowsTop:0,fixedRowsBottom:0,minSpareRows:0,rowHeaders:function(){return[]},columnHeaders:function(){return[]},totalRows:void 0,totalColumns:void 0,cellRenderer:function(e,t,n){var r=o.getSetting("data",e,t);(0,a.fastInnerText)(n,null==r?"":r)},columnWidth:function(){},rowHeight:function(){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown:null,onCellContextMenu:null,onCellMouseOver:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeRemoveCellClassNames:null,onAfterDrawSelection:null,onBeforeDrawBorders:null,onScrollVertically:null,onScrollHorizontally:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onBeforeStretchingColumnWidth:function(e){return e},onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onWindowResize:null,scrollbarWidth:10,scrollbarHeight:10,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null},this.settings={},(0,s.objectEach)(this.defaults,function(e,t){if(void 0!==n[t])o.settings[t]=n[t];else{if(void 0===e)throw new Error('A required setting "'.concat(t,'" was not provided'));o.settings[t]=e}})}return(0,o.default)(t,[{key:"update",value:function(e,t){var n=this;return void 0===t?(0,s.objectEach)(e,function(e,t){n.settings[t]=e}):this.settings[e]=t,this.wot}},{key:"getSetting",value:function(e,t,n,r,o){return"function"==typeof this.settings[e]?this.settings[e](t,n,r,o):void 0!==t&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]}},{key:"has",value:function(e){return!!this.settings[e]}}]),t}();t.default=l},function(e,t,n){"use strict";var r=n(0);n(56),n(31),n(14),t.__esModule=!0,t.default=void 0;var i=r(n(36)),a=r(n(44)),s=r(n(18)),l=r(n(1)),u=r(n(2)),v=n(5),c=n(75),h=r(n(106)),g=r(n(202)),p=r(n(203)),d=r(n(334)),m=r(n(74)),o=function(){function o(e,t){var n=this;(0,l.default)(this,o),this.wot=e,this.instance=this.wot,this.TABLE=t,this.TBODY=null,this.THEAD=null,this.COLGROUP=null,this.tableOffset=0,(this.holderOffset=0,v.removeTextNodes)(this.TABLE),this.spreader=this.createSpreader(this.TABLE),this.hider=this.createHider(this.spreader),this.holder=this.createHolder(this.hider),this.wtRootElement=this.holder.parentNode,this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.colgroupChildrenLength=this.COLGROUP.childNodes.length,this.theadChildrenLength=this.THEAD.firstChild?this.THEAD.firstChild.childNodes.length:0,this.tbodyChildrenLength=this.TBODY.childNodes.length,this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;var r=this.wot.wtSettings.settings.rowHeaderWidth;this.wot.wtSettings.settings.rowHeaderWidth=function(){return n._modifyRowHeaderWidth(r)}}return(0,u.default)(o,[{key:"fixTableDomTree",value:function(){var e=this.wot.rootDocument;this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=e.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=e.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=e.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD)),this.wot.getSetting("columnHeaders").length&&!this.THEAD.childNodes.length&&this.THEAD.appendChild(e.createElement("TR"))}},{key:"createSpreader",value:function(e){var t,n=e.parentNode;return n&&1===n.nodeType&&(0,v.hasClass)(n,"wtHolder")||((t=this.wot.rootDocument.createElement("div")).className="wtSpreader",n&&n.insertBefore(t,e),t.appendChild(e)),t.style.position="relative",t}},{key:"createHider",value:function(e){var t,n=e.parentNode;return n&&1===n.nodeType&&(0,v.hasClass)(n,"wtHolder")||((t=this.wot.rootDocument.createElement("div")).className="wtHider",n&&n.insertBefore(t,e),t.appendChild(e)),t}},{key:"createHolder",value:function(e){var t,n=e.parentNode;return n&&1===n.nodeType&&(0,v.hasClass)(n,"wtHolder")||((t=this.wot.rootDocument.createElement("div")).style.position="relative",t.className="wtHolder",n&&n.insertBefore(t,e),this.isWorkingOnClone()||(t.parentNode.className+="ht_master handsontable"),t.appendChild(e)),t}},{key:"alignOverlaysWithTrimmingContainer",value:function(){var e=(0,v.getTrimmingContainer)(this.wtRootElement);if(!this.isWorkingOnClone()){var t=this.wot.rootWindow;if(this.holder.parentNode.style.position="relative",e===t){this.wot.getSetting("preventOverflow")||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible")}else{var n=(0,v.getStyle)(e,"height",t),r=this.holder.style,o=e.scrollWidth,i=e.scrollHeight,a=e.getBoundingClientRect(),s=a.width,l=a.height;s=Math.min(s,o),l=Math.min(l,i),r.width="".concat(s,"px"),r.height="auto"===n?"auto":"".concat(l,"px"),r.overflow=""}}}},{key:"isWorkingOnClone",value:function(){return!!this.wot.cloneSource}},{key:"draw",value:function(e){var t=this.wot,n=t.wtOverlays,r=t.wtViewport,o=this.instance.getSetting("totalRows"),i=t.getSetting("rowHeaders").length,a=t.getSetting("columnHeaders").length,s=!1,l=e;if(!this.isWorkingOnClone()&&(this.holderOffset=(0,v.offset)(this.holder),l=r.createRenderCalculators(l),i&&!t.getSetting("fixedColumnsLeft"))){var u=n.leftOverlay.getScrollPosition(),c=this.correctHeaderWidth;this.correctHeaderWidth=0<u,c!==this.correctHeaderWidth&&(l=!1)}if(this.isWorkingOnClone()||(s=n.prepareOverlays()),l)this.isWorkingOnClone()||r.createVisibleCalculators(),n&&n.refresh(!0);else{var h,d,f=t.cloneOverlay;this.isWorkingOnClone()?this.tableOffset=t.cloneSource.wtTable.tableOffset:this.tableOffset=(0,v.offset)(this.TABLE),h=m.default.isOverlayTypeOf(f,m.default.CLONE_DEBUG)||m.default.isOverlayTypeOf(f,m.default.CLONE_TOP)||m.default.isOverlayTypeOf(f,m.default.CLONE_TOP_LEFT_CORNER)?0:m.default.isOverlayTypeOf(f,m.default.CLONE_BOTTOM)||m.default.isOverlayTypeOf(f,m.default.CLONE_BOTTOM_LEFT_CORNER)?Math.max(o-t.getSetting("fixedRowsBottom"),0):r.rowsRenderCalculator.startRow,d=m.default.isOverlayTypeOf(f,m.default.CLONE_DEBUG)||m.default.isOverlayTypeOf(f,m.default.CLONE_LEFT)||m.default.isOverlayTypeOf(f,m.default.CLONE_TOP_LEFT_CORNER)||m.default.isOverlayTypeOf(f,m.default.CLONE_BOTTOM_LEFT_CORNER)?0:r.columnsRenderCalculator.startColumn,this.rowFilter=new p.default(h,o,a),this.columnFilter=new g.default(d,t.getSetting("totalColumns"),i),this.alignOverlaysWithTrimmingContainer(),this._doDraw()}return this.refreshSelections(l),this.isWorkingOnClone()||(n.topOverlay.resetFixedPosition(),n.bottomOverlay.clone&&n.bottomOverlay.resetFixedPosition(),n.leftOverlay.resetFixedPosition(),n.topLeftCornerOverlay&&n.topLeftCornerOverlay.resetFixedPosition(),n.bottomLeftCornerOverlay&&n.bottomLeftCornerOverlay.clone&&n.bottomLeftCornerOverlay.resetFixedPosition()),s&&n.syncScrollWithMaster(),t.drawn=!0,this}},{key:"_doDraw",value:function(){new d.default(this).render()}},{key:"removeClassFromCells",value:function(e){for(var t=this.TABLE.querySelectorAll(".".concat(e)),n=0,r=t.length;n<r;n++)(0,v.removeClass)(t[n],e)}},{key:"refreshSelections",value:function(e){var t=this.wot;if(t.selections){var n=Array.from(t.selections),r=n.length;if(e){for(var o=[],i=0;i<r;i++){for(var a=n[i].settings,s=a.highlightHeaderClassName,l=a.highlightRowClassName,u=a.highlightColumnClassName,c=n[i].classNames,h=c.length,d=0;d<h;d++)o.includes(c[d])||o.push(c[d]);s&&!o.includes(s)&&o.push(s),l&&!o.includes(l)&&o.push(l),u&&!o.includes(u)&&o.push(u)}var f=t.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(f))for(var v=0;v<f.length;v++)o.push(f[v]);for(var g=o.length,p=0;p<g;p++)this.removeClassFromCells(o[p])}for(var m=0;m<r;m++)n[m].draw(t,e)}}},{key:"getCell",value:function(e){var t=e.row,n=e.col,r=this.wot.getSetting("onModifyGetCellCoords",t,n);if(r&&Array.isArray(r)){var o=(0,s.default)(r,2);t=o[0],n=o[1]}if(this.isRowBeforeRenderedRows(t))return-1;if(this.isRowAfterRenderedRows(t))return-2;if(this.isColumnBeforeRenderedColumns(n))return-3;if(this.isColumnAfterRenderedColumns(n))return-4;var i=this.TBODY.childNodes[this.rowFilter.sourceToRendered(t)];return i?i.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(n)]:void 0}},{key:"getColumnHeader",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:0,r=this.THEAD.childNodes[n];if(r)return r.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}},{key:"getRowHeader",value: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}},{key:"getCoords",value:function(e){var t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=(0,v.closest)(t,["TD","TH"])),null===t)return null;var n=t.parentNode,r=n.parentNode,o=(0,v.index)(n),i=t.cellIndex;if((0,v.overlayContainsElement)(m.default.CLONE_TOP_LEFT_CORNER,t,this.wtRootElement)||(0,v.overlayContainsElement)(m.default.CLONE_TOP,t,this.wtRootElement))"THEAD"===r.nodeName&&(o-=r.childNodes.length);else if((0,v.overlayContainsElement)(m.default.CLONE_BOTTOM_LEFT_CORNER,t,this.wtRootElement)||(0,v.overlayContainsElement)(m.default.CLONE_BOTTOM,t,this.wtRootElement)){o=this.wot.getSetting("totalRows")-r.childNodes.length+o}else o=r===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(o):this.rowFilter.renderedToSource(o);return i=(0,v.overlayContainsElement)(m.default.CLONE_TOP_LEFT_CORNER,t,this.wtRootElement)||(0,v.overlayContainsElement)(m.default.CLONE_LEFT,t,this.wtRootElement)||(0,v.overlayContainsElement)(m.default.CLONE_BOTTOM_LEFT_CORNER,t,this.wtRootElement)||(0,v.overlayContainsElement)(m.default.CLONE_BOTTOM,t,this.wtRootElement)?this.columnFilter.offsettedTH(i):this.columnFilter.visibleRowHeadedColumnToSourceColumn(i),new h.default(o,i)}},{key:"getTrForRow",value:function(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}},{key:"getFirstRenderedRow",value:function(){return this.wot.wtViewport.rowsRenderCalculator.startRow}},{key:"getFirstVisibleRow",value:function(){return this.wot.wtViewport.rowsVisibleCalculator.startRow}},{key:"getFirstRenderedColumn",value:function(){return this.wot.wtViewport.columnsRenderCalculator.startColumn}},{key:"getFirstVisibleColumn",value:function(){return this.wot.wtViewport.columnsVisibleCalculator.startColumn}},{key:"getLastRenderedRow",value:function(){return this.wot.wtViewport.rowsRenderCalculator.endRow}},{key:"getLastVisibleRow",value:function(){return this.wot.wtViewport.rowsVisibleCalculator.endRow}},{key:"getLastRenderedColumn",value:function(){return this.wot.wtViewport.columnsRenderCalculator.endColumn}},{key:"getLastVisibleColumn",value:function(){return this.wot.wtViewport.columnsVisibleCalculator.endColumn}},{key:"isRowBeforeRenderedRows",value:function(e){return this.rowFilter&&this.rowFilter.sourceToRendered(e)<0&&0<=e}},{key:"isRowAfterViewport",value:function(e){return this.rowFilter&&this.rowFilter.sourceToRendered(e)>this.getLastVisibleRow()}},{key:"isRowAfterRenderedRows",value:function(e){return this.rowFilter&&this.rowFilter.sourceToRendered(e)>this.getLastRenderedRow()}},{key:"isColumnBeforeViewport",value:function(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&0<=e}},{key:"isColumnBeforeRenderedColumns",value:function(e){return this.columnFilter&&this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)<0&&0<=e}},{key:"isColumnAfterViewport",value:function(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)>this.getLastVisibleColumn()}},{key:"isColumnAfterRenderedColumns",value:function(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)>this.getLastRenderedColumn()}},{key:"isLastRowFullyVisible",value:function(){return this.getLastVisibleRow()===this.getLastRenderedRow()}},{key:"isLastColumnFullyVisible",value:function(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}},{key:"getRenderedColumnsCount",value:function(){var e=this.wot,t=e.getSetting("totalColumns"),n=e.wtViewport.columnsRenderCalculator.count;if(e.isOverlayName(m.default.CLONE_DEBUG))n=t;else if(e.isOverlayName(m.default.CLONE_LEFT)||e.isOverlayName(m.default.CLONE_TOP_LEFT_CORNER)||e.isOverlayName(m.default.CLONE_BOTTOM_LEFT_CORNER))return Math.min(e.getSetting("fixedColumnsLeft"),t);return n}},{key:"getRenderedRowsCount",value:function(){var e=this.wot,t=e.getSetting("totalRows"),n=e.wtViewport.rowsRenderCalculator.count;return e.isOverlayName(m.default.CLONE_DEBUG)?n=t:e.isOverlayName(m.default.CLONE_TOP)||e.isOverlayName(m.default.CLONE_TOP_LEFT_CORNER)?n=Math.min(e.getSetting("fixedRowsTop"),t):(e.isOverlayName(m.default.CLONE_BOTTOM)||e.isOverlayName(m.default.CLONE_BOTTOM_LEFT_CORNER))&&(n=Math.min(e.getSetting("fixedRowsBottom"),t)),n}},{key:"getVisibleRowsCount",value:function(){return this.wot.wtViewport.rowsVisibleCalculator.count}},{key:"allRowsInViewport",value:function(){return this.wot.getSetting("totalRows")===this.getVisibleRowsCount()}},{key:"getRowHeight",value:function(e){var t=this.wot.wtSettings.settings.rowHeight(e),n=this.wot.wtViewport.oversizedRows[e];return void 0!==n&&(t=void 0===t?n:Math.max(t,n)),t}},{key:"getColumnHeaderHeight",value: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}},{key:"getVisibleColumnsCount",value:function(){return this.wot.wtViewport.columnsVisibleCalculator.count}},{key:"allColumnsInViewport",value:function(){return this.wot.getSetting("totalColumns")===this.getVisibleColumnsCount()}},{key:"getColumnWidth",value:function(e){var t=this.wot.wtSettings.settings.columnWidth;return"function"==typeof t?t=t(e):"object"===(0,a.default)(t)&&(t=t[e]),t||this.wot.wtSettings.settings.defaultColumnWidth}},{key:"getStretchedColumnWidth",value:function(e){var t=this.getColumnWidth(e),n=null==t?this.instance.wtSettings.settings.defaultColumnWidth:t,r=this.wot.wtViewport.columnsRenderCalculator;if(r){var o=r.getStretchedColumnWidth(e,n);o&&(n=o)}return n}},{key:"_modifyRowHeaderWidth",value:function(e){var t=(0,c.isFunction)(e)?e():null;return Array.isArray(t)?(t=(0,i.default)(t))[t.length-1]=this._correctRowHeaderWidth(t[t.length-1]):t=this._correctRowHeaderWidth(t),t}},{key:"_correctRowHeaderWidth",value:function(e){var t=e;return"number"!=typeof e&&(t=this.wot.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(t+=1),t}}]),o}();t.default=o},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(66)),i=r(n(1)),a=r(n(2)),y=n(5),l=n(57),u=n(67),w=r(n(74));function c(){var e=(0,o.default)(['Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting the number\n of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.']);return c=function(){return e},e}var h=!1;function s(e,t,n){var r=e.createElement("TH");return n.insertBefore(r,t),n.removeChild(t),r}function d(e,t,n){var r=e.createElement("TD");return n.insertBefore(r,t),n.removeChild(t),r}var f=function(){function t(e){(0,i.default)(this,t),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,this.fixedRowsBottom=0}return(0,a.default)(t,[{key:"render",value:function(){if(!this.wtTable.isWorkingOnClone()){var e={};if(this.wot.getSetting("beforeDraw",!0,e),!0===e.skipRender)return}this.rowHeaders=this.wot.getSetting("rowHeaders"),this.rowHeaderCount=this.rowHeaders.length,this.fixedRowsTop=this.wot.getSetting("fixedRowsTop"),this.fixedRowsBottom=this.wot.getSetting("fixedRowsBottom"),this.columnHeaders=this.wot.getSetting("columnHeaders"),this.columnHeaderCount=this.columnHeaders.length;var t,n=this.wtTable.getRenderedColumnsCount(),r=this.wtTable.getRenderedRowsCount(),o=this.wot.getSetting("totalColumns"),i=this.wot.getSetting("totalRows"),a=!1;if((w.default.isOverlayTypeOf(this.wot.cloneOverlay,w.default.CLONE_BOTTOM)||w.default.isOverlayTypeOf(this.wot.cloneOverlay,w.default.CLONE_BOTTOM_LEFT_CORNER))&&(this.columnHeaders=[],this.columnHeaderCount=0),0<=o&&(this.adjustAvailableNodes(),a=!0,this.renderColumnHeaders(),this.renderRows(i,r,n),this.wtTable.isWorkingOnClone()||(t=this.wot.wtViewport.getWorkspaceWidth(),this.wot.wtViewport.containerWidth=null),this.adjustColumnWidths(n),this.markOversizedColumnHeaders(),this.adjustColumnHeaderHeights()),a||this.adjustAvailableNodes(),this.removeRedundantRows(r),this.wtTable.isWorkingOnClone()&&!this.wot.isOverlayName(w.default.CLONE_BOTTOM)||this.markOversizedRows(),this.wtTable.isWorkingOnClone())this.wot.isOverlayName(w.default.CLONE_BOTTOM)&&this.wot.cloneSource.wtOverlays.adjustElementsSize();else{this.wot.wtViewport.createVisibleCalculators(),this.wot.wtOverlays.refresh(!1),this.wot.wtOverlays.applyToDOM();var s=(0,y.outerWidth)(this.wtTable.hider),l=(0,y.outerWidth)(this.wtTable.TABLE);if(0!==s&&l!==s&&this.adjustColumnWidths(n),t!==this.wot.wtViewport.getWorkspaceWidth()){this.wot.wtViewport.containerWidth=null;var u=this.wtTable.getFirstRenderedColumn(),c=this.wtTable.getLastRenderedColumn(),h=this.wot.getSetting("defaultColumnWidth"),d=this.wot.getSetting("rowHeaderWidth");if(null!=(d=this.instance.getSetting("onModifyRowHeaderWidth",d)))for(var f=0;f<this.rowHeaderCount;f++){var v=Array.isArray(d)?d[f]:d;v=null==v?h:v,this.COLGROUP.childNodes[f].style.width="".concat(v,"px")}for(var g=u;g<c;g++){var p=this.wtTable.getStretchedColumnWidth(g),m=this.columnFilter.sourceToRendered(g);this.COLGROUP.childNodes[m+this.rowHeaderCount].style.width="".concat(p,"px")}}this.wot.getSetting("onDraw",!0)}}},{key:"removeRedundantRows",value:function(e){for(;this.wtTable.tbodyChildrenLength>e;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength-=1}},{key:"renderRows",value:function(e,t,n){for(var r,o=0,i=this.rowFilter.renderedToSource(o),a=this.wtTable.isWorkingOnClone();i<e&&0<=i&&(!h&&1e3<o&&(h=!0,(0,l.warn)((0,u.toSingleLine)(c()))),void 0===t||o!==t);){if(r=this.getOrCreateTrForRow(o,r),this.renderRowHeaders(i,r),this.adjustColumns(r,n+this.rowHeaderCount),this.renderCells(i,r,n),a&&!this.wot.isOverlayName(w.default.CLONE_BOTTOM)||this.resetOversizedRow(i),r.firstChild){var s=this.wot.wtTable.getRowHeight(i);s?(s-=1,r.firstChild.style.height="".concat(s,"px")):r.firstChild.style.height=""}o+=1,i=this.rowFilter.renderedToSource(o)}}},{key:"resetOversizedRow",value:function(e){this.wot.getSetting("externalRowCalculator")||this.wot.wtViewport.oversizedRows&&this.wot.wtViewport.oversizedRows[e]&&(this.wot.wtViewport.oversizedRows[e]=void 0)}},{key:"markOversizedRows",value:function(){if(!this.wot.getSetting("externalRowCalculator")){var e,t,n,r,o,i=this.instance.wtTable.TBODY.childNodes.length;if(i*this.instance.wtSettings.settings.defaultRowHeight!=(0,y.innerHeight)(this.instance.wtTable.TBODY)-1||this.instance.getSetting("fixedRowsBottom"))for(;i;)i-=1,n=this.instance.wtTable.rowFilter.renderedToSource(i),e=this.instance.wtTable.getRowHeight(n),t=(o=(r=this.instance.wtTable.getTrForRow(n)).querySelector("th"))?(0,y.innerHeight)(o):(0,y.innerHeight)(r)-1,(!e&&this.instance.wtSettings.settings.defaultRowHeight<t||e<t)&&(t+=1,this.instance.wtViewport.oversizedRows[n]=t)}}},{key:"markOversizedColumnHeaders",value:function(){var e=this.wot.getOverlayName();if(this.columnHeaderCount&&!this.wot.wtViewport.hasOversizedColumnHeadersMarked[e]&&!this.wtTable.isWorkingOnClone()){for(var t=this.wtTable.getRenderedColumnsCount(),n=0;n<this.columnHeaderCount;n++)for(var r=-1*this.rowHeaderCount;r<t;r++)this.markIfOversizedColumnHeader(r);this.wot.wtViewport.hasOversizedColumnHeadersMarked[e]=!0}}},{key:"adjustColumnHeaderHeights",value:function(){for(var e=this.wot.getSetting("columnHeaders"),t=this.wot.wtTable.THEAD.childNodes,n=this.wot.wtViewport.oversizedColumnHeaders,r=0,o=e.length;r<o;r++)if(n[r]){if(!t[r]||0===t[r].childNodes.length)return;t[r].childNodes[0].style.height="".concat(n[r],"px")}}},{key:"markIfOversizedColumnHeader",value:function(e){for(var t,n,r,o=this.wot.wtTable.columnFilter.renderedToSource(e),i=this.columnHeaderCount,a=this.wot.wtSettings.settings.defaultRowHeight,s=this.wot.getSetting("columnHeaderHeight")||[];i;)i-=1,t=this.wot.wtTable.getColumnHeaderHeight(i),(n=this.wot.wtTable.getColumnHeader(o,i))&&(r=(0,y.innerHeight)(n),(!t&&a<r||t<r)&&(this.wot.wtViewport.oversizedColumnHeaders[i]=r),Array.isArray(s)?null!==s[i]&&void 0!==s[i]&&(this.wot.wtViewport.oversizedColumnHeaders[i]=s[i]):isNaN(s)||(this.wot.wtViewport.oversizedColumnHeaders[i]=s),this.wot.wtViewport.oversizedColumnHeaders[i]<(s[i]||s)&&(this.wot.wtViewport.oversizedColumnHeaders[i]=s[i]||s))}},{key:"renderCells",value:function(e,t,n){for(var r,o,i=0;i<n;i++)o=this.columnFilter.renderedToSource(i),"TH"===(r=0===i?t.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(o)]:r.nextSibling).nodeName&&(r=d(this.wot.rootDocument,r,t)),(0,y.hasClass)(r,"hide")||(r.className=""),r.removeAttribute("style"),this.wot.wtSettings.settings.cellRenderer(e,o,r);return r}},{key:"adjustColumnWidths",value:function(e){var t=0,n=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,r=this.wot.getSetting("defaultColumnWidth"),o=this.wot.getSetting("rowHeaderWidth");if(n.offsetHeight<n.scrollHeight&&(t=(0,y.getScrollbarWidth)(this.wot.rootDocument)),this.wot.wtViewport.columnsRenderCalculator.refreshStretching(this.wot.wtViewport.getViewportWidth()-t),null!=(o=this.instance.getSetting("onModifyRowHeaderWidth",o)))for(var i=0;i<this.rowHeaderCount;i++){var a=Array.isArray(o)?o[i]:o;a=null==a?r:a,this.COLGROUP.childNodes[i].style.width="".concat(a,"px")}for(var s=0;s<e;s++){var l=this.wtTable.getStretchedColumnWidth(this.columnFilter.renderedToSource(s));this.COLGROUP.childNodes[s+this.rowHeaderCount].style.width="".concat(l,"px")}}},{key:"appendToTbody",value:function(e){this.TBODY.appendChild(e),this.wtTable.tbodyChildrenLength+=1}},{key:"getOrCreateTrForRow",value: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.className&&n.removeAttribute("class"),n}},{key:"createRow",value:function(){for(var e=this.wot.rootDocument,t=e.createElement("TR"),n=0;n<this.rowHeaderCount;n++)t.appendChild(e.createElement("TH"));return t}},{key:"renderRowHeader",value:function(e,t,n){n.className="",n.removeAttribute("style"),this.rowHeaders[t](e,n,t)}},{key:"renderRowHeaders",value:function(e,t){for(var n=t.firstChild,r=0;r<this.rowHeaderCount;r++)n?"TD"===n.nodeName&&(n=s(this.wot.rootDocument,n,t)):(n=this.wot.rootDocument.createElement("TH"),t.appendChild(n)),this.renderRowHeader(e,r,n),n=n.nextSibling}},{key:"adjustAvailableNodes",value:function(){this.adjustColGroups(),this.adjustThead()}},{key:"renderColumnHeaders",value:function(){if(this.columnHeaderCount)for(var e=this.wtTable.getRenderedColumnsCount(),t=0;t<this.columnHeaderCount;t++)for(var n=this.getTrForColumnHeaders(t),r=-1*this.rowHeaderCount;r<e;r++){var o=this.columnFilter.renderedToSource(r);this.renderColumnHeader(t,o,n.childNodes[r+this.rowHeaderCount])}}},{key:"adjustColGroups",value:function(){for(var e=this.wtTable.getRenderedColumnsCount();this.wtTable.colgroupChildrenLength<e+this.rowHeaderCount;)this.COLGROUP.appendChild(this.wot.rootDocument.createElement("COL")),this.wtTable.colgroupChildrenLength+=1;for(;this.wtTable.colgroupChildrenLength>e+this.rowHeaderCount;)this.COLGROUP.removeChild(this.COLGROUP.lastChild),this.wtTable.colgroupChildrenLength-=1;this.rowHeaderCount&&(0,y.addClass)(this.COLGROUP.childNodes[0],"rowHeader")}},{key:"adjustThead",value:function(){var e=this.wtTable.getRenderedColumnsCount(),t=this.THEAD.firstChild;if(this.columnHeaders.length){for(var n=this.wot.rootDocument,r=0,o=this.columnHeaders.length;r<o;r++){for((t=this.THEAD.childNodes[r])||(t=n.createElement("TR"),this.THEAD.appendChild(t)),this.theadChildrenLength=t.childNodes.length;this.theadChildrenLength<e+this.rowHeaderCount;)t.appendChild(n.createElement("TH")),this.theadChildrenLength+=1;for(;this.theadChildrenLength>e+this.rowHeaderCount;)t.removeChild(t.lastChild),this.theadChildrenLength-=1}var i=this.THEAD.childNodes.length;if(i>this.columnHeaders.length)for(var a=this.columnHeaders.length;a<i;a++)this.THEAD.removeChild(this.THEAD.lastChild)}else t&&(0,y.empty)(t)}},{key:"getTrForColumnHeaders",value:function(e){return this.THEAD.childNodes[e]}},{key:"renderColumnHeader",value:function(e,t,n){return n.className="",n.removeAttribute("style"),this.columnHeaders[e](t,n,e)}},{key:"adjustColumns",value:function(e,t){for(var n=this.wot.rootDocument,r=e.childNodes.length;r<t;){var o=n.createElement("TD");e.appendChild(o),r+=1}for(;t<r;)e.removeChild(e.lastChild),r-=1}},{key:"removeRedundantColumns",value:function(e){for(;this.wtTable.tbodyChildrenLength>e;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength-=1}}]),t}();t.default=f},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),v=n(5),a=n(4),s=r(n(23)),h=r(n(199)),g=r(n(200)),l=function(){function n(e){var t=this;(0,o.default)(this,n),this.wot=e,this.instance=this.wot,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.eventManager=new s.default(this.wot),this.eventManager.addEventListener(this.wot.rootWindow,"resize",function(){t.clientHeight=t.getWorkspaceHeight()})}return(0,i.default)(n,[{key:"getWorkspaceHeight",value:function(){var e=this.wot.rootDocument,t=this.instance.wtOverlays.topOverlay.trimmingContainer;return t===this.wot.rootWindow?e.documentElement.clientHeight:0<(0,v.outerHeight)(t)&&0<t.clientHeight?t.clientHeight:1/0}},{key:"getWorkspaceWidth",value:function(){var e,t,n=this.wot,r=n.rootDocument,o=n.rootWindow,i=this.instance.wtOverlays.leftOverlay.trimmingContainer,a=r.documentElement.offsetWidth,s=n.getSetting("totalColumns"),l=n.getSetting("stretchH");return n.getSetting("preventOverflow")?(0,v.outerWidth)(this.instance.wtTable.wtRootElement):(e=n.getSetting("freezeOverlays")?Math.min(a-this.getWorkspaceOffset().left,a):Math.min(this.getContainerFillWidth(),a-this.getWorkspaceOffset().left,a),i===o&&0<s&&this.sumColumnWidths(0,s-1)>e?r.documentElement.clientWidth:i===o||"scroll"!==(t=(0,v.getStyle)(this.instance.wtOverlays.leftOverlay.trimmingContainer,"overflow",o))&&"hidden"!==t&&"auto"!==t?"none"!==l&&l?e:Math.max(e,(0,v.outerWidth)(this.instance.wtTable.TABLE)):Math.max(e,i.clientWidth))}},{key:"hasVerticalScroll",value:function(){return this.getWorkspaceActualHeight()>this.getWorkspaceHeight()}},{key:"hasHorizontalScroll",value:function(){return this.getWorkspaceActualWidth()>this.getWorkspaceWidth()}},{key:"sumColumnWidths",value:function(e,t){for(var n=this.wot.wtTable,r=0,o=e;o<t;)r+=n.getColumnWidth(o),o+=1;return r}},{key:"getContainerFillWidth",value:function(){if(this.containerWidth)return this.containerWidth;var e=this.instance.wtTable.holder,t=this.wot.rootDocument.createElement("div");t.style.width="100%",t.style.height="1px",e.appendChild(t);var n=t.offsetWidth;return this.containerWidth=n,e.removeChild(t),n}},{key:"getWorkspaceOffset",value:function(){return(0,v.offset)(this.wot.wtTable.TABLE)}},{key:"getWorkspaceActualHeight",value:function(){return(0,v.outerHeight)(this.wot.wtTable.TABLE)}},{key:"getWorkspaceActualWidth",value:function(){var e=this.wot.wtTable;return(0,v.outerWidth)(e.TABLE)||(0,v.outerWidth)(e.TBODY)||(0,v.outerWidth)(e.THEAD)}},{key:"getColumnHeaderHeight",value:function(){return this.instance.getSetting("columnHeaders").length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=(0,v.outerHeight)(this.wot.wtTable.THEAD)):this.columnHeaderHeight=0,this.columnHeaderHeight}},{key:"getViewportHeight",value:function(){var e=this.getWorkspaceHeight();if(e===1/0)return e;var t=this.getColumnHeaderHeight();return 0<t&&(e-=t),e}},{key:"getRowHeaderWidth",value:function(){var e=this.instance.getSetting("rowHeaderWidth"),t=this.instance.getSetting("rowHeaders");if(e)for(var n=this.rowHeaderWidth=0,r=t.length;n<r;n++)this.rowHeaderWidth+=e[n]||e;if(this.wot.cloneSource)return this.wot.cloneSource.wtViewport.getRowHeaderWidth();if(isNaN(this.rowHeaderWidth))if(t.length)for(var o=this.instance.wtTable.TABLE.querySelector("TH"),i=this.rowHeaderWidth=0,a=t.length;i<a;i++)o?(this.rowHeaderWidth+=(0,v.outerWidth)(o),o=o.nextSibling):this.rowHeaderWidth+=50;else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.instance.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}},{key:"getViewportWidth",value:function(){var e=this.getWorkspaceWidth();if(e===1/0)return e;var t=this.getRowHeaderWidth();return 0<t?e-t:e}},{key:"createRowsCalculator",value:function(e){var t,n,r,o=0<arguments.length&&void 0!==e&&e,i=this.wot,a=i.wtSettings,s=i.wtOverlays,l=i.wtTable,u=i.rootDocument;this.rowHeaderWidth=NaN,t=a.settings.renderAllRows&&!o?1/0:this.getViewportHeight();var c=s.topOverlay.getScrollPosition()-s.topOverlay.getTableParentOffset();c<0&&(c=0);var h=i.getSetting("fixedRowsTop"),d=i.getSetting("fixedRowsBottom"),f=i.getSetting("totalRows");return h&&(c+=r=s.topOverlay.sumCellSizes(0,h),t-=r),d&&s.bottomOverlay.clone&&(t-=r=s.bottomOverlay.sumCellSizes(f-d,f)),n=l.holder.clientHeight===l.holder.offsetHeight?0:(0,v.getScrollbarWidth)(u),new g.default(t,c,i.getSetting("totalRows"),function(e){return l.getRowHeight(e)},o?null:a.settings.viewportRowCalculatorOverride,o,n)}},{key:"createColumnsCalculator",value:function(e){var t=0<arguments.length&&void 0!==e&&e,n=this.wot,r=n.wtSettings,o=n.wtOverlays,i=n.wtTable,a=n.rootDocument,s=this.getViewportWidth(),l=o.leftOverlay.getScrollPosition()-o.leftOverlay.getTableParentOffset();this.columnHeaderHeight=NaN,l<0&&(l=0);var u=n.getSetting("fixedColumnsLeft");if(u){var c=o.leftOverlay.sumCellSizes(0,u);l+=c,s-=c}return i.holder.clientWidth!==i.holder.offsetWidth&&(s-=(0,v.getScrollbarWidth)(a)),new h.default(s,l,n.getSetting("totalColumns"),function(e){return n.wtTable.getColumnWidth(e)},t?null:r.settings.viewportColumnCalculatorOverride,t,n.getSetting("stretchH"),function(e,t){return n.getSetting("onBeforeStretchingColumnWidth",e,t)})}},{key:"createRenderCalculators",value:function(e){var t=0<arguments.length&&void 0!==e&&e;if(t){var n=this.createRowsCalculator(!0),r=this.createColumnsCalculator(!0);this.areAllProposedVisibleRowsAlreadyRendered(n)&&this.areAllProposedVisibleColumnsAlreadyRendered(r)||(t=!1)}return t||(this.rowsRenderCalculator=this.createRowsCalculator(),this.columnsRenderCalculator=this.createColumnsCalculator()),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,t}},{key:"createVisibleCalculators",value:function(){this.rowsVisibleCalculator=this.createRowsCalculator(!0),this.columnsVisibleCalculator=this.createColumnsCalculator(!0)}},{key:"areAllProposedVisibleRowsAlreadyRendered",value:function(e){return!!this.rowsVisibleCalculator&&(!(e.startRow<this.rowsRenderCalculator.startRow||e.startRow===this.rowsRenderCalculator.startRow&&0<e.startRow)&&!(e.endRow>this.rowsRenderCalculator.endRow||e.endRow===this.rowsRenderCalculator.endRow&&e.endRow<this.wot.getSetting("totalRows")-1))}},{key:"areAllProposedVisibleColumnsAlreadyRendered",value:function(e){return!!this.columnsVisibleCalculator&&(!(e.startColumn<this.columnsRenderCalculator.startColumn||e.startColumn===this.columnsRenderCalculator.startColumn&&0<e.startColumn)&&!(e.endColumn>this.columnsRenderCalculator.endColumn||e.endColumn===this.columnsRenderCalculator.endColumn&&e.endColumn<this.wot.getSetting("totalColumns")-1))}},{key:"resetHasOversizedColumnHeadersMarked",value:function(){(0,a.objectEach)(this.hasOversizedColumnHeadersMarked,function(e,t,n){n[t]=void 0})}}]),n}();t.default=l},function(e,t,n){"use strict";var r=n(0);n(31),n(51),n(38),t.__esModule=!0,t.default=void 0;var z=r(n(18)),o=r(n(1)),i=r(n(2)),X=n(5),a=n(33),s=n(4),K=n(72),l=r(n(23)),q=r(n(106)),u=function(){function n(e,t){(0,o.default)(this,n),t&&(this.eventManager=new l.default(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:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"},this.corner=null,this.cornerStyle=null,this.createBorders(t),this.registerListeners())}return(0,i.default)(n,[{key:"registerListeners",value:function(){var n=this,e=this.wot.rootDocument.body;this.eventManager.addEventListener(e,"mousedown",function(){return n.onMouseDown()}),this.eventManager.addEventListener(e,"mouseup",function(){return n.onMouseUp()});for(var t=function(t,e){n.eventManager.addEventListener(n.main.childNodes[t],"mouseenter",function(e){return n.onMouseEnter(e,n.main.childNodes[t])})},r=0,o=this.main.childNodes.length;r<o;r++)t(r)}},{key:"onMouseDown",value:function(){this.mouseDown=!0}},{key:"onMouseUp",value:function(){this.mouseDown=!1}},{key:"onMouseEnter",value:function(e,n){if(this.mouseDown&&this.wot.getSetting("hideBorderOnMouseDownOver")){e.preventDefault(),(0,a.stopImmediatePropagation)(e);var r=this,o=this.wot.rootDocument.body,i=n.getBoundingClientRect();n.style.display="none",this.eventManager.addEventListener(o,"mousemove",function e(t){!function(e){return e.clientY<Math.floor(i.top)||e.clientY>Math.ceil(i.top+i.height)||e.clientX<Math.floor(i.left)||e.clientX>Math.ceil(i.left+i.width)||void 0}(t)||(r.eventManager.removeEventListener(o,"mousemove",e),n.style.display="block")})}}},{key:"createBorders",value:function(e){var t=this.wot.rootDocument;this.main=t.createElement("div");var n=["top","left","bottom","right","corner"],r=this.main.style;r.position="absolute",r.top=0;for(var o=r.left=0;o<5;o++){var i=n[o],a=t.createElement("div");a.className="wtBorder ".concat(this.settings.className||""),this.settings[i]&&this.settings[i].hide&&(a.className+=" hidden"),(r=a.style).backgroundColor=this.settings[i]&&this.settings[i].color?this.settings[i].color:e.border.color,r.height=this.settings[i]&&this.settings[i].width?"".concat(this.settings[i].width,"px"):"".concat(e.border.width,"px"),r.width=this.settings[i]&&this.settings[i].width?"".concat(this.settings[i].width,"px"):"".concat(e.border.width,"px"),this.main.appendChild(a)}this.top=this.main.childNodes[0],this.left=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.right=this.main.childNodes[3],this.topStyle=this.top.style,this.leftStyle=this.left.style,this.bottomStyle=this.bottom.style,this.rightStyle=this.right.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.height=this.cornerDefaultStyle.height,this.cornerStyle.border=[this.cornerDefaultStyle.borderWidth,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),(0,K.isMobileBrowser)()&&this.createMultipleSelectorHandles(),this.disappear();var s=this.wot.wtTable,l=s.bordersHolder;l||((l=t.createElement("div")).className="htBorders",s.bordersHolder=l,s.spreader.appendChild(l)),l.appendChild(this.main)}},{key:"createMultipleSelectorHandles",value:function(){var n=this,e=this.wot.rootDocument;this.selectionHandles={topLeft:e.createElement("DIV"),topLeftHitArea:e.createElement("DIV"),bottomRight:e.createElement("DIV"),bottomRightHitArea:e.createElement("DIV")};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 t={position:"absolute",height:"".concat(40,"px"),width:"".concat(40,"px"),"border-radius":"".concat(parseInt(40/1.5,10),"px")};(0,s.objectEach)(t,function(e,t){n.selectionHandles.styles.bottomRightHitArea[t]=e,n.selectionHandles.styles.topLeftHitArea[t]=e});var r={position:"absolute",height:"".concat(10,"px"),width:"".concat(10,"px"),"border-radius":"".concat(parseInt(10/1.5,10),"px"),background:"#F5F5FF",border:"1px solid #4285c8"};(0,s.objectEach)(r,function(e,t){n.selectionHandles.styles.bottomRight[t]=e,n.selectionHandles.styles.topLeft[t]=e}),this.main.appendChild(this.selectionHandles.topLeft),this.main.appendChild(this.selectionHandles.bottomRight),this.main.appendChild(this.selectionHandles.topLeftHitArea),this.main.appendChild(this.selectionHandles.bottomRightHitArea)}},{key:"isPartRange",value:function(e,t){var n=this.wot.selections.createOrGetArea();return!(!n.cellRange||e===n.cellRange.to.row&&t===n.cellRange.to.col)}},{key:"updateMultipleSelectionHandlesPosition",value:function(e,t,n,r,o,i){var a=parseInt(this.selectionHandles.styles.topLeft.width,10),s=parseInt(this.selectionHandles.styles.topLeftHitArea.width,10);this.selectionHandles.styles.topLeft.top="".concat(parseInt(n-a,10),"px"),this.selectionHandles.styles.topLeft.left="".concat(parseInt(r-a,10),"px"),this.selectionHandles.styles.topLeftHitArea.top="".concat(parseInt(n-s/4*3,10),"px"),this.selectionHandles.styles.topLeftHitArea.left="".concat(parseInt(r-s/4*3,10),"px"),this.selectionHandles.styles.bottomRight.top="".concat(parseInt(n+i,10),"px"),this.selectionHandles.styles.bottomRight.left="".concat(parseInt(r+o,10),"px"),this.selectionHandles.styles.bottomRightHitArea.top="".concat(parseInt(n+i-s/4,10),"px"),this.selectionHandles.styles.bottomRightHitArea.left="".concat(parseInt(r+o-s/4,10),"px"),this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(this.selectionHandles.styles.topLeft.display="block",this.selectionHandles.styles.topLeftHitArea.display="block",this.isPartRange(e,t)?(this.selectionHandles.styles.bottomRight.display="none",this.selectionHandles.styles.bottomRightHitArea.display="none"):(this.selectionHandles.styles.bottomRight.display="block",this.selectionHandles.styles.bottomRightHitArea.display="block")):(this.selectionHandles.styles.topLeft.display="none",this.selectionHandles.styles.bottomRight.display="none",this.selectionHandles.styles.topLeftHitArea.display="none",this.selectionHandles.styles.bottomRightHitArea.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsLeft")?(this.selectionHandles.styles.topLeft.zIndex="9999",this.selectionHandles.styles.topLeftHitArea.zIndex="9999"):(this.selectionHandles.styles.topLeft.zIndex="",this.selectionHandles.styles.topLeftHitArea.zIndex="")}},{key:"appear",value:function(e){if(!this.disabled){for(var t,n,r,o,i=this.wot,a=i.wtTable,s=i.rootDocument,l=i.rootWindow,u=a.getRenderedRowsCount(),c=0;c<u;c+=1){var h=a.rowFilter.renderedToSource(c);if(h>=e[0]&&h<=e[2]){t=h;break}}for(var d=u-1;0<=d;d-=1){var f=a.rowFilter.renderedToSource(d);if(f>=e[0]&&f<=e[2]){n=f;break}}for(var v=a.getRenderedColumnsCount(),g=0;g<v;g+=1){var p=a.columnFilter.renderedToSource(g);if(p>=e[1]&&p<=e[3]){r=p;break}}for(var m=v-1;0<=m;m-=1){var y=a.columnFilter.renderedToSource(m);if(y>=e[1]&&y<=e[3]){o=y;break}}if(void 0!==t&&void 0!==r){var w=a.getCell(new q.default(t,r)),C=t!==n||r!==o,E=C?a.getCell(new q.default(n,o)):w,S=(0,X.offset)(w),b=C?(0,X.offset)(E):S,R=(0,X.offset)(a.TABLE),T=S.top,O=S.left,k=O-R.left-1,M=b.left+(0,X.outerWidth)(E)-O;if(this.isEntireColumnSelected(t,n)){var N=this.getDimensionsFromHeader("columns",r,o,R),_=null;if(N){var A=(0,z.default)(N,3);_=A[0],k=A[1],M=A[2]}_&&(w=_)}var I=T-R.top-1,D=b.top+(0,X.outerHeight)(E)-T;if(this.isEntireRowSelected(r,o)){var L=this.getDimensionsFromHeader("rows",t,n,R),H=null;if(L){var x=(0,z.default)(L,3);H=x[0],I=x[1],D=x[2]}H&&(w=H)}var P=(0,X.getComputedStyle)(w,l);0<parseInt(P.borderTopWidth,10)&&(I+=1,D=0<D?D-1:0),0<parseInt(P.borderLeftWidth,10)&&(k+=1,M=0<M?M-1:0),this.topStyle.top="".concat(I,"px"),this.topStyle.left="".concat(k,"px"),this.topStyle.width="".concat(M,"px"),this.topStyle.display="block",this.leftStyle.top="".concat(I,"px"),this.leftStyle.left="".concat(k,"px"),this.leftStyle.height="".concat(D,"px"),this.leftStyle.display="block";var F=Math.floor(this.settings.border.width/2);this.bottomStyle.top="".concat(I+D-F,"px"),this.bottomStyle.left="".concat(k,"px"),this.bottomStyle.width="".concat(M,"px"),this.bottomStyle.display="block",this.rightStyle.top="".concat(I,"px"),this.rightStyle.left="".concat(k+M-F,"px"),this.rightStyle.height="".concat(D+1,"px"),this.rightStyle.display="block";var B=this.settings.border.cornerVisible;B="function"==typeof B?B(this.settings.layerLevel):B;var W=this.wot.getSetting("onModifyGetCellCoords",n,o),V=n,U=o;if(W&&Array.isArray(W)){var Y=(0,z.default)(W,4);V=Y[2],U=Y[3]}if((0,K.isMobileBrowser)()||!B||this.isPartRange(V,U))this.cornerStyle.display="none";else{this.cornerStyle.top="".concat(I+D-4,"px"),this.cornerStyle.left="".concat(k+M-4,"px"),this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";var j=(0,X.getTrimmingContainer)(a.TABLE),G=j===l;if(G&&(j=s.documentElement),o===this.wot.getSetting("totalColumns")-1)(G?E.getBoundingClientRect().left:E.offsetLeft)+(0,X.outerWidth)(E)+parseInt(this.cornerDefaultStyle.width,10)/2>=(0,X.innerWidth)(j)&&(this.cornerStyle.left="".concat(Math.floor(k+M-3-parseInt(this.cornerDefaultStyle.width,10)/2),"px"),this.cornerStyle.borderRightWidth=0);if(n===this.wot.getSetting("totalRows")-1)(G?E.getBoundingClientRect().top:E.offsetTop)+(0,X.outerHeight)(E)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,X.innerHeight)(j)&&(this.cornerStyle.top="".concat(Math.floor(I+D-3-parseInt(this.cornerDefaultStyle.height,10)/2),"px"),this.cornerStyle.borderBottomWidth=0);this.cornerStyle.display="block"}(0,K.isMobileBrowser)()&&this.updateMultipleSelectionHandlesPosition(n,o,I,k,M,D)}else this.disappear()}}},{key:"isEntireColumnSelected",value:function(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}},{key:"isEntireRowSelected",value:function(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}},{key:"getDimensionsFromHeader",value:function(e,t,n,r){var o=this.wot.wtTable,i=o.wtRootElement.parentNode,a=null,s=null,l=null,u=null,c=null,h=null,d=null,f=null;switch(e){case"rows":a=function(){return o.getRowHeader.apply(o,arguments)},s=function(){return X.outerHeight.apply(void 0,arguments)},l="ht__selection--rows",h="top";break;case"columns":a=function(){return o.getColumnHeader.apply(o,arguments)},s=function(){return X.outerWidth.apply(void 0,arguments)},l="ht__selection--columns",h="left"}if(i.className.includes(l)){var v=this.wot.getSetting("columnHeaders").length;if(d=a(t,v-1),f=a(n,v-1),!d||!f)return!1;var g=(0,X.offset)(d),p=(0,X.offset)(f);return d&&f&&(u=g[h]-r[h]-1,c=p[h]+s(f)-g[h]),[d,u,c]}return!1}},{key:"changeBorderStyle",value:function(e,t){var n=this[e].style,r=t[e];!r||r.hide?(0,X.addClass)(this[e],"hidden"):((0,X.hasClass)(this[e],"hidden")&&(0,X.removeClass)(this[e],"hidden"),n.backgroundColor=r.color,"top"!==e&&"bottom"!==e||(n.height="".concat(r.width,"px")),"right"!==e&&"left"!==e||(n.width="".concat(r.width,"px")))}},{key:"changeBorderToDefaultStyle",value:function(e){var t=1,n="#000",r=this[e].style;r.backgroundColor=n,r.width="".concat(t,"px"),r.height="".concat(t,"px")}},{key:"toggleHiddenClass",value:function(e,t){this.changeBorderToDefaultStyle(e),t?(0,X.addClass)(this[e],"hidden"):(0,X.removeClass)(this[e],"hidden")}},{key:"disappear",value:function(){this.topStyle.display="none",this.leftStyle.display="none",this.bottomStyle.display="none",this.rightStyle.display="none",this.cornerStyle.display="none",(0,K.isMobileBrowser)()&&(this.selectionHandles.styles.topLeft.display="none",this.selectionHandles.styles.bottomRight.display="none")}}]),n}();t.default=u},function(e,t,n){"use strict";var r=n(0);n(53),n(159),n(12),n(16),n(64),n(10),n(14),n(39),n(24),n(17),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(26)),l=r(n(6)),u=r(n(13)),c=r(n(8)),h=n(52),v=n(27),d=n(68),g=n(3),p=n(5),f=r(n(338)),m=new WeakMap,y=function(e){function f(e){var t;return(0,o.default)(this,f),(t=(0,a.default)(this,(0,l.default)(f).call(this,e))).query=null,t.strippedChoices=[],t.rawChoices=[],m.set((0,s.default)(t),{skipOne:!1}),t}return(0,c.default)(f,e),(0,i.default)(f,[{key:"getValue",value:function(){var t=this,e=this.rawChoices.find(function(e){return t.stripValueIfNeeded(e)===t.TEXTAREA.value});return(0,v.isDefined)(e)?e:this.TEXTAREA.value}},{key:"createElements",value:function(){(0,u.default)((0,l.default)(f.prototype),"createElements",this).call(this),(0,p.addClass)(this.htContainer,"autocompleteEditor"),(0,p.addClass)(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll")}},{key:"open",value:function(){var d=this,e=m.get(this);this.TEXTAREA_PARENT.style.overflow="auto",(0,u.default)((0,l.default)(f.prototype),"open",this).call(this),this.TEXTAREA_PARENT.style.overflow="";var t=this.htEditor.getInstance(),i=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown;this.showEditableElement(),this.focus();var n=(0,p.getScrollbarWidth)(this.hot.rootDocument);t.updateSettings({colWidths:i?[(0,p.outerWidth)(this.TEXTAREA)-2]:void 0,width:i?(0,p.outerWidth)(this.TEXTAREA)+n+2:void 0,afterRenderer:function(e,t,n,r,o){var i,a,s=d.cellProperties,l=s.filteringCaseSensitive,u=s.allowHtml,c=d.query,h=(0,v.stringify)(o);h&&!u&&-1!==(i=!0===l?h.indexOf(c):h.toLowerCase().indexOf(c.toLowerCase()))&&(a=h.substr(i,c.length),h=h.replace(a,"<strong>".concat(a,"</strong>"))),e.innerHTML=h},autoColumnSize:!0,modifyColWidth:function(e,t){var n=this.getPlugin("autoColumnSize"),r=e;if(n){var o=n.widths;o[t]&&(r=o[t])}return i?r:r+15}}),this.htEditor.view.wt.wtTable.holder.parentNode.style["padding-right"]="".concat(n+2,"px"),e.skipOne&&(e.skipOne=!1),this.hot._registerTimeout(function(){d.queryChoices(d.TEXTAREA.value)})}},{key:"close",value:function(){this.removeHooksByKey("beforeKeyDown"),(0,u.default)((0,l.default)(f.prototype),"close",this).call(this)}},{key:"discardEditor",value:function(e){(0,u.default)((0,l.default)(f.prototype),"discardEditor",this).call(this,e),this.hot.view.render()}},{key:"queryChoices",value:function(e){var t=this,n=this.cellProperties.source;this.query=e,"function"==typeof n?n.call(this.cellProperties,e,function(e){t.rawChoices=e,t.updateChoicesList(t.stripValuesIfNeeded(e))}):Array.isArray(n)?(this.rawChoices=n,this.updateChoicesList(this.stripValuesIfNeeded(n))):this.updateChoicesList([])}},{key:"updateChoicesList",value:function(e){var t=(0,p.getCaretPosition)(this.TEXTAREA),n=(0,p.getSelectionEndPosition)(this.TEXTAREA),r=this.cellProperties.sortByRelevance,o=this.cellProperties.filter,i=null,a=null,s=e;r&&(i=f.sortByRelevance(this.stripValueIfNeeded(this.getValue()),s,this.cellProperties.filteringCaseSensitive));var l=Array.isArray(i)?i.length:0;if(!1===o)l&&(a=i[0]);else{for(var u=[],c=0,h=s.length;c<h&&!(r&&l<=c);c++)l?u.push(s[i[c]]):u.push(s[c]);a=0,s=u}this.strippedChoices=s,this.htEditor.loadData((0,g.pivot)([s])),this.updateDropdownHeight(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(a),this.hot.listen(!1),(0,p.setCaretPosition)(this.TEXTAREA,t,t===n?void 0:n)}},{key:"flipDropdownIfNeeded",value:function(){var e=(0,p.offset)(this.TEXTAREA),t=(0,p.outerHeight)(this.TEXTAREA),n=this.getDropdownHeight(),r=(0,p.getTrimmingContainer)(this.hot.view.wt.wtTable.TABLE),o=r.scrollTop,i=(0,p.outerHeight)(this.hot.view.wt.wtTable.THEAD),a={row:0,col:0};r!==this.hot.rootWindow&&(a=(0,p.offset)(r));var s=e.top-a.top-i+o,l=r.scrollHeight-s-i-t,u=l<n&&l<s;return u?this.flipDropdown(n):this.unflipDropdown(),this.limitDropdownIfNeeded(u?s:l,n),u}},{key:"limitDropdownIfNeeded",value:function(e,t){if(e<t){for(var n,r=0,o=0,i=0;r+=i=this.htEditor.getRowHeight(o)||this.htEditor.view.wt.wtSettings.settings.defaultRowHeight,o+=1,r<e;);n=r-i,this.htEditor.flipped&&(this.htEditor.rootElement.style.top="".concat(parseInt(this.htEditor.rootElement.style.top,10)+t-n,"px")),this.setDropdownHeight(r-i)}}},{key:"flipDropdown",value:function(e){var t=this.htEditor.rootElement.style;t.position="absolute",t.top="".concat(-e,"px"),this.htEditor.flipped=!0}},{key:"unflipDropdown",value:function(){var e=this.htEditor.rootElement.style;"absolute"===e.position&&(e.position="",e.top=""),this.htEditor.flipped=void 0}},{key:"updateDropdownHeight",value:function(){var e=this.htEditor.getColWidth(0)+(0,p.getScrollbarWidth)(this.hot.rootDocument)+2,t=this.cellProperties.trimDropdown;this.htEditor.updateSettings({height:this.getDropdownHeight(),width:t?void 0:e}),this.htEditor.view.wt.wtTable.alignOverlaysWithTrimmingContainer()}},{key:"setDropdownHeight",value:function(e){this.htEditor.updateSettings({height:e})}},{key:"highlightBestMatchingChoice",value:function(e){"number"==typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()}},{key:"getDropdownHeight",value:function(){var e=this.htEditor.getInstance().getRowHeight(0)||23,t=this.cellProperties.visibleRows;return this.strippedChoices.length>=t?t*e:this.strippedChoices.length*e+8}},{key:"stripValueIfNeeded",value:function(e){return this.stripValuesIfNeeded([e])[0]}},{key:"stripValuesIfNeeded",value:function(e){var t=this.cellProperties.allowHtml,n=(0,g.arrayMap)(e,function(e){return(0,v.stringify)(e)});return(0,g.arrayMap)(n,function(e){return t?e:(0,d.stripTags)(e)})}},{key:"allowKeyEventPropagation",value:function(e){var t=this.htEditor.getSelectedRangeLast(),n=t?t.from.row:-1,r=!1;return e===h.KEY_CODES.ARROW_DOWN&&0<n&&n<this.htEditor.countRows()-1&&(r=!0),e===h.KEY_CODES.ARROW_UP&&-1<n&&(r=!0),r}},{key:"onBeforeKeyDown",value:function(e){var t=this,n=m.get(this);if(n.skipOne=!1,(0,h.isPrintableChar)(e.keyCode)||e.keyCode===h.KEY_CODES.BACKSPACE||e.keyCode===h.KEY_CODES.DELETE||e.keyCode===h.KEY_CODES.INSERT){var r=0;if(e.keyCode===h.KEY_CODES.C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(r+=10),this.htEditor&&this.hot._registerTimeout(function(){t.queryChoices(t.TEXTAREA.value),n.skipOne=!0},r)}(0,u.default)((0,l.default)(f.prototype),"onBeforeKeyDown",this).call(this,e)}}]),f}(f.default);y.sortByRelevance=function(e,t,n){var r,o,i,a,s=[],l=e.length,u=[],c=t.length;if(0===l){for(a=0;a<c;a++)u.push(a);return u}for(a=0;a<c;a++)r=(0,d.stripTags)((0,v.stringify)(t[a])),-1!==(o=n?r.indexOf(e):r.toLowerCase().indexOf(e.toLowerCase()))&&(i=r.length-o-l,s.push({baseIndex:a,index:o,charsLeft:i,value:r}));for(s.sort(function(e,t){if(-1===t.index)return-1;if(-1===e.index)return 1;if(e.index<t.index)return-1;if(t.index<e.index)return 1;if(e.index===t.index){if(e.charsLeft<t.charsLeft)return-1;if(e.charsLeft>t.charsLeft)return 1}return 0}),a=0,c=s.length;a<c;a++)u.push(s[a].baseIndex);return u};var w=y;t.default=w},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),u=r(n(6)),c=r(n(13)),s=r(n(8)),h=n(52),d=n(4),f=n(5),v=n(33),l=function(e){function l(){return(0,o.default)(this,l),(0,a.default)(this,(0,u.default)(l).apply(this,arguments))}return(0,s.default)(l,e),(0,i.default)(l,[{key:"open",value:function(){(0,c.default)((0,u.default)(l.prototype),"open",this).call(this),this.htEditor&&this.htEditor.destroy(),"none"===this.htContainer.style.display&&(this.htContainer.style.display=""),this.htEditor=new this.hot.constructor(this.htContainer,this.htOptions),this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),(0,f.setCaretPosition)(this.TEXTAREA,0,this.TEXTAREA.value.length)}},{key:"close",value:function(){this.htEditor.rootElement.style.display="none",this.removeHooksByKey("beforeKeyDown"),(0,c.default)((0,u.default)(l.prototype),"close",this).call(this)}},{key:"prepare",value:function(e,t,n,r,o,i){(0,c.default)((0,u.default)(l.prototype),"prepare",this).call(this,e,t,n,r,o,i);var a=this,s={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,afterOnCellMouseDown:function(e,t){var n=this.getSourceData(t.row,t.col);void 0!==n&&a.setValue(n),a.instance.destroyEditor()}};this.cellProperties.handsontable&&(0,d.extend)(s,i.handsontable),this.htOptions=s}},{key:"beginEditing",value:function(e,t){var n=this.hot.getSettings().onBeginEditing;n&&!1===n()||(0,c.default)((0,u.default)(l.prototype),"beginEditing",this).call(this,e,t)}},{key:"focus",value:function(){(0,c.default)((0,u.default)(l.prototype),"focus",this).call(this)}},{key:"createElements",value:function(){(0,c.default)((0,u.default)(l.prototype),"createElements",this).call(this);var e=this.hot.rootDocument.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()}},{key:"finishEditing",value:function(e,t,n){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedLast()){var r=this.htEditor.getInstance().getValue();void 0!==r&&this.setValue(r)}return(0,c.default)((0,u.default)(l.prototype),"finishEditing",this).call(this,e,t,n)}},{key:"assignHooks",value:function(){var e=this;this.hot.addHook("afterDestroy",function(){e.htEditor&&e.htEditor.destroy()})}},{key:"onBeforeKeyDown",value:function(e){if(!(0,v.isImmediatePropagationStopped)(e)){var t,n,r=this.htEditor.getInstance();if(e.keyCode===h.KEY_CODES.ARROW_DOWN)if(r.getSelectedLast()||r.flipped){if(r.getSelectedLast())if(r.flipped)t=r.getSelectedLast()[0]+1;else if(!r.flipped){var o=r.countRows()-1;n=r.getSelectedLast()[0],t=Math.min(o,n+1)}}else t=0;else e.keyCode===h.KEY_CODES.ARROW_UP&&(!r.getSelectedLast()&&r.flipped?t=r.countRows()-1:r.getSelectedLast()&&(t=r.flipped?(n=r.getSelectedLast()[0],Math.max(0,n-1)):(n=r.getSelectedLast()[0])-1));void 0!==t&&(t<0||r.flipped&&t>r.countRows()-1?r.deselectCell():r.selectCell(t,0),r.getData().length&&(e.preventDefault(),(0,v.stopImmediatePropagation)(e),this.hot.listen(),this.TEXTAREA.focus())),(0,c.default)((0,u.default)(l.prototype),"onBeforeKeyDown",this).call(this,e)}}}]),l}(r(n(107)).default);t.default=l},function(e,t,n){e.exports=function o(i,a,s){function l(n,e){if(!a[n]){if(!i[n]){if(u)return u(n,!0);var t=new Error("Cannot find module '"+n+"'");throw t.code="MODULE_NOT_FOUND",t}var r=a[n]={exports:{}};i[n][0].call(r.exports,function(e){var t=i[n][1][e];return l(t||e)},r,r.exports,o,i,a,s)}return a[n].exports}for(var u=!1,e=0;e<s.length;e++)l(s[e]);return l}({1:[function(e,n,t){!function(e){"use strict";function _(e){var t=0|e;return 0<e||e===t?t:t-1}function A(e){for(var t,n,r=1,o=e.length,i=e[0]+"";r<o;){for(t=e[r++]+"",n=G-t.length;n--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function o(e,t){var n,r,o=e.c,i=t.c,a=e.s,s=t.s,l=e.e,u=t.e;if(!a||!s)return null;if(n=o&&!o[0],r=i&&!i[0],n||r)return n?r?0:-s:a;if(a!=s)return a;if(n=a<0,r=l==u,!o||!i)return r?0:!o^n?1:-1;if(!r)return u<l^n?1:-1;for(s=(l=o.length)<(u=i.length)?l:u,a=0;a<s;a++)if(o[a]!=i[a])return o[a]>i[a]^n?1:-1;return l==u?0:u<l^n?1:-1}function I(e,t,n){return(e=i(e))>=t&&e<=n}function D(e){return"[object Array]"==Object.prototype.toString.call(e)}function L(e,t,n){for(var r,o,i=[0],a=0,s=e.length;a<s;){for(o=i.length;o--;i[o]*=t);for(i[r=0]+=Y.indexOf(e.charAt(a++));r<i.length;r++)i[r]>n-1&&(null==i[r+1]&&(i[r+1]=0),i[r+1]+=i[r]/n|0,i[r]%=n)}return i.reverse()}function H(e,t){return(1<e.length?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function x(e,t){var n,r;if(t<0){for(r="0.";++t;r+="0");e=r+e}else if(n=e.length,++t>n){for(r="0",t-=n;--t;r+="0");e+=r}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}function i(e){return(e=parseFloat(e))<0?F(e):B(e)}var t,P=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,F=Math.ceil,B=Math.floor,W=" not a boolean or binary digit",V="rounding mode",U="number type has more than 15 significant digits",Y="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",j=1e14,G=14,z=9007199254740991,X=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],K=1e7,q=1e9;(t=function e(t){function M(e,t){var n,r,o,i,a,s,l=this;if(!(l instanceof M))return b&&g(26,"constructor call without new",e),new M(e,t);if(null!=t&&R(t,2,64,C,"base")){if(s=e+"",10==(t|=0))return N(l=new M(e instanceof M?e:s),v+l.e+1,y);if((i="number"==typeof e)&&0*e!=0||!new RegExp("^-?"+(n="["+Y.slice(0,t)+"]+")+"(?:\\."+n+")?$",t<37?"i":"").test(s))return c(l,s,i,t);i?(l.s=1/e<0?(s=s.slice(1),-1):1,b&&15<s.replace(/^0\.0*|\./,"").length&&g(C,U,e),i=!1):l.s=45===s.charCodeAt(0)?(s=s.slice(1),-1):1,s=u(s,10,t,l.s)}else{if(e instanceof M)return l.s=e.s,l.e=e.e,l.c=(e=e.c)?e.slice():e,void(C=0);if((i="number"==typeof e)&&0*e==0){if(l.s=1/e<0?(e=-e,-1):1,e===~~e){for(r=0,o=e;10<=o;o/=10,r++);return l.e=r,l.c=[e],void(C=0)}s=e+""}else{if(!P.test(s=e+""))return c(l,s,i);l.s=45===s.charCodeAt(0)?(s=s.slice(1),-1):1}}for(-1<(r=s.indexOf("."))&&(s=s.replace(".","")),0<(o=s.search(/e/i))?(r<0&&(r=o),r+=+s.slice(o+1),s=s.substring(0,o)):r<0&&(r=s.length),o=0;48===s.charCodeAt(o);o++);for(a=s.length;48===s.charCodeAt(--a););if(s=s.slice(o,a+1))if(a=s.length,i&&b&&15<a&&(z<e||e!==B(e))&&g(C,U,l.s*e),(r=r-o-1)>S)l.c=l.e=null;else if(r<E)l.c=[l.e=0];else{if(l.e=r,l.c=[],o=(r+1)%G,r<0&&(o+=G),o<a){for(o&&l.c.push(+s.slice(0,o)),a-=G;o<a;)l.c.push(+s.slice(o,o+=G));s=s.slice(o),o=G-s.length}else o-=a;for(;o--;s+="0");l.c.push(+s)}else l.c=[l.e=0];C=0}function u(e,t,n,r){var o,i,a,s,l,u,c,h=e.indexOf("."),d=v,f=y;for(n<37&&(e=e.toLowerCase()),0<=h&&(a=O,O=0,e=e.replace(".",""),l=(c=new M(n)).pow(e.length-h),O=a,c.c=L(x(A(l.c),l.e),10,t),c.e=c.c.length),i=a=(u=L(e,n,t)).length;0==u[--a];u.pop());if(!u[0])return"0";if(h<0?--i:(l.c=u,l.e=i,l.s=r,u=(l=p(l,c,d,f,t)).c,s=l.r,i=l.e),h=u[o=i+d+1],a=t/2,s=s||o<0||null!=u[o+1],s=f<4?(null!=h||s)&&(0==f||f==(l.s<0?3:2)):a<h||h==a&&(4==f||s||6==f&&1&u[o-1]||f==(l.s<0?8:7)),o<1||!u[0])e=s?x("1",-d):"0";else{if(u.length=o,s)for(--t;++u[--o]>t;)u[o]=0,o||(++i,u=[1].concat(u));for(a=u.length;!u[--a];);for(h=0,e="";h<=a;e+=Y.charAt(u[h++]));e=x(e,i)}return e}function f(e,t,n,r){var o,i,a,s,l;if(n=null!=n&&R(n,0,8,r,V)?0|n:y,!e.c)return e.toString();if(o=e.c[0],a=e.e,null==t)l=A(e.c),l=19==r||24==r&&a<=h?H(l,a):x(l,a);else if(e=N(new M(e),t,n),i=e.e,l=A(e.c),s=l.length,19==r||24==r&&(t<=i||i<=h)){for(;s<t;l+="0",s++);l=H(l,i)}else if(t-=a,l=x(l,i),s<i+1){if(0<--t)for(l+=".";t--;l+="0");}else if(0<(t+=i-s))for(i+1==s&&(l+=".");t--;l+="0");return e.s<0&&o?"-"+l:l}function n(e,t){var n,r,o=0;for(D(e[0])&&(e=e[0]),n=new M(e[0]);++o<e.length;){if(!(r=new M(e[o])).s){n=r;break}t.call(n,r)&&(n=r)}return n}function s(e,t,n,r,o){return(e<t||n<e||e!=i(e))&&g(r,(o||"decimal places")+(e<t||n<e?" out of range":" not an integer"),e),!0}function w(e,t,n){for(var r=1,o=t.length;!t[--o];t.pop());for(o=t[0];10<=o;o/=10,r++);return(n=r+n*G-1)>S?e.c=e.e=null:n<E?e.c=[e.e=0]:(e.e=n,e.c=t),e}function g(e,t,n){var r=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][e]+"() "+t+": "+n);throw r.name="BigNumber Error",C=0,r}function N(e,t,n,r){var o,i,a,s,l,u,c,h=e.c,d=X;if(h){e:{for(o=1,s=h[0];10<=s;s/=10,o++);if((i=t-o)<0)i+=G,a=t,c=(l=h[u=0])/d[o-a-1]%10|0;else if((u=F((i+1)/G))>=h.length){if(!r)break e;for(;h.length<=u;h.push(0));l=c=0,a=(i%=G)-G+(o=1)}else{for(l=s=h[u],o=1;10<=s;s/=10,o++);c=(a=(i%=G)-G+o)<0?0:l/d[o-a-1]%10|0}if(r=r||t<0||null!=h[u+1]||(a<0?l:l%d[o-a-1]),r=n<4?(c||r)&&(0==n||n==(e.s<0?3:2)):5<c||5==c&&(4==n||r||6==n&&(0<i?0<a?l/d[o-a]:0:h[u-1])%10&1||n==(e.s<0?8:7)),t<1||!h[0])return h.length=0,r?(t-=e.e+1,h[0]=d[(G-t%G)%G],e.e=-t||0):h[0]=e.e=0,e;if(0==i?(h.length=u,s=1,u--):(h.length=u+1,s=d[G-i],h[u]=0<a?B(l/d[o-a]%d[a])*s:0),r)for(;;){if(0==u){for(i=1,a=h[0];10<=a;a/=10,i++);for(a=h[0]+=s,s=1;10<=a;a/=10,s++);i!=s&&(e.e++,h[0]==j&&(h[0]=1));break}if(h[u]+=s,h[u]!=j)break;h[u--]=0,s=1}for(i=h.length;0===h[--i];h.pop());}e.e>S?e.c=e.e=null:e.e<E&&(e.c=[e.e=0])}return e}var p,c,C=0,r=M.prototype,m=new M(1),v=20,y=4,h=-7,l=21,E=-1e7,S=1e7,b=!0,R=s,d=!1,T=1,O=0,k={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0};return M.another=e,M.ROUND_UP=0,M.ROUND_DOWN=1,M.ROUND_CEIL=2,M.ROUND_FLOOR=3,M.ROUND_HALF_UP=4,M.ROUND_HALF_DOWN=5,M.ROUND_HALF_EVEN=6,M.ROUND_HALF_CEIL=7,M.ROUND_HALF_FLOOR=8,M.EUCLID=9,M.config=M.set=function(){var e,t,n=0,r={},o=arguments,i=o[0],a=i&&"object"==typeof i?function(){if(i.hasOwnProperty(t))return null!=(e=i[t])}:function(){if(n<o.length)return null!=(e=o[n++])};return a(t="DECIMAL_PLACES")&&R(e,0,q,2,t)&&(v=0|e),r[t]=v,a(t="ROUNDING_MODE")&&R(e,0,8,2,t)&&(y=0|e),r[t]=y,a(t="EXPONENTIAL_AT")&&(D(e)?R(e[0],-q,0,2,t)&&R(e[1],0,q,2,t)&&(h=0|e[0],l=0|e[1]):R(e,-q,q,2,t)&&(h=-(l=0|(e<0?-e:e)))),r[t]=[h,l],a(t="RANGE")&&(D(e)?R(e[0],-q,-1,2,t)&&R(e[1],1,q,2,t)&&(E=0|e[0],S=0|e[1]):R(e,-q,q,2,t)&&(0|e?E=-(S=0|(e<0?-e:e)):b&&g(2,t+" cannot be zero",e))),r[t]=[E,S],a(t="ERRORS")&&(e===!!e||1===e||0===e?(C=0,R=(b=!!e)?s:I):b&&g(2,t+W,e)),r[t]=b,a(t="CRYPTO")&&(!0===e||!1===e||1===e||0===e?e?!(e="undefined"==typeof crypto)&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?d=!0:b?g(2,"crypto unavailable",e?void 0:crypto):d=!1:d=!1:b&&g(2,t+W,e)),r[t]=d,a(t="MODULO_MODE")&&R(e,0,9,2,t)&&(T=0|e),r[t]=T,a(t="POW_PRECISION")&&R(e,0,q,2,t)&&(O=0|e),r[t]=O,a(t="FORMAT")&&("object"==typeof e?k=e:b&&g(2,t+" not an object",e)),r[t]=k,r},M.max=function(){return n(arguments,r.lt)},M.min=function(){return n(arguments,r.gt)},M.random=function(){var u=9007199254740992*Math.random()&2097151?function(){return B(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var t,n,r,o,i,a=0,s=[],l=new M(m);if(e=null!=e&&R(e,0,q,14)?0|e:v,o=F(e/G),d)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));a<o;)9e15<=(i=131072*t[a]+(t[a+1]>>>11))?(n=crypto.getRandomValues(new Uint32Array(2)),t[a]=n[0],t[a+1]=n[1]):(s.push(i%1e14),a+=2);a=o/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(o*=7);a<o;)9e15<=(i=281474976710656*(31&t[a])+1099511627776*t[a+1]+4294967296*t[a+2]+16777216*t[a+3]+(t[a+4]<<16)+(t[a+5]<<8)+t[a+6])?crypto.randomBytes(7).copy(t,a):(s.push(i%1e14),a+=7);a=o/7}else d=!1,b&&g(14,"crypto unavailable",crypto);if(!d)for(;a<o;)(i=u())<9e15&&(s[a++]=i%1e14);for(o=s[--a],e%=G,o&&e&&(i=X[G-e],s[a]=B(o/i)*i);0===s[a];s.pop(),a--);if(a<0)s=[r=0];else{for(r=-1;0===s[0];s.splice(0,1),r-=G);for(a=1,i=s[0];10<=i;i/=10,a++);a<G&&(r-=G-a)}return l.e=r,l.c=s,l}}(),p=function(){function T(e,t,n){var r,o,i,a,s=0,l=e.length,u=t%K,c=t/K|0;for(e=e.slice();l--;)s=((o=u*(i=e[l]%K)+(r=c*i+(a=e[l]/K|0)*u)%K*K+s)/n|0)+(r/K|0)+c*a,e[l]=o%n;return s&&(e=[s].concat(e)),e}function O(e,t,n,r){var o,i;if(n!=r)i=r<n?1:-1;else for(o=i=0;o<n;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function k(e,t,n,r){for(var o=0;n--;)e[n]-=o,o=e[n]<t[n]?1:0,e[n]=o*r+e[n]-t[n];for(;!e[0]&&1<e.length;e.splice(0,1));}return function(e,t,n,r,o){var i,a,s,l,u,c,h,d,f,v,g,p,m,y,w,C,E,S=e.s==t.s?1:-1,b=e.c,R=t.c;if(!(b&&b[0]&&R&&R[0]))return new M(e.s&&t.s&&(b?!R||b[0]!=R[0]:R)?b&&0==b[0]||!R?0*S:S/0:NaN);for(f=(d=new M(S)).c=[],S=n+(a=e.e-t.e)+1,o||(o=j,a=_(e.e/G)-_(t.e/G),S=S/G|0),s=0;R[s]==(b[s]||0);s++);if(R[s]>(b[s]||0)&&a--,S<0)f.push(1),l=!0;else{for(y=b.length,C=R.length,S+=2,1<(u=B(o/(R[s=0]+1)))&&(R=T(R,u,o),b=T(b,u,o),C=R.length,y=b.length),m=C,g=(v=b.slice(0,C)).length;g<C;v[g++]=0);E=R.slice(),E=[0].concat(E),w=R[0],R[1]>=o/2&&w++;do{if(u=0,(i=O(R,v,C,g))<0){if(p=v[0],C!=g&&(p=p*o+(v[1]||0)),1<(u=B(p/w)))for(o<=u&&(u=o-1),h=(c=T(R,u,o)).length,g=v.length;1==O(c,v,h,g);)u--,k(c,C<h?E:R,h,o),h=c.length,i=1;else 0==u&&(i=u=1),h=(c=R.slice()).length;if(h<g&&(c=[0].concat(c)),k(v,c,g,o),g=v.length,-1==i)for(;O(R,v,C,g)<1;)u++,k(v,C<g?E:R,g,o),g=v.length}else 0===i&&(u++,v=[0]);f[s++]=u,v[0]?v[g++]=b[m]||0:(v=[b[m]],g=1)}while((m++<y||null!=v[0])&&S--);l=null!=v[0],f[0]||f.splice(0,1)}if(o==j){for(s=1,S=f[0];10<=S;S/=10,s++);N(d,n+(d.e=s+a*G-1)+1,r,l)}else d.e=a,d.r=+l;return d}}(),c=function(){var a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,s=/^([^.]+)\.$/,l=/^\.([^.]+)$/,u=/^-?(Infinity|NaN)$/,c=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(e,t,n,r){var o,i=n?t:t.replace(c,"");if(u.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!n&&(i=i.replace(a,function(e,t,n){return o="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=o?e:t}),r&&(o=r,i=i.replace(s,"$1").replace(l,"0.$1")),t!=i))return new M(i,o);b&&g(C,"not a"+(r?" base "+r:"")+" number",t),e.s=null}e.c=e.e=null,C=0}}(),r.absoluteValue=r.abs=function(){var e=new M(this);return e.s<0&&(e.s=1),e},r.ceil=function(){return N(new M(this),this.e+1,2)},r.comparedTo=r.cmp=function(e,t){return C=1,o(this,new M(e,t))},r.decimalPlaces=r.dp=function(){var e,t,n=this.c;if(!n)return null;if(e=((t=n.length-1)-_(this.e/G))*G,t=n[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},r.dividedBy=r.div=function(e,t){return C=3,p(this,new M(e,t),v,y)},r.dividedToIntegerBy=r.divToInt=function(e,t){return C=4,p(this,new M(e,t),0,1)},r.equals=r.eq=function(e,t){return C=5,0===o(this,new M(e,t))},r.floor=function(){return N(new M(this),this.e+1,3)},r.greaterThan=r.gt=function(e,t){return C=6,0<o(this,new M(e,t))},r.greaterThanOrEqualTo=r.gte=function(e,t){return C=7,1===(t=o(this,new M(e,t)))||0===t},r.isFinite=function(){return!!this.c},r.isInteger=r.isInt=function(){return!!this.c&&_(this.e/G)>this.c.length-2},r.isNaN=function(){return!this.s},r.isNegative=r.isNeg=function(){return this.s<0},r.isZero=function(){return!!this.c&&0==this.c[0]},r.lessThan=r.lt=function(e,t){return C=8,o(this,new M(e,t))<0},r.lessThanOrEqualTo=r.lte=function(e,t){return C=9,-1===(t=o(this,new M(e,t)))||0===t},r.minus=r.sub=function(e,t){var n,r,o,i,a=this.s;if(C=10,e=new M(e,t),t=e.s,!a||!t)return new M(NaN);if(a!=t)return e.s=-t,this.plus(e);var s=this.e/G,l=e.e/G,u=this.c,c=e.c;if(!s||!l){if(!u||!c)return u?(e.s=-t,e):new M(c?this:NaN);if(!u[0]||!c[0])return c[0]?(e.s=-t,e):new M(u[0]?this:3==y?-0:0)}if(s=_(s),l=_(l),u=u.slice(),a=s-l){for((o=(i=a<0)?(a=-a,u):(l=s,c)).reverse(),t=a;t--;o.push(0));o.reverse()}else for(r=(i=(a=u.length)<(t=c.length))?a:t,a=t=0;t<r;t++)if(u[t]!=c[t]){i=u[t]<c[t];break}if(i&&(o=u,u=c,c=o,e.s=-e.s),0<(t=(r=c.length)-(n=u.length)))for(;t--;u[n++]=0);for(t=j-1;a<r;){if(u[--r]<c[r]){for(n=r;n&&!u[--n];u[n]=t);--u[n],u[r]+=j}u[r]-=c[r]}for(;0==u[0];u.splice(0,1),--l);return u[0]?w(e,u,l):(e.s=3==y?-1:1,e.c=[e.e=0],e)},r.modulo=r.mod=function(e,t){var n,r;return C=11,e=new M(e,t),!this.c||!e.s||e.c&&!e.c[0]?new M(NaN):!e.c||this.c&&!this.c[0]?new M(this):(9==T?(r=e.s,e.s=1,n=p(this,e,0,3),e.s=r,n.s*=r):n=p(this,e,0,T),this.minus(n.times(e)))},r.negated=r.neg=function(){var e=new M(this);return e.s=-e.s||null,e},r.plus=r.add=function(e,t){var n,r=this.s;if(C=12,e=new M(e,t),t=e.s,!r||!t)return new M(NaN);if(r!=t)return e.s=-t,this.minus(e);var o=this.e/G,i=e.e/G,a=this.c,s=e.c;if(!o||!i){if(!a||!s)return new M(r/0);if(!a[0]||!s[0])return s[0]?e:new M(a[0]?this:0*r)}if(o=_(o),i=_(i),a=a.slice(),r=o-i){for((n=0<r?(i=o,s):(r=-r,a)).reverse();r--;n.push(0));n.reverse()}for((r=a.length)-(t=s.length)<0&&(n=s,s=a,a=n,t=r),r=0;t;)r=(a[--t]=a[t]+s[t]+r)/j|0,a[t]=j===a[t]?0:a[t]%j;return r&&(a=[r].concat(a),++i),w(e,a,i)},r.precision=r.sd=function(e){var t,n,r=this.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(b&&g(13,"argument"+W,e),e!=!!e&&(e=null)),!r)return null;if(n=r.length-1,t=n*G+1,n=r[n]){for(;n%10==0;n/=10,t--);for(n=r[0];10<=n;n/=10,t++);}return e&&this.e+1>t&&(t=this.e+1),t},r.round=function(e,t){var n=new M(this);return null!=e&&!R(e,0,q,15)||N(n,~~e+this.e+1,null!=t&&R(t,0,8,15,V)?0|t:y),n},r.shift=function(e){return R(e,-z,z,16,"argument")?this.times("1e"+i(e)):new M(this.c&&this.c[0]&&(e<-z||z<e)?this.s*(e<0?0:1/0):this)},r.squareRoot=r.sqrt=function(){var e,t,n,r,o,i=this.c,a=this.s,s=this.e,l=v+4,u=new M("0.5");if(1!==a||!i||!i[0])return new M(!a||a<0&&(!i||i[0])?NaN:i?this:1/0);if((n=0==(a=Math.sqrt(+this))||a==1/0?(((t=A(i)).length+s)%2==0&&(t+="0"),a=Math.sqrt(t),s=_((s+1)/2)-(s<0||s%2),new M(t=a==1/0?"1e"+s:(t=a.toExponential()).slice(0,t.indexOf("e")+1)+s)):new M(a+"")).c[0])for((a=(s=n.e)+l)<3&&(a=0);;)if(o=n,n=u.times(o.plus(p(this,o,l,1))),A(o.c).slice(0,a)===(t=A(n.c)).slice(0,a)){if(n.e<s&&--a,"9999"!=(t=t.slice(a-3,a+1))&&(r||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(N(n,n.e+v+2,1),e=!n.times(n).eq(this));break}if(!r&&(N(o,o.e+v+2,0),o.times(o).eq(this))){n=o;break}l+=4,a+=4,r=1}return N(n,n.e+v+1,y,e)},r.times=r.mul=function(e,t){var n,r,o,i,a,s,l,u,c,h,d,f,v,g,p,m=this.c,y=(C=17,e=new M(e,t)).c;if(!(m&&y&&m[0]&&y[0]))return!this.s||!e.s||m&&!m[0]&&!y||y&&!y[0]&&!m?e.c=e.e=e.s=null:(e.s*=this.s,m&&y?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=_(this.e/G)+_(e.e/G),e.s*=this.s,(l=m.length)<(h=y.length)&&(v=m,m=y,y=v,o=l,l=h,h=o),o=l+h,v=[];o--;v.push(0));for(g=j,p=K,o=h;0<=--o;){for(n=0,d=y[o]%p,f=y[o]/p|0,i=o+(a=l);o<i;)n=((u=d*(u=m[--a]%p)+(s=f*u+(c=m[a]/p|0)*d)%p*p+v[i]+n)/g|0)+(s/p|0)+f*c,v[i--]=u%g;v[i]=n}return n?++r:v.splice(0,1),w(e,v,r)},r.toDigits=function(e,t){var n=new M(this);return e=null!=e&&R(e,1,q,18,"precision")?0|e:null,t=null!=t&&R(t,0,8,18,V)?0|t:y,e?N(n,e,t):n},r.toExponential=function(e,t){return f(this,null!=e&&R(e,0,q,19)?1+~~e:null,t,19)},r.toFixed=function(e,t){return f(this,null!=e&&R(e,0,q,20)?~~e+this.e+1:null,t,20)},r.toFormat=function(e,t){var n=f(this,null!=e&&R(e,0,q,21)?~~e+this.e+1:null,t,21);if(this.c){var r,o=n.split("."),i=+k.groupSize,a=+k.secondaryGroupSize,s=k.groupSeparator,l=o[0],u=o[1],c=this.s<0,h=c?l.slice(1):l,d=h.length;if(a&&(r=i,i=a,d-=a=r),0<i&&0<d){for(r=d%i||i,l=h.substr(0,r);r<d;r+=i)l+=s+h.substr(r,i);0<a&&(l+=s+h.slice(r)),c&&(l="-"+l)}n=u?l+k.decimalSeparator+((a=+k.fractionGroupSize)?u.replace(new RegExp("\\d{"+a+"}\\B","g"),"$&"+k.fractionGroupSeparator):u):l}return n},r.toFraction=function(e){var t,n,r,o,i,a,s,l,u,c=b,h=this.c,d=new M(m),f=n=new M(m),v=s=new M(m);if(null!=e&&(b=!1,a=new M(e),b=c,(c=a.isInt())&&!a.lt(m)||(b&&g(22,"max denominator "+(c?"out of range":"not an integer"),e),e=!c&&a.c&&N(a,a.e+1,1).gte(m)?a:null)),!h)return this.toString();for(u=A(h),o=d.e=u.length-this.e-1,d.c[0]=X[(i=o%G)<0?G+i:i],e=!e||0<a.cmp(d)?0<o?d:f:a,i=S,S=1/0,a=new M(u),s.c[0]=0;l=p(a,d,0,1),1!=(r=n.plus(l.times(v))).cmp(e);)n=v,v=r,f=s.plus(l.times(r=f)),s=r,d=a.minus(l.times(r=d)),a=r;return r=p(e.minus(n),v,0,1),s=s.plus(r.times(f)),n=n.plus(r.times(v)),s.s=f.s=this.s,t=p(f,v,o*=2,y).minus(this).abs().cmp(p(s,n,o,y).minus(this).abs())<1?[f.toString(),v.toString()]:[s.toString(),n.toString()],S=i,t},r.toNumber=function(){return+this},r.toPower=r.pow=function(e,t){var n,r,o,i=B(e<0?-e:+e),a=this;if(null!=t&&(C=23,t=new M(t)),!R(e,-z,z,23,"exponent")&&(!isFinite(e)||z<i&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return n=Math.pow(+a,e),new M(t?n%t:n);for(t?1<e&&a.gt(m)&&a.isInt()&&t.gt(m)&&t.isInt()?a=a.mod(t):(o=t,t=null):O&&(n=F(O/G+2)),r=new M(m);;){if(i%2){if(!(r=r.times(a)).c)break;n?r.c.length>n&&(r.c.length=n):t&&(r=r.mod(t))}if(!(i=B(i/2)))break;a=a.times(a),n?a.c&&a.c.length>n&&(a.c.length=n):t&&(a=a.mod(t))}return t?r:(e<0&&(r=m.div(r)),o?r.mod(o):n?N(r,O,y):r)},r.toPrecision=function(e,t){return f(this,null!=e&&R(e,1,q,24,"precision")?0|e:null,t,24)},r.toString=function(e){var t,n=this.s,r=this.e;return null===r?n?(t="Infinity",n<0&&(t="-"+t)):t="NaN":(t=A(this.c),t=null!=e&&R(e,2,64,25,"base")?u(x(t,r),0|e,10,n):r<=h||l<=r?H(t,r):x(t,r),n<0&&this.c[0]&&(t="-"+t)),t},r.truncated=r.trunc=function(){return N(new M(this),this.e+1,1)},r.valueOf=r.toJSON=function(){var e,t=this.e;return null===t?this.toString():(e=A(this.c),e=t<=h||l<=t?H(e,t):x(e,t),this.s<0?"-"+e:e)},r.isBigNumber=!0,null!=t&&M.config(t),M}()).default=t.BigNumber=t,void 0!==n&&n.exports?n.exports=t:(e=e||("undefined"!=typeof self?self:Function("return this")())).BigNumber=t}(this)},{}],2:[function(e,t,n){"use strict";t.exports={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,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:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}},{}],3:[function(e,t,n){"use strict";function o(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];if("string"==typeof t&&(t=l.parseFormat(t)),!s.validateFormat(t))return"ERROR: invalid format";var r=t.prefix||"",o=t.postfix||"",i=function(e,u,t){switch(u.output){case"currency":return u=a(u,_.currentCurrencyDefaultFormat()),function(e,t,n){var r=n.currentCurrency(),o=Object.assign({},A,t),i=void 0,a="",s=!!o.totalLength||!!o.forceAverage||o.average,l=t.currencyPosition||r.position,u=t.currencySymbol||r.symbol;o.spaceSeparated&&(a=" "),"infix"===l&&(i=a+u+a);var c=h({instance:e,providedFormat:t,state:n,decimalSeparator:i});return"prefix"===l&&(c=e._value<0&&"sign"===o.negative?"-"+a+u+c.slice(1):u+a+c),l&&"postfix"!==l||(c=c+(a=s?"":a)+u),c}(e,u,_);case"percent":return u=a(u,_.currentPercentageDefaultFormat()),function(e,t,n,r){var o=(t=u).prefixSymbol,i=h({instance:r(100*e._value),providedFormat:t,state:n}),a=Object.assign({},A,t);return o?"%"+(a.spaceSeparated?" ":"")+i:i+(a.spaceSeparated?" ":"")+"%"}(e,u,_,t);case"byte":return u=a(u,_.currentByteDefaultFormat()),function(e,t,n,r){var o=(t=u).base||"binary",i=d[o],a=c(e._value,i.suffixes,i.scale),s=a.value,l=a.suffix;return h({instance:r(s),providedFormat:t,state:n,defaults:n.currentByteDefaultFormat()})+(n.currentAbbreviations().spaced?" ":"")+l}(e,u,_,t);case"time":return u=a(u,_.currentTimeDefaultFormat()),function(e){var t=Math.floor(e._value/60/60),n=Math.floor((e._value-60*t*60)/60),r=Math.round(e._value-60*t*60-60*n);return t+":"+(n<10?"0":"")+n+":"+(r<10?"0":"")+r}(e);case"ordinal":return u=a(u,_.currentOrdinalDefaultFormat()),function(e,t,n){var r=(n=_).currentOrdinal(),o=Object.assign({},A,t),i=h({instance:e,providedFormat:t,state:n}),a=r(e._value);return i+(o.spaceSeparated?" ":"")+a}(e,u,_);case"number":default:return h({instance:e,providedFormat:u,numbro:t})}}(e,t,n);return i=function(e,t){return e+t}(i=function(e,t){return t+e}(i,r),o)}function c(e,t,n){var r=t[0],o=Math.abs(e);if(n<=o){for(var i=1;i<t.length;++i){var a=Math.pow(n,i),s=Math.pow(n,i+1);if(a<=o&&o<s){r=t[i],e/=a;break}}r===t[0]&&(e/=Math.pow(n,t.length-1),r=t[t.length-1])}return{value:e,suffix:r}}function v(e){for(var t="",n=0;n<e;n++)t+="0";return t}function k(e,t){return-1!==e.toString().indexOf("e")?function(e,t){var n=e.toString(),r=n.split("e"),o=N(r,2),i=o[0],a=o[1],s=i.split("."),l=N(s,2),u=l[0],c=l[1],h=void 0===c?"":c;if(0<+a)n=u+h+v(a-h.length);else{var d=".";d=+u<0?"-0"+d:"0"+d;var f=(v(-a-1)+Math.abs(u)+h).substr(0,t);f.length<t&&(f+=v(t-f.length)),n=d+f}return 0<+a&&0<t&&(n+="."+v(t)),n}(e,t):(Math.round(+(e+"e+"+t))/Math.pow(10,t)).toFixed(t)}function M(e,t){for(var n=[],r=0,o=e;0<o;o--)r===t&&(n.unshift(o),r=0),r++;return n}function h(e){var t=e.instance,n=e.providedFormat,r=e.state,o=void 0===r?_:r,i=e.decimalSeparator,a=e.defaults,s=void 0===a?o.currentDefaults():a,l=t._value;if(0===l&&o.hasZeroFormat())return o.getZeroFormat();if(!isFinite(l))return l.toString();var u=Object.assign({},A,s,n),c=u.totalLength,h=c?0:u.characteristic,d=u.optionalCharacteristic,f=u.forceAverage,v=!!c||!!f||u.average,g=c?-1:v&&void 0===n.mantissa?0:u.mantissa,p=!c&&(void 0===n.optionalMantissa?-1===g:u.optionalMantissa),m=u.trimMantissa,y=u.thousandSeparated,w=u.spaceSeparated,C=u.negative,E=u.forceSign,S=u.exponential,b="";if(v){var R=function(e){var t=e.value,n=e.forceAverage,r=e.abbreviations,o=e.spaceSeparated,i=void 0!==o&&o,a=e.totalLength,s=void 0===a?0:a,l="",u=Math.abs(t),c=-1;u>=Math.pow(10,12)&&!n||"trillion"===n?(l=r.trillion,t/=Math.pow(10,12)):u<Math.pow(10,12)&&u>=Math.pow(10,9)&&!n||"billion"===n?(l=r.billion,t/=Math.pow(10,9)):u<Math.pow(10,9)&&u>=Math.pow(10,6)&&!n||"million"===n?(l=r.million,t/=Math.pow(10,6)):(u<Math.pow(10,6)&&u>=Math.pow(10,3)&&!n||"thousand"===n)&&(l=r.thousand,t/=Math.pow(10,3));var h=i?" ":"";if(l=l&&h+l,s){var d=t.toString().split(".")[0];c=Math.max(s-d.length,0)}return{value:t,abbreviation:l,mantissaPrecision:c}}({value:l,forceAverage:f,abbreviations:o.currentAbbreviations(),spaceSeparated:w,totalLength:c});l=R.value,b+=R.abbreviation,c&&(g=R.mantissaPrecision)}if(S){var T=function(e){var t=e.value,n=e.characteristicPrecision,r=void 0===n?0:n,o=t.toExponential().split("e"),i=N(o,2),a=i[0],s=i[1],l=+a;return r&&1<r&&(l*=Math.pow(10,r-1),s=0<=(s=+s-(r-1))?"+"+s:s),{value:l,abbreviation:"e"+s}}({value:l,characteristicPrecision:h});l=T.value,b=T.abbreviation+b}var O=function(e,t,n,r,o){if(-1===r)return e;var i=k(t,r),a=i.toString().split("."),s=N(a,2),l=s[0],u=s[1],c=void 0===u?"":u;if(c.match(/^0+$/)&&(n||o))return l;var h=c.match(/0+$/);return o&&h?l+"."+c.toString().slice(0,h.index):i.toString()}(l.toString(),l,p,g,m);return O=function(e,t,n,r,o){var i=r.currentDelimiters(),a=i.thousands;o=o||i.decimal;var s=i.thousandsSize||3,l=e.toString(),u=l.split(".")[0],c=l.split(".")[1];return n&&(t<0&&(u=u.slice(1)),M(u.length,s).forEach(function(e,t){u=u.slice(0,e+t)+a+u.slice(e+t)}),t<0&&(u="-"+u)),l=c?u+o+c:u}(O=function(e,t,n,r){var o=e,i=o.toString().split("."),a=N(i,2),s=a[0],l=a[1];if(s.match(/^-?0$/)&&n)return l?s.replace("0","")+"."+l:s.replace("0","");if(s.length<r)for(var u=r-s.length,c=0;c<u;c++)o="0"+o;return o.toString()}(O,0,d,h),l,y,o,i),(v||S)&&(O=function(e,t){return e+t}(O,b)),(E||l<0)&&(O=function(e,t,n){return 0===t?e:0==+e?e.replace("-",""):0<t?"+"+e:"sign"===n?e:"("+e.replace("-","")+")"}(O,l,C)),O}function a(e,t){if(!e)return t;var n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}var N=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},_=e("./globalState"),s=e("./validating"),l=e("./parsing"),r=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],d={general:{scale:1024,suffixes:r,marker:"bd"},binary:{scale:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],marker:"b"},decimal:{scale:1e3,suffixes:r,marker:"d"}},A={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1};t.exports=function(r){return{format:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return o.apply(void 0,t.concat([r]))},getByteUnit:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){var t=d.general;return c(e._value,t.suffixes,t.scale).suffix}.apply(void 0,t.concat([r]))},getBinaryByteUnit:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){var t=d.binary;return c(e._value,t.suffixes,t.scale).suffix}.apply(void 0,t.concat([r]))},getDecimalByteUnit:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){var t=d.decimal;return c(e._value,t.suffixes,t.scale).suffix}.apply(void 0,t.concat([r]))},formatOrDefault:a}}},{"./globalState":4,"./parsing":8,"./validating":10}],4:[function(e,t,n){"use strict";function o(e){u=e}function r(){return c[u]}var i=e("./en-US"),a=e("./validating"),s=e("./parsing"),l={},u=void 0,c={},h=null,d={};l.languages=function(){return Object.assign({},c)},l.currentLanguage=function(){return u},l.currentCurrency=function(){return r().currency},l.currentAbbreviations=function(){return r().abbreviations},l.currentDelimiters=function(){return r().delimiters},l.currentOrdinal=function(){return r().ordinal},l.currentDefaults=function(){return Object.assign({},r().defaults,d)},l.currentOrdinalDefaultFormat=function(){return Object.assign({},l.currentDefaults(),r().ordinalFormat)},l.currentByteDefaultFormat=function(){return Object.assign({},l.currentDefaults(),r().byteFormat)},l.currentPercentageDefaultFormat=function(){return Object.assign({},l.currentDefaults(),r().percentageFormat)},l.currentCurrencyDefaultFormat=function(){return Object.assign({},l.currentDefaults(),r().currencyFormat)},l.currentTimeDefaultFormat=function(){return Object.assign({},l.currentDefaults(),r().timeFormat)},l.setDefaults=function(e){e=s.parseFormat(e),a.validateFormat(e)&&(d=e)},l.getZeroFormat=function(){return h},l.setZeroFormat=function(e){return h="string"==typeof e?e:null},l.hasZeroFormat=function(){return null!==h},l.languageData=function(e){if(e){if(c[e])return c[e];throw new Error('Unknown tag "'+e+'"')}return r()},l.registerLanguage=function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!a.validateLanguage(e))throw new Error("Invalid language data");c[e.languageTag]=e,t&&o(e.languageTag)},l.setLanguage=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:i.languageTag;if(!c[e]){var n=e.split("-")[0],r=Object.keys(c).find(function(e){return e.split("-")[0]===n});return c[r]?void o(r):void o(t)}o(e)},l.registerLanguage(i),u=i.languageTag,t.exports=l},{"./en-US":2,"./parsing":8,"./validating":10}],5:[function(r,e,t){"use strict";e.exports=function(t){return{loadLanguagesInNode:function(e){return function(e,n){e.forEach(function(t){var e=void 0;try{e=r("../languages/"+t)}catch(e){console.error('Unable to load "'+t+'". No matching language file found.')}e&&n.registerLanguage(e)})}(e,t)}}}},{}],6:[function(e,t,n){"use strict";function o(e,t,n){var r=new i(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new i(o),e._value=r.minus(o).toNumber(),e}var i=e("bignumber.js");t.exports=function(n){return{add:function(e,t){return function(e,t,n){var r=new i(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new i(o),e._value=r.add(o).toNumber(),e}(e,t,n)},subtract:function(e,t){return o(e,t,n)},multiply:function(e,t){return function(e,t,n){var r=new i(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new i(o),e._value=r.times(o).toNumber(),e}(e,t,n)},divide:function(e,t){return function(e,t,n){var r=new i(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new i(o),e._value=r.dividedBy(o).toNumber(),e}(e,t,n)},set:function(e,t){return function(e,t,n){var r=t;return n.isNumbro(t)&&(r=t._value),e._value=r,e}(e,t,n)},difference:function(e,t){return function(e,t,n){var r=n(e._value);return o(r,t,n),Math.abs(r._value)}(e,t,n)}}}},{"bignumber.js":1}],7:[function(e,t,n){"use strict";function r(e){var t=e;return o.isNumbro(e)?t=e._value:"string"==typeof e?t=o.unformat(e):isNaN(e)&&(t=NaN),t}function o(e){return new f(r(e))}var i=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),a=e("./globalState"),s=e("./validating"),l=e("./loading")(o),u=e("./unformatting"),c=e("./formatting")(o),h=e("./manipulating")(o),d=e("./parsing"),f=function(){function t(e){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,t),this._value=e}return i(t,[{key:"clone",value:function(){return o(this._value)}},{key:"format",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return c.format(this,e)}},{key:"formatCurrency",value:function(e){return"string"==typeof e&&(e=d.parseFormat(e)),(e=c.formatOrDefault(e,a.currentCurrencyDefaultFormat())).output="currency",c.format(this,e)}},{key:"formatTime",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return e.output="time",c.format(this,e)}},{key:"binaryByteUnits",value:function(){return c.getBinaryByteUnit(this)}},{key:"decimalByteUnits",value:function(){return c.getDecimalByteUnit(this)}},{key:"byteUnits",value:function(){return c.getByteUnit(this)}},{key:"difference",value:function(e){return h.difference(this,e)}},{key:"add",value:function(e){return h.add(this,e)}},{key:"subtract",value:function(e){return h.subtract(this,e)}},{key:"multiply",value:function(e){return h.multiply(this,e)}},{key:"divide",value:function(e){return h.divide(this,e)}},{key:"set",value:function(e){return h.set(this,r(e))}},{key:"value",value:function(){return this._value}},{key:"valueOf",value:function(){return this._value}}]),t}();o.version="2.1.1",o.isNumbro=function(e){return e instanceof f},o.language=a.currentLanguage,o.registerLanguage=a.registerLanguage,o.setLanguage=a.setLanguage,o.languages=a.languages,o.languageData=a.languageData,o.zeroFormat=a.setZeroFormat,o.defaultFormat=a.currentDefaults,o.setDefaults=a.setDefaults,o.defaultCurrencyFormat=a.currentCurrencyDefaultFormat,o.validate=s.validate,o.loadLanguagesInNode=l.loadLanguagesInNode,o.unformat=u.unformat,t.exports=o},{"./formatting":3,"./globalState":4,"./loading":5,"./manipulating":6,"./parsing":8,"./unformatting":9,"./validating":10}],8:[function(e,t,n){"use strict";t.exports={parseFormat:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return"string"!=typeof e?e:(function(e,t){if(-1===e.indexOf("$")){if(-1===e.indexOf("%"))return-1!==e.indexOf("bd")?(t.output="byte",t.base="general"):-1!==e.indexOf("b")?(t.output="byte",t.base="binary"):-1!==e.indexOf("d")?(t.output="byte",t.base="decimal"):-1===e.indexOf(":")?-1!==e.indexOf("o")&&(t.output="ordinal"):t.output="time";t.output="percent"}else t.output="currency"}(e=function(e,t){var n=e.match(/{([^}]*)}$/);return n?(t.postfix=n[1],e.slice(0,-n[0].length)):e}(e=function(e,t){var n=e.match(/^{([^}]*)}/);return n?(t.prefix=n[1],e.slice(n[0].length)):e}(e,t),t),t),function(e,t){var n=e.match(/[1-9]+[0-9]*/);n&&(t.totalLength=+n[0])}(e,t),function(e,t){var n=e.split(".")[0].match(/0+/);n&&(t.characteristic=n[0].length)}(e,t),function(e,t){if(-1!==e.indexOf(".")){var n=e.split(".")[0];t.optionalCharacteristic=-1===n.indexOf("0")}}(e,t),function(e,t){-1!==e.indexOf("a")&&(t.average=!0)}(e,t),function(e,t){-1!==e.indexOf("K")?t.forceAverage="thousand":-1!==e.indexOf("M")?t.forceAverage="million":-1!==e.indexOf("B")?t.forceAverage="billion":-1!==e.indexOf("T")&&(t.forceAverage="trillion")}(e,t),function(e,t){var n=e.split(".")[1];if(n){var r=n.match(/0+/);r&&(t.mantissa=r[0].length)}}(e,t),function(e,t){e.match(/\[\.]/)?t.optionalMantissa=!0:e.match(/\./)&&(t.optionalMantissa=!1)}(e,t),function(e,t){-1!==e.indexOf(",")&&(t.thousandSeparated=!0)}(e,t),function(e,t){-1!==e.indexOf(" ")&&(t.spaceSeparated=!0)}(e,t),function(e,t){e.match(/^\+?\([^)]*\)$/)&&(t.negative="parenthesis"),e.match(/^\+?-/)&&(t.negative="sign")}(e,t),function(e,t){e.match(/^\+/)&&(t.forceSign=!0)}(e,t),t)}}},{}],9:[function(u,e,t){"use strict";function E(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function c(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",r=arguments[3],o=arguments[4],i=arguments[5],a=arguments[6];if(""!==e)return isNaN(+e)?e===o?0:function e(t,n){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",o=arguments[3],i=arguments[4],a=arguments[5],s=arguments[6];if(!isNaN(+t))return+t;var l="",u=t.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(u!==t)return-1*e(u,n,r,o,i,a,s);for(var c=0;c<S.length;c++){var h=S[c];if((l=t.replace(h.key,""))!==t)return e(l,n,r,o,i,a,s)*h.factor}if((l=t.replace("%",""))!==t)return e(l,n,r,o,i,a,s)/100;var d=parseFloat(t);if(!isNaN(d)){var f=o(d);if(f&&"."!==f&&(l=t.replace(new RegExp(E(f)+"$"),""))!==t)return e(l,n,r,o,i,a,s);var v={};Object.keys(a).forEach(function(e){v[a[e]]=e});for(var g=Object.keys(v).sort().reverse(),p=g.length,m=0;m<p;m++){var y=g[m],w=v[y];if((l=t.replace(y,""))!==t){var C=void 0;switch(w){case"thousand":C=Math.pow(10,3);break;case"million":C=Math.pow(10,6);break;case"billion":C=Math.pow(10,9);break;case"trillion":C=Math.pow(10,12)}return e(l,n,r,o,i,a,s)*C}}}}(function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",r=e.replace(n,"");return r=(r=r.replace(new RegExp("([0-9])"+E(t.thousands)+"([0-9])","g"),"$1$2")).replace(t.decimal,".")}(e,t,n),t,n,r,o,i,a):+e}var S=[{key:"ZiB",factor:Math.pow(1024,7)},{key:"ZB",factor:Math.pow(1e3,7)},{key:"YiB",factor:Math.pow(1024,8)},{key:"YB",factor:Math.pow(1e3,8)},{key:"TiB",factor:Math.pow(1024,4)},{key:"TB",factor:Math.pow(1e3,4)},{key:"PiB",factor:Math.pow(1024,5)},{key:"PB",factor:Math.pow(1e3,5)},{key:"MiB",factor:Math.pow(1024,2)},{key:"MB",factor:Math.pow(1e3,2)},{key:"KiB",factor:Math.pow(1024,1)},{key:"KB",factor:Math.pow(1e3,1)},{key:"GiB",factor:Math.pow(1024,3)},{key:"GB",factor:Math.pow(1e3,3)},{key:"EiB",factor:Math.pow(1024,6)},{key:"EB",factor:Math.pow(1e3,6)},{key:"B",factor:1}];e.exports={unformat:function(e,t){var n=u("./globalState"),r=n.currentDelimiters(),o=n.currentCurrency().symbol,i=n.currentOrdinal(),a=n.getZeroFormat(),s=n.currentAbbreviations(),l=void 0;if("string"==typeof e)l=function(e,t){if(!e.indexOf(":")||":"===t.thousands)return!1;var n=e.split(":");if(3!==n.length)return!1;var r=+n[0],o=+n[1],i=+n[2];return!isNaN(r)&&!isNaN(o)&&!isNaN(i)}(e,r)?function(e){var t=e.split(":"),n=+t[0],r=+t[1];return+t[2]+60*r+3600*n}(e):c(e,r,o,i,a,s,t);else{if("number"!=typeof e)return;l=e}if(void 0!==l)return l}}},{"./globalState":4}],10:[function(e,t,n){"use strict";function o(e){return!!r.unformat(e)}function h(l,u,c){var e=3<arguments.length&&void 0!==arguments[3]&&arguments[3],t=Object.keys(l).map(function(e){if(!u[e])return console.error(c+" Invalid key: "+e),!1;var t=l[e],n=u[e];if("string"==typeof n&&(n={type:n}),"format"===n.type){if(!h(t,f,"[Validate "+e+"]",!0))return!1}else if((void 0===t?"undefined":d(t))!==n.type)return console.error(c+" "+e+' type mismatched: "'+n.type+'" expected, "'+(void 0===t?"undefined":d(t))+'" provided'),!1;if(n.restrictions&&n.restrictions.length)for(var r=n.restrictions.length,o=0;o<r;o++){var i=n.restrictions[o],a=i.restriction,s=i.message;if(!a(t,l))return console.error(c+" "+e+" invalid value: "+s),!1}return n.restriction&&!n.restriction(t,l)?(console.error(c+" "+e+" invalid value: "+n.message),!1):n.validValues&&-1===n.validValues.indexOf(t)?(console.error(c+" "+e+" invalid value: must be among "+JSON.stringify(n.validValues)+', "'+t+'" provided'),!1):!(n.children&&!h(t,n.children,"[Validate "+e+"]"))});return e||t.push.apply(t,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(Object.keys(u).map(function(e){var t=u[e];if("string"==typeof t&&(t={type:t}),t.mandatory){var n=t.mandatory;if("function"==typeof n&&(n=n(l)),n&&void 0===l[e])return console.error(c+' Missing mandatory key "'+e+'"'),!1}return!0}))),t.reduce(function(e,t){return e&&t},!0)}function i(e){return h(e,f,"[Validate format]")}var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=e("./unformatting"),a=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,f={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:function(e,t){return"byte"===t.output},message:"`base` must be provided only when the output is `byte`",mandatory:function(e){return"byte"===e.output}},characteristic:{type:"number",restriction:function(e){return 0<=e},message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:function(e){return 0<=e},message:"value must be positive"},{restriction:function(e,t){return!t.exponential},message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:function(e){return 0<=e},message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:function(e,t){return"percent"===t.output},message:"`prefixSymbol` can be provided only when the output is `percent`"}},s={languageTag:{type:"string",mandatory:!0,restriction:function(e){return e.match(a)},message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",ordinal:{type:"function",mandatory:!0},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};t.exports={validate:function(e,t){var n=o(e),r=i(t);return n&&r},validateFormat:i,validateInput:o,validateLanguage:function(e){return h(e,s,"[Validate language]")}}},{"./unformatting":9}]},{},[7])(7),window.numbro=n(339)},function(e,t,n){"use strict";var r=n(127),l=n(45),o=n(59),u=n(429),c=n(128);r("search",1,function(r,a,s){return[function(e){var t=o(this),n=null==e?void 0:e[r];return void 0!==n?n.call(e,t):new RegExp(e)[r](String(t))},function(e){var t=s(a,e,this);if(t.done)return t.value;var n=l(e),r=String(this),o=n.lastIndex;u(o,0)||(n.lastIndex=0);var i=c(n,r);return u(n.lastIndex,o)||(n.lastIndex=o),null===i?-1:i.index}]})},function(e,t,n){"use strict";t.__esModule=!0,t.getNormalizedDate=function(e){var t=new Date(e);return isNaN(new Date("".concat(e,"T00:00")).getDate())?t:new Date(t.getTime()+6e4*t.getTimezoneOffset())}},function(e,t,n){"use strict";function c(e){return e.split('"').length-1}var r,o;n(12),n(39),n(46),window,r=function(e){var t,n,r,o,i,a,s,l=[],u=0;for(1<(r=e.replace(/\r\n|\r/g,"\n").split("\n")).length&&""===r[r.length-1]&&r.pop(),t=0,n=r.length;t<n;t+=1){for(r[t]=r[t].split("\t"),o=0,i=r[t].length;o<i;o+=1)l[u]||(l[u]=[]),a&&0===o?(s=l[u].length-1,l[u][s]=l[u][s]+"\n"+r[t][0],a&&1&c(r[t][0])&&(a=!1,l[u][s]=l[u][s].substring(0,l[u][s].length-1).replace(/""/g,'"'))):a=o===i-1&&0===r[t][o].indexOf('"')&&1&c(r[t][o])?(l[u].push(r[t][o].substring(1).replace(/""/g,'"')),!0):(l[u].push(r[t][o].replace(/""/g,'"')),!1);a||(u+=1)}return l},o=function(e){var t,n,r,o,i,a="";for(t=0,n=e.length;t<n;t+=1){for(o=e[t].length,r=0;r<o;r+=1)0<r&&(a+="\t"),"string"==typeof(i=e[t][r])?-1<i.indexOf("\n")?a+='"'+i.replace(/"/g,'""')+'"':a+=i:a+=null==i?"":i;t!==n-1&&(a+="\n")}return a},t.parse=r,t.stringify=o},function(e,t,n){var r=n(22),o=n(29),i=n(60),a=n(145),s=n(184);r({target:"Object",stat:!0,forced:o(function(){a(1)}),sham:!s},{getPrototypeOf:function(e){return a(i(e))}})},function(e,t,n){"use strict";n(16),n(70),n(10),n(14),n(17),t.__esModule=!0,t.mouseDown=r,t.mouseOver=o,t.handleMouseEvent=function(e,t){var n=t.coords,r=t.selection,o=t.controller;a.get(e.type)({coords:n,selection:r,controller:o,isShiftKey:e.shiftKey,isLeftClick:(0,i.isLeftClick)(e)||"touchstart"===e.type,isRightClick:(0,i.isRightClick)(e)})};var i=n(33),f=n(25);function r(e){var t=e.isShiftKey,n=e.isLeftClick,r=e.isRightClick,o=e.coords,i=e.selection,a=e.controller,s=i.isSelected()?i.getSelectedRange().current():null,l=i.isSelectedByCorner(),u=i.isSelectedByRowHeader();if(t&&s)0<=o.row&&0<=o.col&&!a.cells?i.setRangeEnd(o):(l||u)&&0<=o.row&&0<=o.col&&!a.cells?i.setRangeEnd(new f.CellCoords(o.row,o.col)):l&&o.row<0&&!a.column?i.setRangeEnd(new f.CellCoords(s.to.row,o.col)):u&&o.col<0&&!a.row?i.setRangeEnd(new f.CellCoords(o.row,s.to.col)):(!l&&!u&&o.col<0||l&&o.col<0)&&!a.row?i.selectRows(s.from.row,o.row):(!l&&!u&&o.row<0||u&&o.row<0)&&!a.column&&i.selectColumns(s.from.col,o.col);else{var c=new f.CellCoords(o.row,o.col);c.row<0&&(c.row=0),c.col<0&&(c.col=0);var h=!i.inInSelection(c),d=n||r&&h;o.row<0&&0<=o.col&&!a.column?d&&i.selectColumns(o.col):o.col<0&&0<=o.row&&!a.row?d&&i.selectRows(o.row):0<=o.col&&0<=o.row&&!a.cells?d&&i.setRangeStart(o):o.col<0&&o.row<0&&i.setRangeStart(o)}}function o(e){var t=e.isLeftClick,n=e.coords,r=e.selection,o=e.controller;if(t){var i=r.isSelectedByRowHeader(),a=r.isSelectedByColumnHeader(),s=r.tableProps.countCols(),l=r.tableProps.countRows();a&&!o.column?r.setRangeEnd(new f.CellCoords(l-1,n.col)):i&&!o.row?r.setRangeEnd(new f.CellCoords(n.row,s-1)):o.cell||r.setRangeEnd(n)}}var a=new Map([["mousedown",r],["mouseover",o],["touchstart",r]])},function(e,t,n){"use strict";n(133),n(134),n(16),n(10),n(14),n(24),n(17),t.__esModule=!0,t.registerAsRootInstance=function(e){r.set(e,!0)},t.hasValidParameter=function(e){return e===o},t.isRootInstance=function(e){return r.has(e)},t.rootInstanceSymbol=t.holder=void 0;var r=new WeakMap;t.holder=r;var o=Symbol("rootInstance");t.rootInstanceSymbol=o},function(e,t,n){t.f=n(35)},function(e,t,n){var r=n(195),o=n(48),i=n(346),a=n(49).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var i=r(n(44)),a=n(27),s=n(4);function o(){}o.prototype={licenseKey:void 0,data:void 0,dataSchema:void 0,width:void 0,height:void 0,startRows:5,startCols:5,rowHeaders:void 0,colHeaders:null,colWidths:void 0,rowHeights: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,selectionMode:"multiple",fillHandle:{autoInsertRow:!1},fixedRowsTop:0,fixedRowsBottom:0,fixedColumnsLeft:0,outsideClickDeselects:!0,enterBeginsEditing:!0,enterMoves:{row:1,col:0},tabMoves:{row:0,col:1},autoWrapRow:!0,autoWrapCol:!0,persistentState:void 0,currentRowClassName:void 0,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",activeHeaderClassName:"ht__active_highlight",className:void 0,tableClassName:void 0,stretchH:"none",isEmptyRow:function(e){var t,n,r,o;for(t=0,n=this.countCols();t<n;t++)if(""!==(r=this.getDataAtCell(e,t))&&null!==r&&(0,a.isDefined)(r))return"object"===(0,i.default)(r)&&(o=this.getCellMeta(e,t),(0,s.isObjectEqual)(this.getSchema()[o.prop],r));return!0},isEmptyCol:function(e){var t,n,r;for(t=0,n=this.countRows();t<n;t++)if(""!==(r=this.getDataAtCell(t,e))&&null!==r&&(0,a.isDefined)(r))return!1;return!0},observeDOMVisibility:!0,allowInvalid:!0,allowEmpty:!0,invalidCellClassName:"htInvalid",placeholder:void 0,placeholderCellClassName:"htPlaceholder",readOnlyCellClassName:"htDimmed",renderer:void 0,commentedCellClassName:"htCommentCell",fragmentSelection:!1,readOnly:!1,skipColumnOnPaste:!1,skipRowOnPaste:!1,search:!1,type:"text",copyable:!0,editor:void 0,visibleRows:10,trimDropdown:!0,debug:!1,wordWrap:!0,noWordWrapClassName:"htNoWrap",contextMenu:void 0,copyPaste:!0,undo:void 0,columnSorting:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,mergeCells:!1,multiColumnSorting:void 0,viewportRowRenderingOffset:"auto",viewportColumnRenderingOffset:"auto",validator:void 0,disableVisualSelection:!1,manualColumnFreeze:void 0,trimWhitespace:!0,source:void 0,title:void 0,checkedTemplate:void 0,uncheckedTemplate:void 0,label:void 0,numericFormat:void 0,language:"en-US",selectOptions:void 0,autoColumnSize:void 0,autoRowSize:void 0,dateFormat:"DD/MM/YYYY",correctFormat:!1,defaultDate:void 0,strict:void 0,allowHtml:!1,renderAllRows:void 0,preventOverflow:!1,bindRowsWithHeaders:void 0,collapsibleColumns:void 0,columnSummary:void 0,dropdownMenu:void 0,filters:void 0,formulas:void 0,ganttChart:void 0,headerTooltips:void 0,hiddenColumns:void 0,hiddenRows:void 0,nestedHeaders:void 0,trimRows:void 0,rowHeaderWidth:void 0,columnHeaderHeight:void 0,observeChanges:void 0,sortByRelevance:!0,filter:!0,filteringCaseSensitive:!1,dragToScroll:!0,nestedRows:void 0};var l=o;t.default=l},function(e,t,n){"use strict";t.__esModule=!0,t.getTranslatedPhrase=function(e,t,n){var r=(0,s.getLanguageDictionary)(e);if(null===r)return null;var o=r[t];if((0,u.isUndefined)(o))return null;var i=function(t,n){var r=t;return(0,a.arrayEach)((0,l.getPhraseFormatters)(),function(e){r=e(t,n)}),r}(o,n);if(Array.isArray(i))return i[0];return i};var a=n(3),s=n(135),l=n(452),u=n(27)},function(e,t,n){"use strict";var r=n(0);n(19),t.__esModule=!0,t.extendNotExistingKeys=function(n,e){return(0,a.objectEach)(e,function(e,t){(0,i.isUndefined)(n[t])&&(n[t]=e)}),n},t.createCellHeadersRange=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:e,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t,o=n,i=r;if(t<e){var a=[i,o];o=a[0],i=a[1]}return"".concat(o,"-").concat(i)},t.normalizeLanguageCode=h,t.applyLanguageSetting=function(e,t){var n=h(t);(0,u.hasLanguageDictionary)(n)?e.language=n:(e.language=u.DEFAULT_LANGUAGE_CODE,d(t))},t.warnUserAboutLanguageRegistration=d;var o=r(n(66)),i=n(27),a=n(4),s=n(57),l=n(67),u=n(135);function c(){var e=(0,o.default)(['Language with code "','" was not found. You should register particular language \n before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.']);return c=function(){return e},e}function h(e){var t=/^([a-zA-Z]{2})-([a-zA-Z]{2})$/.exec(e);return t?"".concat(t[1].toLowerCase(),"-").concat(t[2].toUpperCase()):e}function d(e){(0,i.isDefined)(e)&&(0,s.error)((0,l.toSingleLine)(c(),e))}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0;var o=r(n(352));t.Highlight=o.default;var i=r(n(463));t.Selection=i.default;var a=n(344);t.handleMouseEvent=a.handleMouseEvent;var s=n(137);t.detectSelectionType=s.detectSelectionType,t.normalizeSelectionFactory=s.normalizeSelectionFactory},function(e,t,n){"use strict";var r=n(0);n(133),n(134),n(353),n(19),n(454),n(31),n(16),n(70),n(10),n(38),n(14),n(17),t.__esModule=!0,t.default=t.CUSTOM_SELECTION=t.HEADER_TYPE=t.FILL_TYPE=t.CELL_TYPE=t.AREA_TYPE=t.ACTIVE_HEADER_TYPE=void 0;var o=r(n(36)),i=r(n(354)),a=r(n(1)),s=r(n(2)),l=n(456),u=n(3),c="active-header";t.ACTIVE_HEADER_TYPE=c;t.AREA_TYPE="area";t.CELL_TYPE="cell";t.FILL_TYPE="fill";t.HEADER_TYPE="header";var h="custom-selection";t.CUSTOM_SELECTION=h;var d=function(){function t(e){(0,a.default)(this,t),this.options=e,this.layerLevel=0,this.cell=(0,l.createHighlight)("cell",e),this.fill=(0,l.createHighlight)("fill",e),this.areas=new Map,this.headers=new Map,this.activeHeaders=new Map,this.customSelections=[]}return(0,s.default)(t,[{key:"isEnabledFor",value:function(e){var t="current"===e?"cell":e,n=this.options.disableHighlight;return"string"==typeof n&&(n=[n]),!1===n||Array.isArray(n)&&!n.includes(t)}},{key:"useLayerLevel",value:function(e){var t=0<arguments.length&&void 0!==e?e:0;return this.layerLevel=t,this}},{key:"getCell",value:function(){return this.cell}},{key:"getFill",value:function(){return this.fill}},{key:"createOrGetArea",value:function(){var e,t=this.layerLevel;return this.areas.has(t)?e=this.areas.get(t):(e=(0,l.createHighlight)("area",(0,i.default)({layerLevel:t},this.options)),this.areas.set(t,e)),e}},{key:"getAreas",value:function(){return(0,o.default)(this.areas.values())}},{key:"createOrGetHeader",value:function(){var e,t=this.layerLevel;return this.headers.has(t)?e=this.headers.get(t):(e=(0,l.createHighlight)("header",(0,i.default)({},this.options)),this.headers.set(t,e)),e}},{key:"getHeaders",value:function(){return(0,o.default)(this.headers.values())}},{key:"createOrGetActiveHeader",value:function(){var e,t=this.layerLevel;return this.activeHeaders.has(t)?e=this.activeHeaders.get(t):(e=(0,l.createHighlight)(c,(0,i.default)({},this.options)),this.activeHeaders.set(t,e)),e}},{key:"getActiveHeaders",value:function(){return(0,o.default)(this.activeHeaders.values())}},{key:"getCustomSelections",value:function(){return(0,o.default)(this.customSelections.values())}},{key:"addCustomSelection",value:function(e){this.customSelections.push((0,l.createHighlight)(h,(0,i.default)({},e)))}},{key:"clear",value:function(){this.cell.clear(),this.fill.clear(),(0,u.arrayEach)(this.areas.values(),function(e){e.clear()}),(0,u.arrayEach)(this.headers.values(),function(e){e.clear()}),(0,u.arrayEach)(this.activeHeaders.values(),function(e){e.clear()})}},{key:Symbol.iterator,value:function(){return[this.cell,this.fill].concat((0,o.default)(this.areas.values()),(0,o.default)(this.headers.values()),(0,o.default)(this.activeHeaders.values()),(0,o.default)(this.customSelections))[Symbol.iterator]()}}]),t}();t.default=d},function(e,t,n){n(347)("iterator")},function(e,t,n){var o=n(71);e.exports=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(e){o(t,e,n[e])})}return t}},function(e,t,n){var r=n(34),o=n(192),i=n(467),a=n(63);for(var s in o){var l=r[s],u=l&&l.prototype;if(u&&u.forEach!==i)try{a(u,"forEach",i)}catch(e){u.forEach=i}}},function(e,t,n){"use strict";var r=n(0);n(12),n(16),n(70),n(76),n(10),n(14),n(17),t.__esModule=!0,t.default=void 0;var f=r(n(71)),o=r(n(1)),i=r(n(2)),v=n(4),g=n(15),p=n(27),a=function(){function t(e){(0,o.default)(this,t),this.samples=null,this.dataFactory=e,this.customSampleCount=null,this.allowDuplicates=!1}return(0,i.default)(t,null,[{key:"SAMPLE_COUNT",get:function(){return 3}}]),(0,i.default)(t,[{key:"getSampleCount",value:function(){return this.customSampleCount?this.customSampleCount:t.SAMPLE_COUNT}},{key:"setSampleCount",value:function(e){this.customSampleCount=e}},{key:"setAllowDuplicates",value:function(e){this.allowDuplicates=e}},{key:"generateRowSamples",value:function(e,t){return this.generateSamples("row",t,e)}},{key:"generateColumnSamples",value:function(e,t){return this.generateSamples("col",t,e)}},{key:"generateSamples",value:function(n,r,e){var o=this,i=new Map,t="number"==typeof e?{from:e,to:e}:e,a=t.from,s=t.to;return(0,g.rangeEach)(a,s,function(e){var t=o.generateSample(n,r,e);i.set(e,t)}),i}},{key:"generateSample",value:function(s,e,l){var u=this;if("row"!==s&&"col"!==s)throw new Error("Unsupported sample type");var c=new Map,h="row"===s?"col":"row",d=[];return(0,g.rangeEach)(e.from,e.to,function(e){var t,n="row"===s?u.dataFactory(l,e):u.dataFactory(e,l),r=n.value,o=n.bundleCountSeed,i=0<o;t=(0,v.isObject)(r)?Object.keys(r).length:Array.isArray(r)?r.length:(0,p.stringify)(r).length,i&&(t+=o),c.has(t)||c.set(t,{needed:u.getSampleCount(),strings:[]});var a=c.get(t);a.needed&&(-1<d.indexOf(r)&&!u.allowDuplicates&&!i||(a.strings.push((0,f.default)({value:r},h,e)),d.push(r),a.needed-=1))}),c}}]),t}();t.default=a},function(e,t,n){"use strict";var r=n(0);n(19),n(16),n(165),n(40),n(64),n(70),n(80),n(81),n(358),n(343),n(10),n(14),n(17),n(32),t.__esModule=!0,t.default=void 0;var l=r(n(36)),a=r(n(354)),s=r(n(476)),o=r(n(1)),i=r(n(2)),u=r(n(7)),c=r(n(26)),h=r(n(6)),d=r(n(13)),f=r(n(8)),v=n(5),g=n(27),p=n(4),m=n(3),y=n(15),w=r(n(21)),C=n(20),E=r(n(43)),S=n(136),b=n(478),R=n(166),T=n(479),O=r(n(480)),k=n(481),M=n(88),N="columnSorting";(0,M.registerRootComparator)(N,k.rootComparator),E.default.getSingleton().register("beforeColumnSort"),E.default.getSingleton().register("afterColumnSort");var _=function(e){function n(e){var t;return(0,o.default)(this,n),(t=(0,u.default)(this,(0,h.default)(n).call(this,e))).columnStatesManager=new b.ColumnStatesManager,t.rowsMapper=new O.default((0,c.default)(t)),t.blockPluginTranslation=!0,t.columnMetaCache=new Map,t.pluginKey=N,t}return(0,f.default)(n,e),(0,i.default)(n,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[this.pluginKey]}},{key:"enablePlugin",value:function(){var o=this;this.enabled||((0,g.isUndefined)(this.hot.getSettings().observeChanges)&&this.enableObserveChangesPlugin(),this.addHook("afterTrimRow",function(){return o.sortByPresetSortStates()}),this.addHook("afterUntrimRow",function(){return o.sortByPresetSortStates()}),this.addHook("modifyRow",function(e,t){return o.onModifyRow(e,t)}),this.addHook("unmodifyRow",function(e,t){return o.onUnmodifyRow(e,t)}),this.addHook("afterGetColHeader",function(e,t){return o.onAfterGetColHeader(e,t)}),this.addHook("beforeOnCellMouseDown",function(e,t,n,r){return o.onBeforeOnCellMouseDown(e,t,n,r)}),this.addHook("afterOnCellMouseDown",function(e,t){return o.onAfterOnCellMouseDown(e,t)}),this.addHook("afterCreateRow",function(e,t){return o.onAfterCreateRow(e,t)}),this.addHook("afterRemoveRow",function(e,t){return o.onAfterRemoveRow(e,t)}),this.addHook("afterInit",function(){return o.loadOrSortBySettings()}),this.addHook("afterLoadData",function(e){return o.onAfterLoadData(e)}),this.addHook("afterCreateCol",function(){return o.onAfterCreateCol()}),this.addHook("afterRemoveCol",function(){return o.onAfterRemoveCol()}),this.hot.view&&this.loadOrSortBySettings(),(0,d.default)((0,h.default)(n.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){function e(e,t){var n=(0,R.getHeaderSpanElement)(t);!1!==(0,R.isFirstLevelColumnHeader)(e,t)&&null!==n&&r.updateHeaderClasses(n)}var r=this;this.hot.addHook("afterGetColHeader",e),this.hot.addHookOnce("afterRender",function(){r.hot.removeHook("afterGetColHeader",e)}),this.rowsMapper.clearMap(),(0,d.default)((0,h.default)(n.prototype),"disablePlugin",this).call(this)}},{key:"sort",value:function(e){var r=this,t=this.getSortConfig(),n=this.getNormalizedSortConfigs(e),o=this.areValidSortConfigs(n);if(!1!==this.hot.runHooks("beforeColumnSort",t,n,o)){if(o){var i=(0,m.arrayMap)(n,function(e){return function(e){var t=e.column,n=(0,s.default)(e,["column"]);return(0,a.default)({column:r.hot.toPhysicalColumn(t)},n)}(e)});this.columnStatesManager.setSortStates(i),this.sortByPresetSortStates(),this.saveAllSortSettings(),this.hot.render(),this.hot.view.wt.draw(!0)}this.hot.runHooks("afterColumnSort",t,this.getSortConfig(),o)}}},{key:"clearSort",value:function(){this.sort([])}},{key:"isSorted",value:function(){return this.enabled&&!this.columnStatesManager.isListOfSortedColumnsEmpty()}},{key:"getSortConfig",value:function(e){function t(e){var t=e.column,n=(0,s.default)(e,["column"]);return(0,a.default)({column:r.hot.toVisualColumn(t)},n)}var r=this;if((0,g.isDefined)(e)){var n=this.hot.toPhysicalColumn(e),o=this.columnStatesManager.getColumnSortState(n);return(0,g.isDefined)(o)?t(o):void 0}var i=this.columnStatesManager.getSortStates();return(0,m.arrayMap)(i,function(e){return t(e)})}},{key:"setSortConfig",value:function(e){var r=this,t=this.getNormalizedSortConfigs(e);if(this.areValidSortConfigs(t)){var n=(0,m.arrayMap)(t,function(e){return function(e){var t=e.column,n=(0,s.default)(e,["column"]);return(0,a.default)({column:r.hot.toPhysicalColumn(t)},n)}(e)});this.columnStatesManager.setSortStates(n)}}},{key:"getNormalizedSortConfigs",value:function(e){var t=0<arguments.length&&void 0!==e?e:[];return Array.isArray(t)?t.slice(0,1):[t].slice(0,1)}},{key:"areValidSortConfigs",value:function(e){if(!1===Array.isArray(e))return!1;var t=e.map(function(e){return e.column}),n=this.hot.countCols(),r=t.every(function(e){return e<=n&&0<=e});return(0,R.areValidSortStates)(e)&&r}},{key:"saveAllSortSettings",value:function(){var e=this.columnStatesManager.getAllColumnsProperties();e.initialConfig=this.columnStatesManager.getSortStates(),this.hot.runHooks("persistentStateSave","columnSorting",e)}},{key:"getAllSavedSortSettings",value:function(){var r=this,e={};this.hot.runHooks("persistentStateLoad","columnSorting",e);var t=e.value;return(0,g.isDefined)(t)&&Array.isArray(t.initialConfig)&&(t.initialConfig=(0,m.arrayMap)(t.initialConfig,function(e){var t=e.column,n=(0,s.default)(e,["column"]);return(0,a.default)({column:r.hot.toVisualColumn(t)},n)})),t}},{key:"getColumnNextConfig",value:function(e){var t=this.hot.toPhysicalColumn(e);if(this.columnStatesManager.isColumnSorted(t)){var n=this.getSortConfig(e),r=(0,R.getNextSortOrder)(n.sortOrder);return(0,g.isDefined)(r)?(n.sortOrder=r,n):void 0}var o=this.hot.countCols();if(Number.isInteger(e)&&0<=e&&e<o)return{column:e,sortOrder:(0,R.getNextSortOrder)()}}},{key:"getNextSortConfig",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:"append",r=this.hot.toPhysicalColumn(e),o=this.columnStatesManager.getIndexOfColumnInSortQueue(r),i=this.columnStatesManager.isColumnSorted(r),a=this.getSortConfig(),s=this.getColumnNextConfig(e);if(i){if((0,g.isUndefined)(s))return[].concat((0,l.default)(a.slice(0,o)),(0,l.default)(a.slice(o+1)));if("append"===n)return[].concat((0,l.default)(a.slice(0,o)),(0,l.default)(a.slice(o+1)),[s]);if("replace"===n)return[].concat((0,l.default)(a.slice(0,o)),[s],(0,l.default)(a.slice(o+1)))}return(0,g.isDefined)(s)?a.concat(s):a}},{key:"setMergedPluginSettings",value:function(e){var t=this.hot.toPhysicalColumn(e),n=this.hot.getSettings()[this.pluginKey],r=this.columnStatesManager.getAllColumnsProperties(),o=this.hot.getCellMeta(0,e),i=Object.getPrototypeOf(o),a=Object.hasOwnProperty.call(i,this.pluginKey)?i[this.pluginKey]:{};this.columnMetaCache.set(t,Object.assign(r,n,a))}},{key:"getFirstCellSettings",value:function(e){var t=this.blockPluginTranslation;this.blockPluginTranslation=!0,(0===this.columnMetaCache.size||this.columnMetaCache.size<this.hot.countCols())&&this.rebuildColumnMetaCache();var n=this.hot.getCellMeta(0,e);this.blockPluginTranslation=t;var r=Object.create(n);return r[this.pluginKey]=this.columnMetaCache.get(this.hot.toPhysicalColumn(e)),r}},{key:"rebuildColumnMetaCache",value:function(){var t=this,e=this.hot.countCols();0===e?this.columnMetaCache.clear():(0,y.rangeEach)(e-1,function(e){return t.setMergedPluginSettings(e)})}},{key:"getNumberOfRowsToSort",value:function(e){var t=this.hot.getSettings();return t.maxRows<=e?t.maxRows:e-t.minSpareRows}},{key:"sortByPresetSortStates",value:function(){var n=this;if(this.columnStatesManager.isListOfSortedColumnsEmpty())this.rowsMapper.clearMap();else{var e=[],r=this.columnStatesManager.getSortedColumns(),t=this.hot.countRows();this.blockPluginTranslation=!0;for(var o=function(t){return(0,m.arrayMap)(r,function(e){return n.hot.getDataAtCell(t,n.hot.toVisualColumn(e))})},i=0;i<this.getNumberOfRowsToSort(t);i+=1)e.push([i].concat(o(i)));(0,M.sort)(e,this.pluginKey,(0,m.arrayMap)(r,function(e){return n.columnStatesManager.getSortOrderOfColumn(e)}),(0,m.arrayMap)(r,function(e){return n.getFirstCellSettings(n.hot.toVisualColumn(e))}));for(var a=e.length;a<t;a+=1)e.push([a].concat(o(a)));this.blockPluginTranslation=!1,this.rowsMapper._arrayMap=(0,m.arrayMap)(e,function(e){return e[0]})}}},{key:"loadOrSortBySettings",value:function(){this.columnMetaCache.clear();var e=this.getAllSavedSortSettings();if((0,p.isObject)(e))this.sortBySettings(e);else{var t=this.hot.getSettings()[this.pluginKey];this.sortBySettings(t)}}},{key:"sortBySettings",value:function(e){if((0,p.isObject)(e)){this.columnStatesManager.updateAllColumnsProperties(e);var t=e.initialConfig;(Array.isArray(t)||(0,p.isObject)(t))&&this.sort(t)}else this.hot.render()}},{key:"enableObserveChangesPlugin",value:function(){var e=this;this.hot._registerTimeout(setTimeout(function(){e.hot.updateSettings({observeChanges:!0})},0))}},{key:"onModifyRow",value:function(e,t){if(!1===this.blockPluginTranslation&&t!==this.pluginName&&this.isSorted()){var n=this.rowsMapper.getValueByIndex(e);e=null===n?e:n}return e}},{key:"onUnmodifyRow",value:function(e,t){return!1===this.blockPluginTranslation&&t!==this.pluginName&&this.isSorted()&&(e=this.rowsMapper.getIndexByValue(e)),e}},{key:"onAfterGetColHeader",value:function(e,t){var n=(0,R.getHeaderSpanElement)(t);if(!1!==(0,R.isFirstLevelColumnHeader)(e,t)&&null!==n){var r=this.hot.toPhysicalColumn(e),o=this.getFirstCellSettings(e)[this.pluginKey],i=o.indicator,a=o.headerAction;this.updateHeaderClasses(n,this.columnStatesManager,r,i,a)}}},{key:"updateHeaderClasses",value:function(e){if((0,v.removeClass)(e,(0,T.getClassedToRemove)(e)),!1!==this.enabled){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(0,v.addClass)(e,T.getClassesToAdd.apply(void 0,n))}}},{key:"onUpdateSettings",value:function(e){(0,d.default)((0,h.default)(n.prototype),"onUpdateSettings",this).call(this),this.columnMetaCache.clear(),(0,g.isDefined)(e[this.pluginKey])&&this.sortBySettings(e[this.pluginKey])}},{key:"onAfterLoadData",value:function(e){this.rowsMapper.clearMap(),this.columnMetaCache.clear(),!0===e&&this.hot.view&&this.loadOrSortBySettings()}},{key:"onAfterCreateRow",value:function(e,t){this.rowsMapper.shiftItems(e,t)}},{key:"onAfterRemoveRow",value:function(e,t){this.rowsMapper.unshiftItems(e,t)}},{key:"onAfterCreateCol",value:function(){this.columnMetaCache.clear()}},{key:"onAfterRemoveCol",value:function(){this.columnMetaCache.clear()}},{key:"wasClickableHeaderClicked",value:function(e,t){return this.getFirstCellSettings(t)[this.pluginKey].headerAction&&"SPAN"===e.realTarget.nodeName}},{key:"onBeforeOnCellMouseDown",value:function(e,t,n,r){!1!==(0,R.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&(0,S.isPressedCtrlKey)()&&(r.column=!0)}},{key:"onAfterOnCellMouseDown",value:function(e,t){!1!==(0,R.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&((0,S.isPressedCtrlKey)()&&(this.hot.deselectCell(),this.hot.selectColumns(t.col)),this.sort(this.getColumnNextConfig(t.col)))}},{key:"destroy",value:function(){this.rowsMapper.destroy(),this.columnStatesManager.destroy(),(0,d.default)((0,h.default)(n.prototype),"destroy",this).call(this)}}]),n}(w.default);(0,C.registerPlugin)(N,_);var A=_;t.default=A},function(e,t,n){var r=n(22),o=n(475);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(e,t,n){var r=n(332),o=n(196),i=n(333);e.exports=function(e){return r(e)||o(e)||i()}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.getCompareFunctionFactory=function(e){if(h(e))return c(e);return c(o.COLUMN_DATA_TYPE)},t.getRootComparator=t.registerRootComparator=void 0;var o=n(482),i=n(483),a=n(484),s=r(n(78)),l=(0,s.default)("sorting.compareFunctionFactory"),u=l.register,c=l.getItem,h=l.hasItem,d=(0,s.default)("sorting.mainSortComparator"),f=d.register,v=d.getItem;t.getRootComparator=v,t.registerRootComparator=f,u(i.COLUMN_DATA_TYPE,i.compareFunctionFactory),u(a.COLUMN_DATA_TYPE,a.compareFunctionFactory),u(o.COLUMN_DATA_TYPE,o.compareFunctionFactory)},function(e,t,n){"use strict";var r=n(0);n(51),n(46),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),c=n(3),h=n(4);var a=function(){function t(e){(0,o.default)(this,t),this.hot=e,this.commands={},this.commonCallback=null}return(0,i.default)(t,[{key:"registerCommand",value:function(e,t){this.commands[e]=t}},{key:"setCommonCallback",value:function(e){this.commonCallback=e}},{key:"execute",value:function(e){for(var t=this,n=arguments.length,r=new Array(1<n?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=e.split(":"),a=i[0],s=2===i.length?i[1]:null,l=this.commands[a];if(!l)throw new Error("Menu command '".concat(a,"' not exists."));if(s&&l.submenu&&(l=function(n,e){var r;return(0,c.arrayEach)(e,function(e){var t=e.key?e.key.split(":"):null;if(Array.isArray(t)&&t[1]===n)return r=e,!1}),r}(s,l.submenu.items)),!0!==l.disabled&&("function"!=typeof l.disabled||!0!==l.disabled.call(this.hot))&&!(0,h.hasOwnProperty)(l,"submenu")){var u=[];"function"==typeof l.callback&&u.push(l.callback),"function"==typeof this.commonCallback&&u.push(this.commonCallback),r.unshift(i.join(":")),(0,c.arrayEach)(u,function(e){return e.apply(t.hot,r)})}}}]),t}();t.default=a},function(e,t,n){"use strict";var r=n(0);n(12),n(54),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(4),s=n(3),l=n(83);var u=function(){function n(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;(0,o.default)(this,n),this.hot=e,this.predefinedItems=(0,l.predefinedItems)(),this.defaultOrderPattern=t}return(0,i.default)(n,[{key:"setPredefinedItems",value:function(e){var r=this,o={};(this.defaultOrderPattern.length=0,a.objectEach)(e,function(e,t){var n="";n=e.name===l.SEPARATOR?(o[l.SEPARATOR]=e,l.SEPARATOR):isNaN(parseInt(t,10))?(e.key=void 0===e.key?t:e.key,(o[t]=e).key):(o[e.key]=e).key,r.defaultOrderPattern.push(n)}),this.predefinedItems=o}},{key:"getItems",value:function(e){return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=[],n=e;n&&n.items?n=n.items:Array.isArray(n)||(n=t);(0,a.isObject)(n)?(0,a.objectEach)(n,function(e,t){var n=r["string"==typeof e?e:t];n=n||e,(0,a.isObject)(e)?(0,a.extend)(n,e):"string"==typeof n&&(n={name:n}),void 0===n.key&&(n.key=t),o.push(n)}):(0,s.arrayEach)(n,function(e,t){var n=r[e];!n&&0<=l.ITEMS.indexOf(e)||(n=n||{name:e,key:"".concat(t)},(0,a.isObject)(e)&&(0,a.extend)(n,e),void 0===n.key&&(n.key=t),o.push(n))});return o}(0<arguments.length&&void 0!==e?e:null,this.defaultOrderPattern,this.predefinedItems)}}]),n}();t.default=u},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(15),s=function(){function t(e){(0,o.default)(this,t),this.hot=e,this._element=null,this.state=0}return(0,i.default)(t,[{key:"appendTo",value:function(e){e.appendChild(this._element),this.state=2}},{key:"build",value:function(){this._element=this.hot.rootDocument.createElement("div"),this.state=1}},{key:"destroy",value:function(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}},{key:"isAppended",value:function(){return 2===this.state}},{key:"isBuilt",value:function(){return 1<=this.state}},{key:"setPosition",value:function(e,t){(0,a.isNumeric)(e)&&(this._element.style.top=e+"px"),(0,a.isNumeric)(t)&&(this._element.style.left=t+"px")}},{key:"getPosition",value:function(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}},{key:"setSize",value:function(e,t){(0,a.isNumeric)(e)&&(this._element.style.width=e+"px"),(0,a.isNumeric)(t)&&(this._element.style.height=t+"px")}},{key:"getSize",value:function(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}},{key:"setOffset",value:function(e,t){(0,a.isNumeric)(e)&&(this._element.style.marginTop=e+"px"),(0,a.isNumeric)(t)&&(this._element.style.marginLeft=t+"px")}},{key:"getOffset",value:function(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}}]),t}();t.default=s},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=function(){function t(e){(0,o.default)(this,t),this.hot=e,this._element=null,this.state=0}return(0,i.default)(t,[{key:"appendTo",value:function(e){e.appendChild(this._element),this.state=2}},{key:"build",value:function(){this._element=this.hot.rootDocument.createElement("div"),this.state=1}},{key:"destroy",value:function(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}},{key:"isAppended",value:function(){return 2===this.state}},{key:"isBuilt",value:function(){return 1<=this.state}},{key:"setPosition",value:function(e,t){void 0!==e&&(this._element.style.top=e+"px"),void 0!==t&&(this._element.style.left=t+"px")}},{key:"getPosition",value:function(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}},{key:"setSize",value:function(e,t){e&&(this._element.style.width=e+"px"),t&&(this._element.style.height=t+"px")}},{key:"getSize",value:function(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}},{key:"setOffset",value:function(e,t){e&&(this._element.style.marginTop=e+"px"),t&&(this._element.style.marginLeft=t+"px")}},{key:"getOffset",value:function(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}}]),t}();t.default=a},function(e,t,n){"use strict";n(10),n(37),t.__esModule=!0,t.applySpanProperties=function(e,t,n,r){t?t.row===n&&t.col===r?(e.setAttribute("rowspan",t.rowspan.toString()),e.setAttribute("colspan",t.colspan.toString())):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="none"):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="")}},function(e,t,n){"use strict";var r=n(9);t.__esModule=!0,t.condition=a,t.CONDITION_NAME=void 0;var o=r(n(11)),i=n(28);function a(e){return""===e.value||null===e.value||void 0===e.value}t.CONDITION_NAME="empty",(0,i.registerCondition)("empty",a,{name:o.FILTERS_CONDITIONS_EMPTY,inputsCount:0,showOperators:!0})},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.condition=u,t.CONDITION_NAME=void 0;var i=o(n(18)),a=r(n(11)),s=n(27),l=n(28);function u(e,t){var n=(0,i.default)(t,1)[0];return(0,s.stringify)(e.value).toLowerCase()===(0,s.stringify)(n)}t.CONDITION_NAME="eq",(0,l.registerCondition)("eq",u,{name:a.FILTERS_CONDITIONS_EQUAL,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.condition=a,t.CONDITION_NAME=void 0;var u=o(n(18)),i=r(n(11)),c=n(28),h=n(369),d=n(370);function a(e,t){var n=(0,u.default)(t,2),r=n[0],o=n[1];if("numeric"===e.meta.type){var i=parseFloat(r,10),a=parseFloat(o,10);r=Math.min(i,a),o=Math.max(i,a)}else if("date"===e.meta.type){var s=(0,c.getCondition)(d.CONDITION_NAME,[o]),l=(0,c.getCondition)(h.CONDITION_NAME,[r]);return s(e)&&l(e)}return e.value>=r&&e.value<=o}t.CONDITION_NAME="between",(0,c.registerCondition)("between",a,{name:i.FILTERS_CONDITIONS_BETWEEN,inputsCount:2,showOperators:!0})},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.condition=c,t.CONDITION_NAME=void 0;var i=o(n(18)),a=o(n(61)),s=r(n(11)),l=n(28),u="date_after";function c(e,t){var n=(0,i.default)(t,1)[0],r=(0,a.default)(e.value,e.meta.dateFormat),o=(0,a.default)(n,e.meta.dateFormat);return!(!r.isValid()||!o.isValid())&&0<=r.diff(o)}t.CONDITION_NAME=u,(0,l.registerCondition)(u,c,{name:s.FILTERS_CONDITIONS_AFTER,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.condition=c,t.CONDITION_NAME=void 0;var i=o(n(18)),a=o(n(61)),s=r(n(11)),l=n(28),u="date_before";function c(e,t){var n=(0,i.default)(t,1)[0],r=(0,a.default)(e.value,e.meta.dateFormat),o=(0,a.default)(n,e.meta.dateFormat);return!(!r.isValid()||!o.isValid())&&r.diff(o)<=0}t.CONDITION_NAME=u,(0,l.registerCondition)(u,c,{name:s.FILTERS_CONDITIONS_BEFORE,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";var r=n(9),o=n(0);n(12),t.__esModule=!0,t.condition=u,t.CONDITION_NAME=void 0;var i=o(n(18)),a=r(n(11)),s=n(27),l=n(28);function u(e,t){var n=(0,i.default)(t,1)[0];return 0<=(0,s.stringify)(e.value).toLowerCase().indexOf((0,s.stringify)(n))}t.CONDITION_NAME="contains",(0,l.registerCondition)("contains",u,{name:a.FILTERS_CONDITIONS_CONTAINS,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";var r=n(9);t.__esModule=!0,t.operationResult=l,t.SHORT_NAME_FOR_COMPONENT=t.OPERATION_ID=void 0;var o=r(n(11)),i=n(109),a="disjunction";t.OPERATION_ID=a;var s=o.FILTERS_LABELS_DISJUNCTION;function l(e,t){return e.some(function(e){return e.func(t)})}t.SHORT_NAME_FOR_COMPONENT=s,(0,i.registerOperation)(a,s,l)},function(e,t,n){"use strict";var r=n(9);n(40),t.__esModule=!0,t.operationResult=l,t.SHORT_NAME_FOR_COMPONENT=t.OPERATION_ID=void 0;var o=r(n(11)),i=n(109),a="disjunctionWithExtraCondition";t.OPERATION_ID=a;var s=o.FILTERS_LABELS_DISJUNCTION;function l(e,t){if(e.length<3)throw Error("Operation doesn't work on less then three conditions.");return e.slice(0,e.length-1).some(function(e){return e.func(t)})&&e[e.length-1].func(t)}t.SHORT_NAME_FOR_COMPONENT=s,(0,i.registerOperation)(a,s,l)},function(e,t,n){"use strict";var r=n(0);n(12),n(30),n(54),t.__esModule=!0,t.default=void 0;var o=r(n(66)),i=r(n(1)),a=r(n(2)),s=n(3),l=n(4),u=n(67),c=r(n(58)),h=n(28),d=n(171),f=n(109);function v(){var e=(0,o.default)(["The column of index "," has been already applied with a `","`\n filter operation. Use `removeConditions` to clear the current conditions and then add new ones.\n Mind that you cannot mix different types of operations (for instance, if you use `conjunction`,\n use it consequently for a particular column)."],["The column of index "," has been already applied with a \\`","\\`\n filter operation. Use \\`removeConditions\\` to clear the current conditions and then add new ones.\n Mind that you cannot mix different types of operations (for instance, if you use \\`conjunction\\`,\n use it consequently for a particular column)."]);return v=function(){return e},e}var g=function(){function e(){(0,i.default)(this,e),this.conditions=this.initConditionsCollection(),this.columnTypes={},this.orderStack=[]}return(0,a.default)(e,[{key:"isEmpty",value:function(){return!this.orderStack.length}},{key:"isMatch",value:function(n,e){var r=this,o=!0;if(void 0===e)(0,l.objectEach)(this.columnTypes,function(e,t){return o=r.isMatchInConditions(r.conditions[e][t],n,e)});else{var t=this.columnTypes[e];o=this.isMatchInConditions(this.getConditions(e),n,t)}return o}},{key:"isMatchInConditions",value:function(e,t,n){var r=2<arguments.length&&void 0!==n?n:d.OPERATION_ID;return!e.length||(0,f.getOperationFunc)(r)(e,t)}},{key:"addCondition",value:function(e,t,n){var r=2<arguments.length&&void 0!==n?n:d.OPERATION_ID,o=(0,s.arrayMap)(t.args,function(e){return"string"==typeof e?e.toLowerCase():e}),i=t.name||t.command.key;this.runLocalHooks("beforeAdd",e),-1===this.orderStack.indexOf(e)&&this.orderStack.push(e);var a=this.columnTypes[e];if(a){if(a!==r)throw Error((0,u.toSingleLine)(v(),e,a))}else{if(!this.conditions[r])throw new Error("Unexpected operation named `".concat(r,"`. Possible ones are `disjunction` and `conjunction`."));this.columnTypes[e]=r}this.getConditions(e).push({name:i,args:o,func:(0,h.getCondition)(i,o)}),this.runLocalHooks("afterAdd",e)}},{key:"getConditions",value:function(e){var t=this.columnTypes[e];return t?(this.conditions[t][e]||(this.conditions[t][e]=[]),this.conditions[t][e]):[]}},{key:"exportAllConditions",value:function(){var r=this,o=[];return(0,s.arrayEach)(this.orderStack,function(e){var t=(0,s.arrayMap)(r.getConditions(e),function(e){return{name:e.name,args:e.args}}),n=r.columnTypes[e];o.push({column:e,operation:n,conditions:t})}),o}},{key:"importAllConditions",value:function(e){var n=this;this.clean(),(0,s.arrayEach)(e,function(t){n.orderStack.push(t.column),(0,s.arrayEach)(t.conditions,function(e){return n.addCondition(t.column,e)})})}},{key:"removeConditions",value:function(e){this.runLocalHooks("beforeRemove",e),0<=this.orderStack.indexOf(e)&&this.orderStack.splice(this.orderStack.indexOf(e),1),this.clearConditions(e),this.runLocalHooks("afterRemove",e)}},{key:"clearConditions",value:function(e){this.runLocalHooks("beforeClear",e),this.getConditions(e).length=0,delete this.columnTypes[e],this.runLocalHooks("afterClear",e)}},{key:"hasConditions",value:function(e,t){if(!this.columnTypes[e])return!1;var n=this.getConditions(e);return t?0<(0,s.arrayFilter)(n,function(e){return e.name===t}).length:0<n.length}},{key:"clean",value:function(){this.runLocalHooks("beforeClean"),this.columnTypes=Object.create(null),this.orderStack.length=0,this.conditions=this.initConditionsCollection(),this.runLocalHooks("afterClean")}},{key:"destroy",value:function(){this.clearLocalHooks(),this.conditions=null,this.orderStack=null,this.columnTypes=null}},{key:"initConditionsCollection",value:function(){var n=Object.create(null);return(0,l.objectEach)(f.operations,function(e,t){n[t]=Object.create(null)}),n}}]),e}();(0,l.mixin)(g,c.default);var p=g;t.default=p},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(3),s=function(){function n(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(){return[]};(0,o.default)(this,n),this.conditionCollection=e,this.columnDataFactory=t}return(0,i.default)(n,[{key:"filter",value:function(){var r=this,o=[];return this.conditionCollection.isEmpty()||(0,a.arrayEach)(this.conditionCollection.orderStack,function(e,t){var n=r.columnDataFactory(e);t&&(n=r._getIntersectData(n,o)),o=r.filterByColumn(e,n)}),o}},{key:"filterByColumn",value:function(t,e){var n=this,r=1<arguments.length&&void 0!==e?e:[],o=[];return(0,a.arrayEach)(r,function(e){void 0!==e&&n.conditionCollection.isMatch(e,t)&&o.push(e)}),o}},{key:"_getIntersectData",value:function(n,e){var r=[];return(0,a.arrayEach)(e,function(e){var t=e.meta.visualRow;void 0!==n[t]&&(r[t]=n[t])}),r}}]),n}();t.default=s},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var i=r(n(1)),a=r(n(2)),s=n(111),l=n(4),o=function(){function o(e,t){(0,i.default)(this,o);var n=(0,l.isObject)(e),r=(0,l.isObject)(t);this._row=n?e.index:e,this.rowAbsolute=!n||e.isAbsolute,this._column=r?t.index:t,this.columnAbsolute=!r||t.isAbsolute,this.rowOffset=0,this.columnOffset=0,Object.defineProperty(this,"row",{get:function(){return this.rowOffset+this._row},set:function(e){this._row=e},enumerable:!0,configurable:!0}),Object.defineProperty(this,"column",{get:function(){return this.columnOffset+this._column},set:function(e){this._column=e},enumerable:!0,configurable:!0})}return(0,a.default)(o,[{key:"translateTo",value:function(e,t){this.row=this.row+e,this.column=this.column+t}},{key:"isEqual",value:function(e){return e.row===this.row&&e.column===this.column}},{key:"toString",value:function(){return(0,s.toLabel)({index:this.row,isAbsolute:this.rowAbsolute},{index:this.column,isAbsolute:this.columnAbsolute})}}]),o}();t.default=o},function(e,t,n){"use strict";var r=n(0);n(19),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(7)),a=r(n(6)),s=r(n(2)),l=r(n(8)),d=n(3),f=n(15),v=n(5),u=function(e){function h(e,t){var n;return(0,o.default)(this,h),(n=(0,i.default)(this,(0,a.default)(h).call(this,e,t))).dataManager=n.plugin.dataManager,n.collapsingUI=n.plugin.collapsingUI,n.rowHeaderWidthCache=null,n.trimRowsPlugin=e.trimRowsPlugin,n}return(0,l.default)(h,e),(0,s.default)(h,null,[{key:"CSS_CLASSES",get:function(){return{indicatorContainer:"ht_nestingLevels",parent:"ht_nestingParent",indicator:"ht_nestingLevel",emptyIndicator:"ht_nestingLevel_empty",button:"ht_nestingButton",expandButton:"ht_nestingExpand",collapseButton:"ht_nestingCollapse"}}}]),(0,s.default)(h,[{key:"appendLevelIndicators",value:function(e,t){var n=this.trimRowsPlugin.rowsMapper.getValueByIndex(e),r=this.dataManager.getRowLevel(n),o=this.dataManager.getDataObject(n),i=t.getElementsByTagName("DIV")[0],a=i.querySelector("span.rowHeader"),s=i.querySelectorAll('[class^="ht_nesting"]');if((0,d.arrayEach)(s,function(e){e&&i.removeChild(e)}),(0,v.addClass)(t,h.CSS_CLASSES.indicatorContainer),r){var l=this.hot.rootDocument,u=a.cloneNode(!0);i.innerHTML="",(0,f.rangeEach)(0,r-1,function(){var e=l.createElement("SPAN");(0,v.addClass)(e,h.CSS_CLASSES.emptyIndicator),i.appendChild(e)}),i.appendChild(u)}if(this.dataManager.hasChildren(o)){var c=this.hot.rootDocument.createElement("DIV");(0,v.addClass)(t,h.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(n)?(0,v.addClass)(c,"".concat(h.CSS_CLASSES.button," ").concat(h.CSS_CLASSES.expandButton)):(0,v.addClass)(c,"".concat(h.CSS_CLASSES.button," ").concat(h.CSS_CLASSES.collapseButton)),i.appendChild(c)}}},{key:"updateRowHeaderWidth",value:function(e){var t=e;t=t||this.dataManager.cache.levelCount,this.rowHeaderWidthCache=Math.max(50,11+10*t+25),this.hot.render()}}]),h}(r(n(174)).default);t.default=u},function(e,t,n){"use strict";var r=n(9),o=n(0);n(379),t.__esModule=!0,t.default=void 0,n(381),n(382),n(383);var i=n(55),a=n(41),s=n(79),l=n(160),u=o(n(161)),c=o(n(466)),h=r(n(23)),d=o(n(43)),f=o(n(164)),v=r(n(163)),g=r(n(3)),p=r(n(72)),m=r(n(132)),y=r(n(341)),w=r(n(73)),C=r(n(75)),E=r(n(27)),S=r(n(15)),b=r(n(4)),R=r(n(162)),T=r(n(68)),O=r(n(52)),k=r(n(5)),M=r(n(33)),N=r(n(468)),_=n(20),A=o(n(348)),I=n(345),D=n(349),L=r(n(11)),H=n(135);function x(e,t){var n=new u.default(e,t||{},I.rootInstanceSymbol);return n.init(),n}(0,c.default)(x),x.Core=u.default,x.DefaultSettings=A.default,x.EventManager=h.default,x._getListenersCounter=h.getListenersCounter,x.packageName="handsontable",x.buildDate="10/06/2019 10:41:57",x.version="7.1.0",x.hooks=d.default.getSingleton(),x.__GhostTable=f.default;var P=[g,p,m,y,w,C,E,S,b,R,T,O,v],F=[k,M];x.helper={},x.dom={},g.arrayEach(P,function(t){g.arrayEach(Object.getOwnPropertyNames(t),function(e){"_"!==e.charAt(0)&&(x.helper[e]=t[e])})}),g.arrayEach(F,function(t){g.arrayEach(Object.getOwnPropertyNames(t),function(e){"_"!==e.charAt(0)&&(x.dom[e]=t[e])})}),x.cellTypes={},g.arrayEach((0,l.getRegisteredCellTypeNames)(),function(e){x.cellTypes[e]=(0,l.getCellType)(e)}),x.cellTypes.registerCellType=l.registerCellType,x.cellTypes.getCellType=l.getCellType,x.editors={},g.arrayEach((0,i.getRegisteredEditorNames)(),function(e){x.editors["".concat(T.toUpperCaseFirst(e),"Editor")]=(0,i.getEditor)(e)}),x.editors.registerEditor=i.registerEditor,x.editors.getEditor=i.getEditor,x.renderers={},g.arrayEach((0,a.getRegisteredRendererNames)(),function(e){var t=(0,a.getRenderer)(e);"base"===e&&(x.renderers.cellDecorator=t),x.renderers["".concat(T.toUpperCaseFirst(e),"Renderer")]=t}),x.renderers.registerRenderer=a.registerRenderer,x.renderers.getRenderer=a.getRenderer,x.validators={},g.arrayEach((0,s.getRegisteredValidatorNames)(),function(e){x.validators["".concat(T.toUpperCaseFirst(e),"Validator")]=(0,s.getValidator)(e)}),x.validators.registerValidator=s.registerValidator,x.validators.getValidator=s.getValidator,x.plugins={},g.arrayEach(Object.getOwnPropertyNames(N),function(e){var t=N[e];"Base"===e?x.plugins["".concat(e,"Plugin")]=t:x.plugins[e]=t}),x.plugins.registerPlugin=_.registerPlugin,(x.languages={}).dictionaryKeys=L,x.languages.getLanguageDictionary=H.getLanguageDictionary,x.languages.getLanguagesDictionaries=H.getLanguagesDictionaries,x.languages.registerLanguageDictionary=H.registerLanguageDictionary,x.languages.getTranslatedPhrase=function(){return D.getTranslatedPhrase.apply(void 0,arguments)};var B=x;t.default=B},function(e,t,n){var r=n(22),o=n(29),i=n(180).f;r({target:"Object",stat:!0,forced:o(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:i})},function(e,t,n){var r=n(34),o=n(99),i=n(119),a=n(45),s=r.Reflect;e.exports=s&&s.ownKeys||function(e){var t=o.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var r=n(47),a=n(49),s=n(45),l=n(89);e.exports=r?Object.defineProperties:function(e,t){s(e);for(var n,r=l(t),o=r.length,i=0;i<o;)a.f(e,n=r[i++],t[n]);return e}},function(e,t,n){"use strict";function o(){return this}var i=n(183).IteratorPrototype,a=n(101),s=n(95),l=n(121),u=n(102);e.exports=function(e,t,n){var r=t+" Iterator";return e.prototype=a(i,{next:s(1,n)}),l(e,r,!1,!0),u[r]=o,e}},function(e,t,n){var r=n(42),o=n(45);e.exports=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}},function(e,t,n){"use strict";var r=n(186),o={};o[n(35)("toStringTag")]="z",e.exports="[object z]"!==String(o)?function(){return"[object "+r(this)+"]"}:o.toString},function(e,t,n){var r=n(29);e.exports=!r(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(e,t,n){function r(e){return"function"==typeof e?e:void 0}var o=n(195),i=n(34);e.exports=function(e,t){return arguments.length<2?r(o[e])||r(i[e]):o[e]&&o[e][t]||i[e]&&i[e][t]}},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t,n){"use strict";var v=n(103),g=n(60),p=n(189),m=n(187),y=n(50),w=n(126),C=n(188);e.exports=function(e,t,n){var r,o,i,a,s=g(e),l="function"==typeof this?this:Array,u=arguments.length,c=1<u?t:void 0,h=void 0!==c,d=0,f=C(s);if(h&&(c=v(c,2<u?n:void 0,2)),null==f||l==Array&&m(f))for(o=new l(r=y(s.length));d<r;d++)w(o,d,h?c(s[d],d):s[d]);else for(a=f.call(s),o=new l;!(i=a.next()).done;d++)w(o,d,h?p(a,c,[i.value,d],!0):i.value);return o.length=d,o}},function(e,t,n){var o=n(45),i=n(149),a=n(35)("species");e.exports=function(e,t){var n,r=o(e).constructor;return void 0===r||null==(n=o(r)[a])?t:i(n)}},function(e,t,n){var r=n(29),o=n(198);e.exports=function(e){return r(function(){return!!o[e]()||"…"!="…"[e]()||o[e].name!==e})}},function(n,e){function r(e,t){return n.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(e,t)}n.exports=r},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(7)),a=r(n(6)),s=r(n(8)),l=n(5),u=r(n(74)),c=function(e){function n(e){var t;return(0,o.default)(this,n),(t=(0,i.default)(this,(0,a.default)(n).call(this,e))).clone=t.makeClone(u.default.CLONE_DEBUG),t.clone.wtTable.holder.style.opacity=.4,t.clone.wtTable.holder.style.textShadow="0 0 2px #ff0000",(0,l.addClass)(t.clone.wtTable.holder.parentNode,"wtDebugVisible"),t}return(0,s.default)(n,e),n}(u.default);u.default.registerOverlay(u.default.CLONE_DEBUG,c);var h=c;t.default=h},function(e,t,n){"use strict";var r=n(22),o=n(146);r({target:"String",proto:!0},{codePointAt:function(e){return o(this,e)}})},function(e,t,n){var c=n(50),h=n(206),d=n(59);e.exports=function(e,t,n,r){var o,i,a=String(d(e)),s=a.length,l=void 0===n?" ":String(n),u=c(t);return u<=s||""==l?a:(o=u-s,(i=h.call(l,Math.ceil(o/l.length))).length>o&&(i=i.slice(0,o)),r?i+a:a+i)}},function(e,t,n){var r=n(204);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r)},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r={"./af":207,"./af.js":207,"./ar":208,"./ar-dz":209,"./ar-dz.js":209,"./ar-kw":210,"./ar-kw.js":210,"./ar-ly":211,"./ar-ly.js":211,"./ar-ma":212,"./ar-ma.js":212,"./ar-sa":213,"./ar-sa.js":213,"./ar-tn":214,"./ar-tn.js":214,"./ar.js":208,"./az":215,"./az.js":215,"./be":216,"./be.js":216,"./bg":217,"./bg.js":217,"./bm":218,"./bm.js":218,"./bn":219,"./bn.js":219,"./bo":220,"./bo.js":220,"./br":221,"./br.js":221,"./bs":222,"./bs.js":222,"./ca":223,"./ca.js":223,"./cs":224,"./cs.js":224,"./cv":225,"./cv.js":225,"./cy":226,"./cy.js":226,"./da":227,"./da.js":227,"./de":228,"./de-at":229,"./de-at.js":229,"./de-ch":230,"./de-ch.js":230,"./de.js":228,"./dv":231,"./dv.js":231,"./el":232,"./el.js":232,"./en-au":233,"./en-au.js":233,"./en-ca":234,"./en-ca.js":234,"./en-gb":235,"./en-gb.js":235,"./en-ie":236,"./en-ie.js":236,"./en-nz":237,"./en-nz.js":237,"./eo":238,"./eo.js":238,"./es":239,"./es-do":240,"./es-do.js":240,"./es-us":241,"./es-us.js":241,"./es.js":239,"./et":242,"./et.js":242,"./eu":243,"./eu.js":243,"./fa":244,"./fa.js":244,"./fi":245,"./fi.js":245,"./fo":246,"./fo.js":246,"./fr":247,"./fr-ca":248,"./fr-ca.js":248,"./fr-ch":249,"./fr-ch.js":249,"./fr.js":247,"./fy":250,"./fy.js":250,"./gd":251,"./gd.js":251,"./gl":252,"./gl.js":252,"./gom-latn":253,"./gom-latn.js":253,"./gu":254,"./gu.js":254,"./he":255,"./he.js":255,"./hi":256,"./hi.js":256,"./hr":257,"./hr.js":257,"./hu":258,"./hu.js":258,"./hy-am":259,"./hy-am.js":259,"./id":260,"./id.js":260,"./is":261,"./is.js":261,"./it":262,"./it.js":262,"./ja":263,"./ja.js":263,"./jv":264,"./jv.js":264,"./ka":265,"./ka.js":265,"./kk":266,"./kk.js":266,"./km":267,"./km.js":267,"./kn":268,"./kn.js":268,"./ko":269,"./ko.js":269,"./ky":270,"./ky.js":270,"./lb":271,"./lb.js":271,"./lo":272,"./lo.js":272,"./lt":273,"./lt.js":273,"./lv":274,"./lv.js":274,"./me":275,"./me.js":275,"./mi":276,"./mi.js":276,"./mk":277,"./mk.js":277,"./ml":278,"./ml.js":278,"./mr":279,"./mr.js":279,"./ms":280,"./ms-my":281,"./ms-my.js":281,"./ms.js":280,"./mt":282,"./mt.js":282,"./my":283,"./my.js":283,"./nb":284,"./nb.js":284,"./ne":285,"./ne.js":285,"./nl":286,"./nl-be":287,"./nl-be.js":287,"./nl.js":286,"./nn":288,"./nn.js":288,"./pa-in":289,"./pa-in.js":289,"./pl":290,"./pl.js":290,"./pt":291,"./pt-br":292,"./pt-br.js":292,"./pt.js":291,"./ro":293,"./ro.js":293,"./ru":294,"./ru.js":294,"./sd":295,"./sd.js":295,"./se":296,"./se.js":296,"./si":297,"./si.js":297,"./sk":298,"./sk.js":298,"./sl":299,"./sl.js":299,"./sq":300,"./sq.js":300,"./sr":301,"./sr-cyrl":302,"./sr-cyrl.js":302,"./sr.js":301,"./ss":303,"./ss.js":303,"./sv":304,"./sv.js":304,"./sw":305,"./sw.js":305,"./ta":306,"./ta.js":306,"./te":307,"./te.js":307,"./tet":308,"./tet.js":308,"./th":309,"./th.js":309,"./tl-ph":310,"./tl-ph.js":310,"./tlh":311,"./tlh.js":311,"./tr":312,"./tr.js":312,"./tzl":313,"./tzl.js":313,"./tzm":314,"./tzm-latn":315,"./tzm-latn.js":315,"./tzm.js":314,"./uk":316,"./uk.js":316,"./ur":317,"./ur.js":317,"./uz":318,"./uz-latn":319,"./uz-latn.js":319,"./uz.js":318,"./vi":320,"./vi.js":320,"./x-pseudo":321,"./x-pseudo.js":321,"./yo":322,"./yo.js":322,"./zh-cn":323,"./zh-cn.js":323,"./zh-hk":324,"./zh-hk.js":324,"./zh-tw":325,"./zh-tw.js":325};function o(e){var t=i(e);return n(t)}function i(e){if(n.o(r,e))return r[e];var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}o.keys=function(){return Object.keys(r)},o.resolve=i,(e.exports=o).id=401},function(e,t){e.exports=function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(8)),u=n(5),c=r(n(74)),h=function(e){function n(e){var t;return(0,o.default)(this,n),(t=(0,a.default)(this,(0,s.default)(n).call(this,e))).clone=t.makeClone(c.default.CLONE_LEFT),t}return(0,l.default)(n,e),(0,i.default)(n,[{key:"shouldBeRendered",value:function(){return!(!this.wot.getSetting("fixedColumnsLeft")&&!this.wot.getSetting("rowHeaders").length)}},{key:"resetFixedPosition",value:function(){var e=this.wot.wtTable;if(this.needFullRender&&e.holder.parentNode){var t=this.clone.wtTable.holder.parentNode,n=0,r=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==this.wot.rootWindow||r&&"horizontal"===r)n=this.getScrollPosition(),(0,u.resetCssTransform)(t);else{var o,i,a=e.hider.getBoundingClientRect(),s=Math.ceil(a.left),l=Math.ceil(a.right);i=""===(i=e.hider.style.top)?0:i,n=o=s<0&&0<l-t.offsetWidth?-s:0,o+="px",(0,u.setOverlayPosition)(t,o,i)}this.adjustHeaderBordersPosition(n),this.adjustElementsSize()}}},{key:"setScrollPosition",value:function(e){var t=this.wot.rootWindow,n=!1;return this.mainTableScrollableElement===t&&t.scrollX!==e?(t.scrollTo(e,(0,u.getWindowScrollTop)(t)),n=!0):this.mainTableScrollableElement.scrollLeft!==e&&(this.mainTableScrollableElement.scrollLeft=e,n=!0),n}},{key:"onScroll",value:function(){this.wot.getSetting("onScrollVertically")}},{key:"sumCellSizes",value:function(e,t){for(var n=this.wot.wtSettings.defaultColumnWidth,r=e,o=0;r<t;)o+=this.wot.wtTable.getStretchedColumnWidth(r)||n,r+=1;return o}},{key:"adjustElementsSize",value:function(e){var t=0<arguments.length&&void 0!==e&&e;this.updateTrimmingContainer(),(this.needFullRender||t)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize(),t||(this.areElementSizesAdjusted=!0))}},{key:"adjustRootElementSize",value:function(){var e=this.wot,t=e.wtTable,n=e.rootDocument,r=e.rootWindow,o=(0,u.getScrollbarWidth)(n),i=this.clone.wtTable.holder.parentNode.style,a=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==r||"vertical"===a){var s=this.wot.wtViewport.getWorkspaceHeight();this.wot.wtOverlays.hasScrollbarBottom&&(s-=o),s=Math.min(s,t.wtRootElement.scrollHeight),i.height="".concat(s,"px")}else i.height="";this.clone.wtTable.holder.style.height=i.height;var l=(0,u.outerWidth)(this.clone.wtTable.TABLE);i.width="".concat(0===l?l:l+4,"px")}},{key:"adjustRootChildrenSize",value:function(){var e=(0,u.getScrollbarWidth)(this.wot.rootDocument);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="".concat(parseInt(this.clone.wtTable.holder.parentNode.style.width,10)+e,"px")}},{key:"applyToDOM",value:function(){var e=this.wot.getSetting("totalColumns");if(this.areElementSizesAdjusted||this.adjustElementsSize(),"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition)this.spreader.style.left="".concat(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()}},{key:"syncOverlayOffset",value:function(){"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.top="".concat(this.wot.wtViewport.rowsRenderCalculator.startPosition,"px"):this.clone.wtTable.spreader.style.top=""}},{key:"scrollTo",value:function(e,t){var n=this.getTableParentOffset(),r=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,o=0;return t&&r.offsetWidth!==r.clientWidth&&(o=(0,u.getScrollbarWidth)(this.wot.rootDocument)),t?(n+=this.sumCellSizes(0,e+1),n-=this.wot.wtViewport.getViewportWidth()):n+=this.sumCellSizes(this.wot.getSetting("fixedColumnsLeft"),e),n+=o,this.setScrollPosition(n)}},{key:"getTableParentOffset",value:function(){var e=0;return this.wot.getSetting("preventOverflow")||this.trimmingContainer!==this.wot.rootWindow||(e=this.wot.wtTable.holderOffset.left),e}},{key:"getScrollPosition",value:function(){return(0,u.getScrollLeft)(this.mainTableScrollableElement,this.wot.rootWindow)}},{key:"adjustHeaderBordersPosition",value:function(e){var t=this.wot.wtTable.holder.parentNode,n=this.wot.getSetting("rowHeaders"),r=this.wot.getSetting("fixedColumnsLeft");if(this.wot.getSetting("totalRows")?(0,u.removeClass)(t,"emptyRows"):(0,u.addClass)(t,"emptyRows"),r&&!n.length)(0,u.addClass)(t,"innerBorderLeft");else if(!r&&n.length){var o=(0,u.hasClass)(t,"innerBorderLeft");e?(0,u.addClass)(t,"innerBorderLeft"):(0,u.removeClass)(t,"innerBorderLeft"),(!o&&e||o&&!e)&&this.wot.wtOverlays.adjustElementsSize()}}}]),n}(c.default);c.default.registerOverlay(c.default.CLONE_LEFT,h);var d=h;t.default=d},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(8)),u=n(5),c=n(3),h=r(n(74)),d=function(e){function n(e){var t;return(0,o.default)(this,n),(t=(0,a.default)(this,(0,s.default)(n).call(this,e))).clone=t.makeClone(h.default.CLONE_TOP),t}return(0,l.default)(n,e),(0,i.default)(n,[{key:"shouldBeRendered",value:function(){return!(!this.wot.getSetting("fixedRowsTop")&&!this.wot.getSetting("columnHeaders").length)}},{key:"resetFixedPosition",value:function(){if(this.needFullRender&&this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=0,n=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==this.wot.rootWindow||n&&"vertical"===n)t=this.getScrollPosition(),(0,u.resetCssTransform)(e);else{var r,o,i=this.wot.wtTable.hider.getBoundingClientRect(),a=Math.ceil(i.top),s=Math.ceil(i.bottom);r=""===(r=this.wot.wtTable.hider.style.left)?0:r,t=o=a<0&&0<s-e.offsetHeight?-a:0,o+="px",(0,u.setOverlayPosition)(e,r,o)}this.adjustHeaderBordersPosition(t),this.adjustElementsSize()}}},{key:"setScrollPosition",value:function(e){var t=this.wot.rootWindow,n=!1;return this.mainTableScrollableElement===t&&t.scrollY!==e?(t.scrollTo((0,u.getWindowScrollLeft)(t),e),n=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,n=!0),n}},{key:"onScroll",value:function(){this.wot.getSetting("onScrollHorizontally")}},{key:"sumCellSizes",value:function(e,t){for(var n=this.wot.wtSettings.settings.defaultRowHeight,r=e,o=0;r<t;){var i=this.wot.wtTable.getRowHeight(r);o+=void 0===i?n:i,r+=1}return o}},{key:"adjustElementsSize",value:function(e){var t=0<arguments.length&&void 0!==e&&e;this.updateTrimmingContainer(),(this.needFullRender||t)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize(),t||(this.areElementSizesAdjusted=!0))}},{key:"adjustRootElementSize",value:function(){var e=this.wot,t=e.wtTable,n=e.rootDocument,r=e.rootWindow,o=(0,u.getScrollbarWidth)(n),i=this.clone.wtTable.holder.parentNode.style,a=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==r||"horizontal"===a){var s=this.wot.wtViewport.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(s-=o),s=Math.min(s,t.wtRootElement.scrollWidth),i.width="".concat(s,"px")}else i.width="";this.clone.wtTable.holder.style.width=i.width;var l=(0,u.outerHeight)(this.clone.wtTable.TABLE);i.height="".concat(0===l?l:l+4,"px")}},{key:"adjustRootChildrenSize",value:function(){var e=(0,u.getScrollbarWidth)(this.wot.rootDocument);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="".concat(parseInt(this.clone.wtTable.holder.parentNode.style.height,10)+e,"px")}},{key:"applyToDOM",value:function(){var e=this.wot.getSetting("totalRows");if(this.areElementSizesAdjusted||this.adjustElementsSize(),"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top="".concat(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()}},{key:"syncOverlayOffset",value:function(){"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.left="".concat(this.wot.wtViewport.columnsRenderCalculator.startPosition,"px"):this.clone.wtTable.spreader.style.left=""}},{key:"scrollTo",value:function(e,t){var n=this.wot,r=(n.cloneSource?n.cloneSource:n).wtTable.holder,o=this.getTableParentOffset(),i=0;if(t&&r.offsetHeight!==r.clientHeight&&(i=(0,u.getScrollbarWidth)(n.rootDocument)),t){var a=n.getSetting("fixedRowsBottom"),s=n.getSetting("totalRows");o+=this.sumCellSizes(0,e+1),o-=n.wtViewport.getViewportHeight()-this.sumCellSizes(s-a,s),o+=1}else o+=this.sumCellSizes(n.getSetting("fixedRowsTop"),e);return o+=i,this.setScrollPosition(o)}},{key:"getTableParentOffset",value:function(){return this.mainTableScrollableElement===this.wot.rootWindow?this.wot.wtTable.holderOffset.top:0}},{key:"getScrollPosition",value:function(){return(0,u.getScrollTop)(this.mainTableScrollableElement,this.wot.rootWindow)}},{key:"redrawSelectionBorders",value:function(e){if(e&&e.cellRange){var t=e.getBorder(this.wot),n=e.getCorners();t.disappear(),t.appear(n)}}},{key:"redrawAllSelectionsBorders",value:function(){var t=this,e=this.wot.selections;this.redrawSelectionBorders(e.getCell()),(0,c.arrayEach)(e.getAreas(),function(e){t.redrawSelectionBorders(e)}),this.redrawSelectionBorders(e.getFill()),this.wot.wtTable.wot.wtOverlays.leftOverlay.refresh()}},{key:"adjustHeaderBordersPosition",value:function(e){var t=this.wot.wtTable.holder.parentNode;if(this.wot.getSetting("totalColumns")?(0,u.removeClass)(t,"emptyColumns"):(0,u.addClass)(t,"emptyColumns"),0===this.wot.getSetting("fixedRowsTop")&&0<this.wot.getSetting("columnHeaders").length){var n=(0,u.hasClass)(t,"innerBorderTop");e||0===this.wot.getSetting("totalRows")?(0,u.addClass)(t,"innerBorderTop"):(0,u.removeClass)(t,"innerBorderTop"),(!n&&e||n&&!e)&&(this.wot.wtOverlays.adjustElementsSize(),this.redrawAllSelectionsBorders())}if(0===this.wot.getSetting("rowHeaders").length){var r=this.clone.wtTable.THEAD.querySelectorAll("th:nth-of-type(2)");if(r)for(var o=0;o<r.length;o++)r[o].style["border-left-width"]=0}}}]),n}(h.default);h.default.registerOverlay(h.default.CLONE_TOP,d);var f=d;t.default=f},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(8)),h=n(5),u=r(n(74)),c=function(e){function n(e){var t;return(0,o.default)(this,n),(t=(0,a.default)(this,(0,s.default)(n).call(this,e))).clone=t.makeClone(u.default.CLONE_TOP_LEFT_CORNER),t}return(0,l.default)(n,e),(0,i.default)(n,[{key:"shouldBeRendered",value:function(){var e=this.wot;return!(!e.getSetting("fixedRowsTop")&&!e.getSetting("columnHeaders").length||!e.getSetting("fixedColumnsLeft")&&!e.getSetting("rowHeaders").length)}},{key:"resetFixedPosition",value:function(){if(this.updateTrimmingContainer(),this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=(0,h.outerHeight)(this.clone.wtTable.TABLE),n=(0,h.outerWidth)(this.clone.wtTable.TABLE),r=this.wot.getSetting("preventOverflow");if(this.trimmingContainer===this.wot.rootWindow){var o=this.wot.wtTable.hider.getBoundingClientRect(),i=Math.ceil(o.top),a=Math.ceil(o.left),s=Math.ceil(o.bottom),l=Math.ceil(o.right),u="0",c="0";r&&"vertical"!==r||a<0&&0<l-e.offsetWidth&&(u="".concat(-a,"px")),r&&"horizontal"!==r||i<0&&0<s-e.offsetHeight&&(c="".concat(-i,"px")),(0,h.setOverlayPosition)(e,u,c)}else(0,h.resetCssTransform)(e);e.style.height="".concat(0===t?t:t+4,"px"),e.style.width="".concat(0===n?n:n+4,"px")}}}]),n}(u.default);u.default.registerOverlay(u.default.CLONE_TOP_LEFT_CORNER,c);var d=c;t.default=d},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(8)),c=n(5),u=r(n(74)),h=function(e){function n(e){var t;return(0,o.default)(this,n),(t=(0,a.default)(this,(0,s.default)(n).call(this,e))).clone=t.makeClone(u.default.CLONE_BOTTOM),t}return(0,l.default)(n,e),(0,i.default)(n,[{key:"repositionOverlay",value:function(){var e=this.wot,t=e.wtTable,n=e.rootDocument,r=this.clone.wtTable.holder.parentNode,o=(0,c.getScrollbarWidth)(n);t.holder.clientHeight===t.holder.offsetHeight&&(o=0),r.style.top="",r.style.bottom="".concat(o,"px")}},{key:"shouldBeRendered",value:function(){return!!this.wot.getSetting("fixedRowsBottom")}},{key:"resetFixedPosition",value:function(){if(this.needFullRender&&this.wot.wtTable.holder.parentNode){var e=this.clone.wtTable.holder.parentNode,t=0;if(e.style.top="",this.wot.wtOverlays.leftOverlay.trimmingContainer===this.wot.rootWindow){var n,r,o=this.wot,i=o.rootDocument,a=o.wtTable,s=a.hider.getBoundingClientRect(),l=Math.ceil(s.bottom),u=i.body.offsetHeight;n=""===(n=a.hider.style.left)?0:n,t=r=u<l?l-u:0,r+="px",e.style.top="",e.style.left=n,e.style.bottom=r}else t=this.getScrollPosition(),(0,c.resetCssTransform)(e),this.repositionOverlay();this.adjustHeaderBordersPosition(t)}}},{key:"setScrollPosition",value:function(e){var t=this.wot.rootWindow;this.mainTableScrollableElement===t?t.scrollTo((0,c.getWindowScrollLeft)(t),e):this.mainTableScrollableElement.scrollTop=e}},{key:"onScroll",value:function(){this.wot.getSetting("onScrollVertically")}},{key:"sumCellSizes",value:function(e,t){for(var n=this.wot,r=n.wtTable,o=n.wtSettings.settings.defaultRowHeight,i=e,a=0;i<t;){var s=r.getRowHeight(i);a+=void 0===s?o:s,i+=1}return a}},{key:"adjustElementsSize",value:function(e){var t=0<arguments.length&&void 0!==e&&e;this.updateTrimmingContainer(),(this.needFullRender||t)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize(),t||(this.areElementSizesAdjusted=!0))}},{key:"adjustRootElementSize",value:function(){var e=this.wot,t=e.wtTable,n=e.wtViewport,r=e.rootWindow,o=(0,c.getScrollbarWidth)(this.wot.rootDocument),i=this.clone.wtTable.holder.parentNode.style,a=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==r||"horizontal"===a){var s=n.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(s-=o),s=Math.min(s,t.wtRootElement.scrollWidth),i.width="".concat(s,"px")}else i.width="";this.clone.wtTable.holder.style.width=i.width;var l=(0,c.outerHeight)(this.clone.wtTable.TABLE);i.height="".concat(l,"px")}},{key:"adjustRootChildrenSize",value:function(){var e=(0,c.getScrollbarWidth)(this.wot.rootDocument);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="".concat(parseInt(this.clone.wtTable.holder.parentNode.style.height,10)+e,"px")}},{key:"applyToDOM",value:function(){var e=this.wot.getSetting("totalRows");if(this.areElementSizesAdjusted||this.adjustElementsSize(),"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top="".concat(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()}},{key:"syncOverlayOffset",value:function(){"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.left="".concat(this.wot.wtViewport.columnsRenderCalculator.startPosition,"px"):this.clone.wtTable.spreader.style.left=""}},{key:"scrollTo",value:function(e,t){var n=this.getTableParentOffset(),r=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,o=0;t&&r.offsetHeight!==r.clientHeight&&(o=(0,c.getScrollbarWidth)(this.wot.rootDocument)),t?(n+=this.sumCellSizes(0,e+1),n-=this.wot.wtViewport.getViewportHeight(),n+=1):n+=this.sumCellSizes(this.wot.getSetting("fixedRowsBottom"),e),n+=o,this.setScrollPosition(n)}},{key:"getTableParentOffset",value:function(){return this.mainTableScrollableElement===this.wot.rootWindow?this.wot.wtTable.holderOffset.top:0}},{key:"getScrollPosition",value:function(){return(0,c.getScrollTop)(this.mainTableScrollableElement,this.wot.rootWindow)}},{key:"adjustHeaderBordersPosition",value:function(e){if(0===this.wot.getSetting("fixedRowsBottom")&&0<this.wot.getSetting("columnHeaders").length){var t=this.wot.wtTable.holder.parentNode,n=(0,c.hasClass)(t,"innerBorderTop");e?(0,c.addClass)(t,"innerBorderTop"):(0,c.removeClass)(t,"innerBorderTop"),(!n&&e||n&&!e)&&this.wot.wtOverlays.adjustElementsSize()}if(0===this.wot.getSetting("rowHeaders").length){var r=this.clone.wtTable.THEAD.querySelector("th:nth-of-type(2)");r&&(r.style["border-left-width"]=0)}}}]),n}(u.default);u.default.registerOverlay(u.default.CLONE_BOTTOM,h);var d=h;t.default=d},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(8)),c=n(5),u=r(n(74)),h=function(e){function n(e){var t;return(0,o.default)(this,n),(t=(0,a.default)(this,(0,s.default)(n).call(this,e))).clone=t.makeClone(u.default.CLONE_BOTTOM_LEFT_CORNER),t}return(0,l.default)(n,e),(0,i.default)(n,[{key:"shouldBeRendered",value:function(){var e=this.wot;return!(!e.getSetting("fixedRowsBottom")||!e.getSetting("fixedColumnsLeft")&&!e.getSetting("rowHeaders").length)}},{key:"repositionOverlay",value:function(){var e=this.wot,t=e.wtTable,n=e.rootDocument,r=this.clone.wtTable.holder.parentNode,o=(0,c.getScrollbarWidth)(n);t.holder.clientHeight===t.holder.offsetHeight&&(o=0),r.style.top="",r.style.bottom="".concat(o,"px")}},{key:"resetFixedPosition",value:function(){var e=this.wot;if(this.updateTrimmingContainer(),e.wtTable.holder.parentNode){var t=this.clone.wtTable.holder.parentNode,n=(0,c.outerHeight)(this.clone.wtTable.TABLE),r=(0,c.outerWidth)(this.clone.wtTable.TABLE);if(t.style.top="",this.trimmingContainer===e.rootWindow){var o,i,a=e.wtTable.hider.getBoundingClientRect(),s=Math.ceil(a.bottom),l=Math.ceil(a.left),u=e.rootDocument.body.offsetHeight;o=l<0?-l:0,i=u<s?s-u:0,i+="px",o+="px",t.style.top="",t.style.left=o,t.style.bottom=i}else(0,c.resetCssTransform)(t),this.repositionOverlay();t.style.height="".concat(n,"px"),t.style.width="".concat(r,"px")}}}]),n}(u.default);u.default.registerOverlay(u.default.CLONE_BOTTOM_LEFT_CORNER,h);var d=h;t.default=d},function(e,t,n){"use strict";var r=n(0);n(19),n(31),n(38),t.__esModule=!0,t.default=void 0;var C=r(n(18)),l=r(n(44)),o=r(n(1)),i=r(n(2)),E=n(5),a=r(n(336)),u=r(n(106)),s=r(n(201)),c=function(){function n(e,t){(0,o.default)(this,n),this.settings=e,this.cellRange=t||null,this.instanceBorders={},this.classNames=[this.settings.className],this.classNameGenerator=this.linearClassNameGenerator(this.settings.className,this.settings.layerLevel)}return(0,i.default)(n,[{key:"getBorder",value:function(e){return this.instanceBorders[e.guid]||(this.instanceBorders[e.guid]=new a.default(e,this.settings)),this.instanceBorders[e.guid]}},{key:"isEmpty",value:function(){return null===this.cellRange}},{key:"add",value:function(e){return this.isEmpty()?this.cellRange=new s.default(e):this.cellRange.expand(e),this}},{key:"replace",value: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}},{key:"clear",value:function(){return this.cellRange=null,this}},{key:"getCorners",value:function(){var e=this.cellRange.getTopLeftCorner(),t=this.cellRange.getBottomRightCorner();return[e.row,e.col,t.row,t.col]}},{key:"addClassAtCoords",value:function(e,t,n,r,o){var i=4<arguments.length&&void 0!==o&&o,a=e.wtTable.getCell(new u.default(t,n));if("object"===(0,l.default)(a)){var s=r;i&&(s=this.classNameGenerator(a),this.classNames.includes(s)||this.classNames.push(s)),(0,E.addClass)(a,s)}return this}},{key:"linearClassNameGenerator",value:function(l,u){return function e(t,n){var r=1<arguments.length&&void 0!==n?n:-1;if(0===u||0===r)return l;var o=0<=r?r:u,i=l,a=0==--o?l:"".concat(l,"-").concat(o);if((0,E.hasClass)(t,a)){var s=1+o;i="".concat(l,"-").concat(s)}else i=e(t,o);return i}}},{key:"draw",value:function(e){if(this.isEmpty())this.settings.border&&this.getBorder(e).disappear();else{for(var t=e.wtTable.getRenderedRowsCount(),n=e.wtTable.getRenderedColumnsCount(),r=this.getCorners(),o=(0,C.default)(r,4),i=o[0],a=o[1],s=o[2],l=o[3],u=0;u<n;u+=1){var c=e.wtTable.columnFilter.renderedToSource(u);if(a<=c&&c<=l){var h=e.wtTable.getColumnHeader(c);if(h){var d=[];this.settings.highlightHeaderClassName&&d.push(this.settings.highlightHeaderClassName),this.settings.highlightColumnClassName&&d.push(this.settings.highlightColumnClassName),(0,E.addClass)(h,d)}}}for(var f=0;f<t;f+=1){var v=e.wtTable.rowFilter.renderedToSource(f);if(i<=v&&v<=s){var g=e.wtTable.getRowHeader(v);if(g){var p=[];this.settings.highlightHeaderClassName&&p.push(this.settings.highlightHeaderClassName),this.settings.highlightRowClassName&&p.push(this.settings.highlightRowClassName),(0,E.addClass)(g,p)}}for(var m=0;m<n;m+=1){var y=e.wtTable.columnFilter.renderedToSource(m);i<=v&&v<=s&&a<=y&&y<=l?this.settings.className&&this.addClassAtCoords(e,v,y,this.settings.className,this.settings.markIntersections):i<=v&&v<=s?this.settings.highlightRowClassName&&this.addClassAtCoords(e,v,y,this.settings.highlightRowClassName):a<=y&&y<=l&&this.settings.highlightColumnClassName&&this.addClassAtCoords(e,v,y,this.settings.highlightColumnClassName);var w=e.getSetting("onAfterDrawSelection",v,y,r,this.settings.layerLevel);"string"==typeof w&&this.addClassAtCoords(e,v,y,w)}}e.getSetting("onBeforeDrawBorders",r,this.settings.className),this.settings.border&&this.getBorder(e).appear(r)}}}]),n}();t.default=c},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(4),i={_hooksStorage:Object.create(null),addHook:function(e,t){return this._hooksStorage[e]||(this._hooksStorage[e]=[]),this.hot.addHook(e,t),this._hooksStorage[e].push(t),this},removeHooksByKey:function(t){var n=this;(0,r.arrayEach)(this._hooksStorage[t]||[],function(e){n.hot.removeHook(t,e)})},clearHooks:function(){var n=this;(0,o.objectEach)(this._hooksStorage,function(e,t){return n.removeHooksByKey(t)}),this._hooksStorage={}}};(0,o.defineGetter)(i,"MIXIN_NAME","hooksRefRegisterer",{writable:!1,enumerable:!1});var a=i;t.default=a},function(e,t,n){var r=n(6);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e}},function(e,t,n){"use strict";n(32),e.exports=function(){function r(e,t,n){e.addEventListener(t,n,!1)}function e(e,t,n){e.removeEventListener(t,n,!1)}function o(e){var t,n;e?/^[a-zA-Z \.,\\\/\|0-9]$/.test(e)||(e="."):e="",void 0!==c.textContent?c.textContent=s.value+e:c.data=s.value+e,h.style.fontSize=d(s).fontSize,h.style.fontFamily=d(s).fontFamily,h.style.whiteSpace="pre",u.appendChild(h),t=h.clientWidth+2,u.removeChild(h),s.style.height=l.minHeight+"px",l.minWidth>t?s.style.width=l.minWidth+"px":t>l.maxWidth?s.style.width=l.maxWidth+"px":s.style.width=t+"px",n=s.scrollHeight?s.scrollHeight-1:0,l.minHeight>n?s.style.height=l.minHeight+"px":l.maxHeight<n?(s.style.height=l.maxHeight+"px",s.style.overflowY="visible"):s.style.height=n+"px"}function i(){window.setTimeout(o,0)}function a(e,t,n){s=e,function(e){if(e&&e.minHeight)if("inherit"==e.minHeight)l.minHeight=s.clientHeight;else{var t=parseInt(e.minHeight);isNaN(t)||(l.minHeight=t)}if(e&&e.maxHeight)if("inherit"==e.maxHeight)l.maxHeight=s.clientHeight;else{var n=parseInt(e.maxHeight);isNaN(n)||(l.maxHeight=n)}if(e&&e.minWidth)if("inherit"==e.minWidth)l.minWidth=s.clientWidth;else{var r=parseInt(e.minWidth);isNaN(r)||(l.minWidth=r)}if(e&&e.maxWidth)if("inherit"==e.maxWidth)l.maxWidth=s.clientWidth;else{var o=parseInt(e.maxWidth);isNaN(o)||(l.maxWidth=o)}h.firstChild||(h.className="autoResize",h.style.display="inline-block",h.appendChild(c))}(t),"TEXTAREA"==s.nodeName&&(s.style.resize="none",s.style.overflowY="",s.style.height=l.minHeight+"px",s.style.minWidth=l.minWidth+"px",s.style.maxWidth=l.maxWidth+"px",s.style.overflowY="hidden"),n&&(r(s,"change",o),r(s,"cut",i),r(s,"paste",i),r(s,"drop",i),r(s,"keydown",i),r(s,"focus",o),r(s,"compositionstart",i),r(s,"compositionupdate",i),r(s,"compositionend",i)),o()}var s,l={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},u=document.body,c=document.createTextNode(""),h=document.createElement("SPAN");function d(e){return e.currentStyle||document.defaultView.getComputedStyle(e)}return{init:function(e,t,n){a(e,t,n)},unObserve:function(){e(s,"change",o),e(s,"cut",i),e(s,"paste",i),e(s,"drop",i),e(s,"keydown",i),e(s,"focus",o),e(s,"compositionstart",i),e(s,"compositionupdate",i),e(s,"compositionend",i)},resize:o}}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(8)),u=r(n(105)),c=n(5),h=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(0,s.default)(t).apply(this,arguments))}return(0,l.default)(t,e),(0,i.default)(t,[{key:"beginEditing",value:function(e,t){if(t&&"mouseup"===t.type){var n=this.TD.querySelector('input[type="checkbox"]');(0,c.hasClass)(n,"htBadValue")||n.click()}}},{key:"finishEditing",value:function(){}},{key:"init",value:function(){}},{key:"open",value:function(){}},{key:"close",value:function(){}},{key:"getValue",value:function(){}},{key:"setValue",value:function(){}},{key:"focus",value:function(){}}]),t}(u.default);t.default=h},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),s=r(n(7)),l=r(n(6)),u=r(n(13)),c=r(n(8)),h=r(n(61)),d=r(n(414));n(415);var f=n(5),v=n(4),g=r(n(23)),p=n(52),m=n(33),a=function(e){function a(e){var t;return(0,o.default)(this,a),(t=(0,s.default)(this,(0,l.default)(a).call(this,e))).defaultDateFormat="DD/MM/YYYY",t.isCellEdited=!1,t.parentDestroyed=!1,t}return(0,c.default)(a,e),(0,i.default)(a,[{key:"init",value:function(){var e=this;if("function"!=typeof h.default)throw new Error("You need to include moment.js to your project.");if("function"!=typeof d.default)throw new Error("You need to include Pikaday to your project.");(0,u.default)((0,l.default)(a.prototype),"init",this).call(this),this.instance.addHook("afterDestroy",function(){e.parentDestroyed=!0,e.destroyElements()})}},{key:"createElements",value:function(){(0,u.default)((0,l.default)(a.prototype),"createElements",this).call(this),this.datePicker=this.hot.rootDocument.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,(0,f.addClass)(this.datePicker,"htDatepickerHolder"),this.hot.rootDocument.body.appendChild(this.datePicker),this.$datePicker=new d.default(this.getDatePickerConfig()),new g.default(this).addEventListener(this.datePicker,"mousedown",function(e){return(0,m.stopPropagation)(e)}),this.hideDatepicker()}},{key:"destroyElements",value:function(){this.$datePicker.destroy()}},{key:"prepare",value:function(e,t,n,r,o,i){(0,u.default)((0,l.default)(a.prototype),"prepare",this).call(this,e,t,n,r,o,i)}},{key:"open",value:function(e){var t=0<arguments.length&&void 0!==e?e:null;(0,u.default)((0,l.default)(a.prototype),"open",this).call(this),this.showDatepicker(t)}},{key:"close",value:function(){var e=this;this._opened=!1,this.instance._registerTimeout(function(){e.instance._refreshBorders()}),(0,u.default)((0,l.default)(a.prototype),"close",this).call(this)}},{key:"finishEditing",value:function(e,t){var n=0<arguments.length&&void 0!==e&&e,r=1<arguments.length&&void 0!==t&&t;if(n){var o=this.originalValue;void 0!==o&&this.setValue(o)}this.hideDatepicker(),(0,u.default)((0,l.default)(a.prototype),"finishEditing",this).call(this,n,r)}},{key:"showDatepicker",value:function(e){this.$datePicker.config(this.getDatePickerConfig());var t,n=this.TD.getBoundingClientRect(),r=this.cellProperties.dateFormat||this.defaultDateFormat,o=this.$datePicker.config(),i=this.instance.view.isMouseDown(),a=!!e&&(0,p.isMetaKey)(e.keyCode);this.datePickerStyle.top="".concat(this.hot.rootWindow.pageYOffset+n.top+(0,f.outerHeight)(this.TD),"px"),this.datePickerStyle.left="".concat(this.hot.rootWindow.pageXOffset+n.left,"px"),this.$datePicker._onInputFocus=function(){},o.format=r,this.originalValue?(t=this.originalValue,(0,h.default)(t,r,!0).isValid()&&this.$datePicker.setMoment((0,h.default)(t,r),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),a||i||this.setValue("")):this.cellProperties.defaultDate?(t=this.cellProperties.defaultDate,o.defaultDate=t,(0,h.default)(t,r,!0).isValid()&&this.$datePicker.setMoment((0,h.default)(t,r),!0),a||i||this.setValue("")):this.$datePicker.gotoToday(),this.datePickerStyle.display="block",this.$datePicker.show()}},{key:"hideDatepicker",value:function(){this.datePickerStyle.display="none",this.$datePicker.hide()}},{key:"getDatePickerConfig",value:function(){var n=this,e=this.TEXTAREA,t={};this.cellProperties&&this.cellProperties.datePickerConfig&&(0,v.deepExtend)(t,this.cellProperties.datePickerConfig);var r=t.onSelect,o=t.onClose;return t.field=e,t.trigger=e,t.container=this.datePicker,t.bound=!1,t.format=t.format||this.defaultDateFormat,t.reposition=t.reposition||!1,t.onSelect=function(e){var t=e;isNaN(t.getTime())||(t=(0,h.default)(t).format(n.cellProperties.dateFormat||n.defaultDateFormat)),n.setValue(t),n.hideDatepicker(),r&&r()},t.onClose=function(){n.parentDestroyed||n.finishEditing(!1),o&&o()},t}}]),a}(r(n(107)).default);t.default=a},function(t,e,n){
/*!
* Pikaday
*
* Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday
*/
!function(){"use strict";var e;try{e=n(61)}catch(e){}t.exports=function(i){"use strict";var a=typeof i==="function",s=!!window.addEventListener,c=window.document,u=window.setTimeout,l=function(e,t,n,r){if(s){e.addEventListener(t,n,!!r)}else{e.attachEvent("on"+t,n)}},t=function(e,t,n,r){if(s){e.removeEventListener(t,n,!!r)}else{e.detachEvent("on"+t,n)}},o=function(e,t,n){var r;if(c.createEvent){r=c.createEvent("HTMLEvents");r.initEvent(t,true,false);r=v(r,n);e.dispatchEvent(r)}else if(c.createEventObject){r=c.createEventObject();r=v(r,n);e.fireEvent("on"+t,r)}},n=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},h=function(e,t){return(" "+e.className+" ").indexOf(" "+t+" ")!==-1},e=function(e,t){if(!h(e,t)){e.className=e.className===""?t:e.className+" "+t}},r=function(e,t){e.className=n((" "+e.className+" ").replace(" "+t+" "," "))},m=function(e){return/Array/.test(Object.prototype.toString.call(e))},H=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},d=function(e){var v=R.getDay();return t===0||t===6},f=function(e){return e%4===0&&e%100!==0||e%400===0},x=function(e,t){return[31,f(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},P=function(e){if(H(e))e.setHours(0,0,0,0)},F=function(e,t){return e.getTime()===t.getTime()},v=function(e,t,n){var r,o;for(r in t){o=e[r]!==undefined;if(o&&typeof t[r]==="object"&&t[r]!==null&&t[r].nodeName===undefined){if(H(t[r])){if(n){e[r]=new Date(t[r].getTime())}}else if(m(t[r])){if(n){e[r]=t[r].slice(0)}}else{e[r]=v({},t[r],n)}}else if(n||!o){e[r]=t[r]}}return e},g=function(e){if(e.month<0){e.year-=Math.ceil(Math.abs(e.month)/12);e.month+=12}if(e.month>11){e.year+=Math.floor(Math.abs(e.month)/12);e.month-=12}return e},p={field:null,bound:undefined,position:"bottom left",reposition:true,format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:false,firstDay:0,formatStrict:false,minDate:null,maxDate:null,yearRange:10,showWeekNumber:false,minYear:0,maxYear:9999,minMonth:undefined,maxMonth:undefined,startRange:null,endRange:null,isRTL:false,yearSuffix:"",showMonthAfterYear:false,showDaysInNextAndPreviousMonths:false,numberOfMonths:1,mainCalendar:"left",container:undefined,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,onSelect:null,onOpen:null,onClose:null,onDraw:null},y=function(e,t,n){t+=e.firstDay;while(t>=7){t-=7}return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},B=function(e){var t=[];var n="false";if(e.isEmpty){if(e.showDaysInNextAndPreviousMonths){t.push("is-outside-current-month")}else{return'<td class="is-empty"></td>'}}if(e.isDisabled){t.push("is-disabled")}if(e.isToday){t.push("is-today")}if(e.isSelected){t.push("is-selected");n="true"}if(e.isInRange){t.push("is-inrange")}if(e.isStartRange){t.push("is-startrange")}if(e.isEndRange){t.push("is-endrange")}return'<td data-day="'+e.day+'" class="'+t.join(" ")+'" aria-selected="'+n+'">'+'<button class="pika-button pika-day" type="button" '+'data-pika-year="'+e.year+'" data-pika-month="'+e.month+'" data-pika-day="'+e.day+'">'+e.day+"</button>"+"</td>"},w=function(e,t,n){var f=new Date(d,0,1),o=Math.ceil(((new Date(d,h,c)-f)/864e5+f.getDay()+1)/7);return'<td class="pika-week">'+o+"</td>"},C=function(e,t){return"<tr>"+(t?e.reverse():e).join("")+"</tr>"},W=function(e){return"<tbody>"+e.join("")+"</tbody>"},V=function(e){var t,n=[];if(e.showWeekNumber){n.push("<th></th>")}for(t=0;t<7;t++){n.push('<th scope="col"><abbr title="'+y(e,t)+'">'+y(e,t,true)+"</abbr></th>")}return"<thead><tr>"+(e.isRTL?n.reverse():n).join("")+"</tr></thead>"},E=function(e,t,n,r,o,i){var a,s,l,u=e._o,c=n===u.minYear,h=n===u.maxYear,d='<div id="'+i+'" class="pika-title" role="heading" aria-live="assertive">',f,v,g=true,p=true;for(l=[],a=0;a<12;a++){l.push('<option value="'+(n===o?a-t:12+a-t)+'"'+(a===r?' selected="selected"':"")+(c&&a<u.minMonth||h&&a>u.maxMonth?'disabled="disabled"':"")+">"+u.i18n.months[a]+"</option>")}f='<div class="pika-label">'+u.i18n.months[r]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>";if(m(u.yearRange)){a=u.yearRange[0];s=u.yearRange[1]+1}else{a=n-u.yearRange;s=1+n+u.yearRange}for(l=[];a<s&&a<=u.maxYear;a++){if(a>=u.minYear){l.push('<option value="'+a+'"'+(a===n?' selected="selected"':"")+">"+a+"</option>")}}v='<div class="pika-label">'+n+u.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+l.join("")+"</select></div>";if(u.showMonthAfterYear){d+=v+f}else{d+=f+v}if(c&&(r===0||u.minMonth>=r)){g=false}if(h&&(r===11||u.maxMonth<=r)){p=false}if(t===0){d+='<button class="pika-prev'+(g?"":" is-disabled")+'" type="button">'+u.i18n.previousMonth+"</button>"}if(t===e._o.numberOfMonths-1){d+='<button class="pika-next'+(p?"":" is-disabled")+'" type="button">'+u.i18n.nextMonth+"</button>"}return d+="</div>"},S=function(e,t,n){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+n+'">'+V(e)+W(t)+"</table>"},b=function(e){var r=this,o=r.config(e);r._onMouseDown=function(e){if(!r._v){return}e=e||window.event;var t=e.target||e.srcElement;if(!t){return}if(!h(t,"is-disabled")){if(h(t,"pika-button")&&!h(t,"is-empty")&&!h(t.parentNode,"is-disabled")){r.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day")));if(o.bound){u(function(){r.hide();if(o.field){o.field.blur()}},100)}}else if(h(t,"pika-prev")){r.prevMonth()}else if(h(t,"pika-next")){r.nextMonth()}}if(!h(t,"pika-select")){if(e.preventDefault){e.preventDefault()}else{e.returnValue=false;return false}}else{r._c=true}};r._onChange=function(e){e=e||window.event;var t=e.target||e.srcElement;if(!t){return}if(h(t,"pika-select-month")){r.gotoMonth(t.value)}else if(h(t,"pika-select-year")){r.gotoYear(t.value)}};r._onKeyChange=function(e){e=e||window.event;if(r.isVisible()){switch(e.keyCode){case 13:case 27:o.field.blur();break;case 37:e.preventDefault();r.adjustDate("subtract",1);break;case 38:r.adjustDate("subtract",7);break;case 39:r.adjustDate("add",1);break;case 40:r.adjustDate("add",7);break}}};r._onInputChange=function(e){var t;if(e.firedBy===r){return}if(a){t=i(o.field.value,o.format,o.formatStrict);t=t&&t.isValid()?t.toDate():null}else{t=new Date(Date.parse(o.field.value))}if(H(t)){r.setDate(t)}if(!r._v){r.show()}};r._onInputFocus=function(){r.show()};r._onInputClick=function(){r.show()};r._onInputBlur=function(){var e=c.activeElement;do{if(h(e,"pika-single")){return}}while(e=e.parentNode);if(!r._c){r._b=u(function(){r.hide()},50)}r._c=false};r._onClick=function(e){e=e||window.event;var t=e.target||e.srcElement,n=t;if(!t){return}if(!s&&h(t,"pika-select")){if(!t.onchange){t.setAttribute("onchange","return;");l(t,"change",r._onChange)}}do{if(h(n,"pika-single")||n===o.trigger){return}}while(n=n.parentNode);if(r._v&&t!==o.trigger&&n!==o.trigger){r.hide()}};r.el=c.createElement("div");r.el.className="pika-single"+(o.isRTL?" is-rtl":"")+(o.theme?" "+o.theme:"");l(r.el,"mousedown",r._onMouseDown,true);l(r.el,"touchend",r._onMouseDown,true);l(r.el,"change",r._onChange);l(c,"keydown",r._onKeyChange);if(o.field){if(o.container){o.container.appendChild(r.el)}else if(o.bound){c.body.appendChild(r.el)}else{o.field.parentNode.insertBefore(r.el,o.field.nextSibling)}l(o.field,"change",r._onInputChange);if(!o.defaultDate){if(a&&o.field.value){o.defaultDate=i(o.field.value,o.format).toDate()}else{o.defaultDate=new Date(Date.parse(o.field.value))}o.setDefaultDate=true}}var t=o.defaultDate;if(H(t)){if(o.setDefaultDate){r.setDate(t,true)}else{r.gotoDate(t)}}else{r.gotoDate(new Date)}if(o.bound){this.hide();r.el.className+=" is-bound";l(o.trigger,"click",r._onInputClick);l(o.trigger,"focus",r._onInputFocus);l(o.trigger,"blur",r._onInputBlur)}else{this.show()}};return b.prototype={config:function(e){this._o||(this._o=v({},p,!0));var t=v(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"==typeof t.theme&&t.theme?t.theme: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=4<n?4:n,H(t.minDate)||(t.minDate=!1),H(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate<t.minDate&&(t.maxDate=t.minDate=!1),t.minDate&&this.setMinDate(t.minDate),t.maxDate&&this.setMaxDate(t.maxDate),m(t.yearRange)){var r=(new Date).getFullYear()-10;t.yearRange[0]=parseInt(t.yearRange[0],10)||r,t.yearRange[1]=parseInt(t.yearRange[1],10)||r}else t.yearRange=Math.abs(parseInt(t.yearRange,10))||p.yearRange,100<t.yearRange&&(t.yearRange=100);return t},toString:function(e){return H(this._d)?a?i(this._d).format(e||this._o.format):this._d.toDateString():""},getMoment:function(){return a?i(this._d):null},setMoment:function(e,t){a&&i.isMoment(e)&&this.setDate(e.toDate(),t)},getDate:function(){return H(this._d)?new Date(this._d.getTime()):new Date},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",o(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),H(e)){var n=this._o.minDate,r=this._o.maxDate;H(n)&&e<n?e=n:H(r)&&r<e&&(e=r),this._d=new Date(e.getTime()),P(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),o(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(H(e)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),r=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),o=e.getTime();r.setMonth(r.getMonth()+1),r.setDate(r.getDate()-1),t=o<n.getTime()||r.getTime()<o}t&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}],"right"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(e,t){var n,r=this.getDate(),o=24*parseInt(t)*60*60*1e3;"add"===e?n=new Date(r.valueOf()+o):"subtract"===e&&(n=new Date(r.valueOf()-o)),a&&("add"===e?n=i(r).add(t,"days").toDate():"subtract"===e&&(n=i(r).subtract(t,"days").toDate())),this.setDate(n)},adjustCalendars:function(){this.calendars[0]=g(this.calendars[0]);for(var e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=g({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){e instanceof Date?(P(e),this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=p.minDate,this._o.minYear=p.minYear,this._o.minMonth=p.minMonth,this._o.startRange=p.startRange),this.draw()},setMaxDate:function(e){e instanceof Date?(P(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=p.maxDate,this._o.maxYear=p.maxYear,this._o.maxMonth=p.maxMonth,this._o.endRange=p.endRange),this.draw()},setStartRange:function(e){this._o.startRange=e},setEndRange:function(e){this._o.endRange=e},draw:function(e){if(this._v||e){var t,n=this._o,r=n.minYear,o=n.maxYear,i=n.minMonth,a=n.maxMonth,s="";this._y<=r&&(this._y=r,!isNaN(i)&&this._m<i&&(this._m=i)),this._y>=o&&(this._y=o,!isNaN(a)&&this._m>a&&(this._m=a)),t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var l=0;l<n.numberOfMonths;l++)s+='<div class="pika-lendar">'+E(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,t)+this.render(this.calendars[l].year,this.calendars[l].month,t)+"</div>";this.el.innerHTML=s,n.bound&&"hidden"!==n.field.type&&u(function(){n.trigger.focus()},1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label","Use the arrow keys to pick a date")}},adjustPosition:function(){var e,t,n,r,o,i,a,s,l,u;if(!this._o.container){if(this.el.style.position="absolute",t=e=this._o.trigger,n=this.el.offsetWidth,r=this.el.offsetHeight,o=window.innerWidth||c.documentElement.clientWidth,i=window.innerHeight||c.documentElement.clientHeight,a=window.pageYOffset||c.body.scrollTop||c.documentElement.scrollTop,"function"==typeof e.getBoundingClientRect)s=(u=e.getBoundingClientRect()).left+window.pageXOffset,l=u.bottom+window.pageYOffset;else for(s=t.offsetLeft,l=t.offsetTop+t.offsetHeight;t=t.offsetParent;)s+=t.offsetLeft,l+=t.offsetTop;(this._o.reposition&&o<s+n||-1<this._o.position.indexOf("right")&&0<s-n+e.offsetWidth)&&(s=s-n+e.offsetWidth),(this._o.reposition&&i+a<l+r||-1<this._o.position.indexOf("top")&&0<l-r-e.offsetHeight)&&(l=l-r-e.offsetHeight),this.el.style.left=s+"px",this.el.style.top=l+"px"}},render:function(e,t,n){var r=this._o,o=new Date,i=x(e,t),a=new Date(e,t,1).getDay(),s=[],l=[];P(o),0<r.firstDay&&(a-=r.firstDay)<0&&(a+=7);for(var u,c,h,d,f,v,g=0===t?11:t-1,p=11===t?0:t+1,m=0===t?e-1:e,y=11===t?e+1:e,w=x(m,g),C=i+a,E=C;7<E;)E-=7;C+=7-E;for(var S=0,b=0;S<C;S++){var R=new Date(e,t,S-a+1),T=!!H(this._d)&&F(R,this._d),O=F(R,o),k=S<a||i+a<=S,M=S-a+1,N=t,_=e,A=r.startRange&&F(r.startRange,R),I=r.endRange&&F(r.endRange,R),D=r.startRange&&r.endRange&&r.startRange<R&&R<r.endRange;k&&(_=S<a?(M=w+M,N=g,m):(M-=i,N=p,y));var L={day:M,month:N,year:_,isSelected:T,isToday:O,isDisabled:r.minDate&&R<r.minDate||r.maxDate&&R>r.maxDate||r.disableWeekends&&(void 0,0===(v=R.getDay())||6===v)||r.disableDayFn&&r.disableDayFn(R),isEmpty:k,isStartRange:A,isEndRange:I,isInRange:D,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths};l.push(B(L)),7==++b&&(r.showWeekNumber&&l.unshift((c=S-a,h=t,d=e,f=void 0,f=new Date(d,0,1),'<td class="pika-week">'+Math.ceil(((new Date(d,h,c)-f)/864e5+f.getDay()+1)/7)+"</td>")),s.push((u=l,"<tr>"+(r.isRTL?u.reverse():u).join("")+"</tr>")),l=[],b=0)}return function(e,t,n){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+n+'">'+V(e)+W(t)+"</table>"}(r,s,n)},isVisible:function(){return this._v},show:function(){this.isVisible()||(function(e,t){e.className=n((" "+e.className+" ").replace(" "+t+" "," "))}(this.el,"is-hidden"),this._v=!0,this.draw(),this._o.bound&&(l(c,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var e=this._v;!1!==e&&(this._o.bound&&t(c,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",function(e,t){if(!h(e,t)){e.className=e.className===""?t:e.className+" "+t}}(this.el,"is-hidden"),this._v=!1,void 0!==e&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){this.hide(),t(this.el,"mousedown",this._onMouseDown,!0),t(this.el,"touchend",this._onMouseDown,!0),t(this.el,"change",this._onChange),this._o.field&&(t(this._o.field,"change",this._onInputChange),this._o.bound&&(t(this._o.trigger,"click",this._onInputClick),t(this._o.trigger,"focus",this._onInputFocus),t(this._o.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},b}(e)}()},function(e,t,n){},function(e,t,n){"use strict";var r=n(0);n(53),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),s=r(n(7)),l=r(n(6)),u=r(n(13)),c=r(n(8)),a=r(n(337)),h=r(n(43)),d=function(e){function a(){return(0,o.default)(this,a),(0,s.default)(this,(0,l.default)(a).apply(this,arguments))}return(0,c.default)(a,e),(0,i.default)(a,[{key:"prepare",value:function(e,t,n,r,o,i){(0,u.default)((0,l.default)(a.prototype),"prepare",this).call(this,e,t,n,r,o,i),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}]),a}(a.default);h.default.getSingleton().add("beforeValidate",function(e,t,n){var r=this.getCellMeta(t,this.propToCol(n));r.editor===d&&void 0===r.strict&&(r.filter=!1,r.strict=!0)});var f=d;t.default=f},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(7)),a=r(n(6)),s=r(n(8)),l=function(e){function t(){return(0,o.default)(this,t),(0,i.default)(this,(0,a.default)(t).apply(this,arguments))}return(0,s.default)(t,e),t}(r(n(107)).default);t.default=l},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(13)),u=r(n(8)),c=n(5),h=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(0,s.default)(t).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"createElements",value:function(){(0,l.default)((0,s.default)(t.prototype),"createElements",this).call(this),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,(this.textareaStyle.height=0,c.empty)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}]),t}(r(n(107)).default);t.default=h},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.default=void 0;var i=o(n(44)),a=o(n(1)),s=o(n(2)),l=o(n(7)),c=o(n(6)),h=o(n(13)),d=o(n(8)),f=n(5),v=n(33),g=n(52),p=r(n(105)),m=n(4),u=function(e){function u(){return(0,a.default)(this,u),(0,l.default)(this,(0,c.default)(u).apply(this,arguments))}return(0,d.default)(u,e),(0,s.default)(u,[{key:"init",value:function(){this.select=this.hot.rootDocument.createElement("SELECT"),(0,f.addClass)(this.select,"htSelectEditor"),this.select.style.display="none",this.hot.rootElement.appendChild(this.select),this.registerHooks()}},{key:"getValue",value:function(){return this.select.value}},{key:"setValue",value:function(e){this.select.value=e}},{key:"open",value:function(){var e=this;this._opened=!0,this.refreshDimensions(),this.select.style.display="",this.addHook("beforeKeyDown",function(){return e.onBeforeKeyDown()})}},{key:"close",value:function(){this._opened=!1,this.select.style.display="none",this.clearHooks()}},{key:"focus",value:function(){this.select.focus()}},{key:"registerHooks",value:function(){var e=this;this.addHook("afterScrollHorizontally",function(){return e.refreshDimensions()}),this.addHook("afterScrollVertically",function(){return e.refreshDimensions()}),this.addHook("afterColumnResize",function(){return e.refreshDimensions()}),this.addHook("afterRowResize",function(){return e.refreshDimensions()})}},{key:"prepare",value:function(e,t,n,r,o,i){var a=this;(0,h.default)((0,c.default)(u.prototype),"prepare",this).call(this,e,t,n,r,o,i);var s,l=this.cellProperties.selectOptions;s="function"==typeof l?this.prepareOptions(l(this.row,this.col,this.prop)):this.prepareOptions(l),(0,f.empty)(this.select),(0,m.objectEach)(s,function(e,t){var n=a.hot.rootDocument.createElement("OPTION");n.value=t,(0,f.fastInnerHTML)(n,e),a.select.appendChild(n)})}},{key:"prepareOptions",value:function(e){var t={};if(Array.isArray(e))for(var n=0,r=e.length;n<r;n++)t[e[n]]=e[n];else"object"===(0,i.default)(e)&&(t=e);return t}},{key:"refreshValue",value:function(){var e=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()}},{key:"refreshDimensions",value:function(){if(this.state===p.EditorState.EDITING)if(this.TD=this.getEditedCell(),this.TD){var e,t=this.hot.view.wt.wtOverlays,n=(0,f.offset)(this.TD),r=(0,f.offset)(this.hot.rootElement),o=t.scrollableElement,i=this.checkEditorSection(),a=(0,f.outerWidth)(this.TD)+1,s=(0,f.outerHeight)(this.TD)+1,l=n.top-r.top-1-(o.scrollTop||0),u=n.left-r.left-1-(o.scrollLeft||0);switch(i){case"top":e=(0,f.getCssTransform)(t.topOverlay.clone.wtTable.holder.parentNode);break;case"left":e=(0,f.getCssTransform)(t.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":e=(0,f.getCssTransform)(t.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":e=(0,f.getCssTransform)(t.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":e=(0,f.getCssTransform)(t.bottomOverlay.clone.wtTable.holder.parentNode)}0===this.hot.getSelectedLast()[0]&&(l+=1),0===this.hot.getSelectedLast()[1]&&(u+=1);var c=this.select.style;e&&-1!==e?c[e[0]]=e[1]:(0,f.resetCssTransform)(this.select);var h=(0,f.getComputedStyle)(this.TD,this.hot.rootWindow);0<parseInt(h.borderTopWidth,10)&&(s-=1),0<parseInt(h.borderLeftWidth,10)&&(a-=1),c.height="".concat(s,"px"),c.minWidth="".concat(a,"px"),c.top="".concat(l,"px"),c.left="".concat(u,"px"),c.margin="0px"}else this.close()}},{key:"getEditedCell",value:function(){var e,t=this.hot.view.wt.wtOverlays;switch(this.checkEditorSection()){case"top":e=t.topOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=101;break;case"corner":e=t.topLeftCornerOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=103;break;case"left":e=t.leftOverlay.clone.wtTable.getCell({row:this.row,col:this.col}),this.select.style.zIndex=102;break;default:e=this.hot.getCell(this.row,this.col),this.select.style.zIndex=""}return e<0?void 0:e}},{key:"onBeforeKeyDown",value:function(){var e=this.select.selectedIndex-1,t=this.select.selectedIndex+1;switch(event.keyCode){case g.KEY_CODES.ARROW_UP:0<=e&&(this.select[e].selected=!0),(0,v.stopImmediatePropagation)(event),event.preventDefault();break;case g.KEY_CODES.ARROW_DOWN:t<=this.select.length-1&&(this.select[t].selected=!0),(0,v.stopImmediatePropagation)(event),event.preventDefault()}}}]),u}(p.default);t.default=u},function(e,t,n){"use strict";n(19),t.__esModule=!0,t.default=void 0;var u=n(5);function r(e,t,n,r,o,i,a){var s=[],l=[];a.className&&(t.className?t.className="".concat(t.className," ").concat(a.className):t.className=a.className),a.readOnly&&s.push(a.readOnlyCellClassName),!1===a.valid&&a.invalidCellClassName?s.push(a.invalidCellClassName):l.push(a.invalidCellClassName),!1===a.wordWrap&&a.noWordWrapClassName&&s.push(a.noWordWrapClassName),!i&&a.placeholder&&s.push(a.placeholderCellClassName),(0,u.removeClass)(t,l),(0,u.addClass)(t,s)}t.default=r},function(e,t,n){"use strict";var r=n(0);n(19),t.__esModule=!0,t.default=void 0;var v=n(5),g=r(n(23)),p=n(25),m=n(41);function o(t,n,r,o,e,i,a){var s=t.rootDocument,l=a.allowHtml?"html":"text",u=s.createElement("DIV");u.className="htAutocompleteArrow",u.appendChild(s.createTextNode(String.fromCharCode(9660)));for(var c=arguments.length,h=new Array(7<c?c-7:0),d=7;d<c;d++)h[d-7]=arguments[d];if((0,m.getRenderer)(l).apply(this,[t,n,r,o,e,i,a].concat(h)),n.firstChild||n.appendChild(s.createTextNode(String.fromCharCode(160))),n.insertBefore(u,n.firstChild),(0,v.addClass)(n,"htAutocomplete"),!t.acArrowListener){var f=new g.default(t);t.acArrowListener=function(e){(0,v.hasClass)(e.target,"htAutocompleteArrow")&&t.view.wt.getSetting("onCellDblClick",null,new p.CellCoords(r,o),n)},f.addEventListener(t.rootElement,"mousedown",t.acArrowListener),t.addHookOnce("afterDestroy",function(){f.destroy()})}}t.default=o},function(e,t,n){"use strict";var r=n(0);n(19),n(31),n(16),n(10),n(37),n(38),n(14),n(24),n(17),n(32),t.__esModule=!0,t.default=void 0;var m=n(5),y=n(68),w=r(n(23)),C=n(52),E=n(75),S=n(33),b=n(41),R=new WeakMap,T=new WeakMap;function O(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}function o(v,e,t,n,r,o,i){for(var a=v.rootDocument,s=arguments.length,l=new Array(7<s?s-7:0),u=7;u<s;u++)l[u-7]=arguments[u];(0,b.getRenderer)("base").apply(this,[v,e,t,n,r,o,i].concat(l)),function(t){var e=T.get(t);if(!e){var n=t.rootElement;(e=new w.default(t)).addEventListener(n,"click",function(e){return function(e,t){if(!O(e.target))return!1;var n=parseInt(e.target.getAttribute("data-row"),10),r=parseInt(e.target.getAttribute("data-col"),10);t.getCellMeta(n,r).readOnly&&e.preventDefault()}(e,t)}),e.addEventListener(n,"mouseup",function(e){return function(e,t){if(!O(e.target))return;setTimeout(t.listen,10)}(e,t)}),e.addEventListener(n,"change",function(e){return function(e,t){if(!O(e.target))return!1;var n=parseInt(e.target.getAttribute("data-row"),10),r=parseInt(e.target.getAttribute("data-col"),10),o=t.getCellMeta(n,r);if(!o.readOnly){var i=null;i=e.target.checked?void 0===o.uncheckedTemplate||o.checkedTemplate:void 0!==o.uncheckedTemplate&&o.uncheckedTemplate,t.setDataAtCell(n,r,i)}}(e,t)}),T.set(t,e)}}(v);var c=function(e){var t=e.createElement("input");return t.className="htCheckboxRendererInput",t.type="checkbox",t.setAttribute("autocomplete","off"),t.setAttribute("tabindex","-1"),t.cloneNode(!1)}(a),h=i.label,d=!1;if(void 0===i.checkedTemplate&&(i.checkedTemplate=!0),void 0===i.uncheckedTemplate&&(i.uncheckedTemplate=!1),(0,m.empty)(e),o===i.checkedTemplate||(0,y.equalsIgnoreCase)(o,i.checkedTemplate)?c.checked=!0:o===i.uncheckedTemplate||(0,y.equalsIgnoreCase)(o,i.uncheckedTemplate)?c.checked=!1:null===o?(0,m.addClass)(c,"noValue"):(c.style.display="none",(0,m.addClass)(c,"htBadValue"),d=!0),c.setAttribute("data-row",t),c.setAttribute("data-col",n),!d&&h){var f="";h.value?f="function"==typeof h.value?h.value.call(this,t,n,r,o):h.value:h.property&&(f=v.getDataAtRowProp(t,h.property));var g=function(e,t){var n=e.createElement("label");return n.className="htCheckboxRendererLabel",n.appendChild(e.createTextNode(t)),n.cloneNode(!0)}(a,f);"before"===h.position?g.appendChild(c):g.insertBefore(c,g.firstChild),c=g}function p(e){var t=0<arguments.length&&void 0!==e&&e,n=v.getSelectedRangeLast();if(n){for(var r=n.getTopLeftCorner(),o=r.row,i=r.col,a=n.getBottomRightCorner(),s=a.row,l=a.col,u=[],c=o;c<=s;c+=1)for(var h=i;h<=l;h+=1){var d=v.getCellMeta(c,h);if("checkbox"!==d.type)return;if(!0!==d.readOnly){void 0===d.checkedTemplate&&(d.checkedTemplate=!0),void 0===d.uncheckedTemplate&&(d.uncheckedTemplate=!1);var f=v.getDataAtCell(c,h);!1===t?[d.checkedTemplate,d.checkedTemplate.toString()].includes(f)?u.push([c,h,d.uncheckedTemplate]):[d.uncheckedTemplate,d.uncheckedTemplate.toString(),null,void 0].includes(f)&&u.push([c,h,d.checkedTemplate]):u.push([c,h,d.uncheckedTemplate])}}0<u.length&&v.setDataAtCell(u)}}e.appendChild(c),d&&e.appendChild(a.createTextNode("#bad-value#")),R.has(v)||(R.set(v,!0),v.addHook("beforeKeyDown",function(e){var t="SPACE|ENTER",n="DELETE|BACKSPACE",r=(0,E.partial)(C.isKey,e.keyCode);if(!v.getSettings().enterBeginsEditing&&r("ENTER"))return;r("".concat(t,"|").concat(n))&&!(0,S.isImmediatePropagationStopped)(e)&&function(e){var t=v.getSelectedRangeLast();if(!t)return;for(var n=t.getTopLeftCorner(),r=t.getBottomRightCorner(),o=n.row;o<=r.row;o++)for(var i=n.col;i<=r.col;i++){var a=v.getCellMeta(o,i);if("checkbox"!==a.type)return;var s=v.getCell(o,i);if(null==s)e(o,i,a);else{var l=s.querySelectorAll("input[type=checkbox]");0<l.length&&!a.readOnly&&e(l)}}}(function(){(0,S.stopImmediatePropagation)(e),e.preventDefault()});r(t)&&p();r(n)&&p(!0)}))}t.default=o},function(e,t,n){"use strict";n(19),t.__esModule=!0,t.default=void 0;var u=n(5),c=n(41);function r(e,t,n,r,o,i){for(var a=arguments.length,s=new Array(6<a?a-6:0),l=6;l<a;l++)s[l-6]=arguments[l];(0,c.getRenderer)("base").apply(this,[e,t,n,r,o,i].concat(s)),(0,u.fastInnerHTML)(t,null==i?"":i)}t.default=r},function(e,t,n){"use strict";var r=n(0);n(12),n(51),n(39),n(46),t.__esModule=!0,t.default=void 0;var g=r(n(339)),p=n(41),m=n(15);function o(e,t,n,r,o,i,a){var s=i;if((0,m.isNumeric)(s)){var l=a.numericFormat,u=l&&l.culture||"-",c=l&&l.pattern,h=a.className||"",d=h.length?h.split(" "):[];if(void 0!==u&&!g.default.languages()[u]){var f=u.replace("-",""),v=g.default.allLanguages?g.default.allLanguages[u]:g.default[f];v&&g.default.registerLanguage(v)}g.default.setLanguage(u),s=(0,g.default)(s).format(c||"0"),d.indexOf("htLeft")<0&&d.indexOf("htCenter")<0&&d.indexOf("htRight")<0&&d.indexOf("htJustify")<0&&d.push("htRight"),d.indexOf("htNumeric")<0&&d.push("htNumeric"),a.className=d.join(" ")}(0,p.getRenderer)("text")(e,t,n,r,o,s,a)}t.default=o},function(e,t,n){"use strict";n(19),t.__esModule=!0,t.default=void 0;var f=n(5),v=n(41),g=n(15);function r(e,t,n,r,o,i,a){for(var s=arguments.length,l=new Array(7<s?s-7:0),u=7;u<s;u++)l[u-7]=arguments[u];(0,v.getRenderer)("text").apply(this,[e,t,n,r,o,i,a].concat(l));var c=a.hashLength||t.innerHTML.length,h=a.hashSymbol||"*",d="";(0,g.rangeEach)(c-1,function(){d+=h}),(0,f.fastInnerHTML)(t,d)}t.default=r},function(e,t,n){"use strict";n(19),n(39),t.__esModule=!0,t.default=void 0;var d=n(5),f=n(27),v=n(41);function r(e,t,n,r,o,i,a){for(var s=arguments.length,l=new Array(7<s?s-7:0),u=7;u<s;u++)l[u-7]=arguments[u];(0,v.getRenderer)("base").apply(this,[e,t,n,r,o,i,a].concat(l));var c=i;if(!c&&a.placeholder&&(c=a.placeholder),c=(0,f.stringify)(c),e.getSettings().trimWhitespace||(c=c.replace(/ /g,String.fromCharCode(160))),a.rendererTemplate){(0,d.empty)(t);var h=e.rootDocument.createElement("TEMPLATE");h.setAttribute("bind","{{}}"),h.innerHTML=a.rendererTemplate,HTMLTemplateElement.decorate(h),h.model=e.getSourceDataAtRow(n),t.appendChild(h)}else(0,d.fastInnerText)(t,c)}t.default=r},function(e,t,n){"use strict";function r(e,o){var i=e;return function(e){for(var t=!1,n=0,r=e.length;n<r;n++)if(i===e[n]){t=!0;break}o(t)}}t.__esModule=!0,t.default=function(e,t){var n=e;null==n&&(n="");if(this.allowEmpty&&""===n)return void t(!0);this.strict&&this.source?"function"==typeof this.source?this.source(n,r(n,t)):r(n,t)(this.source):t(!0)}},function(e,t,n){"use strict";var r=n(0);n(340),t.__esModule=!0,t.default=function(e,t){var n=(0,h.getEditorInstance)("date",this.instance),r=e,o=!0;null==r&&(r="");var i=(0,c.default)(new Date(r)).isValid()||(0,c.default)(r,this.dateFormat||n.defaultDateFormat,!0).isValid(),a=(0,c.default)(r,this.dateFormat||n.defaultDateFormat,!0).isValid();this.allowEmpty&&""===r&&(a=i=!0);i||(o=!1);!i&&a&&(o=!0);if(i&&!a)if(!0===this.correctFormat){var s=d(r,this.dateFormat),l=this.instance.runHooks("unmodifyRow",this.row),u=this.instance.runHooks("unmodifyCol",this.col);this.instance.setDataAtCell(l,u,s,"dateValidator"),o=!0}else o=!1;t(o)},t.correctFormat=d;var c=r(n(61)),i=n(341),h=n(55);function d(e,t){var n=(0,c.default)((0,i.getNormalizedDate)(e)),r=(0,c.default)(e,t),o=-1<e.search(/[A-z]/g);return(n.isValid()&&n.format("x")===r.format("x")||!r.isValid()||o?n:r).format(t)}},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n=e;null==n&&(n="");this.allowEmpty&&""===n?t(!0):t(""!==n&&(0,r.isNumeric)(e))};var r=n(15)},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=function(e,t){var n=this.timeFormat||"h:mm:ss a",r=!0,o=e;null===o&&(o="");o=/^\d{3,}$/.test(o)?parseInt(o,10):o;var i=/^\d{1,2}$/.test(o);i&&(o+=":00");var a=(0,d.default)(o,f,!0).isValid()?(0,d.default)(o):(0,d.default)(o,n),s=a.isValid(),l=(0,d.default)(o,n,!0).isValid()&&!i;this.allowEmpty&&""===o&&(l=s=!0);s||(r=!1);!s&&l&&(r=!0);if(s&&!l)if(!0===this.correctFormat){var u=a.format(n),c=this.instance.runHooks("unmodifyRow",this.row),h=this.instance.runHooks("unmodifyCol",this.col);this.instance.setDataAtCell(c,h,u,"timeValidator"),r=!0}else r=!1;t(r)};var d=r(n(61)),f=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"]},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(55),o=n(41),i=n(79),a="autocomplete",s={editor:(0,r.getEditor)(a),renderer:(0,o.getRenderer)(a),validator:(0,i.getValidator)(a)};t.default=s},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(55),o=n(41),i={editor:(0,r.getEditor)("checkbox"),renderer:(0,o.getRenderer)("checkbox")};t.default=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(55),o=n(41),i=n(79),a={editor:(0,r.getEditor)("date"),renderer:(0,o.getRenderer)("autocomplete"),validator:(0,i.getValidator)("date")};t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(55),o=n(41),i=n(79),a={editor:(0,r.getEditor)("dropdown"),renderer:(0,o.getRenderer)("autocomplete"),validator:(0,i.getValidator)("autocomplete")};t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(55),o=n(41),i={editor:(0,r.getEditor)("handsontable"),renderer:(0,o.getRenderer)("autocomplete")};t.default=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(55),o=n(41),i=n(79),a="numeric",s={editor:(0,r.getEditor)(a),renderer:(0,o.getRenderer)(a),validator:(0,i.getValidator)(a),dataType:"number"};t.default=s},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(55),o=n(41),i={editor:(0,r.getEditor)("password"),renderer:(0,o.getRenderer)("password"),copyable:!1};t.default=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(55),o=n(41),i={editor:(0,r.getEditor)("text"),renderer:(0,o.getRenderer)("text")};t.default=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(55),o=n(41),i=n(79),a={editor:(0,r.getEditor)("text"),renderer:(0,o.getRenderer)("text"),validator:(0,i.getValidator)("time")};t.default=a},function(e,t,n){var r=n(42),o=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&o(e)===e}},function(e,t,n){var r=n(34),o=n(443),i=!r.setImmediate||!r.clearImmediate;n(22)({global:!0,bind:!0,enumerable:!0,forced:i},{setImmediate:o.set,clearImmediate:o.clear})},function(e,t,n){function r(e){if(b.hasOwnProperty(e)){var t=b[e];delete b[e],t()}}function o(e){return function(){r(e)}}function i(e){r(e.data)}function a(e){c.postMessage(e+"",p.protocol+"//"+p.host)}var s,l,u,c=n(34),h=n(29),d=n(77),f=n(103),v=n(182),g=n(140),p=c.location,m=c.setImmediate,y=c.clearImmediate,w=c.process,C=c.MessageChannel,E=c.Dispatch,S=0,b={},R="onreadystatechange";m&&y||(m=function(e){for(var t=[],n=1;n<arguments.length;)t.push(arguments[n++]);return b[++S]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},s(S),S},y=function(e){delete b[e]},"process"==d(w)?s=function(e){w.nextTick(o(e))}:E&&E.now?s=function(e){E.now(o(e))}:C?(u=(l=new C).port2,l.port1.onmessage=i,s=f(u.postMessage,u,1)):!c.addEventListener||"function"!=typeof postMessage||c.importScripts||h(a)?s=R in g("script")?function(e){v.appendChild(g("script"))[R]=function(){v.removeChild(this),r(e)}}:function(e){setTimeout(o(e),0)}:(s=a,c.addEventListener("message",i,!1))),e.exports={set:m,clear:y}},function(e,t,n){"use strict";var r=n(0);n(53),n(12),n(16),n(40),n(64),n(30),n(70),n(10),n(14),n(46),n(17),n(32),t.__esModule=!0,t.default=void 0;var s=r(n(44)),o=r(n(1)),i=r(n(2)),a=r(n(342)),l=n(132),g=n(162),v=n(4),c=n(3),u=r(n(445)),h=n(15),d=(0,l.cellMethodLookupFactory)("copyable",!1),f=function(){function f(e,t,n){var r=this;(0,o.default)(this,f),this.instance=e,this.priv=t,this.GridSettings=n,this.dataSource=this.instance.getSettings().data,this.cachedLength=null,this.skipCache=!1,this.latestSourceRowsCount=0,this.duckSchema=this.dataSource&&this.dataSource[0]?(0,v.duckSchema)(this.dataSource[0]):{},this.colToPropCache=void 0,this.propToColCache=void 0,this.createMap(),this.interval=u.default.create(function(){return r.clearLengthCache()},"15fps"),this.instance.addHook("skipLengthCache",function(e){return r.onSkipLengthCache(e)}),this.onSkipLengthCache(500)}return(0,i.default)(f,null,[{key:"DESTINATION_RENDERER",get:function(){return 1}},{key:"DESTINATION_CLIPBOARD_GENERATOR",get:function(){return 2}}]),(0,i.default)(f,[{key:"createMap",value:function(){var e,t=this.getSchema();if(void 0===t)throw new Error("trying to create `columns` definition but you didn't provide `schema` nor `data`");this.colToPropCache=[],this.propToColCache=new Map;var n=this.instance.getSettings().columns;if(n){var r=this.instance.getSettings().maxCols,o=Math.min(r,n.length),i=0,a=!1,s=(0,v.deepObjectSize)(t);for("function"==typeof n&&(o=0<s?s:this.instance.countSourceCols(),a=!0),e=0;e<o;e++){var l=a?n(e):n[e];if((0,v.isObject)(l)){if(void 0!==l.data){var u=a?i:e;this.colToPropCache[u]=l.data,this.propToColCache.set(l.data,u)}i+=1}}}else this.recursiveDuckColumns(t)}},{key:"recursiveDuckColumns",value:function(e,t,n){var r,o=this,i=t,a=n;return void 0===i&&(i=0,a=""),"object"!==(0,s.default)(e)||Array.isArray(e)||(0,v.objectEach)(e,function(e,t){null===e?(r=a+t,o.colToPropCache.push(r),o.propToColCache.set(r,i),i+=1):i=o.recursiveDuckColumns(e,i,"".concat(t,"."))}),i}},{key:"colToProp",value:function(e){var t=this.instance.toPhysicalColumn(e);return!isNaN(t)&&this.colToPropCache&&void 0!==this.colToPropCache[t]?this.colToPropCache[t]:t}},{key:"propToCol",value:function(e){var t;return t=void 0===this.propToColCache.get(e)?e:this.propToColCache.get(e),t=this.instance.toVisualColumn(t)}},{key:"getSchema",value:function(){var e=this.instance.getSettings().dataSchema;return e?"function"==typeof e?e():e:this.duckSchema}},{key:"createRow",value:function(e,t,n){var r=this,o=1<arguments.length&&void 0!==t?t:1,i=2<arguments.length?n:void 0,a=0,s=e;if(("number"!=typeof s||s>=this.instance.countSourceRows())&&(s=this.instance.countSourceRows()),!1===this.instance.runHooks("beforeCreateRow",s,o,i))return 0;for(var l=this.instance.getSettings().maxRows,u=this.instance.countCols(),c=function(){var e=null;"array"===r.instance.dataType?r.instance.getSettings().dataSchema?e=(0,v.deepClone)(r.getSchema()):(e=[],(0,h.rangeEach)(u-1,function(){return e.push(null)})):"function"===r.instance.dataType?e=r.instance.getSettings().dataSchema(s):(e={},(0,v.deepExtend)(e,r.getSchema())),s===r.instance.countSourceRows()?r.dataSource.push(e):r.spliceData(s,0,e),a+=1};a<o&&this.instance.countSourceRows()<l;)c();return this.instance.runHooks("afterCreateRow",s,a,i),this.instance.forceFullRender=!0,a}},{key:"createCol",value:function(e,t,n){var r=1<arguments.length&&void 0!==t?t:1,o=2<arguments.length?n:void 0;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 i,a=this.instance.countSourceRows(),s=this.dataSource,l=this.instance.countCols(),u="number"!=typeof e||l<=e?l:e,c=0;if(!1===this.instance.runHooks("beforeCreateCol",u,r,o))return 0;i=u;for(var h=this.instance.getSettings().maxCols;c<r&&this.instance.countCols()<h;){var d=(0,g.columnFactory)(this.GridSettings,this.priv.columnsSettingConflicts);if("number"!=typeof u||u>=this.instance.countCols()){if(0<a)for(var f=0;f<a;f++)void 0===s[f]&&(s[f]=[]),s[f].push(null);else s.push([null]);this.priv.columnSettings.push(d)}else{for(var v=0;v<a;v++)s[v].splice(i,0,null);this.priv.columnSettings.splice(i,0,d)}c+=1,i+=1}return this.instance.runHooks("afterCreateCol",u,c,o),this.instance.forceFullRender=!0,c}},{key:"removeRow",value:function(e,t,n){var r=1<arguments.length&&void 0!==t?t:1,o=2<arguments.length?n:void 0,i="number"!=typeof e?-r:e,a=this.instance.runHooks("modifyRemovedAmount",r,i),s=this.instance.countSourceRows();i=(s+i)%s;var l=this.visualRowsToPhysical(i,a);if(!1!==this.instance.runHooks("beforeRemoveRow",i,a,l,o)){var u=this.dataSource,c=this.filterData(i,a);c&&(u.length=0,Array.prototype.push.apply(u,c)),this.instance.runHooks("afterRemoveRow",i,a,l,o),this.instance.forceFullRender=!0}}},{key:"removeCol",value:function(e,t,n){var r=1<arguments.length&&void 0!==t?t:1,o=2<arguments.length?n:void 0;if("object"===this.instance.dataType||this.instance.getSettings().columns)throw new Error("cannot remove column with object data source or columns option specified");var i="number"!=typeof e?-r:e;i=(this.instance.countCols()+i)%this.instance.countCols();var a=this.visualColumnsToPhysical(i,r),s=a.slice(0).sort(function(e,t){return t-e});if(!1!==this.instance.runHooks("beforeRemoveCol",i,r,a,o)){for(var l=!0,u=s.length,c=this.dataSource,h=0;h<u;h++)l&&a[0]!==a[h]-h&&(l=!1);if(l)for(var d=0,f=this.instance.countSourceRows();d<f;d++)c[d].splice(a[0],r);else{for(var v=0,g=this.instance.countSourceRows();v<g;v++)for(var p=0;p<u;p++)c[v].splice(s[p],1);for(var m=0;m<u;m++)this.priv.columnSettings.splice(a[m],1)}this.instance.runHooks("afterRemoveCol",i,r,a,o),this.instance.forceFullRender=!0}}},{key:"spliceCol",value:function(e,t,n){for(var r=this.instance.getDataAtCol(e),o=r.slice(t,t+n),i=r.slice(t+n),a=arguments.length,s=new Array(3<a?a-3:0),l=3;l<a;l++)s[l-3]=arguments[l];(0,c.extendArray)(s,i);for(var u=0;u<n;)s.push(null),u+=1;return(0,c.to2dArray)(s),this.instance.populateFromArray(t,e,s,null,null,"spliceCol"),o}},{key:"spliceRow",value:function(e,t,n){for(var r=this.instance.getSourceDataAtRow(e),o=r.slice(t,t+n),i=r.slice(t+n),a=arguments.length,s=new Array(3<a?a-3:0),l=3;l<a;l++)s[l-3]=arguments[l];(0,c.extendArray)(s,i);for(var u=0;u<n;)s.push(null),u+=1;return this.instance.populateFromArray(e,t,[s],null,null,"spliceRow"),o}},{key:"spliceData",value:function(e,t,n){!1!==this.instance.runHooks("beforeDataSplice",e,t,n)&&this.dataSource.splice(e,t,n)}},{key:"filterData",value:function(e,t){var n=this.visualRowsToPhysical(e,t);if(!1!==this.instance.runHooks("beforeDataFilter",e,t,n))return this.dataSource.filter(function(e,t){return-1===n.indexOf(t)})}},{key:"get",value:function(e,t){var n=this.instance.toPhysicalRow(e),r=this.dataSource[n],o=this.instance.runHooks("modifyRowData",n),i=null;if((r=isNaN(o)?o:r)&&r.hasOwnProperty&&(0,v.hasOwnProperty)(r,t))i=r[t];else if("string"==typeof t&&-1<t.indexOf(".")){var a=t.split("."),s=r;if(!s)return null;for(var l=0,u=a.length;l<u;l++)if(void 0===(s=s[a[l]]))return null;i=s}else"function"==typeof t&&(i=t(this.dataSource.slice(n,n+1)[0]));if(this.instance.hasHook("modifyData")){var c=(0,v.createObjectPropListener)(i);this.instance.runHooks("modifyData",n,this.propToCol(t),c,"get"),c.isTouched()&&(i=c.value)}return i}},{key:"getCopyable",value:function(e,t){return d.call(this.instance,e,this.propToCol(t))?this.get(e,t):""}},{key:"set",value:function(e,t,n,r){var o=this.instance.runHooks("modifyRow",e,r||"datamapGet"),i=n,a=this.dataSource[o],s=this.instance.runHooks("modifyRowData",o);if(a=isNaN(s)?s:a,this.instance.hasHook("modifyData")){var l=(0,v.createObjectPropListener)(i);this.instance.runHooks("modifyData",o,this.propToCol(t),l,"set"),l.isTouched()&&(i=l.value)}if(a&&a.hasOwnProperty&&(0,v.hasOwnProperty)(a,t))a[t]=i;else if("string"==typeof t&&-1<t.indexOf(".")){var u,c=t.split("."),h=a,d=0;for(d=0,u=c.length-1;d<u;d++)void 0===h[c[d]]&&(h[c[d]]={}),h=h[c[d]];h[c[d]]=i}else"function"==typeof t?t(this.dataSource.slice(o,o+1)[0],i):a[t]=i}},{key:"visualRowsToPhysical",value:function(e,t){for(var n,r=this.instance.countSourceRows(),o=[],i=(r+e)%r,a=t;i<r&&a;)n=this.instance.toPhysicalRow(i),o.push(n),a-=1,i+=1;return o}},{key:"visualColumnsToPhysical",value:function(e,t){for(var n=this.instance.countCols(),r=[],o=(n+e)%n,i=t;o<n&&i;){var a=this.instance.toPhysicalColumn(o);r.push(a),i-=1,o+=1}return r}},{key:"clear",value:function(){for(var e=0;e<this.instance.countSourceRows();e++)for(var t=0;t<this.instance.countCols();t++)this.set(e,this.colToProp(t),"")}},{key:"clearLengthCache",value:function(){this.cachedLength=null}},{key:"getLength",value:function(){var e,t=this,n=this.instance.getSettings().maxRows;e=n<0||0===n?0:n||1/0;var r=this.instance.countSourceRows();if(this.instance.hasHook("modifyRow")){var o=this.skipCache;this.interval.start(),r!==this.latestSourceRowsCount&&(o=!0),this.latestSourceRowsCount=r,null===this.cachedLength||o?((0,h.rangeEach)(r-1,function(e){null===t.instance.toPhysicalRow(e)&&(r-=1)}),this.cachedLength=r):r=this.cachedLength}else this.interval.stop();return Math.min(r,e)}},{key:"getAll",value:function(){var e={row:0,col:0},t={row:Math.max(this.instance.countSourceRows()-1,0),col:Math.max(this.instance.countCols()-1,0)};return e.row-t.row!=0||this.instance.countSourceRows()?this.getRange(e,t,f.DESTINATION_RENDERER):[]}},{key:"getRange",value:function(e,t,n){var r,o,i,a=[],s=this.instance.getSettings().maxRows,l=this.instance.getSettings().maxCols;if(0===s||0===l)return[];var u=n===f.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,c=Math.min(Math.max(s-1,0),Math.max(e.row,t.row)),h=Math.min(Math.max(l-1,0),Math.max(e.col,t.col));for(r=Math.min(e.row,t.row);r<=c;r++){i=[];var d=this.instance.toPhysicalRow(r);for(o=Math.min(e.col,t.col);o<=h&&null!==d;o++)i.push(u.call(this,r,this.colToProp(o)));null!==d&&a.push(i)}return a}},{key:"getText",value:function(e,t){return a.default.stringify(this.getRange(e,t,f.DESTINATION_RENDERER))}},{key:"getCopyableText",value:function(e,t){return a.default.stringify(this.getRange(e,t,f.DESTINATION_CLIPBOARD_GENERATOR))}},{key:"onSkipLengthCache",value:function(e){var t=this;this.skipCache=!0,setTimeout(function(){t.skipCache=!1},e)}},{key:"destroy",value:function(){this.interval.stop(),this.interval=null,this.instance=null,this.priv=null,this.GridSettings=null,this.dataSource=null,this.cachedLength=null,this.duckSchema=null,this.colToPropCache.length=0,this.propToColCache.clear(),this.propToColCache=void 0}}]),f}();t.default=f},function(e,t,n){"use strict";var r=n(0);n(39),t.__esModule=!0,t.parseDelay=l,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(73),s=function(){function r(e,t){var n=this;(0,o.default)(this,r),this.timer=null,this.func=e,this.delay=l(t),this.stopped=!0,this._then=null,this._callback=function(){return n.__callback()}}return(0,i.default)(r,null,[{key:"create",value:function(e,t){return new r(e,t)}}]),(0,i.default)(r,[{key:"start",value:function(){return this.stopped&&(this._then=Date.now(),this.stopped=!1,this.timer=(0,a.requestAnimationFrame)(this._callback)),this}},{key:"stop",value:function(){return this.stopped||(this.stopped=!0,(0,a.cancelAnimationFrame)(this.timer),this.timer=null),this}},{key:"__callback",value:function(){if(this.timer=(0,a.requestAnimationFrame)(this._callback),this.delay){var e=Date.now(),t=e-this._then;t>this.delay&&(this._then=e-t%this.delay,this.func())}else this.func()}}]),r}();function l(e){var t=e;return"string"==typeof t&&/fps$/.test(t)&&(t=1e3/parseInt(t.replace("fps","")||0,10)),t}t.default=s},function(e,t,n){"use strict";var r=n(0);n(16),n(10),n(14),n(24),n(17),t.__esModule=!0,t.default=void 0;var i=r(n(1)),a=r(n(2)),s=n(25),l=n(52),u=n(33),c=n(55),h=r(n(23)),d=n(105),f=function(){function o(e,t,n){var r=this;(0,i.default)(this,o),this.instance=e,this.priv=t,this.selection=n,this.eventManager=new h.default(e),this.destroyed=!1,this.lock=!1,this.activeEditor=void 0,this.instance.addHook("afterDocumentKeyDown",function(e){return r.onAfterDocumentKeyDown(e)}),this.eventManager.addEventListener(this.instance.rootDocument.documentElement,"keydown",function(e){r.destroyed||r.instance.runHooks("afterDocumentKeyDown",e)}),this.eventManager.addEventListener(this.instance.rootDocument.documentElement,"compositionstart",function(e){!r.destroyed&&r.activeEditor&&!r.activeEditor.isOpened()&&r.instance.isListening()&&r.openEditor("",e)}),this.instance.view.wt.update("onCellDblClick",function(e,t,n){return r.onCellDblClick(e,t,n)})}return(0,a.default)(o,[{key:"lockEditor",value:function(){this.lock=!0}},{key:"unlockEditor",value:function(){this.lock=!1}},{key:"destroyEditor",value:function(e){this.lock||this.closeEditor(e)}},{key:"getActiveEditor",value:function(){return this.activeEditor}},{key:"prepareEditor",value:function(){var t=this;if(!this.lock)if(this.activeEditor&&this.activeEditor.isWaiting())this.closeEditor(!1,!1,function(e){e&&t.prepareEditor()});else{var e=this.instance.selection.selectedRange.current().highlight,n=e.row,r=e.col,o=this.instance.colToProp(r),i=this.instance.getCell(n,r),a=this.instance.getSourceDataAtCell(this.instance.runHooks("modifyRow",n),r),s=this.instance.getCellMeta(n,r),l=this.instance.getCellEditor(s);l?(this.activeEditor=(0,c.getEditorInstance)(l,this.instance),this.activeEditor.prepare(n,r,o,i,a,s)):this.activeEditor=void 0}}},{key:"isEditorOpened",value:function(){return this.activeEditor&&this.activeEditor.isOpened()}},{key:"openEditor",value:function(e,t){this.activeEditor&&(this.activeEditor.cellProperties.readOnly?t&&t.keyCode===l.KEY_CODES.ENTER&&this.moveSelectionAfterEnter():this.activeEditor.beginEditing(e,t))}},{key:"closeEditor",value:function(e,t,n){this.activeEditor?this.activeEditor.finishEditing(e,t,n):n&&n(!1)}},{key:"closeEditorAndSaveChanges",value:function(e){this.closeEditor(!1,e)}},{key:"closeEditorAndRestoreOriginalValue",value:function(e){return this.closeEditor(!0,e)}},{key:"moveSelectionAfterEnter",value:function(e){var t="function"==typeof this.priv.settings.enterMoves?this.priv.settings.enterMoves(event):this.priv.settings.enterMoves;e?this.selection.transformStart(-t.row,-t.col):this.selection.transformStart(t.row,t.col,!0)}},{key:"moveSelectionUp",value:function(e){e?this.selection.transformEnd(-1,0):this.selection.transformStart(-1,0)}},{key:"moveSelectionDown",value:function(e){e?this.selection.transformEnd(1,0):this.selection.transformStart(1,0)}},{key:"moveSelectionRight",value:function(e){e?this.selection.transformEnd(0,1):this.selection.transformStart(0,1)}},{key:"moveSelectionLeft",value:function(e){e?this.selection.transformEnd(0,-1):this.selection.transformStart(0,-1)}},{key:"onAfterDocumentKeyDown",value:function(e){if(this.instance.isListening()&&(this.instance.runHooks("beforeKeyDown",e),!this.destroyed&&229!==e.keyCode&&!(0,u.isImmediatePropagationStopped)(e)&&(this.priv.lastKeyCode=e.keyCode,this.selection.isSelected()))){var t=(e.ctrlKey||e.metaKey)&&!e.altKey;if(!this.activeEditor||this.activeEditor.isWaiting()||(0,l.isMetaKey)(e.keyCode)||(0,l.isCtrlMetaKey)(e.keyCode)||t||this.isEditorOpened()){var n,r=e.shiftKey,o=r?this.selection.setRangeEnd:this.selection.setRangeStart;switch(e.keyCode){case l.KEY_CODES.A:!this.isEditorOpened()&&t&&(this.instance.selectAll(),e.preventDefault(),(0,u.stopPropagation)(e));break;case l.KEY_CODES.ARROW_UP:this.isEditorOpened()&&!this.activeEditor.isWaiting()&&this.closeEditorAndSaveChanges(t),this.moveSelectionUp(r),e.preventDefault(),(0,u.stopPropagation)(e);break;case l.KEY_CODES.ARROW_DOWN:this.isEditorOpened()&&!this.activeEditor.isWaiting()&&this.closeEditorAndSaveChanges(t),this.moveSelectionDown(r),e.preventDefault(),(0,u.stopPropagation)(e);break;case l.KEY_CODES.ARROW_RIGHT:this.isEditorOpened()&&!this.activeEditor.isWaiting()&&this.closeEditorAndSaveChanges(t),this.moveSelectionRight(r),e.preventDefault(),(0,u.stopPropagation)(e);break;case l.KEY_CODES.ARROW_LEFT:this.isEditorOpened()&&!this.activeEditor.isWaiting()&&this.closeEditorAndSaveChanges(t),this.moveSelectionLeft(r),e.preventDefault(),(0,u.stopPropagation)(e);break;case l.KEY_CODES.TAB:n="function"==typeof this.priv.settings.tabMoves?this.priv.settings.tabMoves(e):this.priv.settings.tabMoves,r?this.selection.transformStart(-n.row,-n.col):this.selection.transformStart(n.row,n.col,!0),e.preventDefault(),(0,u.stopPropagation)(e);break;case l.KEY_CODES.BACKSPACE:case l.KEY_CODES.DELETE:this.instance.emptySelectedCells(),this.prepareEditor(),e.preventDefault();break;case l.KEY_CODES.F2:this.activeEditor&&this.activeEditor.enableFullEditMode(),this.openEditor(null,e),e.preventDefault();break;case l.KEY_CODES.ENTER:this.isEditorOpened()?(this.activeEditor&&this.activeEditor.state!==d.EditorState.WAITING&&this.closeEditorAndSaveChanges(t),this.moveSelectionAfterEnter(r)):this.instance.getSettings().enterBeginsEditing?(this.activeEditor&&this.activeEditor.enableFullEditMode(),this.openEditor(null,e)):this.moveSelectionAfterEnter(r),e.preventDefault(),(0,u.stopImmediatePropagation)(e);break;case l.KEY_CODES.ESCAPE:this.isEditorOpened()&&(this.closeEditorAndRestoreOriginalValue(t),this.activeEditor.focus()),e.preventDefault();break;case l.KEY_CODES.HOME:e.ctrlKey||e.metaKey?o.call(this.selection,new s.CellCoords(0,this.selection.selectedRange.current().from.col)):o.call(this.selection,new s.CellCoords(this.selection.selectedRange.current().from.row,0)),e.preventDefault(),(0,u.stopPropagation)(e);break;case l.KEY_CODES.END:e.ctrlKey||e.metaKey?o.call(this.selection,new s.CellCoords(this.instance.countRows()-1,this.selection.selectedRange.current().from.col)):o.call(this.selection,new s.CellCoords(this.selection.selectedRange.current().from.row,this.instance.countCols()-1)),e.preventDefault(),(0,u.stopPropagation)(e);break;case l.KEY_CODES.PAGE_UP:this.selection.transformStart(-this.instance.countVisibleRows(),0),e.preventDefault(),(0,u.stopPropagation)(e);break;case l.KEY_CODES.PAGE_DOWN:this.selection.transformStart(this.instance.countVisibleRows(),0),e.preventDefault(),(0,u.stopPropagation)(e)}}else this.openEditor("",e)}}},{key:"onCellDblClick",value:function(e,t,n){"TD"===n.nodeName&&(this.activeEditor&&this.activeEditor.enableFullEditMode(),this.openEditor(null,e))}},{key:"destroy",value:function(){this.destroyed=!0,this.eventManager.destroy()}}]),o}(),v=new WeakMap;f.getInstance=function(e,t,n,r){var o=v.get(e);return o||(o=new f(e,t,n,r),v.set(e,o)),o};var o=f;t.default=o},function(e,t,n){"use strict";var r=n(22),o=n(90),i=n(100),a=o(6),s="findIndex",l=!0;s in[]&&Array(1)[s](function(){l=!1}),r({target:"Array",proto:!0,forced:l},{findIndex:function(e,t){return a(this,e,1<arguments.length?t:void 0)}}),i(s)},function(e,t,n){"use strict";var r=n(0);n(16),n(10),n(14),n(24),n(17),t.__esModule=!0,t.default=void 0;var a=r(n(18)),o=r(n(1)),i=r(n(2)),d=n(5),s=r(n(23)),f=n(33),l=r(n(25)),u=n(344),v=new WeakMap,c=function(){function t(e){(0,o.default)(this,t),this.instance=e,this.eventManager=new s.default(e),this.settings=e.getSettings(),this.THEAD=void 0,this.TBODY=void 0,this.wt=void 0,this.activeWt=void 0,v.set(this,{selectionMouseDown:!1,mouseDown:void 0,table:void 0,lastWidth:0,lastHeight:0}),this.createElements(),this.registerEvents(),this.initializeWalkontable()}return(0,i.default)(t,[{key:"render",value:function(){this.wt.draw(!this.instance.forceFullRender),this.instance.forceFullRender=!1,this.instance.renderCall=!1}},{key:"getCellAtCoords",value:function(e,t){var n=this.wt.getCell(e,t);return n<0?null:n}},{key:"scrollViewport",value:function(e,t,n,r,o){return this.wt.scrollViewport(e,t,n,r,o)}},{key:"scrollViewportHorizontally",value:function(e,t,n){return this.wt.scrollViewportHorizontally(e,t,n)}},{key:"scrollViewportVertically",value:function(e,t,n){return this.wt.scrollViewportVertically(e,t,n)}},{key:"updateCellHeader",value:function(e,t,n){var r=t,o=this.wt.wtOverlays.getParentOverlay(e)||this.wt;e.parentNode&&((0,d.hasClass)(e,"colHeader")?r=o.wtTable.columnFilter.sourceToRendered(t):(0,d.hasClass)(e,"rowHeader")&&(r=o.wtTable.rowFilter.sourceToRendered(t))),-1<r?(0,d.fastInnerHTML)(e,n(t)):((0,d.fastInnerText)(e,String.fromCharCode(160)),(0,d.addClass)(e,"cornerHeader"))}},{key:"createElements",value:function(){var e=v.get(this),t=this.instance,n=t.rootElement,r=t.rootDocument,o=n.getAttribute("style");o&&n.setAttribute("data-originalstyle",o),(0,d.addClass)(n,"handsontable"),e.table=r.createElement("TABLE"),(0,d.addClass)(e.table,"htCore"),this.instance.getSettings().tableClassName&&(0,d.addClass)(e.table,this.instance.getSettings().tableClassName),this.THEAD=r.createElement("THEAD"),e.table.appendChild(this.THEAD),this.TBODY=r.createElement("TBODY"),e.table.appendChild(this.TBODY),this.instance.table=e.table,this.instance.container.insertBefore(e.table,this.instance.container.firstChild)}},{key:"registerEvents",value:function(){var s=this,l=v.get(this),e=this.instance,u=e.rootElement,c=e.rootDocument,h=c.documentElement;this.eventManager.addEventListener(u,"mousedown",function(e){if(l.selectionMouseDown=!0,!s.isTextSelectionAllowed(e.target)){var t=s.instance.rootWindow;(0,d.clearTextSelection)(t),e.preventDefault(),t.focus()}}),this.eventManager.addEventListener(u,"mouseup",function(){l.selectionMouseDown=!1}),this.eventManager.addEventListener(u,"mousemove",function(e){l.selectionMouseDown&&!s.isTextSelectionAllowed(e.target)&&(s.settings.fragmentSelection&&(0,d.clearTextSelection)(s.instance.rootWindow),e.preventDefault())}),this.eventManager.addEventListener(h,"keyup",function(e){s.instance.selection.isInProgress()&&!e.shiftKey&&s.instance.selection.finish()}),this.eventManager.addEventListener(h,"mouseup",function(e){s.instance.selection.isInProgress()&&(0,f.isLeftClick)(e)&&s.instance.selection.finish(),l.mouseDown=!1,!(0,d.isOutsideInput)(c.activeElement)&&(s.instance.selection.isSelected()||(0,f.isRightClick)(e))||s.instance.unlisten()}),this.eventManager.addEventListener(h,"contextmenu",function(e){s.instance.selection.isInProgress()&&(0,f.isRightClick)(e)&&(s.instance.selection.finish(),l.mouseDown=!1)}),this.eventManager.addEventListener(h,"touchend",function(){s.instance.selection.isInProgress()&&s.instance.selection.finish(),l.mouseDown=!1}),this.eventManager.addEventListener(h,"mousedown",function(e){var t=e.target,n=e.x||e.clientX,r=e.y||e.clientY,o=e.target;if(!l.mouseDown&&u&&s.instance.view){var i=s.instance.view.wt.wtTable.holder;if(o===i){var a=(0,d.getScrollbarWidth)(c);if(c.elementFromPoint(n+a,r)!==i||c.elementFromPoint(n,r+a)!==i)return}else for(;o!==h;){if(null===o){if(e.isTargetWebComponent)break;return}if(o===u)return;o=o.parentNode}("function"==typeof s.settings.outsideClickDeselects?s.settings.outsideClickDeselects(t):s.settings.outsideClickDeselects)?s.instance.deselectCell():s.instance.destroyEditor(!1,!1)}}),this.eventManager.addEventListener(l.table,"selectstart",function(e){s.settings.fragmentSelection||(0,d.isInput)(e.target)||e.preventDefault()})}},{key:"initializeWalkontable",value:function(){var a=this,i=v.get(this),e={debug:function(){return a.settings.debug},externalRowCalculator:this.instance.getPlugin("autoRowSize")&&this.instance.getPlugin("autoRowSize").isEnabled(),table:i.table,preventOverflow:function(){return a.settings.preventOverflow},stretchH:function(){return a.settings.stretchH},data:this.instance.getDataAtCell,totalRows:function(){return a.instance.countRows()},totalColumns:function(){return a.instance.countCols()},fixedColumnsLeft:function(){return a.settings.fixedColumnsLeft},fixedRowsTop:function(){return a.settings.fixedRowsTop},fixedRowsBottom:function(){return a.settings.fixedRowsBottom},minSpareRows:function(){return a.settings.minSpareRows},renderAllRows:this.settings.renderAllRows,rowHeaders:function(){var e=[];return a.instance.hasRowHeaders()&&e.push(function(e,t){return a.appendRowHeader(e,t)}),a.instance.runHooks("afterGetRowHeaderRenderers",e),e},columnHeaders:function(){var e=[];return a.instance.hasColHeaders()&&e.push(function(e,t){a.appendColHeader(e,t)}),a.instance.runHooks("afterGetColumnHeaderRenderers",e),e},columnWidth:this.instance.getColWidth,rowHeight:this.instance.getRowHeight,cellRenderer:function(e,t,n){var r=a.instance.getCellMeta(e,t),o=a.instance.colToProp(t),i=a.instance.getDataAtRowProp(e,o);a.instance.hasHook("beforeValueRender")&&(i=a.instance.runHooks("beforeValueRender",i,r)),a.instance.runHooks("beforeRenderer",n,e,t,o,i,r),a.instance.getCellRenderer(r)(a.instance,n,e,t,o,i,r),a.instance.runHooks("afterRenderer",n,e,t,o,i,r)},selections:this.instance.selection.highlight,hideBorderOnMouseDownOver:function(){return a.settings.fragmentSelection},onWindowResize:function(){a.instance&&!a.instance.isDestroyed&&a.instance.refreshDimensions()},onCellMouseDown:function(e,t,n,r){var o={row:!1,column:!1,cell:!1};a.instance.listen(),a.activeWt=r,i.mouseDown=!0,a.instance.runHooks("beforeOnCellMouseDown",e,t,n,o),(0,f.isImmediatePropagationStopped)(e)||((0,u.handleMouseEvent)(e,{coords:t,selection:a.instance.selection,controller:o}),a.instance.runHooks("afterOnCellMouseDown",e,t,n),a.activeWt=a.wt)},onCellContextMenu:function(e,t,n,r){a.activeWt=r,i.mouseDown=!1,a.instance.selection.isInProgress()&&a.instance.selection.finish(),a.instance.runHooks("beforeOnCellContextMenu",e,t,n),(0,f.isImmediatePropagationStopped)(e)||(a.instance.runHooks("afterOnCellContextMenu",e,t,n),a.activeWt=a.wt)},onCellMouseOut:function(e,t,n,r){a.activeWt=r,a.instance.runHooks("beforeOnCellMouseOut",e,t,n),(0,f.isImmediatePropagationStopped)(e)||(a.instance.runHooks("afterOnCellMouseOut",e,t,n),a.activeWt=a.wt)},onCellMouseOver:function(e,t,n,r){var o={row:!1,column:!1,cell:!1};a.activeWt=r,a.instance.runHooks("beforeOnCellMouseOver",e,t,n,o),(0,f.isImmediatePropagationStopped)(e)||(i.mouseDown&&(0,u.handleMouseEvent)(e,{coords:t,selection:a.instance.selection,controller:o}),a.instance.runHooks("afterOnCellMouseOver",e,t,n),a.activeWt=a.wt)},onCellMouseUp:function(e,t,n,r){a.activeWt=r,a.instance.runHooks("beforeOnCellMouseUp",e,t,n),a.instance.runHooks("afterOnCellMouseUp",e,t,n),a.activeWt=a.wt},onCellCornerMouseDown:function(e){e.preventDefault(),a.instance.runHooks("afterOnCellCornerMouseDown",e)},onCellCornerDblClick:function(e){e.preventDefault(),a.instance.runHooks("afterOnCellCornerDblClick",e)},beforeDraw:function(e,t){return a.beforeRender(e,t)},onDraw:function(e){return a.onDraw(e)},onScrollVertically:function(){return a.instance.runHooks("afterScrollVertically")},onScrollHorizontally:function(){return a.instance.runHooks("afterScrollHorizontally")},onBeforeRemoveCellClassNames:function(){return a.instance.runHooks("beforeRemoveCellClassNames")},onAfterDrawSelection:function(e,t,n,r){return a.instance.runHooks("afterDrawSelection",e,t,n,r)},onBeforeDrawBorders:function(e,t){return a.instance.runHooks("beforeDrawBorders",e,t)},onBeforeTouchScroll:function(){return a.instance.runHooks("beforeTouchScroll")},onAfterMomentumScroll:function(){return a.instance.runHooks("afterMomentumScroll")},onBeforeStretchingColumnWidth:function(e,t){return a.instance.runHooks("beforeStretchingColumnWidth",e,t)},onModifyRowHeaderWidth:function(e){return a.instance.runHooks("modifyRowHeaderWidth",e)},onModifyGetCellCoords:function(e,t,n){return a.instance.runHooks("modifyGetCellCoords",e,t,n)},viewportRowCalculatorOverride:function(e){var t=a.instance.countRows(),n=a.settings.viewportRowRenderingOffset;if("auto"===n&&a.settings.fixedRowsTop&&(n=10),"number"==typeof n&&(e.startRow=Math.max(e.startRow-n,0),e.endRow=Math.min(e.endRow+n,t-1)),"auto"===n){var r=e.startRow+e.endRow-e.startRow,o=Math.ceil(r/t*12);e.startRow=Math.max(e.startRow-o,0),e.endRow=Math.min(e.endRow+o,t-1)}a.instance.runHooks("afterViewportRowCalculatorOverride",e)},viewportColumnCalculatorOverride:function(e){var t=a.instance.countCols(),n=a.settings.viewportColumnRenderingOffset;if("auto"===n&&a.settings.fixedColumnsLeft&&(n=10),"number"==typeof n&&(e.startColumn=Math.max(e.startColumn-n,0),e.endColumn=Math.min(e.endColumn+n,t-1)),"auto"===n){var r=e.startColumn+e.endColumn-e.startColumn,o=Math.ceil(r/t*12);e.startRow=Math.max(e.startColumn-o,0),e.endColumn=Math.min(e.endColumn+o,t-1)}a.instance.runHooks("afterViewportColumnCalculatorOverride",e)},rowHeaderWidth:function(){return a.settings.rowHeaderWidth},columnHeaderHeight:function(){var e=a.instance.runHooks("modifyColumnHeaderHeight");return a.settings.columnHeaderHeight||e}};this.instance.runHooks("beforeInitWalkontable",e),this.wt=new l.default(e),this.activeWt=this.wt;var t=this.wt.wtTable.spreader,n=this.instance.rootElement.getBoundingClientRect(),r=n.width,o=n.height;this.setLastSize(r,o),this.eventManager.addEventListener(t,"mousedown",function(e){e.target===t&&3===e.which&&(0,f.stopPropagation)(e)}),this.eventManager.addEventListener(t,"contextmenu",function(e){e.target===t&&3===e.which&&(0,f.stopPropagation)(e)}),this.eventManager.addEventListener(this.instance.rootDocument.documentElement,"click",function(){a.settings.observeDOMVisibility&&a.wt.drawInterrupted&&(a.instance.forceFullRender=!0,a.render())})}},{key:"isTextSelectionAllowed",value:function(e){if((0,d.isInput)(e))return!0;var t=(0,d.isChildOf)(e,this.instance.view.wt.wtTable.spreader);return!(!0!==this.settings.fragmentSelection||!t)||(!("cell"!==this.settings.fragmentSelection||!this.isSelectedOnlyCell()||!t)||!(this.settings.fragmentSelection||!this.isCellEdited()||!this.isSelectedOnlyCell()))}},{key:"isMouseDown",value:function(){return v.get(this).mouseDown}},{key:"isSelectedOnlyCell",value:function(){var e=this.instance.getSelectedLast()||[],t=(0,a.default)(e,4),n=t[0],r=t[1],o=t[2],i=t[3];return void 0!==n&&n===o&&r===i}},{key:"isCellEdited",value:function(){var e=this.instance.getActiveEditor();return e&&e.isOpened()}},{key:"beforeRender",value:function(e,t){e&&this.instance.runHooks("beforeRender",this.instance.forceFullRender,t)}},{key:"onDraw",value:function(e){e&&this.instance.runHooks("afterRender",this.instance.forceFullRender)}},{key:"appendRowHeader",value:function(e,t){if(t.firstChild){var n=t.firstChild;if(!(0,d.hasClass)(n,"relative"))return(0,d.empty)(t),void this.appendRowHeader(e,t);this.updateCellHeader(n.querySelector(".rowHeader"),e,this.instance.getRowHeader)}else{var r=this.instance,o=r.rootDocument,i=r.getRowHeader,a=o.createElement("div"),s=o.createElement("span");a.className="relative",s.className="rowHeader",this.updateCellHeader(s,e,i),a.appendChild(s),t.appendChild(a)}this.instance.runHooks("afterGetRowHeader",e,t)}},{key:"appendColHeader",value:function(e,t){if(t.firstChild){var n=t.firstChild;(0,d.hasClass)(n,"relative")?this.updateCellHeader(n.querySelector(".colHeader"),e,this.instance.getColHeader):((0,d.empty)(t),this.appendColHeader(e,t))}else{var r=this.instance.rootDocument,o=r.createElement("div"),i=r.createElement("span");o.className="relative",i.className="colHeader",this.updateCellHeader(i,e,this.instance.getColHeader),o.appendChild(i),t.appendChild(o)}this.instance.runHooks("afterGetColHeader",e,t)}},{key:"maximumVisibleElementWidth",value:function(e){var t=this.wt.wtViewport.getWorkspaceWidth()-e;return 0<t?t:0}},{key:"maximumVisibleElementHeight",value:function(e){var t=this.wt.wtViewport.getWorkspaceHeight()-e;return 0<t?t:0}},{key:"setLastSize",value:function(e,t){var n=v.get(this),r=[e,t];n.lastWidth=r[0],n.lastHeight=r[1]}},{key:"getLastSize",value:function(){var e=v.get(this);return{width:e.lastWidth,height:e.lastHeight}}},{key:"mainViewIsActive",value:function(){return this.wt===this.activeWt}},{key:"destroy",value:function(){this.wt.destroy(),this.eventManager.destroy()}}]),t}();t.default=c},function(e,t,n){"use strict";var r=n(0);n(40),n(76),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(4),s=n(3),c=n(15),l=function(){function n(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];(0,o.default)(this,n),this.hot=e,this.data=t,this.dataType="array",this.colToProp=function(){},this.propToCol=function(){}}return(0,i.default)(n,[{key:"getData",value:function(e){var t=0<arguments.length&&void 0!==e&&e,n=this.data;return t&&(n=this.getByRange({row:0,col:0},{row:Math.max(this.countRows()-1,0),col:Math.max(this.countColumns()-1,0)},!0)),n}},{key:"setData",value:function(e){this.data=e}},{key:"getAtColumn",value:function(r){var o=this,i=[];return(0,s.arrayEach)(this.data,function(e){var t,n=o.colToProp(r);t="string"==typeof n?(0,a.getProperty)(e,n):"function"==typeof n?n(e):e[n],i.push(t)}),i}},{key:"getAtRow",value:function(e){return this.data[e]}},{key:"getAtCell",value:function(e,t){var n=null,r=this.hot.runHooks("modifyRowData",e),o=isNaN(r)?r:this.data[e];if(o){var i=this.colToProp(t);n="string"==typeof i?(0,a.getProperty)(o,i):"function"==typeof i?i(this.data.slice(e,e+1)[0]):o[i]}return n}},{key:"getByRange",value:function(e,t,n){var o=this,i=2<arguments.length&&void 0!==n&&n,r=Math.min(e.row,t.row),a=Math.min(e.col,t.col),s=Math.max(e.row,t.row),l=Math.max(e.col,t.col),u=[];return(0,c.rangeEach)(r,s,function(e){var n,r=o.getAtRow(e);"array"===o.dataType?n=r.slice(a,l+1):"object"===o.dataType&&(n=i?[]:{},(0,c.rangeEach)(a,l,function(e){var t=o.colToProp(e);i?n.push(r[t]):n[t]=r[t]})),u.push(n)}),u}},{key:"countRows",value:function(){return Array.isArray(this.data)?this.data.length:0}},{key:"countColumns",value:function(){var e=0;return Array.isArray(this.data)&&("array"===this.dataType?e=this.data[0].length:"object"===this.dataType&&(e=Object.keys(this.data[0]).length)),e}},{key:"destroy",value:function(){this.data=null,this.hot=null}}]),n}();t.default=l},function(e,t,n){var s=n(89),l=n(119),u=n(94);e.exports=function(e){var t=s(e),n=l.f;if(n)for(var r,o=n(e),i=u.f,a=0;o.length>a;)i.call(e,r=o[a++])&&t.push(r);return t}},function(e,t,n){"use strict";var r=n(0),o=n(9);t.__esModule=!0,t.default=void 0;var i,a=r(n(71)),s=o(n(11)),l=(i={languageCode:"en-US"},(0,a.default)(i,s.CONTEXTMENU_ITEMS_NO_ITEMS,"No available options"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_ROW_ABOVE,"Insert row above"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_ROW_BELOW,"Insert row below"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_INSERT_LEFT,"Insert column left"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_INSERT_RIGHT,"Insert column right"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_REMOVE_ROW,["Remove row","Remove rows"]),(0,a.default)(i,s.CONTEXTMENU_ITEMS_REMOVE_COLUMN,["Remove column","Remove columns"]),(0,a.default)(i,s.CONTEXTMENU_ITEMS_UNDO,"Undo"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_REDO,"Redo"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_READ_ONLY,"Read only"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_CLEAR_COLUMN,"Clear column"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_ALIGNMENT,"Alignment"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT,"Left"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER,"Center"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT,"Right"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY,"Justify"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_ALIGNMENT_TOP,"Top"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE,"Middle"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM,"Bottom"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_FREEZE_COLUMN,"Freeze column"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN,"Unfreeze column"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_BORDERS,"Borders"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_BORDERS_TOP,"Top"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_BORDERS_RIGHT,"Right"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_BORDERS_BOTTOM,"Bottom"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_BORDERS_LEFT,"Left"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_REMOVE_BORDERS,"Remove border(s)"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_ADD_COMMENT,"Add comment"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_EDIT_COMMENT,"Edit comment"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_REMOVE_COMMENT,"Delete comment"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT,"Read-only comment"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_MERGE_CELLS,"Merge cells"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_UNMERGE_CELLS,"Unmerge cells"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_COPY,"Copy"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_CUT,"Cut"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD,"Insert child row"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD,"Detach from parent"),(0,a.default)(i,s.CONTEXTMENU_ITEMS_HIDE_COLUMN,["Hide column","Hide columns"]),(0,a.default)(i,s.CONTEXTMENU_ITEMS_SHOW_COLUMN,["Show column","Show columns"]),(0,a.default)(i,s.CONTEXTMENU_ITEMS_HIDE_ROW,["Hide row","Hide rows"]),(0,a.default)(i,s.CONTEXTMENU_ITEMS_SHOW_ROW,["Show row","Show rows"]),(0,a.default)(i,s.FILTERS_CONDITIONS_NONE,"None"),(0,a.default)(i,s.FILTERS_CONDITIONS_EMPTY,"Is empty"),(0,a.default)(i,s.FILTERS_CONDITIONS_NOT_EMPTY,"Is not empty"),(0,a.default)(i,s.FILTERS_CONDITIONS_EQUAL,"Is equal to"),(0,a.default)(i,s.FILTERS_CONDITIONS_NOT_EQUAL,"Is not equal to"),(0,a.default)(i,s.FILTERS_CONDITIONS_BEGINS_WITH,"Begins with"),(0,a.default)(i,s.FILTERS_CONDITIONS_ENDS_WITH,"Ends with"),(0,a.default)(i,s.FILTERS_CONDITIONS_CONTAINS,"Contains"),(0,a.default)(i,s.FILTERS_CONDITIONS_NOT_CONTAIN,"Does not contain"),(0,a.default)(i,s.FILTERS_CONDITIONS_GREATER_THAN,"Greater than"),(0,a.default)(i,s.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL,"Greater than or equal to"),(0,a.default)(i,s.FILTERS_CONDITIONS_LESS_THAN,"Less than"),(0,a.default)(i,s.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL,"Less than or equal to"),(0,a.default)(i,s.FILTERS_CONDITIONS_BETWEEN,"Is between"),(0,a.default)(i,s.FILTERS_CONDITIONS_NOT_BETWEEN,"Is not between"),(0,a.default)(i,s.FILTERS_CONDITIONS_AFTER,"After"),(0,a.default)(i,s.FILTERS_CONDITIONS_BEFORE,"Before"),(0,a.default)(i,s.FILTERS_CONDITIONS_TODAY,"Today"),(0,a.default)(i,s.FILTERS_CONDITIONS_TOMORROW,"Tomorrow"),(0,a.default)(i,s.FILTERS_CONDITIONS_YESTERDAY,"Yesterday"),(0,a.default)(i,s.FILTERS_VALUES_BLANK_CELLS,"Blank cells"),(0,a.default)(i,s.FILTERS_DIVS_FILTER_BY_CONDITION,"Filter by condition"),(0,a.default)(i,s.FILTERS_DIVS_FILTER_BY_VALUE,"Filter by value"),(0,a.default)(i,s.FILTERS_LABELS_CONJUNCTION,"And"),(0,a.default)(i,s.FILTERS_LABELS_DISJUNCTION,"Or"),(0,a.default)(i,s.FILTERS_BUTTONS_SELECT_ALL,"Select all"),(0,a.default)(i,s.FILTERS_BUTTONS_CLEAR,"Clear"),(0,a.default)(i,s.FILTERS_BUTTONS_OK,"OK"),(0,a.default)(i,s.FILTERS_BUTTONS_CANCEL,"Cancel"),(0,a.default)(i,s.FILTERS_BUTTONS_PLACEHOLDER_SEARCH,"Search"),(0,a.default)(i,s.FILTERS_BUTTONS_PLACEHOLDER_VALUE,"Value"),(0,a.default)(i,s.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE,"Second value"),i);t.default=l},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.registerPhraseFormatter=t.register=u,t.getPhraseFormatters=t.getAll=function(){return l()};var o=r(n(78)),i=r(n(453)),a=(0,o.default)("phraseFormatters"),s=a.register,l=a.getValues;function u(e,t){s(e,t)}u("pluralize",i.default)},function(e,t,n){"use strict";n(80),n(81),t.__esModule=!0,t.default=function(e,t){if(Array.isArray(e)&&Number.isInteger(t))return e[t];return e}},function(e,t,n){var r=n(22),o=n(455),i=n(100);r({target:"Array",proto:!0},{fill:o}),i("fill")},function(e,t,n){"use strict";var u=n(60),c=n(118),h=n(50);e.exports=function(e,t,n){for(var r=u(this),o=h(r.length),i=arguments.length,a=c(1<i?t:void 0,o),s=2<i?n:void 0,l=void 0===s?o:c(s,o);a<l;)r[a++]=e;return r}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.createHighlight=function(e,t){return f(e)(t)};var o=r(n(78)),i=r(n(457)),a=r(n(458)),s=r(n(459)),l=r(n(460)),u=r(n(461)),c=r(n(462)),h=(0,o.default)("highlight/types"),d=h.register,f=h.getItem;d("active-header",i.default),d("area",a.default),d("cell",s.default),d("custom-selection",l.default),d("fill",u.default),d("header",c.default)},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(25);function o(e){var t=e.activeHeaderClassName;return new r.Selection({highlightHeaderClassName:t})}t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(25);function o(e){var t=e.layerLevel,n=e.areaCornerVisible;return new r.Selection({className:"area",markIntersections:!0,layerLevel:Math.min(t,7),border:{width:1,color:"#4b89ff",cornerVisible:n}})}t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(25);function o(e){var t=e.cellCornerVisible;return new r.Selection({className:"current",border:{width:2,color:"#4b89ff",cornerVisible:t}})}t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(25);function o(e){var t=e.border,n=e.cellRange;return new r.Selection(t,n)}t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(25);function o(){return new r.Selection({className:"fill",border:{width:1,color:"#ff0000"}})}t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var o=n(25);function r(e){var t=e.headerClassName,n=e.rowClassName,r=e.columnClassName;return new o.Selection({className:"highlight",highlightHeaderClassName:t,highlightRowClassName:n,highlightColumnClassName:r})}t.default=r},function(e,t,n){"use strict";var r=n(9),o=n(0);n(19),n(56),n(31),n(16),n(80),n(81),n(10),n(82),n(38),n(14),n(17),t.__esModule=!0,t.default=void 0;var h=o(n(18)),i=o(n(66)),a=o(n(1)),s=o(n(2)),l=r(n(352)),u=o(n(464)),d=n(25),c=n(136),f=n(4),v=n(27),g=n(3),p=o(n(58)),m=o(n(465)),y=n(137),w=n(67);function C(){var e=(0,i.default)(["Unsupported format of the selection ranges was passed. To select cells pass \n the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd, columnEnd/columnPropEnd]]) \n or as an array of CellRange objects."]);return C=function(){return e},e}var E=function(){function n(e,t){var r=this;(0,a.default)(this,n),this.settings=e,this.tableProps=t,this.inProgress=!1,this.selectedByCorner=!1,this.selectedByRowHeader=new Set,this.selectedByColumnHeader=new Set,this.selectedRange=new u.default,this.highlight=new l.default({headerClassName:e.currentHeaderClassName,activeHeaderClassName:e.activeHeaderClassName,rowClassName:e.currentRowClassName,columnClassName:e.currentColClassName,disableHighlight:this.settings.disableVisualSelection,cellCornerVisible:function(){return r.isCellCornerVisible.apply(r,arguments)},areaCornerVisible:function(){return r.isAreaCornerVisible.apply(r,arguments)}}),this.transformation=new m.default(this.selectedRange,{countRows:function(){return r.tableProps.countRows()},countCols:function(){return r.tableProps.countCols()},fixedRowsBottom:function(){return e.fixedRowsBottom},minSpareRows:function(){return e.minSpareRows},minSpareCols:function(){return e.minSpareCols},autoWrapRow:function(){return e.autoWrapRow},autoWrapCol:function(){return e.autoWrapCol}}),this.transformation.addLocalHook("beforeTransformStart",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks.apply(r,["beforeModifyTransformStart"].concat(t))}),this.transformation.addLocalHook("afterTransformStart",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks.apply(r,["afterModifyTransformStart"].concat(t))}),this.transformation.addLocalHook("beforeTransformEnd",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks.apply(r,["beforeModifyTransformEnd"].concat(t))}),this.transformation.addLocalHook("afterTransformEnd",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks.apply(r,["afterModifyTransformEnd"].concat(t))}),this.transformation.addLocalHook("insertRowRequire",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks.apply(r,["insertRowRequire"].concat(t))}),this.transformation.addLocalHook("insertColRequire",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks.apply(r,["insertColRequire"].concat(t))})}return(0,s.default)(n,[{key:"getSelectedRange",value:function(){return this.selectedRange}},{key:"begin",value:function(){this.inProgress=!0}},{key:"finish",value:function(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1}},{key:"isInProgress",value:function(){return this.inProgress}},{key:"setRangeStart",value:function(e,t,n){var r=2<arguments.length&&void 0!==n&&n,o="multiple"===this.settings.selectionMode,i=(0,v.isUndefined)(t)?(0,c.isPressedCtrlKey)():t,a=e.row<0,s=e.col<0,l=a&&s;a&&(e.row=0),s&&(e.col=0),this.selectedByCorner=l,this.runLocalHooks("beforeSetRangeStart".concat(r?"Only":""),e),(!o||o&&!i&&(0,v.isUndefined)(t))&&this.selectedRange.clear(),this.selectedRange.add(e),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),!l&&s&&this.selectedByRowHeader.add(this.getLayerLevel()),!l&&a&&this.selectedByColumnHeader.add(this.getLayerLevel()),r||this.setRangeEnd(e)}},{key:"setRangeStartOnly",value:function(e,t){this.setRangeStart(e,t,!0)}},{key:"setRangeEnd",value:function(e){if(!this.selectedRange.isEmpty()){this.runLocalHooks("beforeSetRangeEnd",e),this.begin();var t=this.selectedRange.current();"single"!==this.settings.selectionMode&&t.setTo(new d.CellCoords(e.row,e.col)),this.highlight.getCell().clear(),this.highlight.isEnabledFor(l.CELL_TYPE)&&this.highlight.getCell().add(this.selectedRange.current().highlight);var n=this.getLayerLevel();n<this.highlight.layerLevel&&((0,g.arrayEach)(this.highlight.getAreas(),function(e){e.clear()}),(0,g.arrayEach)(this.highlight.getHeaders(),function(e){e.clear()}),(0,g.arrayEach)(this.highlight.getActiveHeaders(),function(e){e.clear()})),this.highlight.useLayerLevel(n);var r=this.highlight.createOrGetArea(),o=this.highlight.createOrGetHeader(),i=this.highlight.createOrGetActiveHeader();if(r.clear(),o.clear(),i.clear(),this.highlight.isEnabledFor(l.AREA_TYPE)&&(this.isMultiple()||1<=n)&&(r.add(t.from).add(t.to),1===n&&(this.highlight.useLayerLevel(n-1).createOrGetArea().add(this.selectedRange.previous().from),this.highlight.useLayerLevel(n))),this.highlight.isEnabledFor(l.HEADER_TYPE)&&("single"===this.settings.selectionMode?o.add(t.highlight):o.add(t.from).add(t.to)),this.isSelectedByRowHeader())this.tableProps.countCols()===t.getWidth()&&i.add(new d.CellCoords(t.from.row,-1)).add(new d.CellCoords(t.to.row,-1));if(this.isSelectedByColumnHeader())this.tableProps.countRows()===t.getHeight()&&i.add(new d.CellCoords(-1,t.from.col)).add(new d.CellCoords(-1,t.to.col));this.runLocalHooks("afterSetRangeEnd",e)}}},{key:"isMultiple",value:function(){var e=(0,f.createObjectPropListener)(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}},{key:"transformStart",value:function(e,t,n){this.setRangeStart(this.transformation.transformStart(e,t,n))}},{key:"transformEnd",value:function(e,t){this.setRangeEnd(this.transformation.transformEnd(e,t))}},{key:"getLayerLevel",value:function(){return this.selectedRange.size()-1}},{key:"isSelected",value:function(){return!this.selectedRange.isEmpty()}},{key:"isSelectedByRowHeader",value:function(e){var t=0<arguments.length&&void 0!==e?e:this.getLayerLevel();return-1===t?0<this.selectedByRowHeader.size:this.selectedByRowHeader.has(t)}},{key:"isSelectedByColumnHeader",value:function(e){var t=0<arguments.length&&void 0!==e?e:this.getLayerLevel();return-1===t?0<this.selectedByColumnHeader.size:this.selectedByColumnHeader.has(t)}},{key:"isSelectedByAnyHeader",value:function(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)}},{key:"isSelectedByCorner",value:function(){return this.selectedByCorner}},{key:"inInSelection",value:function(e){return this.selectedRange.includes(e)}},{key:"isCellCornerVisible",value:function(){return this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&!this.isMultiple()}},{key:"isAreaCornerVisible",value:function(e){return(!Number.isInteger(e)||e===this.getLayerLevel())&&(this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&this.isMultiple())}},{key:"clear",value:function(){this.selectedRange.clear(),this.highlight.clear()}},{key:"deselect",value:function(){this.isSelected()&&(this.inProgress=!1,this.clear(),this.runLocalHooks("afterDeselect"))}},{key:"selectAll",value:function(){this.clear(),this.setRangeStart(new d.CellCoords(-1,-1)),this.selectedByRowHeader.add(this.getLayerLevel()),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(new d.CellCoords(this.tableProps.countRows()-1,this.tableProps.countCols()-1))}},{key:"selectCells",value:function(e){var s=this,t=(0,y.detectSelectionType)(e);if(t===y.SELECTION_TYPE_EMPTY)return!1;if(t===y.SELECTION_TYPE_UNRECOGNIZED)throw new Error((0,w.toSingleLine)(C()));var l=(0,y.normalizeSelectionFactory)(t,{propToCol:function(e){return s.tableProps.propToCol(e)},keepDirection:!0}),u=this.tableProps.countRows(),c=this.tableProps.countCols(),n=!e.some(function(e){var t=l(e),n=(0,h.default)(t,4),r=n[0],o=n[1],i=n[2],a=n[3];return!((0,y.isValidCoord)(r,u)&&(0,y.isValidCoord)(o,c)&&(0,y.isValidCoord)(i,u)&&(0,y.isValidCoord)(a,c))});return n&&(this.clear(),(0,g.arrayEach)(e,function(e){var t=l(e),n=(0,h.default)(t,4),r=n[0],o=n[1],i=n[2],a=n[3];s.setRangeStartOnly(new d.CellCoords(r,o),!1),s.setRangeEnd(new d.CellCoords(i,a)),s.finish()})),n}},{key:"selectColumns",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:e,r="string"==typeof e?this.tableProps.propToCol(e):e,o="string"==typeof n?this.tableProps.propToCol(n):n,i=this.tableProps.countCols(),a=(0,y.isValidCoord)(r,i)&&(0,y.isValidCoord)(o,i);return a&&(this.setRangeStartOnly(new d.CellCoords(-1,r)),this.setRangeEnd(new d.CellCoords(this.tableProps.countRows()-1,o)),this.finish()),a}},{key:"selectRows",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:e,r=this.tableProps.countRows(),o=(0,y.isValidCoord)(e,r)&&(0,y.isValidCoord)(n,r);return o&&(this.setRangeStartOnly(new d.CellCoords(e,-1)),this.setRangeEnd(new d.CellCoords(n,this.tableProps.countCols()-1)),this.finish()),o}}]),n}();(0,f.mixin)(E,p.default);var S=E;t.default=S},function(e,t,n){"use strict";var r=n(0);n(133),n(134),n(353),n(31),n(16),n(10),n(38),n(14),n(17),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(25),s=function(){function e(){(0,o.default)(this,e),this.ranges=[]}return(0,i.default)(e,[{key:"isEmpty",value:function(){return 0===this.size()}},{key:"set",value:function(e){return this.clear(),this.ranges.push(new a.CellRange(e)),this}},{key:"add",value:function(e){return this.ranges.push(new a.CellRange(e)),this}},{key:"current",value:function(){return this.peekByIndex(0)}},{key:"previous",value:function(){return this.peekByIndex(-1)}},{key:"includes",value:function(t){return this.ranges.some(function(e){return e.includes(t)})}},{key:"clear",value:function(){return this.ranges.length=0,this}},{key:"size",value:function(){return this.ranges.length}},{key:"peekByIndex",value:function(e){var t,n=0<arguments.length&&void 0!==e?e:0,r=this.size()+n-1;return 0<=r&&(t=this.ranges[r]),t}},{key:Symbol.iterator,value:function(){return this.ranges[Symbol.iterator]()}}]),e}();t.default=s},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),g=n(25),a=n(4),s=r(n(58)),l=function(){function n(e,t){(0,o.default)(this,n),this.range=e,this.options=t}return(0,i.default)(n,[{key:"transformStart",value:function(e,t,n){var r=new g.CellCoords(e,t);this.runLocalHooks("beforeTransformStart",r);var o=this.options.countRows(),i=this.options.countCols(),a=this.options.fixedRowsBottom(),s=this.options.minSpareRows(),l=this.options.minSpareCols(),u=this.options.autoWrapRow(),c=this.options.autoWrapCol(),h=this.range.current().highlight;h.row+e>o-1?n&&0<s&&!(a&&h.row>=o-a-1)?(this.runLocalHooks("insertRowRequire",o),o=this.options.countRows()):c&&(r.row=1-o,r.col=h.col+r.col===i-1?1-i:1):c&&h.row+r.row<0&&0<=h.col+r.col&&(r.row=o-1,r.col=h.col+r.col===0?i-1:-1),h.col+r.col>i-1?n&&0<l?(this.runLocalHooks("insertColRequire",i),i=this.options.countCols()):u&&(r.row=h.row+r.row===o-1?1-o:1,r.col=1-i):u&&h.col+r.col<0&&0<=h.row+r.row&&(r.row=h.row+r.row===0?o-1:-1,r.col=i-1);var d=new g.CellCoords(h.row+r.row,h.col+r.col),f=0,v=0;return d.row<0?(f=-1,d.row=0):0<d.row&&d.row>=o&&(f=1,d.row=o-1),d.col<0?(v=-1,d.col=0):0<d.col&&d.col>=i&&(v=1,d.col=i-1),this.runLocalHooks("afterTransformStart",d,f,v),d}},{key:"transformEnd",value:function(e,t){var n=new g.CellCoords(e,t);this.runLocalHooks("beforeTransformEnd",n);var r=this.options.countRows(),o=this.options.countCols(),i=this.range.current(),a=new g.CellCoords(i.to.row+n.row,i.to.col+n.col),s=0,l=0;return a.row<0?(s=-1,a.row=0):0<a.row&&a.row>=r&&(s=1,a.row=r-1),a.col<0?(l=-1,a.col=0):0<a.col&&a.col>=o&&(l=1,a.col=o-1),this.runLocalHooks("afterTransformEnd",a,s,l),a}}]),n}();(0,a.mixin)(l,s.default);var u=l;t.default=u},function(e,t,n){"use strict";n(19),t.__esModule=!0,t.default=function(u){var e="undefined"!=typeof window&&window.jQuery;if(!e)return;e.fn.handsontable=function(e){var t,n=this.first(),r=n.data("handsontable");if("string"!=typeof e){var o=e||{};return r?r.updateSettings(o):(r=new u.Core(n[0],o),n.data("handsontable",r),r.init()),n}if(r){if(void 0===r[e])throw new Error("Handsontable do not provide action: ".concat(e));for(var i,a=arguments.length,s=new Array(1<a?a-1:0),l=1;l<a;l++)s[l-1]=arguments[l];t=(i=r[e]).call.apply(i,[r].concat(s)),"destroy"===e&&n.removeData()}return t}}},function(e,t,n){"use strict";var r=n(90),o=n(125),i=r(0),a=o("forEach");e.exports=a?function(e,t){return i(this,e,t)}:[].forEach},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0;var o=r(n(469));t.PersistentState=o.default;var i=r(n(471));t.AutoColumnSize=i.default;var a=r(n(472));t.AutoFill=a.default;var s=r(n(474));t.AutoRowSize=s.default;var l=r(n(357));t.ColumnSorting=l.default;var u=r(n(488));t.Comments=u.default;var c=r(n(492));t.ContextMenu=c.default;var h=r(n(507));t.CopyPaste=h.default;var d=r(n(515));t.CustomBorders=d.default;var f=r(n(524));t.DragToScroll=f.default;var v=r(n(525));t.ManualColumnFreeze=v.default;var g=r(n(529));t.ManualColumnMove=g.default;var p=r(n(534));t.ManualColumnResize=p.default;var m=r(n(535));t.ManualRowMove=m.default;var y=r(n(540));t.ManualRowResize=y.default;var w=r(n(541));t.MergeCells=w.default;var C=r(n(547));t.MultipleSelectionHandles=C.default;var E=r(n(548));t.ObserveChanges=E.default;var S=r(n(552));t.Search=S.default;var b=r(n(553));t.TouchScroll=b.default;var R=r(n(554));t.UndoRedo=R.default;var T=r(n(21));t.Base=T.default;var O=r(n(555));t.BindRowsWithHeaders=O.default;var k=r(n(560));t.CollapsibleColumns=k.default;var M=r(n(561));t.ColumnSummary=M.default;var N=r(n(565));t.DropdownMenu=N.default;var _=r(n(567));t.ExportFile=_.default;var A=r(n(572));t.MultiColumnSorting=A.default;var I=r(n(577));t.Filters=I.default;var D=r(n(610));t.Formulas=D.default;var L=r(n(623));t.GanttChart=L.default;var H=r(n(627));t.HeaderTooltips=H.default;var x=r(n(628));t.NestedHeaders=x.default;var P=r(n(631));t.NestedRows=P.default;var F=r(n(636));t.HiddenColumns=F.default;var B=r(n(640));t.HiddenRows=B.default;var W=r(n(644));t.TrimRows=W.default},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(13)),u=r(n(8)),c=r(n(21)),h=n(20),d=r(n(470)),f=r(n(43));f.default.getSingleton().register("persistentStateSave"),f.default.getSingleton().register("persistentStateLoad"),f.default.getSingleton().register("persistentStateReset");var v=function(e){function r(e){var t;return(0,o.default)(this,r),(t=(0,a.default)(this,(0,s.default)(r).call(this,e))).storage=void 0,t}return(0,u.default)(r,e),(0,i.default)(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().persistentState}},{key:"enablePlugin",value:function(){var n=this;this.enabled||(this.storage||(this.storage=new d.default(this.hot.rootElement.id,this.hot.rootWindow)),this.addHook("persistentStateSave",function(e,t){return n.saveValue(e,t)}),this.addHook("persistentStateLoad",function(e,t){return n.loadValue(e,t)}),this.addHook("persistentStateReset",function(){return n.resetValue()}),(0,l.default)((0,s.default)(r.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.storage=void 0,(0,l.default)((0,s.default)(r.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),(0,l.default)((0,s.default)(r.prototype),"updatePlugin",this).call(this)}},{key:"loadValue",value:function(e,t){t.value=this.storage.loadValue(e)}},{key:"saveValue",value:function(e,t){this.storage.saveValue(e,t)}},{key:"resetValue",value:function(e){void 0===e?this.storage.resetAll():this.storage.reset(e)}},{key:"destroy",value:function(){(0,l.default)((0,s.default)(r.prototype),"destroy",this).call(this)}}]),r}(c.default);(0,h.registerPlugin)("persistentState",v);var g=v;t.default=g},function(e,t,n){"use strict";var r=n(0);n(19),n(12),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(3),s=function(){function n(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:window;(0,o.default)(this,n),this.rootWindow=t,this.prefix=e,this.savedKeys=[],this.loadSavedKeys()}return(0,i.default)(n,[{key:"saveValue",value:function(e,t){this.rootWindow.localStorage.setItem("".concat(this.prefix,"_").concat(e),JSON.stringify(t)),-1===this.savedKeys.indexOf(e)&&(this.savedKeys.push(e),this.saveSavedKeys())}},{key:"loadValue",value:function(e,t){var n=void 0===e?t:e,r=this.rootWindow.localStorage.getItem("".concat(this.prefix,"_").concat(n));return null===r?void 0:JSON.parse(r)}},{key:"reset",value:function(e){this.rootWindow.localStorage.removeItem("".concat(this.prefix,"_").concat(e))}},{key:"resetAll",value:function(){var n=this;(0,a.arrayEach)(this.savedKeys,function(e,t){n.rootWindow.localStorage.removeItem("".concat(n.prefix,"_").concat(n.savedKeys[t]))}),this.clearSavedKeys()}},{key:"loadSavedKeys",value:function(){var e=this.rootWindow.localStorage.getItem("".concat(this.prefix,"__persistentStateKeys")),t="string"==typeof e?JSON.parse(e):void 0;this.savedKeys=t||[]}},{key:"saveSavedKeys",value:function(){this.rootWindow.localStorage.setItem("".concat(this.prefix,"__persistentStateKeys"),JSON.stringify(this.savedKeys))}},{key:"clearSavedKeys",value:function(){this.savedKeys.length=0,this.saveSavedKeys()}}]),n}();t.default=s},function(e,t,n){"use strict";var r=n(0);n(16),n(10),n(14),n(24),n(17),n(32),t.__esModule=!0,t.default=void 0;var u=r(n(18)),o=r(n(1)),i=r(n(7)),a=r(n(26)),l=r(n(6)),c=r(n(13)),h=r(n(2)),d=r(n(8)),s=r(n(21)),f=n(3),v=n(73),g=n(5),p=r(n(164)),m=n(4),y=n(15),w=n(20),C=r(n(356)),E=n(68),S=n(25),b=new WeakMap,R=function(e){function s(e){var u;return(0,o.default)(this,s),u=(0,i.default)(this,(0,l.default)(s).call(this,e)),b.set((0,a.default)(u),{cachedColumnHeaders:[]}),u.widths=[],u.ghostTable=new p.default(u.hot),u.samplesGenerator=new C.default(function(e,t){var n=u.hot.getCellMeta(e,t),r="";n.spanned||(r=u.hot.getDataAtCell(e,t));var o=0;if(n.label){var i=n.label,a=i.value,s=i.property,l="";a?l="function"==typeof a?a(e,t,u.hot.colToProp(t),r):a:s&&(l=u.hot.getDataAtRowProp(e,s)),o=l.length}return{value:r,bundleCountSeed:o}}),u.firstCalculation=!0,u.inProgress=!1,u.addHook("beforeColumnResize",function(e,t,n){return u.onBeforeColumnResize(e,t,n)}),u}return(0,d.default)(s,e),(0,h.default)(s,null,[{key:"CALCULATION_STEP",get:function(){return 50}},{key:"SYNC_CALCULATION_LIMIT",get:function(){return 50}}]),(0,h.default)(s,[{key:"isEnabled",value:function(){return!1!==this.hot.getSettings().autoColumnSize&&!this.hot.getSettings().colWidths}},{key:"enablePlugin",value:function(){var n=this;if(!this.enabled){var e=this.hot.getSettings().autoColumnSize;e&&null!==e.useHeaders&&void 0!==e.useHeaders&&this.ghostTable.setSetting("useHeaders",e.useHeaders),this.setSamplingOptions(),this.addHook("afterLoadData",function(){return n.onAfterLoadData()}),this.addHook("beforeChange",function(e){return n.onBeforeChange(e)}),this.addHook("beforeRender",function(e){return n.onBeforeRender(e)}),this.addHook("modifyColWidth",function(e,t){return n.getColumnWidth(t,e)}),this.addHook("afterInit",function(){return n.onAfterInit()}),(0,c.default)((0,l.default)(s.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){var e=this.findColumnsWhereHeaderWasChanged();e.length&&this.clearCache(e),(0,c.default)((0,l.default)(s.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){(0,c.default)((0,l.default)(s.prototype),"disablePlugin",this).call(this)}},{key:"calculateColumnsWidth",value:function(e,t,n){var o=this,r=0<arguments.length&&void 0!==e?e:{from:0,to:this.hot.countCols()-1},i=1<arguments.length&&void 0!==t?t:{from:0,to:this.hot.countRows()-1},a=2<arguments.length&&void 0!==n&&n,s="number"==typeof r?{from:r,to:r}:r,l="number"==typeof i?{from:i,to:i}:i;(0,y.rangeEach)(s.from,s.to,function(e){if(a||void 0===o.widths[e]&&!o.hot._getColWidthFromSettings(e)){var t=o.samplesGenerator.generateColumnSamples(e,l);(0,f.arrayEach)(t,function(e){var t=(0,u.default)(e,2),n=t[0],r=t[1];return o.ghostTable.addColumn(n,r)})}}),this.ghostTable.columns.length&&(this.ghostTable.getWidths(function(e,t){o.widths[e]=t}),this.ghostTable.clean())}},{key:"calculateAllColumnsWidth",value:function(e){var t=this,n=0<arguments.length&&void 0!==e?e:{from:0,to:this.hot.countRows()-1},r=0,o=this.hot.countCols()-1,i=null;this.inProgress=!0;var a=this.getSyncCalculationLimit();this.firstCalculation&&0<=a&&(this.calculateColumnsWidth({from:0,to:a},n),this.firstCalculation=!1,r=a+1),r<o?function e(){if(!t.hot)return(0,v.cancelAnimationFrame)(i),void(t.inProgress=!1);t.calculateColumnsWidth({from:r,to:Math.min(r+s.CALCULATION_STEP,o)},n),(r=r+s.CALCULATION_STEP+1)<o?i=(0,v.requestAnimationFrame)(e):((0,v.cancelAnimationFrame)(i),t.inProgress=!1,t.hot.view.wt.wtOverlays.adjustElementsSize())}():this.inProgress=!1}},{key:"setSamplingOptions",value:function(){var e=this.hot.getSettings().autoColumnSize,t=e&&(0,m.hasOwnProperty)(e,"samplingRatio")?this.hot.getSettings().autoColumnSize.samplingRatio:void 0,n=e&&(0,m.hasOwnProperty)(e,"allowSampleDuplicates")?this.hot.getSettings().autoColumnSize.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),n&&this.samplesGenerator.setAllowDuplicates(n)}},{key:"recalculateAllColumnsWidth",value:function(){this.hot.view&&(0,g.isVisible)(this.hot.view.wt.wtTable.TABLE)&&(this.clearCache(),this.calculateAllColumnsWidth())}},{key:"getSyncCalculationLimit",value:function(){var e=s.SYNC_CALCULATION_LIMIT,t=this.hot.countCols()-1;return(0,m.isObject)(this.hot.getSettings().autoColumnSize)&&(e=this.hot.getSettings().autoColumnSize.syncLimit,(0,E.isPercentValue)(e)?e=(0,y.valueAccordingPercent)(t,e):e>>=0),Math.min(e,t)}},{key:"getColumnWidth",value:function(e,t,n){var r=!(2<arguments.length&&void 0!==n)||n,o=1<arguments.length&&void 0!==t?t:void 0;return void 0===o&&(o=this.widths[e],r&&"number"==typeof o&&(o=Math.max(o,S.ViewportColumnsCalculator.DEFAULT_WIDTH))),o}},{key:"getFirstVisibleColumn",value:function(){var e=this.hot.view.wt;return e.wtViewport.columnsVisibleCalculator?e.wtTable.getFirstVisibleColumn():e.wtViewport.columnsRenderCalculator?e.wtTable.getFirstRenderedColumn():-1}},{key:"getLastVisibleColumn",value:function(){var e=this.hot.view.wt;return e.wtViewport.columnsVisibleCalculator?e.wtTable.getLastVisibleColumn():e.wtViewport.columnsRenderCalculator?e.wtTable.getLastRenderedColumn():-1}},{key:"findColumnsWhereHeaderWasChanged",value:function(){var e=this.hot.getColHeader(),o=b.get(this).cachedColumnHeaders;return(0,f.arrayReduce)(e,function(e,t,n){var r=o.length;return(r-1<n||o[n]!==t)&&e.push(n),r-1<n?o.push(t):o[n]=t,e},[])}},{key:"clearCache",value:function(e){var t=this,n=0<arguments.length&&void 0!==e?e:[];n.length?(0,f.arrayEach)(n,function(e){t.widths[e]=void 0}):this.widths.length=0}},{key:"isNeedRecalculate",value:function(){return!!(0,f.arrayFilter)(this.widths,function(e){return void 0===e}).length}},{key:"onBeforeRender",value:function(){var e=this.hot.renderCall,t=this.hot.countRows(),n=this.getFirstVisibleColumn(),r=this.getLastVisibleColumn();null!==n&&null!==r&&t&&(this.calculateColumnsWidth({from:n,to:r},void 0,e),this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllColumnsWidth())}},{key:"onAfterLoadData",value:function(){var e=this;this.hot.view?this.recalculateAllColumnsWidth():setTimeout(function(){e.hot&&e.recalculateAllColumnsWidth()},0)}},{key:"onBeforeChange",value:function(e){var n=this,t=(0,f.arrayMap)(e,function(e){var t=(0,u.default)(e,2)[1];return n.hot.propToCol(t)});this.clearCache(t)}},{key:"onBeforeColumnResize",value:function(e,t,n){var r=t;return n&&(this.calculateColumnsWidth(e,void 0,!0),r=this.getColumnWidth(e,void 0,!1)),r}},{key:"onAfterInit",value:function(){b.get(this).cachedColumnHeaders=this.hot.getColHeader()}},{key:"destroy",value:function(){this.ghostTable.clean(),(0,c.default)((0,l.default)(s.prototype),"destroy",this).call(this)}}]),s}(s.default);(0,w.registerPlugin)("autoColumnSize",R);var T=R;t.default=T},function(e,t,n){"use strict";var r=n(0);n(19),n(31),n(12),n(38),n(32),t.__esModule=!0,t.default=void 0;var o=r(n(36)),i=r(n(1)),a=r(n(2)),s=r(n(7)),l=r(n(26)),u=r(n(6)),c=r(n(13)),h=r(n(8)),d=r(n(21)),f=r(n(43)),v=n(5),g=n(3),p=n(15),m=r(n(23)),y=n(20),w=n(25),C=n(473);f.default.getSingleton().register("modifyAutofillRange"),f.default.getSingleton().register("beforeAutofill");var E=function(e){function r(e){var t;return(0,i.default)(this,r),(t=(0,s.default)(this,(0,u.default)(r).call(this,e))).eventManager=new m.default((0,l.default)(t)),t.addingStarted=!1,t.mouseDownOnCellCorner=!1,t.mouseDragOutside=!1,t.handleDraggedCells=0,t.directions=[],t.autoInsertRow=!1,t}return(0,h.default)(r,e),(0,a.default)(r,[{key:"isEnabled",value:function(){return this.hot.getSettings().fillHandle}},{key:"enablePlugin",value:function(){var n=this;this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",function(e){return n.onAfterCellCornerMouseDown(e)}),this.addHook("afterOnCellCornerDblClick",function(e){return n.onCellCornerDblClick(e)}),this.addHook("beforeOnCellMouseOver",function(e,t){return n.onBeforeCellMouseOver(t)}),(0,c.default)((0,u.default)(r.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),(0,c.default)((0,u.default)(r.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.clearMappedSettings(),(0,c.default)((0,u.default)(r.prototype),"disablePlugin",this).call(this)}},{key:"getCopyableRanges",value:function(){var e=this.hot.getSelectedRangeLast(),t=e.getTopLeftCorner(),n=e.getBottomRightCorner(),r=t.row,o=t.col,i=n.row,a=n.col,s=[];return s.push({startRow:r,startCol:o,endRow:i,endCol:a}),s=this.hot.runHooks("modifyCopyableRange",s)}},{key:"getSelectionData",value:function(){var r=this,e=this.getCopyableRanges(),t=[],o=[],i=[];return(0,g.arrayEach)(e,function(e){(0,p.rangeEach)(e.startRow,e.endRow,function(e){-1===t.indexOf(e)&&t.push(e)}),(0,p.rangeEach)(e.startCol,e.endCol,function(e){-1===o.indexOf(e)&&o.push(e)})}),(0,g.arrayEach)(t,function(t){var n=[];(0,g.arrayEach)(o,function(e){n.push(r.hot.getCopyableData(t,e))}),i.push(n)}),i}},{key:"fillIn",value:function(){if(this.hot.selection.highlight.getFill().isEmpty())return!1;var e=this.hot.selection.highlight.getFill().getCorners();this.resetSelectionOfDraggedArea();var t=this.getCornersOfSelectedCells();e=this.hot.runHooks("modifyAutofillRange",e,t);var n=(0,C.getDragDirectionAndRange)(t,e),r=n.directionOfDrag,o=n.startOfDragCoords,i=n.endOfDragCoords;if(o&&-1<o.row&&-1<o.col){var a=this.getSelectionData();this.hot.runHooks("beforeAutofill",o,i,a);var s=(0,C.getDeltas)(o,i,a,r),l=a;if(-1<["up","left"].indexOf(r)){l=[];var u=null,c=null;if("up"===r){c=(u=i.row-o.row+1)%a.length;for(var h=0;h<u;h++)l.push(a[(h+(a.length-c))%a.length])}else{c=(u=i.col-o.col+1)%a[0].length;for(var d=0;d<a.length;d++){l.push([]);for(var f=0;f<u;f++)l[d].push(a[d][(f+(a[d].length-c))%a[d].length])}}}this.hot.populateFromArray(o.row,o.col,l,i.row,i.col,"".concat(this.pluginName,".fill"),null,r,s),this.setSelection(e)}else this.hot._refreshBorders();return!0}},{key:"reduceSelectionAreaIfNeeded",value:function(e){return e.row<0&&(e.row=0),e.col<0&&(e.col=0),e}},{key:"getCoordsOfDragAndDropBorders",value:function(e){var t,n=this.hot.getSelectedRangeLast().getTopLeftCorner(),r=this.hot.getSelectedRangeLast().getBottomRightCorner();if(this.directions.includes(C.DIRECTIONS.vertical)&&(r.row<e.row||n.row>e.row))t=new w.CellCoords(e.row,r.col);else{if(!this.directions.includes(C.DIRECTIONS.horizontal))return;t=new w.CellCoords(r.row,e.col)}return this.reduceSelectionAreaIfNeeded(t)}},{key:"showBorder",value:function(e){var t=this.getCoordsOfDragAndDropBorders(e);t&&this.redrawBorders(t)}},{key:"addRow",value:function(){var e=this;this.hot._registerTimeout(setTimeout(function(){e.hot.alter("insert_row",void 0,1,"".concat(e.pluginName,".fill")),e.addingStarted=!1},200))}},{key:"addNewRowIfNeeded",value:function(){if(this.hot.selection.highlight.getFill().cellRange&&!1===this.addingStarted&&this.autoInsertRow){var e=this.hot.getSelectedLast(),t=this.hot.selection.highlight.getFill().getCorners(),n=this.hot.countRows();e[2]<n-1&&t[2]===n-1&&(this.addingStarted=!0,this.addRow())}}},{key:"getCornersOfSelectedCells",value:function(){return this.hot.selection.isMultiple()?this.hot.selection.highlight.createOrGetArea().getCorners():this.hot.selection.highlight.getCell().getCorners()}},{key:"getIndexOfLastAdjacentFilledInRow",value:function(e){for(var t,n=this.hot.getData(),r=this.hot.countRows(),o=e[2]+1;o<r;o++){for(var i=e[1];i<=e[3];i++){if(n[o][i])return-1}var a=n[o][e[1]-1],s=n[o][e[3]+1];(a||s)&&(t=o)}return t}},{key:"addSelectionFromStartAreaToSpecificRowIndex",value:function(e,t){this.hot.selection.highlight.getFill().clear().add(new w.CellCoords(e[0],e[1])).add(new w.CellCoords(t,e[3]))}},{key:"setSelection",value:function(e){var t;(t=this.hot).selectCell.apply(t,(0,o.default)(e).concat([!1,!1]))}},{key:"selectAdjacent",value:function(){var e=this.getCornersOfSelectedCells(),t=this.getIndexOfLastAdjacentFilledInRow(e);return-1!==t&&void 0!==t&&(this.addSelectionFromStartAreaToSpecificRowIndex(e,t),!0)}},{key:"resetSelectionOfDraggedArea",value:function(){this.handleDraggedCells=0,this.hot.selection.highlight.getFill().clear()}},{key:"redrawBorders",value:function(e){this.hot.selection.highlight.getFill().clear().add(this.hot.getSelectedRangeLast().from).add(this.hot.getSelectedRangeLast().to).add(e),this.hot.view.render()}},{key:"getIfMouseWasDraggedOutside",value:function(e){var t=this.hot.rootDocument.documentElement,n=(0,v.offset)(this.hot.table).top-(this.hot.rootWindow.pageYOffset||t.scrollTop)+(0,v.outerHeight)(this.hot.table),r=(0,v.offset)(this.hot.table).left-(this.hot.rootWindow.pageXOffset||t.scrollLeft)+(0,v.outerWidth)(this.hot.table);return e.clientY>n&&e.clientX<=r}},{key:"registerEvents",value:function(){var t=this,e=this.hot.rootDocument.documentElement;this.eventManager.addEventListener(e,"mouseup",function(){return t.onMouseUp()}),this.eventManager.addEventListener(e,"mousemove",function(e){return t.onMouseMove(e)})}},{key:"onCellCornerDblClick",value:function(){this.selectAdjacent()&&this.fillIn()}},{key:"onAfterCellCornerMouseDown",value:function(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}},{key:"onBeforeCellMouseOver",value:function(e){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(e),this.addNewRowIfNeeded())}},{key:"onMouseUp",value:function(){this.handleDraggedCells&&(1<this.handleDraggedCells&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}},{key:"onMouseMove",value:function(e){var t=this.getIfMouseWasDraggedOutside(e);!1===this.addingStarted&&0<this.handleDraggedCells&&t?(this.mouseDragOutside=!0,this.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&this.autoInsertRow&&this.addRow()}},{key:"clearMappedSettings",value:function(){this.directions.length=0,this.autoInsertRow=!1}},{key:"mapSettings",value:function(){var e=(0,C.getMappedFillHandleSetting)(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow}},{key:"destroy",value:function(){(0,c.default)((0,u.default)(r.prototype),"destroy",this).call(this)}}]),r}(d.default);(0,y.registerPlugin)("autofill",E);var S=E;t.default=S},function(e,t,n){"use strict";n(12),n(76),t.__esModule=!0,t.getDeltas=function(e,t,n,r){var o=n.length,i=n?n[0].length:0,a=[],s=t.row-e.row,l=t.col-e.col;if(-1!==["down","up"].indexOf(r)){for(var u=[],c=0;c<l;c++){var h=parseInt(n[0][c],10),d=parseInt(n[o-1][c],10),f=("down"===r?d-h:h-d)/(o-1)||0;u.push(f)}a.push(u)}if(-1!==["right","left"].indexOf(r))for(var v=0;v<s;v++){var g=parseInt(n[v][0],10),p=parseInt(n[v][i-1],10),m=("right"===r?p-g:g-p)/(i-1)||0;a.push([m])}return a},t.getDragDirectionAndRange=function(e,t){var n,r,o;t[0]===e[0]&&t[1]<e[1]?(o="left",n=new i.CellCoords(t[0],t[1]),r=new i.CellCoords(t[2],e[1]-1)):t[2]===e[2]&&t[0]===e[0]&&t[3]>e[3]?(o="right",n=new i.CellCoords(t[0],e[3]+1),r=new i.CellCoords(t[2],t[3])):t[0]<e[0]&&t[1]===e[1]?(o="up",n=new i.CellCoords(t[0],t[1]),r=new i.CellCoords(e[0]-1,t[3])):t[2]>e[2]&&t[1]===e[1]&&(o="down",n=new i.CellCoords(e[2]+1,t[1]),r=new i.CellCoords(t[2],t[3]));return{directionOfDrag:o,startOfDragCoords:n,endOfDragCoords:r}},t.getMappedFillHandleSetting=function(e){var t={};!0===e?(t.directions=Object.keys(a),t.autoInsertRow=!0):(0,r.isObject)(e)?((0,o.isDefined)(e.autoInsertRow)?e.direction===a.horizontal?t.autoInsertRow=!1:t.autoInsertRow=e.autoInsertRow:t.autoInsertRow=!1,(0,o.isDefined)(e.direction)?t.directions=[e.direction]:t.directions=Object.keys(a)):"string"==typeof e?(t.directions=[e],t.autoInsertRow=!0):(t.directions=[],t.autoInsertRow=!1);return t},t.DIRECTIONS=void 0;var r=n(4),o=n(27),i=n(25),a={horizontal:"horizontal",vertical:"vertical"};t.DIRECTIONS=a},function(e,t,n){"use strict";var r=n(0);n(32),t.__esModule=!0,t.default=void 0;var c=r(n(18)),o=r(n(1)),i=r(n(7)),a=r(n(6)),l=r(n(13)),u=r(n(2)),h=r(n(8)),s=r(n(21)),d=n(3),f=n(73),v=n(5),g=r(n(164)),p=n(4),m=n(15),y=n(20),w=r(n(356)),C=n(68),E=function(e){function s(e){var r;return(0,o.default)(this,s),(r=(0,i.default)(this,(0,a.default)(s).call(this,e))).heights=[],r.ghostTable=new g.default(r.hot),r.samplesGenerator=new w.default(function(e,t){var n;return 0<=e?n=r.hot.getDataAtCell(e,t):-1===e&&(n=r.hot.getColHeader(t)),{value:n}}),r.firstCalculation=!0,r.inProgress=!1,r.addHook("beforeRowResize",function(e,t,n){return r.onBeforeRowResize(e,t,n)}),r}return(0,h.default)(s,e),(0,u.default)(s,null,[{key:"CALCULATION_STEP",get:function(){return 50}},{key:"SYNC_CALCULATION_LIMIT",get:function(){return 500}}]),(0,u.default)(s,[{key:"isEnabled",value:function(){return!0===this.hot.getSettings().autoRowSize||(0,p.isObject)(this.hot.getSettings().autoRowSize)}},{key:"enablePlugin",value:function(){var n=this;this.enabled||(this.setSamplingOptions(),this.addHook("afterLoadData",function(){return n.onAfterLoadData()}),this.addHook("beforeChange",function(e){return n.onBeforeChange(e)}),this.addHook("beforeColumnMove",function(){return n.recalculateAllRowsHeight()}),this.addHook("beforeColumnResize",function(){return n.recalculateAllRowsHeight()}),this.addHook("beforeColumnSort",function(){return n.clearCache()}),this.addHook("beforeRender",function(e){return n.onBeforeRender(e)}),this.addHook("beforeRowMove",function(e,t){return n.onBeforeRowMove(e,t)}),this.addHook("modifyRowHeight",function(e,t){return n.getRowHeight(t,e)}),this.addHook("modifyColumnHeaderHeight",function(){return n.getColumnHeaderHeight()}),(0,l.default)((0,a.default)(s.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){(0,l.default)((0,a.default)(s.prototype),"disablePlugin",this).call(this)}},{key:"calculateRowsHeight",value:function(e,t,n){var o=this,r=0<arguments.length&&void 0!==e?e:{from:0,to:this.hot.countRows()-1},i=1<arguments.length&&void 0!==t?t:{from:0,to:this.hot.countCols()-1},a=2<arguments.length&&void 0!==n&&n,s="number"==typeof r?{from:r,to:r}:r,l="number"==typeof i?{from:i,to:i}:i;if(null!==this.hot.getColHeader(0)){var u=this.samplesGenerator.generateRowSamples(-1,l);this.ghostTable.addColumnHeadersRow(u.get(-1))}(0,m.rangeEach)(s.from,s.to,function(e){if(a||void 0===o.heights[e]){var t=o.samplesGenerator.generateRowSamples(e,l);(0,d.arrayEach)(t,function(e){var t=(0,c.default)(e,2),n=t[0],r=t[1];return o.ghostTable.addRow(n,r)})}}),this.ghostTable.rows.length&&(this.ghostTable.getHeights(function(e,t){o.heights[e]=t}),this.ghostTable.clean())}},{key:"calculateAllRowsHeight",value:function(e){var t=this,n=0<arguments.length&&void 0!==e?e:{from:0,to:this.hot.countCols()-1},r=0,o=this.hot.countRows()-1,i=null;this.inProgress=!0;var a=this.getSyncCalculationLimit();this.firstCalculation&&0<=a&&(this.calculateRowsHeight({from:0,to:a},n),this.firstCalculation=!1,r=a+1),r<o?function e(){if(!t.hot)return(0,f.cancelAnimationFrame)(i),void(t.inProgress=!1);t.calculateRowsHeight({from:r,to:Math.min(r+s.CALCULATION_STEP,o)},n),(r=r+s.CALCULATION_STEP+1)<o?i=(0,f.requestAnimationFrame)(e):((0,f.cancelAnimationFrame)(i),t.inProgress=!1,t.hot.view.wt.wtOverlays.adjustElementsSize(!0),t.hot.view.wt.wtOverlays.leftOverlay.needFullRender&&t.hot.view.wt.wtOverlays.leftOverlay.clone.draw())}():(this.inProgress=!1,this.hot.view.wt.wtOverlays.adjustElementsSize(!1))}},{key:"setSamplingOptions",value:function(){var e=this.hot.getSettings().autoRowSize,t=e&&(0,p.hasOwnProperty)(e,"samplingRatio")?this.hot.getSettings().autoRowSize.samplingRatio:void 0,n=e&&(0,p.hasOwnProperty)(e,"allowSampleDuplicates")?this.hot.getSettings().autoRowSize.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),n&&this.samplesGenerator.setAllowDuplicates(n)}},{key:"recalculateAllRowsHeight",value:function(){(0,v.isVisible)(this.hot.view.wt.wtTable.TABLE)&&(this.clearCache(),this.calculateAllRowsHeight())}},{key:"getSyncCalculationLimit",value:function(){var e=s.SYNC_CALCULATION_LIMIT,t=this.hot.countRows()-1;return(0,p.isObject)(this.hot.getSettings().autoRowSize)&&(e=this.hot.getSettings().autoRowSize.syncLimit,(0,C.isPercentValue)(e)?e=(0,m.valueAccordingPercent)(t,e):e>>=0),Math.min(e,t)}},{key:"getRowHeight",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:void 0,r=n;return void 0!==this.heights[e]&&this.heights[e]>(n||0)&&(r=this.heights[e]),r}},{key:"getColumnHeaderHeight",value:function(){return this.heights[-1]}},{key:"getFirstVisibleRow",value:function(){var e=this.hot.view.wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getFirstVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getFirstRenderedRow():-1}},{key:"getLastVisibleRow",value:function(){var e=this.hot.view.wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getLastVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getLastRenderedRow():-1}},{key:"clearCache",value:function(){this.heights.length=0,this.heights[-1]=void 0}},{key:"clearCacheByRange",value:function(e){var t=this,n="number"==typeof e?{from:e,to:e}:e,r=n.from,o=n.to;(0,m.rangeEach)(Math.min(r,o),Math.max(r,o),function(e){t.heights[e]=void 0})}},{key:"isNeedRecalculate",value:function(){return!!(0,d.arrayFilter)(this.heights,function(e){return void 0===e}).length}},{key:"onBeforeRender",value:function(){var e=this.hot.renderCall,t=this.hot.getSettings().fixedRowsBottom,n=this.getFirstVisibleRow(),r=this.getLastVisibleRow();if(null!==n&&null!==r){if(this.calculateRowsHeight({from:n,to:r},void 0,e),t){var o=this.hot.countRows()-1;this.calculateRowsHeight({from:o-t,to:o})}this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllRowsHeight()}}},{key:"onBeforeRowMove",value:function(e,t){this.clearCacheByRange({from:e,to:t}),this.calculateAllRowsHeight()}},{key:"onBeforeRowResize",value:function(e,t,n){var r=t;return n&&(this.calculateRowsHeight(e,void 0,!0),r=this.getRowHeight(e)),r}},{key:"onAfterLoadData",value:function(){var e=this;this.hot.view?this.recalculateAllRowsHeight():setTimeout(function(){e.hot&&e.recalculateAllRowsHeight()},0)}},{key:"onBeforeChange",value:function(e){var t=null;1===e.length?t=e[0][0]:1<e.length&&(t={from:e[0][0],to:e[e.length-1][0]}),null!==t&&this.clearCacheByRange(t)}},{key:"destroy",value:function(){this.ghostTable.clean(),(0,l.default)((0,a.default)(s.prototype),"destroy",this).call(this)}}]),s}(s.default);(0,y.registerPlugin)("autoRowSize",E);var S=E;t.default=S},function(e,t,n){"use strict";var d=n(47),r=n(29),f=n(89),v=n(119),g=n(94),p=n(60),m=n(114),o=Object.assign;e.exports=!o||r(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=o({},e)[n]||f(o({},t)).join("")!=r})?function(e,t){for(var n=p(e),r=arguments.length,o=1,i=v.f,a=g.f;o<r;)for(var s,l=m(arguments[o++]),u=i?f(l).concat(i(l)):f(l),c=u.length,h=0;h<c;)s=u[h++],d&&!a.call(l,s)||(n[s]=l[s]);return n}:o},function(e,t,n){var a=n(477);e.exports=function(e,t){if(null==e)return{};var n,r,o=a(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}},function(e,t,n){"use strict";var r=n(0);n(159),n(31),n(12),n(38),t.__esModule=!0,t.ColumnStatesManager=void 0;var o=r(n(1)),i=r(n(2)),a=n(4),s=n(3),l=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"],u=function(){function e(){(0,o.default)(this,e),this.sortedColumnsStates=[],this.sortEmptyCells=!1,this.indicator=!0,this.headerAction=!0,this.compareFunctionFactory=void 0}return(0,i.default)(e,[{key:"updateAllColumnsProperties",value:function(e){var n=this;(0,a.isObject)(e)&&(0,a.objectEach)(e,function(e,t){l.includes(t)&&(n[t]=e)})}},{key:"getAllColumnsProperties",value:function(){var e={sortEmptyCells:this.sortEmptyCells,indicator:this.indicator,headerAction:this.headerAction};return"function"==typeof this.compareFunctionFactory&&(e.compareFunctionFactory=this.compareFunctionFactory),e}},{key:"getFirstSortedColumn",value:function(){var e;return 0<this.getNumberOfSortedColumns()&&(e=this.sortedColumnsStates[0].column),e}},{key:"getSortOrderOfColumn",value:function(n){var e,t=this.sortedColumnsStates.find(function(e){var t=e.column;return n===t});return(0,a.isObject)(t)&&(e=t.sortOrder),e}},{key:"getSortedColumns",value:function(){return(0,s.arrayMap)(this.sortedColumnsStates,function(e){return e.column})}},{key:"getIndexOfColumnInSortQueue",value:function(e){return this.getSortedColumns().indexOf(e)}},{key:"getNumberOfSortedColumns",value:function(){return this.sortedColumnsStates.length}},{key:"isListOfSortedColumnsEmpty",value:function(){return 0===this.getNumberOfSortedColumns()}},{key:"isColumnSorted",value:function(e){return this.getSortedColumns().includes(e)}},{key:"getSortStates",value:function(){return(0,a.deepClone)(this.sortedColumnsStates)}},{key:"getColumnSortState",value:function(e){if(this.isColumnSorted(e))return(0,a.deepClone)(this.sortedColumnsStates[this.getIndexOfColumnInSortQueue(e)])}},{key:"setSortStates",value:function(e){this.sortedColumnsStates=e}},{key:"destroy",value:function(){this.sortedColumnsStates.length=0,this.sortedColumnsStates=null}}]),e}();t.ColumnStatesManager=u},function(e,t,n){"use strict";n(19),n(56),n(16),n(70),n(10),n(14),n(17),t.__esModule=!0,t.getClassesToAdd=function(e,t,n,r){var o=[s];r&&o.push(l);if(!1===n)o.push(a);else if(e.isColumnSorted(t)){var i=e.getSortOrderOfColumn(t);o.push(u.get(i))}return o},t.getClassedToRemove=function(){return Array.from(u.values()).concat(l,a,s)};var r=n(166),a="indicatorDisabled",s="columnSorting",l="sortAction",u=new Map([[r.ASC_SORT_STATE,"ascending"],[r.DESC_SORT_STATE,"descending"]])},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(92)),s=n(4),l=n(15),u=function(){function e(){(0,o.default)(this,e)}return(0,i.default)(e,[{key:"createMap",value:function(e){var t=this,n=void 0===e?this._arrayMap.length:e;(this._arrayMap.length=0,l.rangeEach)(n-1,function(e){t._arrayMap[e]=e})}},{key:"destroy",value:function(){this._arrayMap=null}}]),e}();(0,s.mixin)(u,a.default);var c=u;t.default=c},function(e,t,n){"use strict";var r=n(0);n(40),t.__esModule=!0,t.rootComparator=function(c,h){return function(e,t){var n,r,o,i,a,s,l=(0,d.default)(e).slice(1),u=(0,d.default)(t).slice(1);return r=c[n=0],o=h[n],i=l[n],a=u[n],((s=o.columnSorting).compareFunctionFactory?s.compareFunctionFactory:(0,f.getCompareFunctionFactory)(o.type))(r,o,s)(i,a)}};var d=r(n(359)),f=n(88)},function(e,t,n){"use strict";t.__esModule=!0,t.compareFunctionFactory=function(r,e,o){return function(e,t){var n=o.sortEmptyCells;return"string"==typeof e&&(e=e.toLowerCase()),"string"==typeof t&&(t=t.toLowerCase()),e===t?a.DO_NOT_SWAP:(0,i.isEmpty)(e)?(0,i.isEmpty)(t)?a.DO_NOT_SWAP:n&&"asc"===r?a.FIRST_BEFORE_SECOND:a.FIRST_AFTER_SECOND:(0,i.isEmpty)(t)?n&&"asc"===r?a.FIRST_AFTER_SECOND:a.FIRST_BEFORE_SECOND:isNaN(e)&&!isNaN(t)?"asc"===r?a.FIRST_AFTER_SECOND:a.FIRST_BEFORE_SECOND:!isNaN(e)&&isNaN(t)?"asc"===r?a.FIRST_BEFORE_SECOND:a.FIRST_AFTER_SECOND:(isNaN(e)||isNaN(t)||(e=parseFloat(e),t=parseFloat(t)),e<t?"asc"===r?a.FIRST_BEFORE_SECOND:a.FIRST_AFTER_SECOND:t<e?"asc"===r?a.FIRST_AFTER_SECOND:a.FIRST_BEFORE_SECOND:a.DO_NOT_SWAP)}},t.COLUMN_DATA_TYPE=void 0;var i=n(27),a=n(88);t.COLUMN_DATA_TYPE="default"},function(e,t,n){"use strict";t.__esModule=!0,t.compareFunctionFactory=function(i,e,a){return function(e,t){var n=parseFloat(e),r=parseFloat(t),o=a.sortEmptyCells;if(n===r||isNaN(n)&&isNaN(r))return l.DO_NOT_SWAP;if(o){if((0,s.isEmpty)(e))return"asc"===i?l.FIRST_BEFORE_SECOND:l.FIRST_AFTER_SECOND;if((0,s.isEmpty)(t))return"asc"===i?l.FIRST_AFTER_SECOND:l.FIRST_BEFORE_SECOND}return isNaN(n)?l.FIRST_AFTER_SECOND:isNaN(r)?l.FIRST_BEFORE_SECOND:n<r?"asc"===i?l.FIRST_BEFORE_SECOND:l.FIRST_AFTER_SECOND:r<n?"asc"===i?l.FIRST_AFTER_SECOND:l.FIRST_BEFORE_SECOND:l.DO_NOT_SWAP}},t.COLUMN_DATA_TYPE=void 0;var s=n(27),l=n(88);t.COLUMN_DATA_TYPE="numeric"},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.compareFunctionFactory=function(a,s,l){return function(e,t){var n=l.sortEmptyCells;if(e===t)return h.DO_NOT_SWAP;if((0,c.isEmpty)(e))return(0,c.isEmpty)(t)?h.DO_NOT_SWAP:n&&"asc"===a?h.FIRST_BEFORE_SECOND:h.FIRST_AFTER_SECOND;if((0,c.isEmpty)(t))return n&&"asc"===a?h.FIRST_AFTER_SECOND:h.FIRST_BEFORE_SECOND;var r=s.dateFormat,o=(0,u.default)(e,r),i=(0,u.default)(t,r);return o.isValid()?i.isValid()?i.isAfter(o)?"asc"===a?h.FIRST_BEFORE_SECOND:h.FIRST_AFTER_SECOND:i.isBefore(o)?"asc"===a?h.FIRST_AFTER_SECOND:h.FIRST_BEFORE_SECOND:h.DO_NOT_SWAP:h.FIRST_BEFORE_SECOND:h.FIRST_AFTER_SECOND}},t.COLUMN_DATA_TYPE=void 0;var u=r(n(61)),c=n(27),h=n(88);t.COLUMN_DATA_TYPE="date"},function(e,t,n){"use strict";var r=n(0);n(64),t.__esModule=!0,t.sort=function(e,t){for(var n=(0,s.getRootComparator)(t),r=arguments.length,o=new Array(2<r?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];(0,a.default)(e,n.apply(void 0,o))},t.FIRST_AFTER_SECOND=t.FIRST_BEFORE_SECOND=t.DO_NOT_SWAP=void 0;var a=r(n(486)),s=n(360);t.DO_NOT_SWAP=0;t.FIRST_BEFORE_SECOND=-1;t.FIRST_AFTER_SECOND=1},function(e,t,n){"use strict";var r=n(0);n(10),n(37),t.__esModule=!0,t.default=function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:a;var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;var o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:t.length;if(Math.abs(o-r)<=1)return[];var i=Math.ceil((r+o)/2);e(t,n,r,i);e(t,n,i,o);return s(t,n,r,i,o)};var f=r(n(487)),a=function(e,t){var n=e.toString(),r=t.toString();return n===r?0:n<r?-1:1};function s(e,t,n,r,o){for(var i=new f.default,a=new f.default,s=r-n,l=o-r,u=Math.max(s,l),c=o-n,h=0;h<u;h+=1)h<s&&i.push(e[n+h]),h<l&&a.push(e[r+h]);for(var d=0;d<c;)i.first&&a.first?0<t(i.first.data,a.first.data)?e[n+d]=a.shift().data:e[n+d]=i.shift().data:i.first?e[n+d]=i.shift().data:e[n+d]=a.shift().data,d+=1;return e}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=t.NodeStructure=void 0;function o(e){(0,a.default)(this,o),this.data=e,this.next=null,this.prev=null}var i=r(n(2)),a=r(n(1));t.NodeStructure=o;var s=function(){function e(){(0,a.default)(this,e),this.first=null,this.last=null}return(0,i.default)(e,[{key:"push",value:function(e){var t=new o(e);if(null===this.first)this.first=t,this.last=t;else{var n=this.last;((this.last=t).prev=n).next=t}}},{key:"unshift",value:function(e){var t=new o(e);if(null===this.first)this.first=t,this.last=t;else{var n=this.first;((this.first=t).next=n).prev=t}}},{key:"inorder",value:function(e){for(var t=this.first;t;)e(t),t=t.next}},{key:"remove",value:function(e){if(null===this.first)return!1;for(var t,n,r=this.first;r;){if(r.data===e)return t=r.next,n=r.prev,t&&(t.prev=n),n&&(n.next=t),r===this.first&&(this.first=t),r===this.last&&(this.last=n),!0;r=r.next}return!1}},{key:"hasCycle",value:function(){for(var e=this.first,t=this.first;;){if(null===e)return!1;if(null===(e=e.next))return!1;if((e=e.next)===(t=t.next))return!0}}},{key:"pop",value:function(){if(null===this.last)return null;var e=this.last;return this.last=this.last.prev,e}},{key:"shift",value:function(){if(null===this.first)return null;var e=this.first;return this.first=this.first.next,e}},{key:"recursiveReverse",value:function(){if(this.first){!function e(t,n){n&&(e(n,n.next),n.next=t)}(this.first,this.first.next),this.first.next=null;var e=this.first;this.first=this.last,this.last=e}}},{key:"reverse",value:function(){if(this.first&&this.first.next){for(var e,t=this.first.next,n=this.first;t;)e=t.next,n=(t.next=n).prev=t,t=e;this.first.next=null,this.last.prev=null,e=this.first,this.first=n,this.last=e}}}]),e}();t.default=s},function(e,t,n){"use strict";var r=n(9),o=n(0);n(16),n(10),n(14),n(24),n(17),n(32),t.__esModule=!0,t.default=void 0;var a=o(n(71)),i=o(n(1)),s=o(n(2)),l=o(n(7)),u=o(n(26)),c=o(n(6)),h=o(n(13)),d=o(n(8)),y=n(5),f=n(4),v=o(n(23)),g=n(25),p=n(20),m=o(n(21)),w=o(n(489)),C=n(62),E=o(n(490)),S=r(n(11));n(491);var b=new WeakMap,R="comment",T="value",O="readOnly",k=function(e){function n(e){var t;return(0,i.default)(this,n),(t=(0,l.default)(this,(0,c.default)(n).call(this,e))).editor=null,t.displaySwitch=null,t.eventManager=null,t.range={},t.mouseDown=!1,t.contextMenuEvent=!1,t.timer=null,b.set((0,u.default)(t),{tempEditorDimensions:{},cellBelowCursor:null}),t}return(0,d.default)(n,e),(0,s.default)(n,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().comments}},{key:"enablePlugin",value:function(){var a=this;this.enabled||(this.editor||(this.editor=new w.default(this.hot.rootDocument)),this.eventManager||(this.eventManager=new v.default(this)),this.displaySwitch||(this.displaySwitch=new E.default(this.getDisplayDelaySetting())),this.addHook("afterContextMenuDefaultOptions",function(e){return a.addToContextMenu(e)}),this.addHook("afterRenderer",function(e,t,n,r,o,i){return a.onAfterRenderer(e,i)}),this.addHook("afterScrollHorizontally",function(){return a.hide()}),this.addHook("afterScrollVertically",function(){return a.hide()}),this.addHook("afterBeginEditing",function(){return a.onAfterBeginEditing()}),this.displaySwitch.addLocalHook("hide",function(){return a.hide()}),this.displaySwitch.addLocalHook("show",function(e,t){return a.showAtCell(e,t)}),this.registerListeners(),(0,h.default)((0,c.default)(n.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),(0,h.default)((0,c.default)(n.prototype),"updatePlugin",this).call(this),this.displaySwitch.updateDelay(this.getDisplayDelaySetting())}},{key:"disablePlugin",value:function(){(0,h.default)((0,c.default)(n.prototype),"disablePlugin",this).call(this)}},{key:"registerListeners",value:function(){var t=this,e=this.hot.rootDocument;this.eventManager.addEventListener(e,"mouseover",function(e){return t.onMouseOver(e)}),this.eventManager.addEventListener(e,"mousedown",function(e){return t.onMouseDown(e)}),this.eventManager.addEventListener(e,"mouseup",function(){return t.onMouseUp()}),this.eventManager.addEventListener(this.editor.getInputElement(),"blur",function(){return t.onEditorBlur()}),this.eventManager.addEventListener(this.editor.getInputElement(),"mousedown",function(e){return t.onEditorMouseDown(e)}),this.eventManager.addEventListener(this.editor.getInputElement(),"mouseup",function(e){return t.onEditorMouseUp(e)})}},{key:"setRange",value:function(e){this.range=e}},{key:"clearRange",value:function(){this.range={}}},{key:"targetIsCellWithComment",value:function(e){var t=(0,y.closest)(e.target,"TD","TBODY");return!!(t&&(0,y.hasClass)(t,"htCommentCell")&&(0,y.closest)(t,[this.hot.rootElement]))}},{key:"targetIsCommentTextArea",value:function(e){return this.editor.getInputElement()===e.target}},{key:"setComment",value:function(e){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');var t=this.editor.getValue(),n="";null!=e?n=e:null!=t&&(n=t);var r=this.range.from.row,o=this.range.from.col;this.updateCommentMeta(r,o,(0,a.default)({},T,n)),this.hot.render()}},{key:"setCommentAtCell",value:function(e,t,n){this.setRange({from:new g.CellCoords(e,t)}),this.setComment(n)}},{key:"removeComment",value:function(e){var t=!(0<arguments.length&&void 0!==e)||e;if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');this.hot.setCellMeta(this.range.from.row,this.range.from.col,R,void 0),t&&this.hot.render(),this.hide()}},{key:"removeCommentAtCell",value:function(e,t,n){var r=!(2<arguments.length&&void 0!==n)||n;this.setRange({from:new g.CellCoords(e,t)}),this.removeComment(r)}},{key:"getComment",value:function(){var e=this.range.from.row,t=this.range.from.col;return this.getCommentMeta(e,t,T)}},{key:"getCommentAtCell",value:function(e,t){return this.getCommentMeta(e,t,T)}},{key:"show",value: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.refreshEditor(!0),this.editor.setValue(e[R]?e[R][T]:""),this.editor.hidden&&this.editor.show(),!0}},{key:"showAtCell",value:function(e,t){return this.setRange({from:new g.CellCoords(e,t)}),this.show()}},{key:"hide",value:function(){this.editor.hidden||this.editor.hide()}},{key:"refreshEditor",value:function(e){if(0<arguments.length&&void 0!==e&&e||this.range.from&&this.editor.isVisible()){var t=this.hot.rootWindow,n=this.hot.view.wt,r=n.wtTable,o=n.wtOverlays,i=n.wtViewport,a=o.scrollableElement,s=r.getCell(this.range.from),l=this.range.from.row,u=this.range.from.col,c=(0,y.offset)(s),h=r.getStretchedColumnWidth(u),d=c.top<0?0:c.top,f=c.left;i.hasVerticalScroll()&&a!==t&&(d-=o.topOverlay.getScrollPosition()),i.hasHorizontalScroll()&&a!==t&&(f-=o.leftOverlay.getScrollPosition());var v=f+h,g=d,p=this.getCommentMeta(l,u,"style"),m=this.getCommentMeta(l,u,O);p?this.editor.setSize(p.width,p.height):this.editor.resetSize(),this.editor.setReadOnlyState(m),this.editor.setPosition(v,g)}}},{key:"checkSelectionCommentsConsistency",value:function(){var e=this.hot.getSelectedRangeLast();if(!e)return!1;var t=!1,n=e.from;return this.getCommentMeta(n.row,n.col,T)&&(t=!0),t}},{key:"updateCommentMeta",value:function(e,t,n){var r,o=this.hot.getCellMeta(e,t)[R];o?(r=(0,f.deepClone)(o),(0,f.deepExtend)(r,n)):r=n,this.hot.setCellMeta(e,t,R,r)}},{key:"getCommentMeta",value:function(e,t,n){var r=this.hot.getCellMeta(e,t);if(r[R])return r[R][n]}},{key:"onMouseDown",value:function(e){if(this.mouseDown=!0,this.hot.view&&this.hot.view.wt){if(!this.contextMenuEvent&&!this.targetIsCommentTextArea(e)){var t=(0,y.closest)(e.target,"TD","TBODY"),n=null;t&&(n=this.hot.view.wt.wtTable.getCoords(t)),t&&(!this.range.from||!n||this.range.from.row===n.row&&this.range.from.col===n.col)||this.hide()}this.contextMenuEvent=!1}}},{key:"onMouseOver",value:function(e){var t=b.get(this),n=this.hot.rootDocument;if(t.cellBelowCursor=n.elementFromPoint(e.clientX,e.clientY),!(this.mouseDown||this.editor.isFocused()||(0,y.hasClass)(e.target,"wtBorder")||t.cellBelowCursor!==e.target)&&this.editor)if(this.targetIsCellWithComment(e)){var r=this.hot.view.wt.wtTable.getCoords(e.target),o={from:new g.CellCoords(r.row,r.col)};this.displaySwitch.show(o)}else(0,y.isChildOf)(e.target,n)&&!this.targetIsCommentTextArea(e)&&this.displaySwitch.hide()}},{key:"onMouseUp",value:function(){this.mouseDown=!1}},{key:"onAfterRenderer",value:function(e,t){t[R]&&t[R][T]&&(0,y.addClass)(e,t.commentedCellClassName)}},{key:"onEditorBlur",value:function(){this.setComment()}},{key:"onEditorMouseDown",value:function(e){b.get(this).tempEditorDimensions={width:(0,y.outerWidth)(e.target),height:(0,y.outerHeight)(e.target)}}},{key:"onEditorMouseUp",value:function(e){var t=b.get(this),n=(0,y.outerWidth)(e.target),r=(0,y.outerHeight)(e.target);n===t.tempEditorDimensions.width+1&&r===t.tempEditorDimensions.height+2||this.updateCommentMeta(this.range.from.row,this.range.from.col,(0,a.default)({},"style",{width:n,height:r}))}},{key:"onContextMenuAddComment",value:function(){var e=this;this.displaySwitch.cancelHiding();var t=this.hot.getSelectedRangeLast();this.contextMenuEvent=!0,this.setRange({from:t.from}),this.show(),setTimeout(function(){e.hot&&(e.hot.deselectCell(),e.editor.focus())},10)}},{key:"onContextMenuRemoveComment",value:function(){var e=this.hot.getSelectedRangeLast(),t=e.from,n=e.to;this.contextMenuEvent=!0;for(var r=t.row;r<=n.row;r++)for(var o=t.col;o<=n.col;o++)this.removeCommentAtCell(r,o,!1);this.hot.render()}},{key:"onContextMenuMakeReadOnly",value:function(){var e=this.hot.getSelectedRangeLast(),t=e.from,n=e.to;this.contextMenuEvent=!0;for(var r=t.row;r<=n.row;r++)for(var o=t.col;o<=n.col;o++){var i=!!this.getCommentMeta(r,o,O);this.updateCommentMeta(r,o,(0,a.default)({},O,!i))}}},{key:"addToContextMenu",value:function(e){var t=this;e.items.push({name:"---------"},{key:"commentsAddEdit",name:function(){return t.checkSelectionCommentsConsistency()?t.hot.getTranslatedPhrase(S.CONTEXTMENU_ITEMS_EDIT_COMMENT):t.hot.getTranslatedPhrase(S.CONTEXTMENU_ITEMS_ADD_COMMENT)},callback:function(){return t.onContextMenuAddComment()},disabled:function(){return!(this.getSelectedLast()&&!this.selection.isSelectedByCorner())}},{key:"commentsRemove",name:function(){return this.getTranslatedPhrase(S.CONTEXTMENU_ITEMS_REMOVE_COMMENT)},callback:function(){return t.onContextMenuRemoveComment()},disabled:function(){return t.hot.selection.isSelectedByCorner()}},{key:"commentsReadOnly",name:function(){var r=this,e=this.getTranslatedPhrase(S.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);return(0,C.checkSelectionConsistency)(this.getSelectedRangeLast(),function(e,t){var n=r.getCellMeta(e,t)[R];if(n=n&&n[O])return!0})&&(e=(0,C.markLabelAsSelected)(e)),e},callback:function(){return t.onContextMenuMakeReadOnly()},disabled:function(){return t.hot.selection.isSelectedByCorner()||!t.checkSelectionCommentsConsistency()}})}},{key:"getDisplayDelaySetting",value:function(){var e=this.hot.getSettings().comments;if((0,f.isObject)(e))return e.displayDelay}},{key:"onAfterBeginEditing",value:function(){this.hide()}},{key:"destroy",value:function(){this.editor&&this.editor.destroy(),this.displaySwitch&&this.displaySwitch.destroy(),(0,h.default)((0,c.default)(n.prototype),"destroy",this).call(this)}}]),n}(m.default);(0,p.registerPlugin)("comments",k);var M=k;t.default=M},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(5),s=function(){function r(e){(0,o.default)(this,r),this.rootDocument=e,this.editor=this.createEditor(),this.editorStyle=this.editor.style,this.hidden=!0,this.hide()}return(0,i.default)(r,null,[{key:"CLASS_EDITOR_CONTAINER",get:function(){return"htCommentsContainer"}},{key:"CLASS_EDITOR",get:function(){return"htComments"}},{key:"CLASS_INPUT",get:function(){return"htCommentTextArea"}},{key:"CLASS_CELL",get:function(){return"htCommentCell"}}]),(0,i.default)(r,[{key:"setPosition",value:function(e,t){this.editorStyle.left="".concat(e,"px"),this.editorStyle.top="".concat(t,"px")}},{key:"setSize",value:function(e,t){if(e&&t){var n=this.getInputElement();n.style.width="".concat(e,"px"),n.style.height="".concat(t,"px")}}},{key:"resetSize",value:function(){var e=this.getInputElement();e.style.width="",e.style.height=""}},{key:"setReadOnlyState",value:function(e){this.getInputElement().readOnly=e}},{key:"show",value:function(){this.editorStyle.display="block",this.hidden=!1}},{key:"hide",value:function(){this.editorStyle.display="none",this.hidden=!0}},{key:"isVisible",value:function(){return"block"===this.editorStyle.display}},{key:"setValue",value:function(e){var t=(0<arguments.length&&void 0!==e?e:"")||"";this.getInputElement().value=t}},{key:"getValue",value:function(){return this.getInputElement().value}},{key:"isFocused",value:function(){return this.rootDocument.activeElement===this.getInputElement()}},{key:"focus",value:function(){this.getInputElement().focus()}},{key:"createEditor",value:function(){var e=this.rootDocument.createElement("div"),t=this.rootDocument.createElement("textarea"),n=this.rootDocument.querySelector(".".concat(r.CLASS_EDITOR_CONTAINER));return n||(n=this.rootDocument.createElement("div"),(0,a.addClass)(n,r.CLASS_EDITOR_CONTAINER),this.rootDocument.body.appendChild(n)),(0,a.addClass)(e,r.CLASS_EDITOR),(0,a.addClass)(t,r.CLASS_INPUT),e.appendChild(t),n.appendChild(e),e}},{key:"getInputElement",value:function(){return this.editor.querySelector(".".concat(r.CLASS_INPUT))}},{key:"destroy",value:function(){this.editor.parentNode.removeChild(this.editor),this.editor=null,this.editorStyle=null}}]),r}();t.default=s},function(e,t,n){"use strict";var r=n(0);n(32),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(75),s=n(4),l=r(n(58)),u=function(){function t(e){(0,o.default)(this,t),this.wasLastActionShow=!0,this.showDebounced=null,this.hidingTimer=null,this.updateDelay(e)}return(0,i.default)(t,[{key:"hide",value:function(){var e=this;this.wasLastActionShow=!1,this.hidingTimer=setTimeout(function(){!1===e.wasLastActionShow&&e.runLocalHooks("hide")},250)}},{key:"show",value:function(e){this.wasLastActionShow=!0,this.showDebounced(e)}},{key:"cancelHiding",value:function(){this.wasLastActionShow=!0,clearTimeout(this.hidingTimer),this.hidingTimer=null}},{key:"updateDelay",value:function(e){var t=this,n=0<arguments.length&&void 0!==e?e:250;this.showDebounced=(0,a.debounce)(function(e){t.wasLastActionShow&&t.runLocalHooks("show",e.from.row,e.from.col)},n)}},{key:"destroy",value:function(){this.clearLocalHooks()}}]),t}();(0,s.mixin)(u,l.default);var c=u;t.default=c},function(e,t,n){},function(e,t,n){"use strict";var r=n(0);n(19),t.__esModule=!0,t.default=void 0;var o=r(n(1)),a=r(n(7)),s=r(n(26)),l=r(n(6)),u=r(n(13)),c=r(n(2)),h=r(n(8)),i=r(n(21)),d=r(n(43)),f=n(3),v=r(n(361)),g=r(n(23)),p=r(n(362)),m=r(n(168)),y=n(20),w=n(33),C=n(5),E=n(83);n(506),d.default.getSingleton().register("afterContextMenuDefaultOptions"),d.default.getSingleton().register("beforeContextMenuShow"),d.default.getSingleton().register("afterContextMenuShow"),d.default.getSingleton().register("afterContextMenuHide"),d.default.getSingleton().register("afterContextMenuExecute");var S=function(e){function i(e){var t;return(0,o.default)(this,i),(t=(0,a.default)(this,(0,l.default)(i).call(this,e))).eventManager=new g.default((0,s.default)(t)),t.commandExecutor=new v.default(t.hot),t.itemsFactory=null,t.menu=null,t}return(0,h.default)(i,e),(0,c.default)(i,null,[{key:"DEFAULT_ITEMS",get:function(){return[E.ROW_ABOVE,E.ROW_BELOW,E.SEPARATOR,E.COLUMN_LEFT,E.COLUMN_RIGHT,E.SEPARATOR,E.REMOVE_ROW,E.REMOVE_COLUMN,E.SEPARATOR,E.UNDO,E.REDO,E.SEPARATOR,E.READ_ONLY,E.SEPARATOR,E.ALIGNMENT]}}]),(0,c.default)(i,[{key:"isEnabled",value:function(){return this.hot.getSettings().contextMenu}},{key:"enablePlugin",value:function(){var o=this;if(!this.enabled){var e=this.hot.getSettings().contextMenu;"function"==typeof e.callback&&this.commandExecutor.setCommonCallback(e.callback),this.menu=new m.default(this.hot,{className:"htContextMenu",keepInViewport:!0}),this.menu.addLocalHook("beforeOpen",function(){return o.onMenuBeforeOpen()}),this.menu.addLocalHook("afterOpen",function(){return o.onMenuAfterOpen()}),this.menu.addLocalHook("afterClose",function(){return o.onMenuAfterClose()}),this.menu.addLocalHook("executeCommand",function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.executeCommand).call.apply(e,[o].concat(n))}),this.addHook("afterOnCellContextMenu",function(e){return o.onAfterOnCellContextMenu(e)}),(0,u.default)((0,l.default)(i.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),(0,u.default)((0,l.default)(i.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),(0,u.default)((0,l.default)(i.prototype),"disablePlugin",this).call(this)}},{key:"open",value:function(e){this.menu&&(this.prepareMenuItems(),this.menu.open(),this.menu.isOpened()&&(this.menu.setPosition({top:parseInt((0,w.pageY)(e),10)-(0,C.getWindowScrollTop)(this.hot.rootWindow),left:parseInt((0,w.pageX)(e),10)-(0,C.getWindowScrollLeft)(this.hot.rootWindow)}),this.menu.hotMenu.isHotTableEnv=this.hot.isHotTableEnv))}},{key:"close",value:function(){this.menu&&(this.menu.close(),this.itemsFactory=null)}},{key:"executeCommand",value:function(e){var t;null===this.itemsFactory&&this.prepareMenuItems();for(var n=arguments.length,r=new Array(1<n?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];(t=this.commandExecutor).execute.apply(t,[e].concat(r))}},{key:"prepareMenuItems",value:function(){var t=this;this.itemsFactory=new p.default(this.hot,i.DEFAULT_ITEMS);var e=this.hot.getSettings().contextMenu,n={items:this.itemsFactory.getItems(e)};this.hot.runHooks("afterContextMenuDefaultOptions",n),this.itemsFactory.setPredefinedItems(n.items);var r=this.itemsFactory.getItems(e);this.hot.runHooks("beforeContextMenuSetItems",r),this.menu.setMenuItems(r),(0,f.arrayEach)(r,function(e){return t.commandExecutor.registerCommand(e.key,e)})}},{key:"onAfterOnCellContextMenu",value:function(e){var t=this.hot.getSettings(),n=t.rowHeaders,r=t.colHeaders;var o,i=e.realTarget;this.close(),(0,C.hasClass)(i,"handsontableInput")||(e.preventDefault(),(0,w.stopPropagation)(e),(n||r||"TD"===(o=i).nodeName||"TD"===o.parentNode.nodeName||(0,C.hasClass)(i,"current")&&(0,C.hasClass)(i,"wtBorder"))&&this.open(e))}},{key:"onMenuBeforeOpen",value:function(){this.hot.runHooks("beforeContextMenuShow",this)}},{key:"onMenuAfterOpen",value:function(){this.hot.runHooks("afterContextMenuShow",this)}},{key:"onMenuAfterClose",value:function(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}},{key:"destroy",value:function(){this.close(),this.menu&&this.menu.destroy(),(0,u.default)((0,l.default)(i.prototype),"destroy",this).call(this)}}]),i}(i.default);S.SEPARATOR={name:E.SEPARATOR},(0,y.registerPlugin)("contextMenu",S);var b=S;t.default=b},function(e,t,n){"use strict";var r=n(9);n(12),t.__esModule=!0,t.default=function(){return{key:s,name:function(){return this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT)},disabled:function(){return!(this.getSelectedRange()&&!this.selection.isSelectedByCorner())},submenu:{items:[{key:"".concat(s,":left"),name:function(){var r=this,e=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT);return(0,i.checkSelectionConsistency)(this.getSelectedRange(),function(e,t){var n=r.getCellMeta(e,t).className;if(n&&-1!==n.indexOf("htLeft"))return!0})&&(e=(0,i.markLabelAsSelected)(e)),e},callback:function(){var o=this,e=this.getSelectedRange(),t=(0,i.getAlignmentClasses)(e,function(e,t){return o.getCellMeta(e,t).className}),n="horizontal";this.runHooks("beforeCellAlignment",t,e,n,"htLeft"),(0,i.align)(e,n,"htLeft",function(e,t){return o.getCellMeta(e,t)},function(e,t,n,r){return o.setCellMeta(e,t,n,r)}),this.render()},disabled:!1},{key:"".concat(s,":center"),name:function(){var r=this,e=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER);return(0,i.checkSelectionConsistency)(this.getSelectedRange(),function(e,t){var n=r.getCellMeta(e,t).className;if(n&&-1!==n.indexOf("htCenter"))return!0})&&(e=(0,i.markLabelAsSelected)(e)),e},callback:function(){var o=this,e=this.getSelectedRange(),t=(0,i.getAlignmentClasses)(e,function(e,t){return o.getCellMeta(e,t).className}),n="horizontal";this.runHooks("beforeCellAlignment",t,e,n,"htCenter"),(0,i.align)(e,n,"htCenter",function(e,t){return o.getCellMeta(e,t)},function(e,t,n,r){return o.setCellMeta(e,t,n,r)}),this.render()},disabled:!1},{key:"".concat(s,":right"),name:function(){var r=this,e=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT);return(0,i.checkSelectionConsistency)(this.getSelectedRange(),function(e,t){var n=r.getCellMeta(e,t).className;if(n&&-1!==n.indexOf("htRight"))return!0})&&(e=(0,i.markLabelAsSelected)(e)),e},callback:function(){var o=this,e=this.getSelectedRange(),t=(0,i.getAlignmentClasses)(e,function(e,t){return o.getCellMeta(e,t).className}),n="horizontal";this.runHooks("beforeCellAlignment",t,e,n,"htRight"),(0,i.align)(e,n,"htRight",function(e,t){return o.getCellMeta(e,t)},function(e,t,n,r){return o.setCellMeta(e,t,n,r)}),this.render()},disabled:!1},{key:"".concat(s,":justify"),name:function(){var r=this,e=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY);return(0,i.checkSelectionConsistency)(this.getSelectedRange(),function(e,t){var n=r.getCellMeta(e,t).className;if(n&&-1!==n.indexOf("htJustify"))return!0})&&(e=(0,i.markLabelAsSelected)(e)),e},callback:function(){var o=this,e=this.getSelectedRange(),t=(0,i.getAlignmentClasses)(e,function(e,t){return o.getCellMeta(e,t).className}),n="horizontal";this.runHooks("beforeCellAlignment",t,e,n,"htJustify"),(0,i.align)(e,n,"htJustify",function(e,t){return o.getCellMeta(e,t)},function(e,t,n,r){return o.setCellMeta(e,t,n,r)}),this.render()},disabled:!1},{name:o.KEY},{key:"".concat(s,":top"),name:function(){var r=this,e=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_TOP);return(0,i.checkSelectionConsistency)(this.getSelectedRange(),function(e,t){var n=r.getCellMeta(e,t).className;if(n&&-1!==n.indexOf("htTop"))return!0})&&(e=(0,i.markLabelAsSelected)(e)),e},callback:function(){var o=this,e=this.getSelectedRange(),t=(0,i.getAlignmentClasses)(e,function(e,t){return o.getCellMeta(e,t).className});this.runHooks("beforeCellAlignment",t,e,"vertical","htTop"),(0,i.align)(e,"vertical","htTop",function(e,t){return o.getCellMeta(e,t)},function(e,t,n,r){return o.setCellMeta(e,t,n,r)}),this.render()},disabled:!1},{key:"".concat(s,":middle"),name:function(){var r=this,e=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE);return(0,i.checkSelectionConsistency)(this.getSelectedRange(),function(e,t){var n=r.getCellMeta(e,t).className;if(n&&-1!==n.indexOf("htMiddle"))return!0})&&(e=(0,i.markLabelAsSelected)(e)),e},callback:function(){var o=this,e=this.getSelectedRange(),t=(0,i.getAlignmentClasses)(e,function(e,t){return o.getCellMeta(e,t).className});this.runHooks("beforeCellAlignment",t,e,"vertical","htMiddle"),(0,i.align)(e,"vertical","htMiddle",function(e,t){return o.getCellMeta(e,t)},function(e,t,n,r){return o.setCellMeta(e,t,n,r)}),this.render()},disabled:!1},{key:"".concat(s,":bottom"),name:function(){var r=this,e=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM);return(0,i.checkSelectionConsistency)(this.getSelectedRange(),function(e,t){var n=r.getCellMeta(e,t).className;if(n&&-1!==n.indexOf("htBottom"))return!0})&&(e=(0,i.markLabelAsSelected)(e)),e},callback:function(){var o=this,e=this.getSelectedRange(),t=(0,i.getAlignmentClasses)(e,function(e,t){return o.getCellMeta(e,t).className});this.runHooks("beforeCellAlignment",t,e,"vertical","htBottom"),(0,i.align)(e,"vertical","htBottom",function(e,t){return o.getCellMeta(e,t)},function(e,t,n,r){return o.setCellMeta(e,t,n,r)}),this.render()},disabled:!1}]}}},t.KEY=void 0;var i=n(62),o=n(167),a=r(n(11)),s="alignment";t.KEY=s},function(e,t,n){"use strict";var r=n(9),o=n(0);n(51),t.__esModule=!0,t.default=function(){return{key:l,name:function(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_CLEAR_COLUMN)},callback:function(e,t){var n=t[0].start.col;this.countRows()&&this.populateFromArray(0,n,[[null]],Math.max(t[0].start.row,t[0].end.row),n,"ContextMenu.clearColumn")},disabled:function(){var e=(0,a.getValidSelection)(this);if(!e)return!0;var t=(0,i.default)(e[0],3),n=t[0],r=t[1],o=[n,0,t[2],this.countCols()-1].join(",")===e.join(",");return r<0||this.countCols()>=this.getSettings().maxCols||o}}},t.KEY=void 0;var i=o(n(18)),a=n(62),s=r(n(11)),l="clear_column";t.KEY=l},function(e,t,n){"use strict";var r=n(9),o=n(0);n(51),t.__esModule=!0,t.default=function(){return{key:l,name:function(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_INSERT_LEFT)},callback:function(e,t){var n=t[Math.max(t.length-1,0)];this.alter("insert_col",n.start.col,1,"ContextMenu.columnLeft")},disabled:function(){var e=(0,s.getValidSelection)(this);if(!e)return!0;if(!this.isColumnModificationAllowed())return!0;var t=(0,a.default)(e[0],3),n=t[0],r=t[1],o=[n,0,t[2],this.countCols()-1].join(",")===e.join(","),i=1===this.countCols();return r<0||this.countCols()>=this.getSettings().maxCols||!i&&o},hidden:function(){return!this.getSettings().allowInsertColumn}}},t.KEY=void 0;var a=o(n(18)),s=n(62),i=r(n(11)),l="col_left";t.KEY=l},function(e,t,n){"use strict";var r=n(9),o=n(0);n(51),t.__esModule=!0,t.default=function(){return{key:l,name:function(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_INSERT_RIGHT)},callback:function(e,t){var n=t[Math.max(t.length-1,0)];this.alter("insert_col",n.end.col+1,1,"ContextMenu.columnRight")},disabled:function(){var e=(0,s.getValidSelection)(this);if(!e)return!0;if(!this.isColumnModificationAllowed())return!0;var t=(0,a.default)(e[0],3),n=t[0],r=t[1],o=[n,0,t[2],this.countCols()-1].join(",")===e.join(","),i=1===this.countCols();return r<0||this.countCols()>=this.getSettings().maxCols||!i&&o},hidden:function(){return!this.getSettings().allowInsertColumn}}},t.KEY=void 0;var a=o(n(18)),s=n(62),i=r(n(11)),l="col_right";t.KEY=l},function(e,t,n){"use strict";var r=n(9);t.__esModule=!0,t.default=function(){return{key:s,name:function(){var n=this,e=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_READ_ONLY);return(0,o.checkSelectionConsistency)(this.getSelectedRange(),function(e,t){return n.getCellMeta(e,t).readOnly})&&(e=(0,o.markLabelAsSelected)(e)),e},callback:function(){var n=this,e=this.getSelectedRange(),r=(0,o.checkSelectionConsistency)(e,function(e,t){return n.getCellMeta(e,t).readOnly});(0,i.arrayEach)(e,function(e){e.forAll(function(e,t){n.setCellMeta(e,t,"readOnly",!r)})}),this.render()},disabled:function(){return!(this.getSelectedRange()&&!this.selection.isSelectedByCorner())}}},t.KEY=void 0;var o=n(62),i=n(3),a=r(n(11)),s="make_read_only";t.KEY=s},function(e,t,n){"use strict";var r=n(9);t.__esModule=!0,t.default=function(){return{key:i,name:function(){return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_REDO)},callback:function(){this.redo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isRedoAvailable()}}},t.KEY=void 0;var o=r(n(11)),i="redo";t.KEY=i},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.default=function(){return{key:u,name:function(){var e=this.getSelected(),t=0;if(e)if(1<e.length)t=1;else{var n=(0,i.default)(e[0],4);n[1]-n[3]!=0&&(t=1)}return this.getTranslatedPhrase(l.CONTEXTMENU_ITEMS_REMOVE_COLUMN,t)},callback:function(){this.alter("remove_col",(0,s.transformSelectionToColumnDistance)(this.getSelected()),null,"ContextMenu.removeColumn")},disabled:function(){var e=(0,a.getValidSelection)(this),t=this.countCols();return!e||(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner()||!this.isColumnModificationAllowed()||!t)},hidden:function(){return!this.getSettings().allowRemoveColumn}}},t.KEY=void 0;var i=o(n(18)),a=n(62),s=n(137),l=r(n(11)),u="remove_col";t.KEY=u},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.default=function(){return{key:u,name:function(){var e=this.getSelected(),t=0;if(e)if(1<e.length)t=1;else{var n=(0,i.default)(e[0],3);n[0]-n[2]!=0&&(t=1)}return this.getTranslatedPhrase(l.CONTEXTMENU_ITEMS_REMOVE_ROW,t)},callback:function(){this.alter("remove_row",(0,s.transformSelectionToRowDistance)(this.getSelected()),1,"ContextMenu.removeRow")},disabled:function(){var e=(0,a.getValidSelection)(this),t=this.countRows();return!e||(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner()||!t)},hidden:function(){return!this.getSettings().allowRemoveRow}}},t.KEY=void 0;var i=o(n(18)),a=n(62),s=n(137),l=r(n(11)),u="remove_row";t.KEY=u},function(e,t,n){"use strict";var r=n(9);t.__esModule=!0,t.default=function(){return{key:a,name:function(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ROW_ABOVE)},callback:function(e,t){var n=t[Math.max(t.length-1,0)];this.alter("insert_row",n.start.row,1,"ContextMenu.rowAbove")},disabled:function(){return!(0,o.getValidSelection)(this)||(this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows)},hidden:function(){return!this.getSettings().allowInsertRow}}},t.KEY=void 0;var o=n(62),i=r(n(11)),a="row_above";t.KEY=a},function(e,t,n){"use strict";var r=n(9);t.__esModule=!0,t.default=function(){return{key:a,name:function(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ROW_BELOW)},callback:function(e,t){var n=t[Math.max(t.length-1,0)];this.alter("insert_row",n.end.row+1,1,"ContextMenu.rowBelow")},disabled:function(){return!(0,o.getValidSelection)(this)||(this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows)},hidden:function(){return!this.getSettings().allowInsertRow}}},t.KEY=void 0;var o=n(62),i=r(n(11)),a="row_below";t.KEY=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(){return{key:o,name:function(){return this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_NO_ITEMS)},disabled:!0,isCommand:!1}},t.KEY=void 0;var r=n(11),o="no_items";t.KEY=o},function(e,t,n){"use strict";var r=n(9);t.__esModule=!0,t.default=function(){return{key:i,name:function(){return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_UNDO)},callback:function(){this.undo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isUndoAvailable()}}},t.KEY=void 0;var o=r(n(11)),i="undo";t.KEY=i},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var h=r(n(1)),o=r(n(2)),d=n(5),f=n(33),i=function(){function c(e,t){(0,h.default)(this,c);var n,r,o,i,a,s,l=(0,d.getWindowScrollTop)(t),u=(0,d.getWindowScrollLeft)(t);this.rootWindow=t,this.type=this.getSourceType(e),"literal"===this.type?(n=parseInt(e.top,10),o=parseInt(e.left,10),a=e.height||0,s=e.width||0,r=n,i=o,n+=l,o+=u):"event"===this.type&&(n=parseInt((0,f.pageY)(e),10),o=parseInt((0,f.pageX)(e),10),a=e.target.clientHeight,s=e.target.clientWidth,r=n-l,i=o-u),this.top=n,this.topRelative=r,this.left=o,this.leftRelative=i,this.scrollTop=l,this.scrollLeft=u,this.cellHeight=a,this.cellWidth=s}return(0,o.default)(c,[{key:"getSourceType",value:function(e){var t="literal";return e instanceof Event&&(t="event"),t}},{key:"fitsAbove",value:function(e){return this.topRelative>=e.offsetHeight}},{key:"fitsBelow",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:this.rootWindow.innerHeight;return this.topRelative+e.offsetHeight<=n}},{key:"fitsOnRight",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:this.rootWindow.innerWidth;return this.leftRelative+this.cellWidth+e.offsetWidth<=n}},{key:"fitsOnLeft",value:function(e){return this.leftRelative>=e.offsetWidth}}]),c}();t.default=i},function(e,t,n){},function(e,t,n){"use strict";var r=n(0);n(12),n(16),n(51),n(10),n(14),n(24),n(17),t.__esModule=!0,t.default=void 0;var u=r(n(18)),o=r(n(44)),i=r(n(1)),a=r(n(2)),s=r(n(7)),l=r(n(26)),c=r(n(6)),h=r(n(13)),d=r(n(8)),f=r(n(21)),v=r(n(43)),g=r(n(342)),p=n(3),m=n(15),y=n(5),w=n(20),C=r(n(508)),E=r(n(509)),S=r(n(510)),b=n(512),R=n(163);n(514),v.default.getSingleton().register("afterCopyLimit"),v.default.getSingleton().register("modifyCopyableRange"),v.default.getSingleton().register("beforeCut"),v.default.getSingleton().register("afterCut"),v.default.getSingleton().register("beforePaste"),v.default.getSingleton().register("afterPaste"),v.default.getSingleton().register("beforeCopy"),v.default.getSingleton().register("afterCopy");var T=new WeakMap,O=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join(""),k=function(e){function n(e){var t;return(0,i.default)(this,n),(t=(0,s.default)(this,(0,c.default)(n).call(this,e))).columnsLimit=1e3,t.copyableRanges=[],t.pasteMode="overwrite",t.rowsLimit=1e3,T.set((0,l.default)(t),{isTriggeredByCopy:!1,isTriggeredByCut:!1,isBeginEditing:!1,isFragmentSelectionEnabled:!1}),t}return(0,d.default)(n,e),(0,a.default)(n,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().copyPaste}},{key:"enablePlugin",value:function(){var t=this;if(!this.enabled){var e=this.hot.getSettings();T.get(this).isFragmentSelectionEnabled=e.fragmentSelection,"object"===(0,o.default)(e.copyPaste)&&(this.pasteMode=e.copyPaste.pasteMode||this.pasteMode,this.rowsLimit=e.copyPaste.rowsLimit||this.rowsLimit,this.columnsLimit=e.copyPaste.columnsLimit||this.columnsLimit),this.addHook("afterContextMenuDefaultOptions",function(e){return t.onAfterContextMenuDefaultOptions(e)}),this.addHook("afterOnCellMouseUp",function(){return t.onAfterOnCellMouseUp()}),this.addHook("afterSelectionEnd",function(){return t.onAfterSelectionEnd()}),this.addHook("beforeKeyDown",function(){return t.onBeforeKeyDown()}),this.focusableElement=(0,b.createElement)(this.hot.rootDocument),this.focusableElement.addLocalHook("copy",function(e){return t.onCopy(e)}).addLocalHook("cut",function(e){return t.onCut(e)}).addLocalHook("paste",function(e){return t.onPaste(e)}),(0,h.default)((0,c.default)(n.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.getOrCreateFocusableElement(),(0,h.default)((0,c.default)(n.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.focusableElement&&(0,b.destroyElement)(this.focusableElement),(0,h.default)((0,c.default)(n.prototype),"disablePlugin",this).call(this)}},{key:"copy",value:function(){T.get(this).isTriggeredByCopy=!0,this.getOrCreateFocusableElement(),this.focusableElement.focus(),this.hot.rootDocument.execCommand("copy")}},{key:"cut",value:function(){T.get(this).isTriggeredByCut=!0,this.getOrCreateFocusableElement(),this.focusableElement.focus(),this.hot.rootDocument.execCommand("cut")}},{key:"getRangedCopyableData",value:function(e){var r=this,o=[],t=[],i=[];return(0,p.arrayEach)(e,function(e){(0,m.rangeEach)(e.startRow,e.endRow,function(e){-1===t.indexOf(e)&&t.push(e)}),(0,m.rangeEach)(e.startCol,e.endCol,function(e){-1===i.indexOf(e)&&i.push(e)})}),(0,p.arrayEach)(t,function(t){var n=[];(0,p.arrayEach)(i,function(e){n.push(r.hot.getCopyableData(t,e))}),o.push(n)}),g.default.stringify(o)}},{key:"getRangedData",value:function(e){var r=this,o=[],t=[],i=[];return(0,p.arrayEach)(e,function(e){(0,m.rangeEach)(e.startRow,e.endRow,function(e){-1===t.indexOf(e)&&t.push(e)}),(0,m.rangeEach)(e.startCol,e.endCol,function(e){-1===i.indexOf(e)&&i.push(e)})}),(0,p.arrayEach)(t,function(t){var n=[];(0,p.arrayEach)(i,function(e){n.push(r.hot.getCopyableData(t,e))}),o.push(n)}),o}},{key:"paste",value:function(e,t){var n=0<arguments.length&&void 0!==e?e:"",r=1<arguments.length&&void 0!==t?t:n;if(n||r){var o=new S.default;n&&o.clipboardData.setData("text/plain",n),r&&o.clipboardData.setData("text/html",r),this.getOrCreateFocusableElement(),this.onPaste(o)}}},{key:"setCopyableText",value:function(){var e=this.hot.getSelectedRangeLast();if(e){var t=e.getTopLeftCorner(),n=e.getBottomRightCorner(),r=t.row,o=t.col,i=n.row,a=n.col,s=Math.min(i,r+this.rowsLimit-1),l=Math.min(a,o+this.columnsLimit-1);this.copyableRanges.length=0,this.copyableRanges.push({startRow:r,startCol:o,endRow:s,endCol:l}),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges),i===s&&a===l||this.hot.runHooks("afterCopyLimit",i-r+1,a-o+1,this.rowsLimit,this.columnsLimit)}}},{key:"getOrCreateFocusableElement",value:function(){var e=this.hot.getActiveEditor(),t=e?e.TEXTAREA:void 0;t?this.focusableElement.setFocusableElement(t):this.focusableElement.useSecondaryElement()}},{key:"isEditorOpened",value:function(){var e=this.hot.getActiveEditor();return e&&e.isOpened()}},{key:"populateValues",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:this.hot.getSelectedLast();if(e.length){for(var r=e.length-1,o=e[0].length-1,i=Math.min(n[0],n[2]),a=Math.max(n[0],n[2],r+i),s=Math.min(n[1],n[3]),l=Math.max(n[1],n[3],o+s),u=[],c=i,h=0;c<=a;c+=1){for(var d=[],f=s,v=0;f<=l;f+=1)d.push(e[h][v]),v=v===o?0:v+=1;u.push(d),h=h===r?0:h+=1}return this.hot.populateFromArray(i,s,u,void 0,void 0,"CopyPaste.paste",this.pasteMode),[i,s,a,l]}}},{key:"onCopy",value:function(e){var t=T.get(this);if((this.hot.isListening()||t.isTriggeredByCopy)&&!this.isEditorOpened()){this.setCopyableText(),t.isTriggeredByCopy=!1;var n=this.getRangedData(this.copyableRanges);if(!!this.hot.runHooks("beforeCopy",n,this.copyableRanges)){var r=g.default.stringify(n);if(e&&e.clipboardData){var o=(0,R._dataToHTML)(n,this.hot.rootDocument);e.clipboardData.setData("text/plain",r),e.clipboardData.setData("text/html",[O,o].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",r);this.hot.runHooks("afterCopy",n,this.copyableRanges)}e.preventDefault()}}},{key:"onCut",value:function(e){var t=T.get(this);if((this.hot.isListening()||t.isTriggeredByCut)&&!this.isEditorOpened()){this.setCopyableText(),t.isTriggeredByCut=!1;var n=this.getRangedData(this.copyableRanges);if(!!this.hot.runHooks("beforeCut",n,this.copyableRanges)){var r=g.default.stringify(n);if(e&&e.clipboardData){var o=(0,R._dataToHTML)(n,this.hot.rootDocument);e.clipboardData.setData("text/plain",r),e.clipboardData.setData("text/html",[O,o].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",r);this.hot.emptySelectedCells(),this.hot.runHooks("afterCut",n,this.copyableRanges)}e.preventDefault()}}},{key:"onPaste",value:function(e){if(this.hot.isListening()&&!this.isEditorOpened()){var t;if(e&&e.preventDefault&&e.preventDefault(),e&&void 0!==e.clipboardData){var n=e.clipboardData.getData("text/html");if(n&&/(<table)|(<TABLE)/g.test(n))t=(0,R.htmlToGridSettings)(n,this.hot.rootDocument).data;else t=e.clipboardData.getData("text/plain")}else"undefined"==typeof ClipboardEvent&&void 0!==this.hot.rootWindow.clipboardData&&(t=this.hot.rootWindow.clipboardData.getData("Text"));if("string"==typeof t&&(t=g.default.parse(t)),(!t||0!==t.length)&&!1!==this.hot.runHooks("beforePaste",t,this.copyableRanges)){var r=this.populateValues(t),o=(0,u.default)(r,4),i=o[0],a=o[1],s=o[2],l=o[3];this.hot.selectCell(i,a,Math.min(this.hot.countRows()-1,s),Math.min(this.hot.countCols()-1,l)),this.hot.runHooks("afterPaste",t,this.copyableRanges)}}}},{key:"onAfterContextMenuDefaultOptions",value:function(e){e.items.push({name:"---------"},(0,C.default)(this),(0,E.default)(this))}},{key:"onAfterOnCellMouseUp",value:function(){this.hot.isListening()&&!this.isEditorOpened()&&(this.getOrCreateFocusableElement(),this.focusableElement.focus())}},{key:"onAfterSelectionEnd",value:function(){var e=T.get(this).isFragmentSelectionEnabled;this.isEditorOpened()||(this.getOrCreateFocusableElement(),e&&this.focusableElement.getFocusableElement()!==this.hot.rootDocument.activeElement&&(0,y.getSelectionText)()||(this.setCopyableText(),this.focusableElement.focus()))}},{key:"onBeforeKeyDown",value:function(){if(this.hot.isListening()&&!this.isEditorOpened()){var e=this.hot.rootDocument.activeElement,t=this.hot.getActiveEditor();!t||e!==this.focusableElement.getFocusableElement()&&e!==t.select||(this.getOrCreateFocusableElement(),this.focusableElement.focus())}}},{key:"destroy",value:function(){this.focusableElement&&((0,b.destroyElement)(this.focusableElement),this.focusableElement=null),(0,h.default)((0,c.default)(n.prototype),"destroy",this).call(this)}}]),n}(f.default);(0,w.registerPlugin)("CopyPaste",k);var M=k;t.default=M},function(e,t,n){"use strict";var r=n(9);t.__esModule=!0,t.default=function(e){return{key:"copy",name:function(){return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_COPY)},callback:function(){e.copy()},disabled:function(){var e=this.getSelected();return!e||1<e.length},hidden:!1}};var o=r(n(11))},function(e,t,n){"use strict";var r=n(9);t.__esModule=!0,t.default=function(e){return{key:"cut",name:function(){return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_CUT)},callback:function(){e.cut()},disabled:function(){var e=this.getSelected();return!e||1<e.length},hidden:!1}};var o=r(n(11))},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(511));t.default=function e(){(0,o.default)(this,e),this.clipboardData=new i.default}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=function(){function e(){(0,o.default)(this,e),this.data={}}return(0,i.default)(e,[{key:"setData",value:function(e,t){this.data[e]=t}},{key:"getData",value:function(e){return this.data[e]||void 0}}]),e}();t.default=a},function(e,t,n){"use strict";var r=n(0);n(16),n(10),n(14),n(24),n(513),n(17),t.__esModule=!0,t.createElement=function(e){var t=new h(e);return d+=1,t},t.deactivateElement=f,t.destroyElement=function(e){if(!(e instanceof h))return;0<d&&(d-=1);if(f(e),d<=0){d=0;var t=p.get(e.rootDocument);t&&t.parentNode&&(t.parentNode.removeChild(t),p.delete(e.rootDocument)),e.mainElement=null}};var o=r(n(1)),i=r(n(2)),a=r(n(23)),s=r(n(58)),l=n(4),u=n(72),c=n(5),h=function(){function t(e){(0,o.default)(this,t),this.rootDocument=e,this.mainElement=null,this.eventManager=new a.default(this),this.listenersCount=new WeakSet}return(0,i.default)(t,[{key:"useSecondaryElement",value:function(){var e=function(e){var t=p.get(e);if(t)return t.parentElement||this.rootDocument.body.appendChild(t),t;var n=e.createElement("textarea");return p.set(e,n),n.id="HandsontableCopyPaste",n.className="copyPaste",n.tabIndex=-1,n.autocomplete="off",n.wrap="hard",n.value=" ",e.body.appendChild(n),n}(this.rootDocument);this.listenersCount.has(e)||(this.listenersCount.add(e),g(this.eventManager,e,this)),this.mainElement=e}},{key:"setFocusableElement",value:function(e){this.listenersCount.has(e)||(this.listenersCount.add(e),g(this.eventManager,e,this)),this.mainElement=e}},{key:"getFocusableElement",value:function(){return this.mainElement}},{key:"focus",value:function(){this.mainElement.value=" ",(0,u.isMobileBrowser)()||(0,c.selectElementIfAllowed)(this.mainElement)}}]),t}();(0,l.mixin)(h,s.default);var d=0;function f(e){e.eventManager.clear()}var v=function(t,n){return function(e){return n.runLocalHooks(t,e)}};function g(e,t,n){e.addEventListener(t,"copy",v("copy",n)),e.addEventListener(t,"cut",v("cut",n)),e.addEventListener(t,"paste",v("paste",n))}var p=new WeakMap},function(e,t,n){"use strict";n(123)("WeakSet",function(t){return function(e){return t(this,0<arguments.length?e:void 0)}},n(191),!1,!0)},function(e,t,n){},function(e,t,n){"use strict";var r=n(9),o=n(0);n(12),n(30),n(358),n(76),n(516),t.__esModule=!0,t.default=void 0;var f=o(n(18)),i=o(n(1)),a=o(n(2)),s=o(n(7)),l=o(n(6)),u=o(n(13)),c=o(n(8)),h=o(n(21)),d=n(20),v=n(4),g=n(15),p=n(3),m=n(25),y=r(n(11)),w=n(518),C=n(93),E=n(351),S=function(e){function n(e){var t;return(0,i.default)(this,n),(t=(0,s.default)(this,(0,l.default)(n).call(this,e))).savedBorders=[],t}return(0,c.default)(n,e),(0,a.default)(n,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().customBorders}},{key:"enablePlugin",value:function(){var t=this;this.enabled||(this.addHook("afterContextMenuDefaultOptions",function(e){return t.onAfterContextMenuDefaultOptions(e)}),this.addHook("afterInit",function(){return t.onAfterInit()}),(0,u.default)((0,l.default)(n.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.hideBorders(),(0,u.default)((0,l.default)(n.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),(0,u.default)((0,l.default)(n.prototype),"updatePlugin",this).call(this)}},{key:"setBorders",value:function(e,u){var c=this,h=u?Object.keys(u):["top","right","bottom","left"],t=(0,E.detectSelectionType)(e),d=(0,E.normalizeSelectionFactory)(t);(0,p.arrayEach)(e,function(e){for(var t=d(e),n=(0,f.default)(t,4),r=n[0],o=n[1],i=n[2],a=n[3],s=function(n){for(var e=function(t){(0,p.arrayEach)(h,function(e){c.prepareBorderFromCustomAdded(n,t,u,e)})},t=o;t<=a;t+=1)e(t)},l=r;l<=i;l+=1)s(l)})}},{key:"getBorders",value:function(e){var u=this;if(!Array.isArray(e))return this.savedBorders;var t=(0,E.detectSelectionType)(e),c=(0,E.normalizeSelectionFactory)(t),h=[];return(0,p.arrayEach)(e,function(e){for(var t=c(e),n=(0,f.default)(t,4),r=n[0],o=n[1],i=n[2],a=n[3],s=function(n){for(var e=function(t){(0,p.arrayEach)(u.savedBorders,function(e){e.row===n&&e.col===t&&h.push(e)})},t=o;t<=a;t+=1)e(t)},l=r;l<=i;l+=1)s(l)}),h}},{key:"clearBorders",value:function(e){var t=this;e?this.setBorders(e):((0,p.arrayEach)(this.savedBorders,function(e){t.clearBordersFromSelectionSettings(e.id),t.clearNullCellRange(),t.hot.removeCellMeta(e.row,e.col,"borders")}),this.savedBorders.length=0)}},{key:"insertBorderIntoSettings",value:function(e,t){this.checkSavedBorders(e)||this.savedBorders.push(e);var n={row:e.row,col:e.col},r=new m.CellRange(n,n,n);this.checkCustomSelections(e,r,t)||(this.hot.selection.highlight.addCustomSelection({border:e,cellRange:r}),this.hot.view.wt.draw(!0))}},{key:"prepareBorderFromCustomAdded",value:function(e,t,n,r){var o=(0,C.createEmptyBorders)(e,t);n&&(o=(0,C.extendDefaultBorder)(o,n),(0,p.arrayEach)(this.hot.selection.highlight.customSelections,function(e){if(o.id===e.settings.id)return Object.assign(e.settings,n),o=e.settings,!1})),this.hot.setCellMeta(e,t,"borders",o),this.insertBorderIntoSettings(o,r)}},{key:"prepareBorderFromCustomAddedRange",value:function(o){var i=this,a=o.range;(0,g.rangeEach)(a.from.row,a.to.row,function(r){(0,g.rangeEach)(a.from.col,a.to.col,function(e){var t=(0,C.createEmptyBorders)(r,e),n=0;r===a.from.row&&(n+=1,(0,v.hasOwnProperty)(o,"top")&&(t.top=o.top)),r===a.to.row&&(n+=1,(0,v.hasOwnProperty)(o,"bottom")&&(t.bottom=o.bottom)),e===a.from.col&&(n+=1,(0,v.hasOwnProperty)(o,"left")&&(t.left=o.left)),e===a.to.col&&(n+=1,(0,v.hasOwnProperty)(o,"right")&&(t.right=o.right)),0<n&&(i.hot.setCellMeta(r,e,"borders",t),i.insertBorderIntoSettings(t))})})}},{key:"removeAllBorders",value:function(e,t){var n=(0,C.createId)(e,t);this.spliceBorder(n),this.clearBordersFromSelectionSettings(n),this.clearNullCellRange(),this.hot.removeCellMeta(e,t,"borders")}},{key:"setBorder",value:function(e,t,n,r){var o=this.hot.getCellMeta(e,t).borders;(o&&void 0!==o.border||(o=(0,C.createEmptyBorders)(e,t)),r)?(o[n]=(0,C.createSingleEmptyBorder)(),4===this.countHide(o)?this.removeAllBorders(e,t):(this.checkCustomSelectionsFromContextMenu(o,n,r)||this.insertBorderIntoSettings(o),this.hot.setCellMeta(e,t,"borders",o))):(o[n]=(0,C.createDefaultCustomBorder)(),this.checkCustomSelectionsFromContextMenu(o,n,r)||this.insertBorderIntoSettings(o),this.hot.setCellMeta(e,t,"borders",o))}},{key:"prepareBorder",value:function(e,t,o){var i=this;(0,p.arrayEach)(e,function(e){var n=e.start,r=e.end;if(n.row===r.row&&n.col===r.col)"noBorders"===t?i.removeAllBorders(n.row,n.col):i.setBorder(n.row,n.col,t,o);else switch(t){case"noBorders":(0,g.rangeEach)(n.col,r.col,function(t){(0,g.rangeEach)(n.row,r.row,function(e){i.removeAllBorders(e,t)})});break;case"top":(0,g.rangeEach)(n.col,r.col,function(e){i.setBorder(n.row,e,t,o)});break;case"right":(0,g.rangeEach)(n.row,r.row,function(e){i.setBorder(e,r.col,t,o)});break;case"bottom":(0,g.rangeEach)(n.col,r.col,function(e){i.setBorder(r.row,e,t,o)});break;case"left":(0,g.rangeEach)(n.row,r.row,function(e){i.setBorder(e,n.col,t,o)})}})}},{key:"createCustomBorders",value:function(e){var t=this;(0,p.arrayEach)(e,function(e){e.range?t.prepareBorderFromCustomAddedRange(e):t.prepareBorderFromCustomAdded(e.row,e.col,e)})}},{key:"countHide",value:function(e){var t=Object.values(e);return(0,p.arrayReduce)(t,function(e,t){var n=e;return t.hide&&(n+=1),n},0)}},{key:"clearBordersFromSelectionSettings",value:function(e){var t=(0,p.arrayMap)(this.hot.selection.highlight.customSelections,function(e){return e.settings.id}).indexOf(e);-1<t&&this.hot.selection.highlight.customSelections[t].clear(),this.hot.view.wt.draw(!0)}},{key:"clearNullCellRange",value:function(){var n=this;(0,p.arrayEach)(this.hot.selection.highlight.customSelections,function(e,t){if(null===e.cellRange)return n.hot.selection.highlight.customSelections.splice(t,1),!1})}},{key:"hideBorders",value:function(){var t=this;(0,p.arrayEach)(this.savedBorders,function(e){t.clearBordersFromSelectionSettings(e.id)})}},{key:"spliceBorder",value:function(e){var t=(0,p.arrayMap)(this.savedBorders,function(e){return e.id}).indexOf(e);-1<t&&this.savedBorders.splice(t,1)}},{key:"checkSavedBorders",value:function(n){var r=this,o=!1;return 4===this.countHide(n)?(this.spliceBorder(n.id),o=!0):(0,p.arrayEach)(this.savedBorders,function(e,t){if(n.id===e.id)return r.savedBorders[t]=n,!(o=!0)}),o}},{key:"checkCustomSelectionsFromContextMenu",value:function(t,n,r){var o=!1;return(0,p.arrayEach)(this.hot.selection.highlight.customSelections,function(e){if(t.id===e.settings.id)return(0,v.objectEach)(e.instanceBorders,function(e){e.toggleHiddenClass(n,r)}),!(o=!0)}),o}},{key:"checkCustomSelections",value:function(t,n,r){var e=this.countHide(t),o=!1;return 4===e?(this.removeAllBorders(t.row,t.col),this.clearBordersFromSelectionSettings(t.id),this.clearNullCellRange(),o=!0):(0,p.arrayEach)(this.hot.selection.highlight.customSelections,function(e){if(t.id===e.settings.id)return e.cellRange=n,r&&(0,v.objectEach)(e.instanceBorders,function(e){e.changeBorderStyle(r,t)}),!(o=!0)}),o}},{key:"changeBorderSettings",value:function(){var e=this.hot.getSettings().customBorders;Array.isArray(e)?(e.length||(this.savedBorders=e),this.createCustomBorders(e)):void 0!==e&&this.createCustomBorders(this.savedBorders)}},{key:"onAfterContextMenuDefaultOptions",value:function(e){this.hot.getSettings().customBorders&&e.items.push({name:"---------"},{key:"borders",name:function(){return this.getTranslatedPhrase(y.CONTEXTMENU_ITEMS_BORDERS)},disabled:function(){return this.selection.isSelectedByCorner()},submenu:{items:[(0,w.top)(this),(0,w.right)(this),(0,w.bottom)(this),(0,w.left)(this),(0,w.noBorders)(this)]}})}},{key:"onAfterInit",value:function(){this.changeBorderSettings()}},{key:"destroy",value:function(){(0,u.default)((0,l.default)(n.prototype),"destroy",this).call(this)}}]),n}(h.default);(0,d.registerPlugin)("customBorders",S);var b=S;t.default=b},function(e,t,n){var r=n(22),o=n(517);r({target:"Object",stat:!0},{values:function(e){return o(e)}})},function(e,t,n){var l=n(47),u=n(89),c=n(69),h=n(94).f;e.exports=function(e,t){for(var n,r=c(e),o=u(r),i=o.length,a=0,s=[];a<i;)n=o[a++],l&&!h.call(r,n)||s.push(t?[n,r[n]]:r[n]);return s}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0;var o=r(n(519));t.bottom=o.default;var i=r(n(520));t.left=i.default;var a=r(n(521));t.noBorders=a.default;var s=r(n(522));t.right=s.default;var l=r(n(523));t.top=l.default},function(e,t,n){"use strict";var r=n(9);t.__esModule=!0,t.default=function(r){return{key:"borders:bottom",name:function(){var e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_BORDERS_BOTTOM);return(0,i.checkSelectionBorders)(this,"bottom")&&(e=(0,i.markSelected)(e)),e},callback:function(e,t){var n=(0,i.checkSelectionBorders)(this,"bottom");r.prepareBorder(t,"bottom",n)}}};var o=r(n(11)),i=n(93)},function(e,t,n){"use strict";var r=n(9);t.__esModule=!0,t.default=function(r){return{key:"borders:left",name:function(){var e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_BORDERS_LEFT);return(0,i.checkSelectionBorders)(this,"left")&&(e=(0,i.markSelected)(e)),e},callback:function(e,t){var n=(0,i.checkSelectionBorders)(this,"left");r.prepareBorder(t,"left",n)}}};var o=r(n(11)),i=n(93)},function(e,t,n){"use strict";var r=n(9);t.__esModule=!0,t.default=function(n){return{key:"borders:no_borders",name:function(){return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_REMOVE_BORDERS)},callback:function(e,t){n.prepareBorder(t,"noBorders")},disabled:function(){return!(0,i.checkSelectionBorders)(this)}}};var o=r(n(11)),i=n(93)},function(e,t,n){"use strict";var r=n(9);t.__esModule=!0,t.default=function(r){return{key:"borders:right",name:function(){var e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_BORDERS_RIGHT);return(0,i.checkSelectionBorders)(this,"right")&&(e=(0,i.markSelected)(e)),e},callback:function(e,t){var n=(0,i.checkSelectionBorders)(this,"right");r.prepareBorder(t,"right",n)}}};var o=r(n(11)),i=n(93)},function(e,t,n){"use strict";var r=n(9);t.__esModule=!0,t.default=function(r){return{key:"borders:top",name:function(){var e=this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_BORDERS_TOP);return(0,i.checkSelectionBorders)(this,"top")&&(e=(0,i.markSelected)(e)),e},callback:function(e,t){var n=(0,i.checkSelectionBorders)(this,"top");r.prepareBorder(t,"top",n)}}};var o=r(n(11)),i=n(93)},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(26)),l=r(n(6)),u=r(n(13)),c=r(n(8)),h=r(n(21)),d=r(n(23)),f=n(20),v=function(e){function n(e){var t;return(0,o.default)(this,n),(t=(0,a.default)(this,(0,l.default)(n).call(this,e))).eventManager=new d.default((0,s.default)(t)),t.boundaries=null,t.callback=null,t.listening=!1,t}return(0,c.default)(n,e),(0,i.default)(n,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().dragToScroll}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.addHook("afterOnCellMouseDown",function(){return e.setupListening()}),this.addHook("afterOnCellCornerMouseDown",function(){return e.setupListening()}),this.registerEvents(),(0,u.default)((0,l.default)(n.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),(0,u.default)((0,l.default)(n.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.unregisterEvents(),(0,u.default)((0,l.default)(n.prototype),"disablePlugin",this).call(this)}},{key:"setBoundaries",value:function(e){this.boundaries=e}},{key:"setCallback",value:function(e){this.callback=e}},{key:"check",value:function(e,t){var n=0,r=0;t<this.boundaries.top?r=t-this.boundaries.top:t>this.boundaries.bottom&&(r=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,r)}},{key:"registerEvents",value:function(){var t=this,e=this.hot.rootDocument;this.eventManager.addEventListener(e,"mouseup",function(){return t.onMouseUp()}),this.eventManager.addEventListener(e,"mousemove",function(e){return t.onMouseMove(e)})}},{key:"unregisterEvents",value:function(){this.eventManager.clear()}},{key:"setupListening",value:function(){var n=this.hot.view.wt.wtTable.holder;n!==this.hot.rootWindow&&(this.setBoundaries(n.getBoundingClientRect()),this.setCallback(function(e,t){e<0?n.scrollLeft-=50:0<e&&(n.scrollLeft+=50),t<0?n.scrollTop-=20:0<t&&(n.scrollTop+=20)}),this.listening=!0)}},{key:"onMouseMove",value:function(e){this.listening&&this.check(e.clientX,e.clientY)}},{key:"onMouseUp",value:function(){this.listening=!1}},{key:"destroy",value:function(){(0,u.default)((0,l.default)(n.prototype),"destroy",this).call(this)}}]),n}(h.default);(0,f.registerPlugin)("dragToScroll",v);var g=v;t.default=g},function(e,t,n){"use strict";var r=n(0);n(16),n(10),n(14),n(24),n(17),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(26)),l=r(n(6)),u=r(n(13)),c=r(n(8)),h=r(n(21)),d=n(20),f=n(3),v=r(n(526)),g=r(n(527));n(528);var p=new WeakMap,m=function(e){function r(e){var t;return(0,o.default)(this,r),t=(0,a.default)(this,(0,l.default)(r).call(this,e)),p.set((0,s.default)(t),{moveByFreeze:!1,afterFirstUse:!1}),t.frozenColumnsBasePositions=[],t.manualColumnMovePlugin=void 0,t}return(0,c.default)(r,e),(0,i.default)(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().manualColumnFreeze}},{key:"enablePlugin",value:function(){var n=this;this.enabled||(this.addHook("afterContextMenuDefaultOptions",function(e){return n.addContextMenuEntry(e)}),this.addHook("afterInit",function(){return n.onAfterInit()}),this.addHook("beforeColumnMove",function(e,t){return n.onBeforeColumnMove(e,t)}),(0,u.default)((0,l.default)(r.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){var e=p.get(this);e.afterFirstUse=!1,e.moveByFreeze=!1,(0,u.default)((0,l.default)(r.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),(0,u.default)((0,l.default)(r.prototype),"updatePlugin",this).call(this)}},{key:"freezeColumn",value:function(e){var t=p.get(this),n=this.hot.getSettings();t.afterFirstUse||(t.afterFirstUse=!0),n.fixedColumnsLeft===this.hot.countCols()||e<=n.fixedColumnsLeft-1||(t.moveByFreeze=!0,e!==this.getMovePlugin().columnsMapper.getValueByIndex(e)&&(this.frozenColumnsBasePositions[n.fixedColumnsLeft]=e),this.getMovePlugin().moveColumn(e,n.fixedColumnsLeft),n.fixedColumnsLeft+=1)}},{key:"unfreezeColumn",value:function(e){var t=p.get(this),n=this.hot.getSettings();if(t.afterFirstUse||(t.afterFirstUse=!0),!(n.fixedColumnsLeft<=0||e>n.fixedColumnsLeft-1)){var r=this.getBestColumnReturnPosition(e);t.moveByFreeze=!0,n.fixedColumnsLeft-=1,this.getMovePlugin().moveColumn(e,r+1)}}},{key:"getMovePlugin",value:function(){return this.manualColumnMovePlugin||(this.manualColumnMovePlugin=this.hot.getPlugin("manualColumnMove")),this.manualColumnMovePlugin}},{key:"getBestColumnReturnPosition",value:function(e){var t,n=this.getMovePlugin(),r=this.hot.getSettings().fixedColumnsLeft,o=n.columnsMapper.getValueByIndex(r);if(null===this.frozenColumnsBasePositions[e]||void 0===this.frozenColumnsBasePositions[e])for(t=n.columnsMapper.getValueByIndex(e);null!==o&&o<=t;)r+=1,o=n.columnsMapper.getValueByIndex(r);else{for(t=this.frozenColumnsBasePositions[e],this.frozenColumnsBasePositions[e]=void 0;null!==o&&o<=t;)r+=1,o=n.columnsMapper.getValueByIndex(r);r=o}return r-1}},{key:"addContextMenuEntry",value:function(e){e.items.push({name:"---------"},(0,v.default)(this),(0,g.default)(this))}},{key:"onAfterInit",value:function(){this.getMovePlugin().isEnabled()||this.getMovePlugin().enablePlugin()}},{key:"onBeforeColumnMove",value:function(e,t){var n=p.get(this);if(n.afterFirstUse&&!n.moveByFreeze){var r=this.hot.getSettings().fixedColumnsLeft,o=t<r;if(o||(0,f.arrayEach)(e,function(e){if(e<r)return!(o=!0)}),o)return!1}n.moveByFreeze&&(n.moveByFreeze=!1)}},{key:"destroy",value:function(){(0,u.default)((0,l.default)(r.prototype),"destroy",this).call(this)}}]),r}(h.default);(0,d.registerPlugin)("manualColumnFreeze",m);var y=m;t.default=y},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.default=function(r){return{key:"freeze_column",name:function(){return this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_FREEZE_COLUMN)},callback:function(e,t){var n=(0,i.default)(t,1)[0].start.col;r.freezeColumn(n),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},hidden:function(){var e=this.getSelectedRange(),t=!1;return void 0===e?t=!0:1<e.length?t=!0:(e[0].from.col!==e[0].to.col||e[0].from.col<=this.getSettings().fixedColumnsLeft-1)&&(t=!0),t}}};var i=o(n(18)),a=r(n(11))},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.default=function(r){return{key:"unfreeze_column",name:function(){return this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN)},callback:function(e,t){var n=(0,i.default)(t,1)[0].start.col;r.unfreezeColumn(n),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},hidden:function(){var e=this.getSelectedRange(),t=!1;return void 0===e?t=!0:1<e.length?t=!0:(e[0].from.col!==e[0].to.col||e[0].from.col>=this.getSettings().fixedColumnsLeft)&&(t=!0),t}}};var i=o(n(18)),a=r(n(11))},function(e,t,n){},function(e,t,n){"use strict";var r=n(0);n(12),n(16),n(10),n(14),n(24),n(17),n(32),t.__esModule=!0,t.default=void 0;var a=r(n(36)),o=r(n(1)),i=r(n(2)),s=r(n(7)),l=r(n(26)),u=r(n(6)),c=r(n(13)),h=r(n(8)),d=r(n(21)),f=r(n(43)),v=n(3),S=n(5),g=n(15),p=r(n(23)),m=n(20),y=r(n(530)),w=r(n(531)),C=r(n(532));n(533),f.default.getSingleton().register("beforeColumnMove"),f.default.getSingleton().register("afterColumnMove"),f.default.getSingleton().register("unmodifyCol");var b=new WeakMap,E="ht__manualColumnMove",R="show-ui",T="on-moving--columns",O="after-selection--columns",k=function(e){function n(e){var t;return(0,o.default)(this,n),t=(0,s.default)(this,(0,u.default)(n).call(this,e)),b.set((0,l.default)(t),{columnsToMove:[],countCols:0,fixedColumns:0,pressed:void 0,disallowMoving:void 0,target:{eventPageX:void 0,coords:void 0,TD:void 0,col:void 0}}),t.removedColumns=[],t.columnsMapper=new y.default((0,l.default)(t)),t.eventManager=new p.default((0,l.default)(t)),t.backlight=new w.default(e),t.guideline=new C.default(e),t}return(0,h.default)(n,e),(0,i.default)(n,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().manualColumnMove}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.addHook("beforeOnCellMouseDown",function(e,t,n,r){return o.onBeforeOnCellMouseDown(e,t,n,r)}),this.addHook("beforeOnCellMouseOver",function(e,t,n,r){return o.onBeforeOnCellMouseOver(e,t,n,r)}),this.addHook("afterScrollVertically",function(){return o.onAfterScrollVertically()}),this.addHook("modifyCol",function(e,t){return o.onModifyCol(e,t)}),this.addHook("beforeRemoveCol",function(e,t){return o.onBeforeRemoveCol(e,t)}),this.addHook("afterRemoveCol",function(){return o.onAfterRemoveCol()}),this.addHook("afterCreateCol",function(e,t){return o.onAfterCreateCol(e,t)}),this.addHook("afterLoadData",function(){return o.onAfterLoadData()}),this.addHook("unmodifyCol",function(e){return o.onUnmodifyCol(e)}),this.registerEvents(),(0,S.addClass)(this.hot.rootElement,E),(0,c.default)((0,u.default)(n.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.onAfterPluginsInitialized(),(0,c.default)((0,u.default)(n.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){var e=this.hot.getSettings().manualColumnMove;Array.isArray(e)&&this.columnsMapper.clearMap(),(0,S.removeClass)(this.hot.rootElement,E),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),(0,c.default)((0,u.default)(n.prototype),"disablePlugin",this).call(this)}},{key:"moveColumn",value:function(e,t){this.moveColumns([e],t)}},{key:"moveColumns",value:function(e,r){var o=this,t=(0,a.default)(e),n=b.get(this),i=this.hot.runHooks("beforeColumnMove",t,r);n.disallowMoving=!i,!1!==i&&((0,v.arrayEach)(e,function(e,t,n){n[t]=o.columnsMapper.getValueByIndex(e)}),(0,v.arrayEach)(e,function(e,t){var n=o.columnsMapper.getIndexByValue(e);n!==r&&o.columnsMapper.moveColumn(n,r+t)}),this.columnsMapper.clearNull()),this.hot.runHooks("afterColumnMove",t,r)}},{key:"changeSelection",value:function(e,t){this.hot.selectColumns(e,t)}},{key:"getColumnsWidth",value:function(e,t){for(var n=0,r=e;r<t;r++){n+=r<0?this.hot.view.wt.wtViewport.getRowHeaderWidth()||0:this.hot.view.wt.wtTable.getStretchedColumnWidth(r)||0}return n}},{key:"initialSettings",value:function(){var e=this.hot.getSettings().manualColumnMove;Array.isArray(e)?this.moveColumns(e,0):void 0!==e&&this.persistentStateLoad()}},{key:"isFixedColumnsLeft",value:function(e){return e<this.hot.getSettings().fixedColumnsLeft}},{key:"persistentStateSave",value:function(){this.hot.runHooks("persistentStateSave","manualColumnMove",this.columnsMapper._arrayMap)}},{key:"persistentStateLoad",value:function(){var e={};this.hot.runHooks("persistentStateLoad","manualColumnMove",e),e.value&&(this.columnsMapper._arrayMap=e.value)}},{key:"prepareColumnsToMoving",value:function(e,t){var n=[];return(0,g.rangeEach)(e,t,function(e){n.push(e)}),n}},{key:"refreshPositions",value:function(){var e=b.get(this),t=this.hot.view.wt.wtTable.getFirstVisibleColumn(),n=this.hot.view.wt.wtTable.getLastVisibleColumn(),r=this.hot.view.wt.wtTable,o=this.hot.view.wt.wtOverlays.scrollableElement,i="number"==typeof o.scrollX?o.scrollX:o.scrollLeft,a=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,e.coordsColumn),s=e.target.eventPageX-(e.rootElementOffset-(void 0===o.scrollX?i:0)),l=r.hider.offsetWidth,u=r.TBODY.offsetLeft,c=this.backlight.getOffset().left,h=this.backlight.getSize().width,d=0;if(e.rootElementOffset+r.holder.offsetWidth+i<e.target.eventPageX&&e.coordsColumn<e.countCols&&(e.coordsColumn+=1),e.hasRowHeaders&&(d=this.hot.view.wt.wtOverlays.leftOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsLeft(e.coordsColumn)&&(a+=i),a+=d,e.coordsColumn<0)0<e.fixedColumns?e.target.col=0:e.target.col=0<t?t-1:t;else if(e.target.TD.offsetWidth/2+a<=s){var f=e.coordsColumn>=e.countCols?e.countCols-1:e.coordsColumn;e.target.col=f+1,a+=e.target.TD.offsetWidth,e.target.col>n&&n<e.countCols&&this.hot.scrollViewportTo(void 0,n+1,void 0,!0)}else e.target.col=e.coordsColumn,e.target.col<=t&&e.target.col>=e.fixedColumns&&0<t&&this.hot.scrollViewportTo(void 0,t-1);e.target.col<=t&&e.target.col>=e.fixedColumns&&0<t&&this.hot.scrollViewportTo(void 0,t-1);var v=s,g=a;l<=s+h+c?v=l-h-c:s+c<u+d&&(v=u+d+Math.abs(c)),l-1<=a?g=l-1:0===g?g=1:void 0!==o.scrollX&&e.coordsColumn<e.fixedColumns&&(g-=e.rootElementOffset<=o.scrollX?e.rootElementOffset:0),this.backlight.setPosition(null,v),this.guideline.setPosition(null,g)}},{key:"updateColumnsMapper",value:function(){var e=this.hot.countSourceCols(),t=this.columnsMapper._arrayMap.length;if(0===t)this.columnsMapper.createMap(e||this.hot.getSettings().startCols);else if(t<e){var n=e-t;this.columnsMapper.insertItems(t,n)}else if(e<t){var r=e-1,o=[];(0,v.arrayEach)(this.columnsMapper._arrayMap,function(e,t){r<e&&o.push(t)}),this.columnsMapper.removeItems(o)}}},{key:"registerEvents",value:function(){var t=this,e=this.hot.rootDocument.documentElement;this.eventManager.addEventListener(e,"mousemove",function(e){return t.onMouseMove(e)}),this.eventManager.addEventListener(e,"mouseup",function(){return t.onMouseUp()})}},{key:"unregisterEvents",value:function(){this.eventManager.clear()}},{key:"onBeforeOnCellMouseDown",value:function(e,t,n,r){var o=this.hot.view.wt.wtTable,i=this.hot.selection.isSelectedByColumnHeader(),a=this.hot.getSelectedRangeLast(),s=b.get(this),l=(0,S.hasClass)(e.realTarget,"sortAction");if(!a||!i||s.pressed||0!==e.button||l)return s.pressed=!1,void(s.columnsToMove.length=0,S.removeClass)(this.hot.rootElement,[T,R]);var u=this.guideline.isBuilt()&&!this.guideline.isAppended(),c=this.backlight.isBuilt()&&!this.backlight.isAppended();u&&c&&(this.guideline.appendTo(o.hider),this.backlight.appendTo(o.hider));var h=a.from,d=a.to,f=Math.min(h.col,d.col),v=Math.max(h.col,d.col);if(t.row<0&&t.col>=f&&t.col<=v){r.column=!0,s.pressed=!0,s.target.eventPageX=e.pageX,s.coordsColumn=t.col,s.target.TD=n,s.target.col=t.col,s.columnsToMove=this.prepareColumnsToMoving(f,v),s.hasRowHeaders=!!this.hot.getSettings().rowHeaders,s.countCols=this.hot.countCols(),s.fixedColumns=this.hot.getSettings().fixedColumnsLeft,s.rootElementOffset=(0,S.offset)(this.hot.rootElement).left;var g=s.hasRowHeaders?-1:0,p=o.holder.scrollTop+o.getColumnHeaderHeight(0)+1,m=t.col<s.fixedColumns,y=this.hot.view.wt.wtOverlays.scrollableElement,w=y.scrollX?y.scrollX-s.rootElementOffset:0,C=e.layerX-(m?w:0),E=Math.abs(this.getColumnsWidth(f,t.col)+C);this.backlight.setPosition(p,this.getColumnsWidth(g,f)+E),this.backlight.setSize(this.getColumnsWidth(f,v+1),o.hider.offsetHeight-p),this.backlight.setOffset(null,-1*E),(0,S.addClass)(this.hot.rootElement,T)}else(0,S.removeClass)(this.hot.rootElement,O),s.pressed=!1,s.columnsToMove.length=0}},{key:"onMouseMove",value:function(e){var t=b.get(this);if(t.pressed){if(e.realTarget===this.backlight.element){var n=this.backlight.getSize().width;this.backlight.setSize(0),setTimeout(function(){this.backlight.setPosition(n)})}t.target.eventPageX=e.pageX,this.refreshPositions()}}},{key:"onBeforeOnCellMouseOver",value:function(e,t,n,r){var o=this.hot.getSelectedRangeLast(),i=b.get(this);o&&i.pressed&&(-1<i.columnsToMove.indexOf(t.col)?(0,S.removeClass)(this.hot.rootElement,R):(0,S.addClass)(this.hot.rootElement,R),r.row=!0,r.column=!0,r.cell=!0,i.coordsColumn=t.col,i.target.TD=n)}},{key:"onMouseUp",value:function(){var e=b.get(this);if(e.coordsColumn=void 0,e.pressed=!1,(e.backlightWidth=0,S.removeClass)(this.hot.rootElement,[T,R,O]),this.hot.selection.isSelectedByColumnHeader()&&(0,S.addClass)(this.hot.rootElement,O),!(e.columnsToMove.length<1||void 0===e.target.col||-1<e.columnsToMove.indexOf(e.target.col))){if(this.moveColumns(e.columnsToMove,e.target.col),this.persistentStateSave(),this.hot.render(),this.hot.view.wt.wtOverlays.adjustElementsSize(!0),!e.disallowMoving){var t=this.columnsMapper.getIndexByValue(e.columnsToMove[0]),n=this.columnsMapper.getIndexByValue(e.columnsToMove[e.columnsToMove.length-1]);this.changeSelection(t,n)}e.columnsToMove.length=0}}},{key:"onAfterScrollVertically",value:function(){var e=this.hot.view.wt.wtTable,t=e.getColumnHeaderHeight(0)+1+e.holder.scrollTop;this.backlight.setPosition(t),this.backlight.setSize(null,e.hider.offsetHeight-t)}},{key:"onAfterCreateCol",value:function(e,t){this.columnsMapper.shiftItems(e,t)}},{key:"onBeforeRemoveCol",value:function(e,t){var n=this;this.removedColumns.length=0,!1!==e&&(0,g.rangeEach)(e,e+t-1,function(e){n.removedColumns.push(n.hot.runHooks("modifyCol",e,n.pluginName))})}},{key:"onAfterRemoveCol",value:function(){this.columnsMapper.unshiftItems(this.removedColumns)}},{key:"onAfterLoadData",value:function(){this.updateColumnsMapper()}},{key:"onModifyCol",value:function(e,t){var n=e;if(t!==this.pluginName){var r=this.columnsMapper.getValueByIndex(n);n=null===r?n:r}return n}},{key:"onUnmodifyCol",value:function(e){var t=this.columnsMapper.getIndexByValue(e);return null===t?e:t}},{key:"onAfterPluginsInitialized",value:function(){this.updateColumnsMapper(),this.initialSettings(),this.backlight.build(),this.guideline.build()}},{key:"destroy",value:function(){this.backlight.destroy(),this.guideline.destroy(),(0,c.default)((0,u.default)(n.prototype),"destroy",this).call(this)}}]),n}(d.default);(0,m.registerPlugin)("ManualColumnMove",k);var M=k;t.default=M},function(e,t,n){"use strict";var r=n(0);n(30),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(92)),s=n(3),l=n(4),u=n(15),c=function(){function t(e){(0,o.default)(this,t),this.manualColumnMove=e}return(0,i.default)(t,[{key:"createMap",value:function(e){var t=this,n=void 0===e?this._arrayMap.length:e;(this._arrayMap.length=0,u.rangeEach)(n-1,function(e){t._arrayMap[e]=e})}},{key:"destroy",value:function(){this._arrayMap=null}},{key:"moveColumn",value:function(e,t){var n=this._arrayMap[e];this._arrayMap[e]=null,this._arrayMap.splice(t,0,n)}},{key:"clearNull",value:function(){this._arrayMap=(0,s.arrayFilter)(this._arrayMap,function(e){return null!==e})}}]),t}();(0,l.mixin)(c,a.default);var h=c;t.default=h},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(13)),u=r(n(8)),c=r(n(363)),h=n(5),d=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(0,s.default)(t).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"build",value:function(){(0,l.default)((0,s.default)(t.prototype),"build",this).call(this),(0,h.addClass)(this._element,"ht__manualColumnMove--backlight")}}]),t}(c.default);t.default=d},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(13)),u=r(n(8)),c=r(n(363)),h=n(5),d=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(0,s.default)(t).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"build",value:function(){(0,l.default)((0,s.default)(t.prototype),"build",this).call(this),(0,h.addClass)(this._element,"ht__manualColumnMove--guideline")}}]),t}(c.default);t.default=d},function(e,t,n){},function(e,t,n){"use strict";var r=n(0);n(32),t.__esModule=!0,t.default=void 0;var i=r(n(1)),a=r(n(2)),s=r(n(7)),l=r(n(26)),u=r(n(6)),c=r(n(13)),h=r(n(8)),o=r(n(21)),v=n(5),d=r(n(23)),f=n(33),g=n(3),p=n(15),m=n(20),y=function(e){function o(e){var t;(0,i.default)(this,o);var n=(t=(0,s.default)(this,(0,u.default)(o).call(this,e))).hot.rootDocument;return t.currentTH=null,t.currentCol=null,t.selectedCols=[],t.currentWidth=null,t.newSize=null,t.startY=null,t.startWidth=null,t.startOffset=null,t.handle=n.createElement("DIV"),t.guide=n.createElement("DIV"),t.eventManager=new d.default((0,l.default)(t)),t.pressed=null,t.dblclick=0,t.autoresizeTimeout=null,t.manualColumnWidths=[],(0,v.addClass)(t.handle,"manualColumnResizer"),(0,v.addClass)(t.guide,"manualColumnResizerGuide"),t}return(0,h.default)(o,e),(0,a.default)(o,[{key:"isEnabled",value:function(){return this.hot.getSettings().manualColumnResize}},{key:"enablePlugin",value:function(){var r=this;if(!this.enabled){this.manualColumnWidths=[];var e=this.hot.getSettings().manualColumnResize,t=this.loadManualColumnWidths();this.addHook("modifyColWidth",function(e,t){return r.onModifyColWidth(e,t)}),this.addHook("beforeStretchingColumnWidth",function(e,t){return r.onBeforeStretchingColumnWidth(e,t)}),this.addHook("beforeColumnResize",function(e,t,n){return r.onBeforeColumnResize(e,t,n)}),void 0!==t?this.manualColumnWidths=t:Array.isArray(e)?this.manualColumnWidths=e:this.manualColumnWidths=[],this.bindEvents(),(0,c.default)((0,u.default)(o.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){var e=this.hot.getSettings().manualColumnResize;Array.isArray(e)?this.manualColumnWidths=e:e||(this.manualColumnWidths=[])}},{key:"disablePlugin",value:function(){(0,c.default)((0,u.default)(o.prototype),"disablePlugin",this).call(this)}},{key:"saveManualColumnWidths",value:function(){this.hot.runHooks("persistentStateSave","manualColumnWidths",this.manualColumnWidths)}},{key:"loadManualColumnWidths",value:function(){var e={};return this.hot.runHooks("persistentStateLoad","manualColumnWidths",e),e.value}},{key:"setupHandlePosition",value:function(e){var t=this;if(!e.parentNode)return!1;this.currentTH=e;var n=this.hot.view.wt.wtTable.getCoords(this.currentTH),r=n.col,o=(0,v.outerHeight)(this.currentTH);if(0<=r){var i=this.currentTH.getBoundingClientRect(),a=r<this.hot.getSettings().fixedColumnsLeft?this.hot.view.wt.wtOverlays.topLeftCornerOverlay:this.hot.view.wt.wtOverlays.topOverlay,s=a.getRelativeCellPosition(this.currentTH,n.row,n.col);if(!s){var l=a.clone.wtTable.THEAD.lastChild.children[+!!this.hot.getSettings().rowHeaders+r];s=a.getRelativeCellPosition(l,n.row,n.col)}if(this.currentCol=r,this.selectedCols=[],this.hot.selection.isSelected()&&this.hot.selection.isSelectedByColumnHeader()){var u=this.hot.getSelectedRangeLast(),c=u.from,h=u.to,d=c.col,f=h.col;f<=d&&(d=h.col,f=c.col),this.currentCol>=d&&this.currentCol<=f?(0,p.rangeEach)(d,f,function(e){return t.selectedCols.push(e)}):this.selectedCols.push(this.currentCol)}else this.selectedCols.push(this.currentCol);this.startOffset=s.left-6,this.startWidth=parseInt(i.width,10),this.handle.style.top="".concat(s.top,"px"),this.handle.style.left="".concat(this.startOffset+this.startWidth,"px"),this.handle.style.height="".concat(o,"px"),this.hot.rootElement.appendChild(this.handle)}}},{key:"refreshHandlePosition",value:function(){this.handle.style.left="".concat(this.startOffset+this.currentWidth,"px")}},{key:"setupGuidePosition",value:function(){var e=parseInt((0,v.outerHeight)(this.handle),10),t=parseInt(this.handle.style.top,10)+e,n=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);(0,v.addClass)(this.handle,"active"),(0,v.addClass)(this.guide,"active"),this.guide.style.top="".concat(t,"px"),this.guide.style.left=this.handle.style.left,this.guide.style.height="".concat(n-e,"px"),this.hot.rootElement.appendChild(this.guide)}},{key:"refreshGuidePosition",value:function(){this.guide.style.left=this.handle.style.left}},{key:"hideHandleAndGuide",value:function(){(0,v.removeClass)(this.handle,"active"),(0,v.removeClass)(this.guide,"active")}},{key:"checkIfColumnHeader",value:function(e){if(e===this.hot.rootElement)return!1;var t=e.parentNode;return"THEAD"===t.tagName||this.checkIfColumnHeader(t)}},{key:"getTHFromTargetElement",value:function(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getTHFromTargetElement(e.parentNode):null}},{key:"onMouseOver",value:function(e){if(this.checkIfColumnHeader(e.target)){var t=this.getTHFromTargetElement(e.target);if(!t)return;var n=t.getAttribute("colspan");!t||null!==n&&1!==n||this.pressed||this.setupHandlePosition(t)}}},{key:"afterMouseDownTimeout",value:function(){function r(){o.hot.forceFullRender=!0,o.hot.view.render(),o.hot.view.wt.wtOverlays.adjustElementsSize(!0)}function t(e,t){var n=o.hot.runHooks("beforeColumnResize",e,o.newSize,!0);void 0!==n&&(o.newSize=n),"all"===o.hot.getSettings().stretchH?o.clearManualSize(e):o.setManualSize(e,o.newSize),t&&r(),o.saveManualColumnWidths(),o.hot.runHooks("afterColumnResize",e,o.newSize,!0)}var o=this;2<=this.dblclick&&(1<this.selectedCols.length?((0,g.arrayEach)(this.selectedCols,function(e){t(e)}),r()):(0,g.arrayEach)(this.selectedCols,function(e){t(e,!0)}));this.dblclick=0,this.autoresizeTimeout=null}},{key:"onMouseDown",value:function(e){var t=this;(0,v.hasClass)(e.target,"manualColumnResizer")&&(this.setupGuidePosition(),this.pressed=this.hot,null===this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout(function(){return t.afterMouseDownTimeout()},500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick+=1,this.startX=(0,f.pageX)(e),this.newSize=this.startWidth)}},{key:"onMouseMove",value:function(e){var t=this;this.pressed&&(this.currentWidth=this.startWidth+((0,f.pageX)(e)-this.startX),(0,g.arrayEach)(this.selectedCols,function(e){t.newSize=t.setManualSize(e,t.currentWidth)}),this.refreshHandlePosition(),this.refreshGuidePosition())}},{key:"onMouseUp",value:function(){function n(){r.hot.forceFullRender=!0,r.hot.view.render(),r.hot.view.wt.wtOverlays.adjustElementsSize(!0)}function t(e,t){r.hot.runHooks("beforeColumnResize",e,r.newSize,!1),t&&n(),r.saveManualColumnWidths(),r.hot.runHooks("afterColumnResize",e,r.newSize)}var r=this;if(this.pressed){if(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startWidth)1<this.selectedCols.length?((0,g.arrayEach)(this.selectedCols,function(e){t(e)}),n()):(0,g.arrayEach)(this.selectedCols,function(e){t(e,!0)});this.setupHandlePosition(this.currentTH)}}},{key:"bindEvents",value:function(){var t=this,e=this.hot,n=e.rootWindow,r=e.rootElement;this.eventManager.addEventListener(r,"mouseover",function(e){return t.onMouseOver(e)}),this.eventManager.addEventListener(r,"mousedown",function(e){return t.onMouseDown(e)}),this.eventManager.addEventListener(n,"mousemove",function(e){return t.onMouseMove(e)}),this.eventManager.addEventListener(n,"mouseup",function(){return t.onMouseUp()})}},{key:"setManualSize",value:function(e,t){var n=Math.max(t,20),r=this.hot.runHooks("modifyCol",e);return this.manualColumnWidths[r]=n}},{key:"clearManualSize",value:function(e){var t=this.hot.runHooks("modifyCol",e);this.manualColumnWidths[t]=void 0}},{key:"onModifyColWidth",value:function(e,t){var n=e;if(this.enabled){var r=this.hot.runHooks("modifyCol",t),o=this.manualColumnWidths[r];this.hot.getSettings().manualColumnResize&&o&&(n=o)}return n}},{key:"onBeforeStretchingColumnWidth",value:function(e,t){var n=this.manualColumnWidths[t];return void 0===n&&(n=e),n}},{key:"onBeforeColumnResize",value:function(){this.hot.view.wt.wtViewport.hasOversizedColumnHeadersMarked={}}}]),o}(o.default);(0,m.registerPlugin)("manualColumnResize",y);var w=y;t.default=w},function(e,t,n){"use strict";var r=n(0);n(12),n(16),n(10),n(14),n(24),n(17),n(32),t.__esModule=!0,t.default=void 0;var a=r(n(36)),o=r(n(1)),i=r(n(2)),s=r(n(7)),l=r(n(26)),u=r(n(6)),c=r(n(13)),h=r(n(8)),d=r(n(21)),f=r(n(43)),v=n(3),y=n(5),g=n(15),p=r(n(23)),m=n(20),w=r(n(536)),C=r(n(537)),E=r(n(538));n(539),f.default.getSingleton().register("beforeRowMove"),f.default.getSingleton().register("afterRowMove"),f.default.getSingleton().register("unmodifyRow");var S=new WeakMap,b="ht__manualRowMove",R="show-ui",T="on-moving--rows",O="after-selection--rows",k=function(e){function n(e){var t;return(0,o.default)(this,n),t=(0,s.default)(this,(0,u.default)(n).call(this,e)),S.set((0,l.default)(t),{rowsToMove:[],pressed:void 0,disallowMoving:void 0,target:{eventPageY:void 0,coords:void 0,TD:void 0,row:void 0}}),t.removedRows=[],t.rowsMapper=new w.default((0,l.default)(t)),t.eventManager=new p.default((0,l.default)(t)),t.backlight=new C.default(e),t.guideline=new E.default(e),t}return(0,h.default)(n,e),(0,i.default)(n,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().manualRowMove}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.addHook("beforeOnCellMouseDown",function(e,t,n,r){return o.onBeforeOnCellMouseDown(e,t,n,r)}),this.addHook("beforeOnCellMouseOver",function(e,t,n,r){return o.onBeforeOnCellMouseOver(e,t,n,r)}),this.addHook("afterScrollHorizontally",function(){return o.onAfterScrollHorizontally()}),this.addHook("modifyRow",function(e,t){return o.onModifyRow(e,t)}),this.addHook("beforeRemoveRow",function(e,t){return o.onBeforeRemoveRow(e,t)}),this.addHook("afterRemoveRow",function(){return o.onAfterRemoveRow()}),this.addHook("afterCreateRow",function(e,t){return o.onAfterCreateRow(e,t)}),this.addHook("afterLoadData",function(){return o.onAfterLoadData()}),this.addHook("beforeColumnSort",function(e,t){return o.onBeforeColumnSort(e,t)}),this.addHook("unmodifyRow",function(e){return o.onUnmodifyRow(e)}),this.registerEvents(),(0,y.addClass)(this.hot.rootElement,b),(0,c.default)((0,u.default)(n.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.onAfterPluginsInitialized(),(0,c.default)((0,u.default)(n.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){var e=this.hot.getSettings().manualRowMove;Array.isArray(e)&&this.rowsMapper.clearMap(),(0,y.removeClass)(this.hot.rootElement,b),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),(0,c.default)((0,u.default)(n.prototype),"disablePlugin",this).call(this)}},{key:"moveRow",value:function(e,t){this.moveRows([e],t)}},{key:"moveRows",value:function(e,r){var o=this,t=(0,a.default)(e),n=S.get(this),i=this.hot.runHooks("beforeRowMove",t,r);n.disallowMoving=!1===i,n.disallowMoving||((0,v.arrayEach)(e,function(e,t,n){n[t]=o.rowsMapper.getValueByIndex(e)}),(0,v.arrayEach)(e,function(e,t){var n=o.rowsMapper.getIndexByValue(e);n!==r&&o.rowsMapper.moveRow(n,r+t)}),this.rowsMapper.clearNull()),this.hot.runHooks("afterRowMove",t,r)}},{key:"changeSelection",value:function(e,t){this.hot.selectRows(e,t)}},{key:"getRowsHeight",value:function(e,t){for(var n=0,r=e;r<t;r++){n+=this.hot.view.wt.wtTable.getRowHeight(r)||23}return n}},{key:"initialSettings",value:function(){var e=this.hot.getSettings().manualRowMove;if(Array.isArray(e))this.moveRows(e,0);else if(void 0!==e){var t=this.persistentStateLoad();t.length&&this.moveRows(t,0)}}},{key:"isFixedRowTop",value:function(e){return e<this.hot.getSettings().fixedRowsTop}},{key:"isFixedRowBottom",value:function(e){return e>this.hot.getSettings().fixedRowsBottom}},{key:"persistentStateSave",value:function(){this.hot.runHooks("persistentStateSave","manualRowMove",this.rowsMapper._arrayMap)}},{key:"persistentStateLoad",value:function(){var e={};return this.hot.runHooks("persistentStateLoad","manualRowMove",e),e.value?e.value:[]}},{key:"prepareRowsToMoving",value:function(){var e=this.hot.getSelectedRangeLast(),t=[];if(!e)return t;var n=e.from,r=e.to,o=Math.min(n.row,r.row),i=Math.max(n.row,r.row);return(0,g.rangeEach)(o,i,function(e){t.push(e)}),t}},{key:"refreshPositions",value:function(){var e=S.get(this),t=e.target.coords,n=this.hot.view.wt.wtTable.getFirstVisibleRow(),r=this.hot.view.wt.wtTable.getLastVisibleRow(),o=this.hot.getSettings().fixedRowsTop,i=this.hot.countRows();t.row<o&&0<n&&this.hot.scrollViewportTo(n-1),t.row>=r&&r<i&&this.hot.scrollViewportTo(r+1,void 0,!0);var a=this.hot.view.wt.wtTable,s=e.target.TD,l=(0,y.offset)(this.hot.rootElement),u=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,t.row),c=e.target.eventPageY-l.top+a.holder.scrollTop,h=a.hider.offsetHeight,d=a.TBODY.offsetTop,f=this.backlight.getOffset().top,v=this.backlight.getSize().height;this.isFixedRowTop(t.row)&&(u+=a.holder.scrollTop),t.row<0?e.target.row=0<n?n-1:n:s.offsetHeight/2+u<=c?(e.target.row=t.row+1,u+=0===t.row?s.offsetHeight-1:s.offsetHeight):e.target.row=t.row;var g=c,p=u;h<=c+v+f?g=h-v-f:c+f<d&&(g=d+Math.abs(f)),h-1<=u&&(p=h-1);var m=0;this.hot.view.wt.wtOverlays.topOverlay&&(m=this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.TABLE.offsetHeight),t.row>=o&&p-a.holder.scrollTop<m&&this.hot.scrollViewportTo(t.row),this.backlight.setPosition(g),this.guideline.setPosition(p)}},{key:"updateRowsMapper",value:function(){var e=this.hot.countSourceRows(),t=this.rowsMapper._arrayMap.length;if(0===t)this.rowsMapper.createMap(e||this.hot.getSettings().startRows);else if(t<e){var n=e-t;this.rowsMapper.insertItems(t,n)}else if(e<t){var r=e-1,o=[];(0,v.arrayEach)(this.rowsMapper._arrayMap,function(e,t){r<e&&o.push(t)}),this.rowsMapper.removeItems(o)}}},{key:"registerEvents",value:function(){var t=this,e=this.hot.rootDocument.documentElement;this.eventManager.addEventListener(e,"mousemove",function(e){return t.onMouseMove(e)}),this.eventManager.addEventListener(e,"mouseup",function(){return t.onMouseUp()})}},{key:"unregisterEvents",value:function(){this.eventManager.clear()}},{key:"onBeforeColumnSort",value:function(e,t){S.get(this).disallowMoving=void 0!==t}},{key:"onBeforeOnCellMouseDown",value:function(e,t,n,r){var o=this.hot.view.wt,i=o.wtTable,a=o.wtViewport,s=this.hot.selection.isSelectedByRowHeader(),l=this.hot.getSelectedRangeLast(),u=S.get(this);if(!l||!s||u.pressed||0!==e.button)return u.pressed=!1,void(u.rowsToMove.length=0,y.removeClass)(this.hot.rootElement,[T,R]);var c=this.guideline.isBuilt()&&!this.guideline.isAppended(),h=this.backlight.isBuilt()&&!this.backlight.isAppended();c&&h&&(this.guideline.appendTo(i.hider),this.backlight.appendTo(i.hider));var d=l.from,f=l.to,v=Math.min(d.row,f.row),g=Math.max(d.row,f.row);if(t.col<0&&t.row>=v&&t.row<=g){r.row=!0,u.pressed=!0,u.target.eventPageY=e.pageY,u.target.coords=t,u.target.TD=n,u.rowsToMove=this.prepareRowsToMoving();var p=i.holder.scrollLeft+a.getRowHeaderWidth();this.backlight.setPosition(null,p),this.backlight.setSize(i.hider.offsetWidth-p,this.getRowsHeight(v,g+1)),this.backlight.setOffset(-1*(this.getRowsHeight(v,t.row)+e.layerY),null),(0,y.addClass)(this.hot.rootElement,T),this.refreshPositions()}else(0,y.removeClass)(this.hot.rootElement,O),u.pressed=!1,u.rowsToMove.length=0}},{key:"onMouseMove",value:function(e){var t=S.get(this);if(t.pressed){if(e.realTarget===this.backlight.element){var n=this.backlight.getSize().height;this.backlight.setSize(null,0),setTimeout(function(){this.backlight.setPosition(null,n)})}t.target.eventPageY=e.pageY,this.refreshPositions()}}},{key:"onBeforeOnCellMouseOver",value:function(e,t,n,r){var o=this.hot.getSelectedRangeLast(),i=S.get(this);o&&i.pressed&&(-1<i.rowsToMove.indexOf(t.row)?(0,y.removeClass)(this.hot.rootElement,R):(0,y.addClass)(this.hot.rootElement,R),r.row=!0,r.column=!0,r.cell=!0,i.target.coords=t,i.target.TD=n)}},{key:"onMouseUp",value:function(){var e=S.get(this),t=e.target.row,n=e.rowsToMove.length;if(e.pressed=!1,(e.backlightHeight=0,y.removeClass)(this.hot.rootElement,[T,R,O]),this.hot.selection.isSelectedByRowHeader()&&(0,y.addClass)(this.hot.rootElement,O),!(n<1||void 0===t||-1<e.rowsToMove.indexOf(t)||e.rowsToMove[n-1]===t-1)){if(this.moveRows(e.rowsToMove,t),this.persistentStateSave(),this.hot.render(),!e.disallowMoving){var r=this.rowsMapper.getIndexByValue(e.rowsToMove[0]),o=this.rowsMapper.getIndexByValue(e.rowsToMove[n-1]);this.changeSelection(r,o)}e.rowsToMove.length=0}}},{key:"onAfterScrollHorizontally",value:function(){var e=this.hot.view.wt.wtTable,t=this.hot.view.wt.wtViewport.getRowHeaderWidth()+e.holder.scrollLeft;this.backlight.setPosition(null,t),this.backlight.setSize(e.hider.offsetWidth-t)}},{key:"onAfterCreateRow",value:function(e,t){this.rowsMapper.shiftItems(e,t)}},{key:"onBeforeRemoveRow",value:function(e,t){var n=this;this.removedRows.length=0,!1!==e&&(0,g.rangeEach)(e,e+t-1,function(e){n.removedRows.push(n.hot.runHooks("modifyRow",e,n.pluginName))})}},{key:"onAfterRemoveRow",value:function(){this.rowsMapper.unshiftItems(this.removedRows)}},{key:"onAfterLoadData",value:function(){this.updateRowsMapper()}},{key:"onModifyRow",value:function(e,t){var n=e;if(t!==this.pluginName){var r=this.rowsMapper.getValueByIndex(n);n=null===r?n:r}return n}},{key:"onUnmodifyRow",value:function(e){var t=this.rowsMapper.getIndexByValue(e);return null===t?e:t}},{key:"onAfterPluginsInitialized",value:function(){this.updateRowsMapper(),this.initialSettings(),this.backlight.build(),this.guideline.build()}},{key:"destroy",value:function(){this.backlight.destroy(),this.guideline.destroy(),this.rowsMapper.destroy(),(0,c.default)((0,u.default)(n.prototype),"destroy",this).call(this)}}]),n}(d.default);(0,m.registerPlugin)("ManualRowMove",k);var M=k;t.default=M},function(e,t,n){"use strict";var r=n(0);n(30),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(92)),s=n(3),l=n(4),u=n(15),c=function(){function t(e){(0,o.default)(this,t),this.manualRowMove=e}return(0,i.default)(t,[{key:"createMap",value:function(e){var t=this,n=void 0===e?this._arrayMap.length:e;(this._arrayMap.length=0,u.rangeEach)(n-1,function(e){t._arrayMap[e]=e})}},{key:"destroy",value:function(){this._arrayMap=null}},{key:"moveRow",value:function(e,t){var n=this._arrayMap[e];this._arrayMap[e]=null,this._arrayMap.splice(t,0,n)}},{key:"clearNull",value:function(){this._arrayMap=(0,s.arrayFilter)(this._arrayMap,function(e){return null!==e})}}]),t}();(0,l.mixin)(c,a.default);var h=c;t.default=h},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(13)),u=r(n(8)),c=r(n(364)),h=n(5),d=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(0,s.default)(t).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"build",value:function(){(0,l.default)((0,s.default)(t.prototype),"build",this).call(this),(0,h.addClass)(this._element,"ht__manualRowMove--backlight")}}]),t}(c.default);t.default=d},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(13)),u=r(n(8)),c=r(n(364)),h=n(5),d=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(0,s.default)(t).apply(this,arguments))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"build",value:function(){(0,l.default)((0,s.default)(t.prototype),"build",this).call(this),(0,h.addClass)(this._element,"ht__manualRowMove--guideline")}}]),t}(c.default);t.default=d},function(e,t,n){},function(e,t,n){"use strict";var r=n(0);n(32),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(26)),l=r(n(6)),u=r(n(13)),c=r(n(8)),h=r(n(21)),p=n(5),d=r(n(23)),f=n(33),v=n(3),m=n(15),g=n(20),y=function(e){function r(e){var t;(0,o.default)(this,r);var n=(t=(0,a.default)(this,(0,l.default)(r).call(this,e))).hot.rootDocument;return t.currentTH=null,t.currentRow=null,t.selectedRows=[],t.currentHeight=null,t.newSize=null,t.startY=null,t.startHeight=null,t.startOffset=null,t.handle=n.createElement("DIV"),t.guide=n.createElement("DIV"),t.eventManager=new d.default((0,s.default)(t)),t.pressed=null,t.dblclick=0,t.autoresizeTimeout=null,t.manualRowHeights=[],(0,p.addClass)(t.handle,"manualRowResizer"),(0,p.addClass)(t.guide,"manualRowResizerGuide"),t}return(0,c.default)(r,e),(0,i.default)(r,[{key:"isEnabled",value:function(){return this.hot.getSettings().manualRowResize}},{key:"enablePlugin",value:function(){var n=this;if(!this.enabled){this.manualRowHeights=[];var e=this.hot.getSettings().manualRowResize,t=this.loadManualRowHeights();void 0!==t?this.manualRowHeights=t:Array.isArray(e)?this.manualRowHeights=e:this.manualRowHeights=[],this.addHook("modifyRowHeight",function(e,t){return n.onModifyRowHeight(e,t)}),this.bindEvents(),(0,u.default)((0,l.default)(r.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){var e=this.hot.getSettings().manualRowResize;Array.isArray(e)?this.manualRowHeights=e:e||(this.manualRowHeights=[])}},{key:"disablePlugin",value:function(){(0,u.default)((0,l.default)(r.prototype),"disablePlugin",this).call(this)}},{key:"saveManualRowHeights",value:function(){this.hot.runHooks("persistentStateSave","manualRowHeights",this.manualRowHeights)}},{key:"loadManualRowHeights",value:function(){var e={};return this.hot.runHooks("persistentStateLoad","manualRowHeights",e),e.value}},{key:"setupHandlePosition",value:function(e){var t=this;this.currentTH=e;var n=this.hot.getCoords(this.currentTH),r=n.row,o=(0,p.outerWidth)(this.currentTH);if(0<=r){var i=this.currentTH.getBoundingClientRect(),a=r<this.hot.getSettings().fixedRowsTop,s=r>=this.hot.countRows()-this.hot.getSettings().fixedRowsBottom,l=this.hot.view.wt.wtOverlays.leftOverlay;a?l=this.hot.view.wt.wtOverlays.topLeftCornerOverlay:s&&(l=this.hot.view.wt.wtOverlays.bottomLeftCornerOverlay);var u=l.getRelativeCellPosition(this.currentTH,n.row,n.col);if(!u){var c=l.clone.wtTable.TBODY.children[+!!this.hot.getSettings().colHeaders+r].firstChild;u=l.getRelativeCellPosition(c,n.row,n.col)}if(this.currentRow=r,this.selectedRows=[],this.hot.selection.isSelected()&&this.hot.selection.isSelectedByRowHeader()){var h=this.hot.getSelectedRangeLast(),d=h.from,f=h.to,v=d.row,g=f.row;g<=v&&(v=f.row,g=d.row),this.currentRow>=v&&this.currentRow<=g?(0,m.rangeEach)(v,g,function(e){return t.selectedRows.push(e)}):this.selectedRows.push(this.currentRow)}else this.selectedRows.push(this.currentRow);this.startOffset=u.top-6,this.startHeight=parseInt(i.height,10),this.handle.style.top="".concat(this.startOffset+this.startHeight,"px"),this.handle.style.left="".concat(u.left,"px"),this.handle.style.width="".concat(o,"px"),this.hot.rootElement.appendChild(this.handle)}}},{key:"refreshHandlePosition",value:function(){this.handle.style.top="".concat(this.startOffset+this.currentHeight,"px")}},{key:"setupGuidePosition",value:function(){var e=parseInt((0,p.outerWidth)(this.handle),10),t=parseInt(this.handle.style.left,10)+e,n=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);(0,p.addClass)(this.handle,"active"),(0,p.addClass)(this.guide,"active"),this.guide.style.top=this.handle.style.top,this.guide.style.left="".concat(t,"px"),this.guide.style.width="".concat(n-e,"px"),this.hot.rootElement.appendChild(this.guide)}},{key:"refreshGuidePosition",value:function(){this.guide.style.top=this.handle.style.top}},{key:"hideHandleAndGuide",value:function(){(0,p.removeClass)(this.handle,"active"),(0,p.removeClass)(this.guide,"active")}},{key:"checkIfRowHeader",value:function(e){if(e===this.hot.rootElement)return!1;var t=e.parentNode;return"TBODY"===t.tagName||this.checkIfRowHeader(t)}},{key:"getTHFromTargetElement",value:function(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getTHFromTargetElement(e.parentNode):null}},{key:"onMouseOver",value:function(e){if(this.checkIfRowHeader(e.target)){var t=this.getTHFromTargetElement(e.target);t&&(this.pressed||this.setupHandlePosition(t))}}},{key:"afterMouseDownTimeout",value:function(){function r(){o.hot.forceFullRender=!0,o.hot.view.render(),o.hot.view.wt.wtOverlays.adjustElementsSize(!0)}function t(e,t){var n=o.hot.runHooks("beforeRowResize",e,o.newSize,!0);void 0!==n&&(o.newSize=n),o.setManualSize(e,o.newSize),t&&r(),o.hot.runHooks("afterRowResize",e,o.newSize,!0)}var o=this;2<=this.dblclick&&(1<this.selectedRows.length?((0,v.arrayEach)(this.selectedRows,function(e){t(e)}),r()):(0,v.arrayEach)(this.selectedRows,function(e){t(e,!0)}));this.dblclick=0,this.autoresizeTimeout=null}},{key:"onMouseDown",value:function(e){var t=this;(0,p.hasClass)(e.target,"manualRowResizer")&&(this.setupGuidePosition(),this.pressed=this.hot,null===this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout(function(){return t.afterMouseDownTimeout()},500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick+=1,this.startY=(0,f.pageY)(e),this.newSize=this.startHeight)}},{key:"onMouseMove",value:function(e){var t=this;this.pressed&&(this.currentHeight=this.startHeight+((0,f.pageY)(e)-this.startY),(0,v.arrayEach)(this.selectedRows,function(e){t.newSize=t.setManualSize(e,t.currentHeight)}),this.refreshHandlePosition(),this.refreshGuidePosition())}},{key:"onMouseUp",value:function(){function n(){r.hot.forceFullRender=!0,r.hot.view.render(),r.hot.view.wt.wtOverlays.adjustElementsSize(!0)}function t(e,t){r.hot.runHooks("beforeRowResize",e,r.newSize),t&&n(),r.saveManualRowHeights(),r.hot.runHooks("afterRowResize",e,r.newSize,!1)}var r=this;if(this.pressed){if(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startHeight)1<this.selectedRows.length?((0,v.arrayEach)(this.selectedRows,function(e){t(e)}),n()):(0,v.arrayEach)(this.selectedRows,function(e){t(e,!0)});this.setupHandlePosition(this.currentTH)}}},{key:"bindEvents",value:function(){var t=this,e=this.hot,n=e.rootElement,r=e.rootWindow;this.eventManager.addEventListener(n,"mouseover",function(e){return t.onMouseOver(e)}),this.eventManager.addEventListener(n,"mousedown",function(e){return t.onMouseDown(e)}),this.eventManager.addEventListener(r,"mousemove",function(e){return t.onMouseMove(e)}),this.eventManager.addEventListener(r,"mouseup",function(){return t.onMouseUp()})}},{key:"setManualSize",value:function(e,t){var n=this.hot.runHooks("modifyRow",e);return this.manualRowHeights[n]=t}},{key:"onModifyRowHeight",value:function(e,t){if(this.enabled){var n=this.hot.getPlugin("autoRowSize"),r=n?n.heights[t]:null,o=this.hot.runHooks("modifyRow",t),i=this.manualRowHeights[o];if(void 0!==i&&(i===r||(e||0)<i))return i}return e}}]),r}(h.default);(0,g.registerPlugin)("manualRowResize",y);var w=y;t.default=w},function(e,t,n){"use strict";var r=n(0);n(19),n(53),n(31),n(16),n(30),n(10),n(38),n(14),n(24),n(17),t.__esModule=!0,t.default=void 0;var s=r(n(18)),l=r(n(36)),o=r(n(1)),i=r(n(2)),a=r(n(7)),u=r(n(26)),c=r(n(6)),h=r(n(13)),d=r(n(8)),f=r(n(21)),v=r(n(43)),g=n(20),p=n(33),m=n(25),y=r(n(542)),w=r(n(169)),C=r(n(543)),E=r(n(544)),S=r(n(545)),b=n(3),R=n(4),T=n(57),O=n(15),k=n(365);n(546),v.default.getSingleton().register("beforeMergeCells"),v.default.getSingleton().register("afterMergeCells"),v.default.getSingleton().register("beforeUnmergeCells"),v.default.getSingleton().register("afterUnmergeCells");var M=new WeakMap,N=function(e){function n(e){var t;return(0,o.default)(this,n),t=(0,a.default)(this,(0,c.default)(n).call(this,e)),M.set((0,u.default)(t),{lastDesiredCoords:null}),t.mergedCellsCollection=null,t.autofillCalculations=null,t.selectionCalculations=null,t}return(0,d.default)(n,e),(0,i.default)(n,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().mergeCells}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.mergedCellsCollection=new y.default(this),this.autofillCalculations=new C.default(this),this.selectionCalculations=new E.default(this),this.addHook("afterInit",function(){return e.onAfterInit.apply(e,arguments)}),this.addHook("beforeKeyDown",function(){return e.onBeforeKeyDown.apply(e,arguments)}),this.addHook("modifyTransformStart",function(){return e.onModifyTransformStart.apply(e,arguments)}),this.addHook("afterModifyTransformStart",function(){return e.onAfterModifyTransformStart.apply(e,arguments)}),this.addHook("modifyTransformEnd",function(){return e.onModifyTransformEnd.apply(e,arguments)}),this.addHook("modifyGetCellCoords",function(){return e.onModifyGetCellCoords.apply(e,arguments)}),this.addHook("beforeSetRangeEnd",function(){return e.onBeforeSetRangeEnd.apply(e,arguments)}),this.addHook("afterIsMultipleSelection",function(){return e.onAfterIsMultipleSelection.apply(e,arguments)}),this.addHook("afterRenderer",function(){return e.onAfterRenderer.apply(e,arguments)}),this.addHook("afterContextMenuDefaultOptions",function(){return e.addMergeActionsToContextMenu.apply(e,arguments)}),this.addHook("afterGetCellMeta",function(){return e.onAfterGetCellMeta.apply(e,arguments)}),this.addHook("afterViewportRowCalculatorOverride",function(){return e.onAfterViewportRowCalculatorOverride.apply(e,arguments)}),this.addHook("afterViewportColumnCalculatorOverride",function(){return e.onAfterViewportColumnCalculatorOverride.apply(e,arguments)}),this.addHook("modifyAutofillRange",function(){return e.onModifyAutofillRange.apply(e,arguments)}),this.addHook("afterCreateCol",function(){return e.onAfterCreateCol.apply(e,arguments)}),this.addHook("afterRemoveCol",function(){return e.onAfterRemoveCol.apply(e,arguments)}),this.addHook("afterCreateRow",function(){return e.onAfterCreateRow.apply(e,arguments)}),this.addHook("afterRemoveRow",function(){return e.onAfterRemoveRow.apply(e,arguments)}),this.addHook("afterChange",function(){return e.onAfterChange.apply(e,arguments)}),this.addHook("beforeDrawBorders",function(){return e.onBeforeDrawAreaBorders.apply(e,arguments)}),this.addHook("afterDrawSelection",function(){return e.onAfterDrawSelection.apply(e,arguments)}),this.addHook("beforeRemoveCellClassNames",function(){return e.onBeforeRemoveCellClassNames.apply(e,arguments)}),(0,h.default)((0,c.default)(n.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.clearCollections(),this.hot.render(),(0,h.default)((0,c.default)(n.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){var e=this.hot.getSettings().mergeCells;this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(e),(0,h.default)((0,c.default)(n.prototype),"updatePlugin",this).call(this)}},{key:"validateSetting",value:function(e){var t=!0;return!!e&&(w.default.containsNegativeValues(e)?((0,T.warn)(w.default.NEGATIVE_VALUES_WARNING(e)),t=!1):w.default.isOutOfBounds(e,this.hot.countRows(),this.hot.countCols())?((0,T.warn)(w.default.IS_OUT_OF_BOUNDS_WARNING(e)),t=!1):w.default.isSingleCell(e)?((0,T.warn)(w.default.IS_SINGLE_CELL(e)),t=!1):w.default.containsZeroSpan(e)&&((0,T.warn)(w.default.ZERO_SPAN_WARNING(e)),t=!1),t)}},{key:"generateFromSettings",value:function(e){var o=this;if(Array.isArray(e)){var t,i=[];(0,b.arrayEach)(e,function(e){if(o.validateSetting(e)){var t=new m.CellCoords(e.row,e.col),n=new m.CellCoords(e.row+e.rowspan-1,e.col+e.colspan-1),r=new m.CellRange(t,t,n);i.push(o.mergeRange(r,!0,!0))}}),i=i.filter(function(e){return!0!==e});var n=this.getBulkCollectionData(i);(t=this.hot).populateFromArray.apply(t,(0,l.default)(n))}}},{key:"getBulkCollectionData",value:function(e){var t,i=this.getBulkCollectionDataRange(e),a=(t=this.hot).getData.apply(t,(0,l.default)(i)).splice(0);return(0,b.arrayEach)(e,function(e){var t=(0,s.default)(e,3),r=t[0],o=t[1],n=t[2];(0,b.arrayEach)(n,function(e,n){(0,b.arrayEach)(e,function(e,t){a[r-i[0]+n][o-i[1]+t]=e})})}),[i[0],i[1],a]}},{key:"getBulkCollectionDataRange",value:function(e){var t=[0,0],n=[0,0],r=null,o=null,i=null;return(0,b.arrayEach)(e,function(e){r=e[0],o=e[1],i=e[2],t[0]=Math.min(r,t[0]),t[1]=Math.min(o,t[1]),n[0]=Math.max(r+i.length-1,n[0]),n[1]=Math.max(o+i[0].length-1,n[1])}),[].concat(t,n)}},{key:"clearCollections",value:function(){this.mergedCellsCollection.clear()}},{key:"canMergeRange",value:function(e,t){return!!(1<arguments.length&&void 0!==t&&t)||this.validateSetting(e)}},{key:"toggleMergeOnSelection",value:function(){var e=this.hot.getSelectedRangeLast();if(e){e.setDirection("NW-SE");var t=e.from,n=e.to;this.toggleMerge(e),this.hot.selectCell(t.row,t.col,n.row,n.col,!1)}}},{key:"mergeSelection",value:function(e){var t=0<arguments.length&&void 0!==e?e:this.hot.getSelectedRangeLast();if(t){t.setDirection("NW-SE");var n=t.from,r=t.to;this.unmergeRange(t,!0),this.mergeRange(t),this.hot.selectCell(n.row,n.col,r.row,r.col,!1)}}},{key:"unmergeSelection",value:function(e){var t=0<arguments.length&&void 0!==e?e:this.hot.getSelectedRangeLast();if(t){var n=t.from,r=t.to;this.unmergeRange(t,!0),this.hot.selectCell(n.row,n.col,r.row,r.col,!1)}}},{key:"mergeRange",value:function(e,t,n){var r=this,o=1<arguments.length&&void 0!==t&&t,i=2<arguments.length&&void 0!==n&&n,a=e.getTopLeftCorner(),s=e.getBottomRightCorner(),l={row:a.row,col:a.col,rowspan:s.row-a.row+1,colspan:s.col-a.col+1},u=[],c=null;return!!this.canMergeRange(l,o)&&(this.hot.runHooks("beforeMergeCells",e,o),(0,O.rangeEach)(0,l.rowspan-1,function(n){(0,O.rangeEach)(0,l.colspan-1,function(e){var t=null;u[n]||(u[n]=[]),0===n&&0===e?t=r.hot.getDataAtCell(l.row,l.col):r.hot.setCellMeta(l.row+n,l.col+e,"hidden",!0),u[n][e]=t})}),this.hot.setCellMeta(l.row,l.col,"spanned",!0),!this.mergedCellsCollection.add(l)||(i?c=[l.row,l.col,u]:this.hot.populateFromArray(l.row,l.col,u,void 0,void 0,this.pluginName),this.hot.runHooks("afterMergeCells",e,l,o),c))}},{key:"unmergeRange",value:function(e,t){var r=this,n=1<arguments.length&&void 0!==t&&t,o=this.mergedCellsCollection.getWithinRange(e);o&&(this.hot.runHooks("beforeUnmergeCells",e,n),(0,b.arrayEach)(o,function(n){r.mergedCellsCollection.remove(n.row,n.col),(0,O.rangeEach)(0,n.rowspan-1,function(t){(0,O.rangeEach)(0,n.colspan-1,function(e){r.hot.removeCellMeta(n.row+t,n.col+e,"hidden")})}),r.hot.removeCellMeta(n.row,n.col,"spanned")}),this.hot.render(),this.hot.runHooks("afterUnmergeCells",e,n))}},{key:"toggleMerge",value:function(e){var t=this.mergedCellsCollection.get(e.from.row,e.from.col);t.row===e.from.row&&t.col===e.from.col&&t.row+t.rowspan-1===e.to.row&&t.col+t.colspan-1===e.to.col?this.unmergeRange(e):this.mergeSelection(e)}},{key:"merge",value:function(e,t,n,r){var o=new m.CellCoords(e,t),i=new m.CellCoords(n,r);this.mergeRange(new m.CellRange(o,o,i))}},{key:"unmerge",value:function(e,t,n,r){var o=new m.CellCoords(e,t),i=new m.CellCoords(n,r);this.unmergeRange(new m.CellRange(o,o,i))}},{key:"onAfterInit",value:function(){this.generateFromSettings(this.hot.getSettings().mergeCells),this.hot.render()}},{key:"onBeforeKeyDown",value:function(e){!e.ctrlKey&&!e.metaKey||e.altKey||77!==e.keyCode||(this.toggleMerge(this.hot.getSelectedRangeLast()),this.hot.render(),(0,p.stopImmediatePropagation)(e))}},{key:"onAfterIsMultipleSelection",value:function(e){if(e)for(var t=this.mergedCellsCollection.mergedCells,n=this.hot.getSelectedRangeLast(),r=0;r<t.length;r+=1)if(n.highlight.row===t[r].row&&n.highlight.col===t[r].col&&n.to.row===t[r].row+t[r].rowspan-1&&n.to.col===t[r].col+t[r].colspan-1)return!1;return e}},{key:"onModifyTransformStart",value:function(e){var t,n=M.get(this),r=this.hot.getSelectedRangeLast(),o={row:e.row,col:e.col},i=new m.CellCoords(r.highlight.row,r.highlight.col),a=this.mergedCellsCollection.get(i.row,i.col);if(n.lastDesiredCoords||(n.lastDesiredCoords=new m.CellCoords(null,null)),a){var s=new m.CellCoords(a.row,a.col),l=new m.CellCoords(a.row+a.rowspan-1,a.col+a.colspan-1);new m.CellRange(s,s,l).includes(n.lastDesiredCoords)||(n.lastDesiredCoords=new m.CellCoords(null,null)),o.row=n.lastDesiredCoords.row?n.lastDesiredCoords.row-i.row:o.row,o.col=n.lastDesiredCoords.col?n.lastDesiredCoords.col-i.col:o.col,0<e.row?o.row=a.row+a.rowspan-1-i.row+e.row:e.row<0&&(o.row=i.row-a.row+e.row),0<e.col?o.col=a.col+a.colspan-1-i.col+e.col:e.col<0&&(o.col=i.col-a.col+e.col)}t=new m.CellCoords(r.highlight.row+o.row,r.highlight.col+o.col);var u=this.mergedCellsCollection.get(t.row,t.col);u&&(n.lastDesiredCoords=t,o={row:u.row-i.row,col:u.col-i.col}),0!==o.row&&(e.row=o.row),0!==o.col&&(e.col=o.col)}},{key:"onModifyTransformEnd",value:function(e){for(var t=this,n=this.hot.getSelectedRangeLast(),r=(0,R.clone)(e),o=this.selectionCalculations.getUpdatedSelectionRange(n,e),i=(0,R.clone)(r),a=this.mergedCellsCollection.getWithinRange(o,!0);i=(0,R.clone)(r),this.selectionCalculations.getUpdatedSelectionRange(n,r),(0,b.arrayEach)(a,function(e){t.selectionCalculations.snapDelta(r,n,e)}),r.row!==i.row||r.col!==i.col;);e.row=r.row,e.col=r.col}},{key:"onModifyGetCellCoords",value:function(e,t){var n=this.mergedCellsCollection.get(e,t);return n?[n.row,n.col,n.row+n.rowspan-1,n.col+n.colspan-1]:void 0}},{key:"addMergeActionsToContextMenu",value:function(e){e.items.push({name:"---------"},(0,S.default)(this))}},{key:"onAfterRenderer",value:function(e,t,n){var r=this.mergedCellsCollection.get(t,n);(0,k.applySpanProperties)(e,r,t,n)}},{key:"onBeforeSetRangeEnd",value:function(e){var t=this.hot.getSelectedRangeLast();t.highlight=new m.CellCoords(t.highlight.row,t.highlight.col),t.to=e;var n=!1;if(!this.hot.selection.isSelectedByColumnHeader()&&!this.hot.selection.isSelectedByRowHeader())do{n=!1;for(var r=0;r<this.mergedCellsCollection.mergedCells.length;r+=1){var o=this.mergedCellsCollection.mergedCells[r].getRange();t.expandByRange(o)&&(e.row=t.to.row,e.col=t.to.col,n=!0)}}while(n)}},{key:"onAfterGetCellMeta",value:function(e,t,n){var r=this.mergedCellsCollection.get(e,t);r&&(r.row!==e||r.col!==t?n.copyable=!1:(n.rowspan=r.rowspan,n.colspan=r.colspan))}},{key:"onAfterViewportRowCalculatorOverride",value:function(n){var r,o=this,e=this.hot.countCols();(0,O.rangeEach)(0,e-1,function(e){if((r=o.mergedCellsCollection.get(n.startRow,e))&&r.row<n.startRow)return n.startRow=r.row,o.onAfterViewportRowCalculatorOverride.call(o,n);if(r=o.mergedCellsCollection.get(n.endRow,e)){var t=r.row+r.rowspan-1;if(t>n.endRow)return n.endRow=t,o.onAfterViewportRowCalculatorOverride.call(o,n)}return!0})}},{key:"onAfterViewportColumnCalculatorOverride",value:function(n){var r,o=this,e=this.hot.countRows();(0,O.rangeEach)(0,e-1,function(e){if((r=o.mergedCellsCollection.get(e,n.startColumn))&&r.col<n.startColumn)return n.startColumn=r.col,o.onAfterViewportColumnCalculatorOverride.call(o,n);if(r=o.mergedCellsCollection.get(e,n.endColumn)){var t=r.col+r.colspan-1;if(t>n.endColumn)return n.endColumn=t,o.onAfterViewportColumnCalculatorOverride.call(o,n)}return!0})}},{key:"onModifyAutofillRange",value:function(e,t){this.autofillCalculations.correctSelectionAreaSize(t);var n=this.autofillCalculations.getDirection(t,e),r=e;if(this.autofillCalculations.dragAreaOverlapsCollections(t,r,n))return r=t;var o=this.mergedCellsCollection.getWithinRange({from:{row:t[0],col:t[1]},to:{row:t[2],col:t[3]}});return o?r=this.autofillCalculations.snapDragArea(t,r,n,o):r}},{key:"onAfterCreateCol",value:function(e,t){this.mergedCellsCollection.shiftCollections("right",e,t)}},{key:"onAfterRemoveCol",value:function(e,t){this.mergedCellsCollection.shiftCollections("left",e,t)}},{key:"onAfterCreateRow",value:function(e,t,n){"auto"!==n&&this.mergedCellsCollection.shiftCollections("down",e,t)}},{key:"onAfterRemoveRow",value:function(e,t){this.mergedCellsCollection.shiftCollections("up",e,t)}},{key:"onAfterChange",value:function(e,t){"Autofill.fill"===t&&this.autofillCalculations.recreateAfterDataPopulation(e)}},{key:"onBeforeDrawAreaBorders",value:function(t,e){if(e&&"area"===e){var n=this.hot.getSelectedRangeLast(),r=this.mergedCellsCollection.getWithinRange(n);(0,b.arrayEach)(r,function(e){n.getBottomRightCorner().row===e.getLastRow()&&n.getBottomRightCorner().col===e.getLastColumn()&&(t[2]=e.row,t[3]=e.col)})}}},{key:"onAfterModifyTransformStart",value:function(e,t,n){if(this.enabled){var r=this.mergedCellsCollection.get(e.row,e.col);if(r){var o=0<t,i=t<0,a=n<0,s=0<n,l=r.row+r.rowspan-1==this.hot.countRows()-1,u=0===r.row,c=r.col+r.colspan-1==this.hot.countCols()-1,h=0===r.col;(o&&l||i&&u||s&&c||a&&h)&&(e.row=r.row,e.col=r.col)}}}},{key:"onAfterDrawSelection",value:function(e,t,n,r){return this.selectionCalculations.getSelectedMergedCellClassName(e,t,n,r)}},{key:"onBeforeRemoveCellClassNames",value:function(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}}]),n}(f.default);(0,g.registerPlugin)("mergeCells",N);var _=N;t.default=_},function(e,t,n){"use strict";var r=n(0);n(12),n(30),t.__esModule=!0,t.default=void 0;var o=r(n(66)),a=r(n(36)),i=r(n(1)),s=r(n(2)),c=r(n(169)),l=n(25),h=n(15),d=n(57),f=n(3),v=n(365),g=n(67);function p(){var e=(0,o.default)(["The merged cell declared at [",", ","], overlaps with the other declared merged \n cell. The overlapping merged cell was not added to the table, please fix your setup."]);return p=function(){return e},e}var u=function(){function u(e){(0,i.default)(this,u),this.plugin=e,this.mergedCells=[],this.hot=e.hot}return(0,s.default)(u,[{key:"get",value:function(t,n){var e=this.mergedCells,r=!1;return(0,f.arrayEach)(e,function(e){return!(e.row<=t&&e.row+e.rowspan-1>=t&&e.col<=n&&e.col+e.colspan-1>=n)||(r=e,!1)}),r}},{key:"getByRange",value:function(t){var e=this.mergedCells,n=!1;return(0,f.arrayEach)(e,function(e){return!(e.row<=t.from.row&&e.row+e.rowspan-1>=t.to.row&&e.col<=t.from.col&&e.col+e.colspan-1>=t.to.col)||(n=e)}),n}},{key:"getWithinRange",value:function(e,t){var o=1<arguments.length&&void 0!==t&&t,n=this.mergedCells,i=[],a=e;if(!a.includesRange){var r=new l.CellCoords(a.from.row,a.from.col),s=new l.CellCoords(a.to.row,a.to.col);a=new l.CellRange(r,r,s)}return(0,f.arrayEach)(n,function(e){var t=new l.CellCoords(e.row,e.col),n=new l.CellCoords(e.row+e.rowspan-1,e.col+e.colspan-1),r=new l.CellRange(t,t,n);o?a.overlaps(r)&&i.push(e):a.includesRange(r)&&i.push(e)}),!!i.length&&i}},{key:"add",value:function(e){var t=this.mergedCells,n=e.row,r=e.col,o=e.rowspan,i=e.colspan,a=new c.default(n,r,o,i),s=this.get(n,r),l=this.isOverlapping(a);return s||l?((0,d.warn)(u.IS_OVERLAPPING_WARNING(a)),!1):(this.hot&&a.normalize(this.hot),t.push(a),a)}},{key:"remove",value:function(e,t){var n=this.mergedCells,r=this.get(e,t),o=r?this.mergedCells.indexOf(r):null;return!(!r||!1===o)&&(n.splice(o,1),r)}},{key:"clear",value:function(){var o=this,e=this.mergedCells,n=[],i=[];(0,f.arrayEach)(e,function(e){var t=o.hot.getCell(e.row,e.col);t&&n.push([t,o.get(e.row,e.col),e.row,e.col])}),(this.mergedCells.length=0,f.arrayEach)(n,function(r,e){(0,h.rangeEach)(0,r.rowspan-1,function(n){(0,h.rangeEach)(0,r.colspan-1,function(e){if(0!==e||0!==n){var t=o.hot.getCell(r.row+n,r.col+e);t&&i.push([t,null,null,null])}})}),n[e][1]=null}),(0,f.arrayEach)(n,function(e){v.applySpanProperties.apply(void 0,(0,a.default)(e))}),(0,f.arrayEach)(i,function(e){v.applySpanProperties.apply(void 0,(0,a.default)(e))})}},{key:"isOverlapping",value:function(e){var t=new l.CellRange(null,new l.CellCoords(e.row,e.col),new l.CellCoords(e.row+e.rowspan-1,e.col+e.colspan-1)),n=!1;return(0,f.arrayEach)(this.mergedCells,function(e){return!new l.CellRange(null,new l.CellCoords(e.row,e.col),new l.CellCoords(e.row+e.rowspan-1,e.col+e.colspan-1)).overlaps(t)||!(n=!0)}),n}},{key:"isMergedParent",value:function(t,n){var e=this.mergedCells,r=!1;return(0,f.arrayEach)(e,function(e){return e.row!==t||e.col!==n||!(r=!0)}),r}},{key:"shiftCollections",value:function(e,t,n){var r=this,o=[0,0];switch(e){case"right":o[0]+=n;break;case"left":o[0]-=n;break;case"down":o[1]+=n;break;case"up":o[1]-=n}(0,f.arrayEach)(this.mergedCells,function(e){e.shift(o,t)}),(0,h.rangeEachReverse)(this.mergedCells.length-1,0,function(e){var t=r.mergedCells[e];t&&t.removed&&r.mergedCells.splice(r.mergedCells.indexOf(t),1)})}}],[{key:"IS_OVERLAPPING_WARNING",value:function(e){return(0,g.toSingleLine)(p(),e.row,e.col)}}]),u}();t.default=u},function(e,t,n){"use strict";var r=n(0);n(12),n(40),t.__esModule=!0,t.default=void 0;var y=r(n(18)),o=r(n(1)),i=r(n(2)),a=n(4),d=n(25),w=n(3),s=function(){function t(e){(0,o.default)(this,t),this.plugin=e,this.mergedCellsCollection=this.plugin.mergedCellsCollection,this.currentFillData=null}return(0,i.default)(t,[{key:"correctSelectionAreaSize",value:function(e){if(e[0]===e[2]&&e[1]===e[3]){var t=this.mergedCellsCollection.get(e[0],e[1]);t&&(e[2]=e[0]+t.rowspan-1,e[3]=e[1]+t.colspan-1)}}},{key:"getDirection",value:function(e,t){return t[0]===e[0]&&t[1]===e[1]&&t[3]===e[3]?"down":t[2]===e[2]&&t[1]===e[1]&&t[3]===e[3]?"up":t[1]===e[1]&&t[2]===e[2]?"right":"left"}},{key:"snapDragArea",value:function(e,t,n,r){var o=t.slice(0),i=this.getAutofillSize(e,t,n),a=(0,y.default)(e,4),s=a[0],l=a[1],u=a[2],c=a[3],h=-1<["up","down"].indexOf(n)?u-s+1:c-l+1,d=i-Math.floor(i/h)*h,f=this.getFarthestCollection(e,t,n,r);if(f)if("down"===n){var v=f.row+f.rowspan-s-d;o[2]+v>=this.plugin.hot.countRows()?o[2]-=d:o[2]+=d?v:0}else if("right"===n){var g=f.col+f.colspan-l-d;o[3]+g>=this.plugin.hot.countCols()?o[3]-=d:o[3]+=d?g:0}else if("up"===n){var p=u-d-f.row+1;o[0]+p<0?o[0]+=d:o[0]-=d?p:0}else if("left"===n){var m=c-d-f.col+1;o[1]+m<0?o[1]+=d:o[1]-=d?m:0}return this.updateCurrentFillCache({baseArea:e,dragDirection:n,foundMergedCells:r,fillSize:i,dragArea:o,cycleLength:h}),o}},{key:"updateCurrentFillCache",value:function(e){this.currentFillData||(this.currentFillData={}),(0,a.extend)(this.currentFillData,e)}},{key:"getAutofillSize",value:function(e,t,n){var r=(0,y.default)(e,4),o=r[0],i=r[1],a=r[2],s=r[3],l=(0,y.default)(t,4),u=l[0],c=l[1],h=l[2],d=l[3];switch(n){case"up":return o-u;case"down":return h-a;case"left":return i-c;case"right":return d-s;default:return null}}},{key:"getDragArea",value:function(e,t,n){var r=(0,y.default)(e,4),o=r[0],i=r[1],a=r[2],s=r[3],l=(0,y.default)(t,4),u=l[0],c=l[1],h=l[2],d=l[3];switch(n){case"up":return[u,c,o-1,s];case"down":return[a+1,i,h,s];case"left":return[u,c,a,i-1];case"right":return[o,s+1,h,d];default:return null}}},{key:"getFarthestCollection",value:function(e,t,n,r){var o=(0,y.default)(e,4),i=o[0],a=o[1],s=o[2],l=o[3],u=-1<["up","down"].indexOf(n),c=u?s:l,h=u?i:a,d=this.getAutofillSize(e,t,n),f=u?s-i+1:l-a+1,v=d-Math.floor(d/f)*f,g=null,p=null,m=null;switch(n){case"up":g="includesVertically",m=c-v+1;break;case"left":g="includesHorizontally",m=c-v+1;break;case"down":g="includesVertically",m=h+v-1;break;case"right":g="includesHorizontally",m=h+v-1}return(0,w.arrayEach)(r,function(e){e[g](m)&&e.isFarther(p,n)&&(p=e)}),p}},{key:"recreateAfterDataPopulation",value:function(e){if(this.currentFillData){var n=this.getRangeFromChanges(e),t=this.currentFillData.foundMergedCells,r=this.currentFillData.dragDirection,o=function(e,t){switch(r){case"up":return e.row-t>=n.from.row;case"down":return e.row+e.rowspan-1+t<=n.to.row;case"left":return e.col-t>=n.from.column;case"right":return e.col+e.colspan-1+t<=n.to.column;default:return null}},i=0,a=null,s=1;do{for(var l=0;l<t.length;l+=1){if(o(a=t[l],i=s*this.currentFillData.cycleLength))switch(r){case"up":this.plugin.mergedCellsCollection.add({row:a.row-i,rowspan:a.rowspan,col:a.col,colspan:a.colspan});break;case"down":this.plugin.mergedCellsCollection.add({row:a.row+i,rowspan:a.rowspan,col:a.col,colspan:a.colspan});break;case"left":this.plugin.mergedCellsCollection.add({row:a.row,rowspan:a.rowspan,col:a.col-i,colspan:a.colspan});break;case"right":this.plugin.mergedCellsCollection.add({row:a.row,rowspan:a.rowspan,col:a.col+i,colspan:a.colspan})}l===t.length-1&&(s+=1)}}while(o(a,i));this.currentFillData=null,this.plugin.hot.render()}}},{key:"getRangeFromChanges",value:function(e){var r=this,o={min:null,max:null},i={min:null,max:null};return(0,w.arrayEach)(e,function(e){var t=e[0],n=r.plugin.hot.propToCol(e[1]);(null===o.min||t<o.min)&&(o.min=t),(null===o.max||t>o.max)&&(o.max=t),(null===i.min||n<i.min)&&(i.min=n),(null===i.max||n>i.max)&&(i.max=n)}),{from:{row:o.min,column:i.min},to:{row:o.max,column:i.max}}}},{key:"dragAreaOverlapsCollections",value:function(e,t,n){var r=this.getDragArea(e,t,n),o=(0,y.default)(r,4),i=o[0],a=o[1],s=o[2],l=o[3],u=new d.CellCoords(i,a),c=new d.CellCoords(s,l),h=new d.CellRange(u,u,c);return!!this.mergedCellsCollection.getWithinRange(h,!0)}}]),t}();t.default=s},function(e,t,n){"use strict";var r=n(0);n(19),n(31),n(38),t.__esModule=!0,t.default=void 0;var c=r(n(18)),o=r(n(1)),i=r(n(2)),l=n(25),a=function(){function t(e){(0,o.default)(this,t),this.plugin=e,this.fullySelectedMergedCellClassName="fullySelectedMergedCell"}return(0,i.default)(t,[{key:"snapDelta",value:function(e,t,n){var r=t.to,o=r.row+e.row,i=r.col+e.col;e.row?this.jumpOverMergedCell(e,n,o):e.col&&this.jumpOverMergedCell(e,n,i)}},{key:"jumpOverMergedCell",value:function(e,t,n){var r=e.row||e.col,o=null,i=null,a=null;e.row?(o=t.includesVertically(n),i=t.row,a=t.getLastRow()):e.col&&(o=t.includesHorizontally(n),i=t.col,a=t.getLastColumn()),0!==r&&(0<r?o&&n!==i&&(r+=a-n+1):o&&n!==a&&(r-=n-i+1),e.row?e.row=r:e.col&&(e.col=r))}},{key:"getUpdatedSelectionRange",value:function(e,t){return new l.CellRange(e.highlight,e.from,new l.CellCoords(e.to.row+t.row,e.to.col+t.col))}},{key:"getSelectedMergedCellClassName",value:function(e,t,n,r){var o=(0,c.default)(n,4),i=o[0],a=o[1],s=o[2],l=o[3];if(void 0!==r&&i<=e&&e<=s&&a<=t&&t<=l){if(!this.plugin.mergedCellsCollection.isMergedParent(e,t))return;var u=this.plugin.mergedCellsCollection.get(e,t);if(!u)return;if(u.row+u.rowspan-1<=s&&u.col+u.colspan-1<=l)return"".concat(this.fullySelectedMergedCellClassName,"-").concat(r);if(this.plugin.selectionCalculations.isMergeCellFullySelected(u,this.plugin.hot.getSelectedRange()))return"".concat(this.fullySelectedMergedCellClassName,"-multiple")}}},{key:"isMergeCellFullySelected",value:function(e,t){var n=[];if(!t||!e)return!1;for(var r=0;r<e.rowspan;r+=1)for(var o=0;o<e.colspan;o+=1)n.push(new l.CellCoords(e.row+r,e.col+o));for(var i=0;i<n.length;i+=1){for(var a=[],s=0;s<t.length;s+=1)a[s]=t[s].includes(n[i]);if(!a.includes(!0))return!1}return!0}},{key:"getSelectedMergedCellClassNameToRemove",value:function(){for(var e=[],t=0;t<=7;t+=1)e.push("".concat(this.fullySelectedMergedCellClassName,"-").concat(t));return e.push("".concat(this.fullySelectedMergedCellClassName,"-multiple")),e}}]),t}();t.default=a},function(e,t,n){"use strict";var r=n(0),o=n(9);t.__esModule=!0,t.default=function(n){return{key:"mergeCells",name:function(){var e=this.getSelectedLast();if(e){var t=n.mergedCellsCollection.get(e[0],e[1]);if(t.row===e[0]&&t.col===e[1]&&t.row+t.rowspan-1===e[2]&&t.col+t.colspan-1===e[3])return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_UNMERGE_CELLS)}return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_MERGE_CELLS)},callback:function(){n.toggleMergeOnSelection()},disabled:function(){var e=this.getSelectedLast();return!e||(a.default.isSingleCell({row:e[0],col:e[1],rowspan:e[2]-e[0]+1,colspan:e[3]-e[1]+1})||this.selection.isSelectedByCorner())},hidden:!1}};var i=o(n(11)),a=r(n(169))},function(e,t,n){},function(e,t,n){"use strict";var r=n(0);n(12),n(40),n(30),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(13)),u=r(n(8)),g=n(5),c=n(72),h=r(n(21)),d=r(n(23)),f=n(20),v=n(25),p=function(e){function n(e){var t;return(0,o.default)(this,n),(t=(0,a.default)(this,(0,s.default)(n).call(this,e))).dragged=[],t.eventManager=null,t.lastSetCell=null,t}return(0,u.default)(n,e),(0,i.default)(n,[{key:"isEnabled",value:function(){return(0,c.isMobileBrowser)()}},{key:"enablePlugin",value:function(){this.enabled||(this.eventManager||(this.eventManager=new d.default(this)),this.registerListeners(),(0,l.default)((0,s.default)(n.prototype),"enablePlugin",this).call(this))}},{key:"registerListeners",value:function(){var f=this,v=this,e=this.hot.rootElement;function t(e){if(1===v.dragged.length)return v.dragged.splice(0,v.dragged.length),!0;var t=v.dragged.indexOf(e);if(-1===t)return!1;0===t?v.dragged=v.dragged.slice(0,1):1===t&&(v.dragged=v.dragged.slice(-1))}this.eventManager.addEventListener(e,"touchstart",function(e){var t;return(0,g.hasClass)(e.target,"topLeftSelectionHandle-HitArea")?(t=v.hot.getSelectedRangeLast(),v.dragged.push("topLeft"),v.touchStartRange={width:t.getWidth(),height:t.getHeight(),direction:t.getDirection()},e.preventDefault(),!1):(0,g.hasClass)(e.target,"bottomRightSelectionHandle-HitArea")?(t=v.hot.getSelectedRangeLast(),v.dragged.push("bottomRight"),v.touchStartRange={width:t.getWidth(),height:t.getHeight(),direction:t.getDirection()},e.preventDefault(),!1):void 0}),this.eventManager.addEventListener(e,"touchend",function(e){return(0,g.hasClass)(e.target,"topLeftSelectionHandle-HitArea")?(t.call(v,"topLeft"),v.touchStartRange=void 0,e.preventDefault(),!1):(0,g.hasClass)(e.target,"bottomRightSelectionHandle-HitArea")?(t.call(v,"bottomRight"),v.touchStartRange=void 0,e.preventDefault(),!1):void 0}),this.eventManager.addEventListener(e,"touchmove",function(e){var t,n,r,o,i,a,s=f.hot,l=s.rootWindow,u=s.rootDocument,c=(0,g.getWindowScrollTop)(l),h=(0,g.getWindowScrollLeft)(l);if(0!==v.dragged.length){var d=u.elementFromPoint(e.touches[0].screenX-h,e.touches[0].screenY-c);d&&d!==v.lastSetCell&&("TD"!==d.nodeName&&"TH"!==d.nodeName||(-1===(t=v.hot.getCoords(d)).col&&(t.col=0),r=(n=v.hot.getSelectedRangeLast()).getWidth(),o=n.getHeight(),i=n.getDirection(),1===r&&1===o&&v.hot.selection.setRangeEnd(t),null!==(a=v.getCurrentRangeCoords(n,t,v.touchStartRange.direction,i,v.dragged[0])).start&&v.hot.selection.setRangeStart(a.start),v.hot.selection.setRangeEnd(a.end),v.lastSetCell=d),e.preventDefault())}})}},{key:"getCurrentRangeCoords",value:function(e,t,n,r,o){var i=e.getTopLeftCorner(),a=e.getBottomRightCorner(),s=e.getBottomLeftCorner(),l=e.getTopRightCorner(),u={start:null,end:null};switch(n){case"NE-SW":switch(r){case"NE-SW":case"NW-SE":u="topLeft"===o?{start:new v.CellCoords(t.row,e.highlight.col),end:new v.CellCoords(s.row,t.col)}:{start:new v.CellCoords(e.highlight.row,t.col),end:new v.CellCoords(t.row,i.col)};break;case"SE-NW":"bottomRight"===o&&(u={start:new v.CellCoords(a.row,t.col),end:new v.CellCoords(t.row,i.col)})}break;case"NW-SE":switch(r){case"NE-SW":"topLeft"===o?u={start:t,end:s}:u.end=t;break;case"NW-SE":"topLeft"===o?u={start:t,end:a}:u.end=t;break;case"SE-NW":"topLeft"===o?u={start:t,end:i}:u.end=t;break;case"SW-NE":"topLeft"===o?u={start:t,end:l}:u.end=t}break;case"SW-NE":switch(r){case"NW-SE":u="bottomRight"===o?{start:new v.CellCoords(t.row,i.col),end:new v.CellCoords(s.row,t.col)}:{start:new v.CellCoords(i.row,t.col),end:new v.CellCoords(t.row,a.col)};break;case"SW-NE":u="topLeft"===o?{start:new v.CellCoords(e.highlight.row,t.col),end:new v.CellCoords(t.row,a.col)}:{start:new v.CellCoords(t.row,i.col),end:new v.CellCoords(i.row,t.col)};break;case"SE-NW":"bottomRight"===o?u={start:new v.CellCoords(t.row,l.col),end:new v.CellCoords(i.row,t.col)}:"topLeft"===o&&(u={start:s,end:t})}break;case"SE-NW":switch(r){case"NW-SE":case"NE-SW":case"SW-NE":"topLeft"===o&&(u.end=t);break;case"SE-NW":"topLeft"===o?u.end=t:u={start:t,end:i}}}return u}},{key:"isDragged",value:function(){return 0<this.dragged.length}}]),n}(h.default);(0,f.registerPlugin)("multipleSelectionHandles",p);var m=p;t.default=m},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(13)),u=r(n(8)),c=r(n(21)),h=r(n(549)),d=n(3),f=n(20),v=function(e){function r(e){var t;return(0,o.default)(this,r),(t=(0,a.default)(this,(0,s.default)(r).call(this,e))).observer=null,t}return(0,u.default)(r,e),(0,i.default)(r,[{key:"isEnabled",value:function(){return this.hot.getSettings().observeChanges}},{key:"enablePlugin",value:function(){var n=this;this.enabled||(this.observer||(this.observer=new h.default(this.hot.getSourceData()),this._exposePublicApi()),this.observer.addLocalHook("change",function(e){return n.onDataChange(e)}),this.addHook("afterCreateRow",function(){return n.onAfterTableAlter()}),this.addHook("afterRemoveRow",function(){return n.onAfterTableAlter()}),this.addHook("afterCreateCol",function(){return n.onAfterTableAlter()}),this.addHook("afterRemoveCol",function(){return n.onAfterTableAlter()}),this.addHook("afterChange",function(e,t){return n.onAfterTableAlter(t)}),this.addHook("afterLoadData",function(e){return n.onAfterLoadData(e)}),(0,l.default)((0,s.default)(r.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.observer&&(this.observer.destroy(),this.observer=null,this._deletePublicApi()),(0,l.default)((0,s.default)(r.prototype),"disablePlugin",this).call(this)}},{key:"onDataChange",value:function(e){var t=this;if(!this.observer.isPaused()){var n="".concat(this.pluginName,".change"),r={add:function(e){isNaN(e.col)?t.hot.runHooks("afterCreateRow",e.row,1,n):t.hot.runHooks("afterCreateCol",e.col,1,n)},remove:function(e){isNaN(e.col)?t.hot.runHooks("afterRemoveRow",e.row,1,n):t.hot.runHooks("afterRemoveCol",e.col,1,n)},replace:function(e){t.hot.runHooks("afterChange",[[e.row,e.col,null,e.value]],n)}};(0,d.arrayEach)(e,function(e){r[e.op]&&r[e.op](e)}),this.hot.render()}this.hot.runHooks("afterChangesObserved")}},{key:"onAfterTableAlter",value:function(e){var t=this;"loadData"!==e&&(this.observer.pause(),this.hot.addHookOnce("afterChangesObserved",function(){return t.observer.resume()}))}},{key:"onAfterLoadData",value:function(e){e||this.observer.setObservedData(this.hot.getSourceData())}},{key:"destroy",value:function(){this.observer&&(this.observer.destroy(),this._deletePublicApi()),(0,l.default)((0,s.default)(r.prototype),"destroy",this).call(this)}},{key:"_exposePublicApi",value:function(){var e=this,t=this.hot;t.pauseObservingChanges=function(){return e.observer.pause()},t.resumeObservingChanges=function(){return e.observer.resume()},t.isPausedObservingChanges=function(){return e.observer.isPaused()}}},{key:"_deletePublicApi",value:function(){var e=this.hot;delete e.pauseObservingChanges,delete e.resumeObservingChanges,delete e.isPausedObservingChanges}}]),r}(c.default),g=v;t.default=g,(0,f.registerPlugin)("observeChanges",v)},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(550)),s=r(n(58)),l=n(4),u=n(551),c=function(){function t(e){(0,o.default)(this,t),this.observedData=null,this.observer=null,this.paused=!1,this.setObservedData(e)}return(0,i.default)(t,[{key:"setObservedData",value:function(e){var t=this;this.observer&&a.default.unobserve(this.observedData,this.observer),this.observedData=e,this.observer=a.default.observe(this.observedData,function(e){return t.onChange(e)})}},{key:"isPaused",value:function(){return this.paused}},{key:"pause",value:function(){this.paused=!0}},{key:"resume",value:function(){this.paused=!1}},{key:"onChange",value:function(e){this.runLocalHooks("change",(0,u.cleanPatches)(e))}},{key:"destroy",value:function(){a.default.unobserve(this.observedData,this.observer),this.observedData=null,this.observer=null}}]),t}();(0,l.mixin)(c,s.default);var h=c;t.default=h},function(e,t,n){"use strict";var r=n(0);n(12),n(51),n(40),n(30),n(54),n(76),n(39),n(46),n(32);var o,b=r(n(44)),s=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);function r(){this.constructor=e}e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},R=Error;
/*!
* https://github.com/Starcounter-Jack/JSON-Patch
* json-patch-duplex.js version: 0.5.7
* (c) 2013 Joachim Wester
* MIT license
*/!function(l){var h=function(e){if(p(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t};var f={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 r={op:"_get",path:this.from};return i(n,[r]),i(n,[{op:"remove",path:this.from}]),i(n,[{op:"add",path:this.path,value:r.value}]),!0},copy:function(e,t,n){var r={op:"_get",path:this.from};return i(n,[r]),i(n,[{op:"add",path:this.path,value:r.value}]),!0},test:function(e,t){return function e(t,n){switch((0,b.default)(t)){case"undefined":case"boolean":case"string":case"number":return t===n;case"object":if(null===t)return null===n;if(p(t)){if(!p(n)||t.length!==n.length)return!1;for(var r=0,o=t.length;r<o;r++)if(!e(t[r],n[r]))return!1;return!0}var i=h(n).length;if(h(t).length!==i)return!1;for(r=0;r<i;r++)if(!e(t[r],n[r]))return!1;return!0;default:return!1}}(e[t],this.value)},_get:function(e,t){this.value=e[t]}},v={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:f.move,copy:f.copy,test:f.test,_get:f._get},g={add:function(e){for(var t in g.remove.call(this,e),this.value)this.value.hasOwnProperty(t)&&(e[t]=this.value[t]);return!0},remove:function(e){for(var t in e)e.hasOwnProperty(t)&&f.remove.call(this,e,t);return!0},replace:function(e){return i(e,[{op:"remove",path:this.path}]),i(e,[{op:"add",path:this.path,value:this.value}]),!0},move:f.move,copy:f.copy,test:function(e){return JSON.stringify(e)===JSON.stringify(this.value)},_get:function(e){this.value=e}};function d(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}var p,u=[],c=function(e){this.observers=[],this.obj=e},m=function(e,t){this.callback=e,this.observer=t};function y(e){return"object"===(0,b.default)(e)?JSON.parse(JSON.stringify(e)):e}function w(e){for(var t,n=0,r=u.length;n<r;n++)if(u[n].obj===e.object){t=u[n];break}C(t.value,e.object,e.patches,""),e.patches.length&&i(t.value,e.patches);var o=e.patches;return 0<o.length&&(e.patches=[],e.callback&&e.callback(o)),o}function C(e,t,n,r){for(var o=h(t),i=h(e),a=!1,s=i.length-1;0<=s;s--){var l=e[c=i[s]];if(t.hasOwnProperty(c)){var u=t[c];"object"==(0,b.default)(l)&&null!=l&&"object"==(0,b.default)(u)&&null!=u?C(l,u,n,r+"/"+d(c)):l!=u&&(!0,n.push({op:"replace",path:r+"/"+d(c),value:y(u)}))}else n.push({op:"remove",path:r+"/"+d(c)}),a=!0}if(a||o.length!=i.length)for(s=0;s<o.length;s++){var c=o[s];e.hasOwnProperty(c)||n.push({op:"add",path:r+"/"+d(c),value:y(t[c])})}}function E(e){for(var t,n=0,r=e.length;n<r;){if(!(48<=(t=e.charCodeAt(n))&&t<=57))return!1;n++}return!0}function i(e,t,n){for(var r,o,i=!1,a=0,s=t.length;a<s;){r=t[a],a++;for(var l=(r.path||"").split("/"),u=e,c=1,h=l.length,d=void 0;;){if(o=l[c],n&&void 0===d&&(void 0===u[o]?d=l.slice(0,c).join("/"):c==h-1&&(d=r.path),void 0!==d&&this.validator(r,a-1,e,d)),c++,void 0===o&&h<=c){i=g[r.op].call(r,u,o,e);break}if(p(u)){if("-"===o)o=u.length;else{if(n&&!E(o))throw new S("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a-1,r.path,r);o=parseInt(o,10)}if(h<=c){if(n&&"add"===r.op&&o>u.length)throw new S("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a-1,r.path,r);i=v[r.op].call(r,u,o,e);break}}else if(o&&-1!=o.indexOf("~")&&(o=o.replace(/~1/g,"/").replace(/~0/g,"~")),h<=c){i=f[r.op].call(r,u,o,e);break}u=u[o]}}return i}l.unobserve=function(e,t){t.unobserve()},l.observe=function(e,t){var n,r=function(e){for(var t=0,n=u.length;t<n;t++)if(u[t].obj===e)return u[t]}(e);if(r?n=function(e,t){for(var n=0,r=e.observers.length;n<r;n++)if(e.observers[n].callback===t)return e.observers[n].observer}(r,t):(r=new c(e),u.push(r)),n)return n;if(n={},r.value=y(e),t){n.callback=t,n.next=null;var o=this.intervals||[100,1e3,1e4,6e4];if(void 0===o.push)throw new R("jsonpatch.intervals must be an array");var i=0,a=function(){w(n)},s=function(){clearTimeout(n.next),n.next=setTimeout(function(){a(),i=0,n.next=setTimeout(l,o[i++])},0)},l=function e(){a(),i==o.length&&(i=o.length-1),n.next=setTimeout(e,o[i++])};"undefined"!=typeof window&&(window.addEventListener?(window.addEventListener("mousedown",s),window.addEventListener("mouseup",s),window.addEventListener("keydown",s)):(document.documentElement.attachEvent("onmousedown",s),document.documentElement.attachEvent("onmouseup",s),document.documentElement.attachEvent("onkeydown",s))),n.next=setTimeout(l,o[i++])}return n.patches=[],n.object=e,n.unobserve=function(){w(n),clearTimeout(n.next),function(e,t){for(var n=0,r=e.observers.length;n<r;n++)if(e.observers[n].observer===t)return e.observers.splice(n,1)}(r,n),0===r.observers.length&&u.splice(u.indexOf(r),1),"undefined"!=typeof window&&(window.removeEventListener?(window.removeEventListener("mousedown",s),window.removeEventListener("mouseup",s),window.removeEventListener("keydown",s)):(document.documentElement.detachEvent("onmousedown",s),document.documentElement.detachEvent("onmouseup",s),document.documentElement.detachEvent("onkeydown",s)))},r.observers.push(new m(t,n)),n},l.generate=w,p=Array.isArray?Array.isArray:function(e){return e.push&&"number"==typeof e.length},l.apply=i,l.compare=function(e,t){var n=[];return C(e,t,n,""),n};var a,S=(s(e,a=R),e);function e(e,t,n,r,o){a.call(this,e),this.message=e,this.name=t,this.index=n,this.operation=r,this.tree=o}l.JsonPatchError=S,l.Error=S,l.validator=function(e,t,n,r){if("object"!==(0,b.default)(e)||null===e||p(e))throw new S("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(!f[e.op])throw new S("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n);if("string"!=typeof e.path)throw new S("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new S("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new S("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&function e(t){if(void 0===t)return!0;if("array"==typeof t||"object"==(0,b.default)(t))for(var n in t)if(e(t[n]))return!0;return!1}(e.value))throw new S("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n)if("add"==e.op){var o=e.path.split("/").length,i=r.split("/").length;if(o!==i+1&&o!==i)throw new S("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==r)throw new S("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if("move"===e.op||"copy"===e.op){var a={op:"_get",path:e.from,value:void 0},s=l.validate([a],n);if(s&&"OPERATION_PATH_UNRESOLVABLE"===s.name)throw new S("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}},l.validate=function(e,t){try{if(!p(e))throw new S("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)t=JSON.parse(JSON.stringify(t)),i.call(this,t,e,!0);else for(var n=0;n<e.length;n++)this.validator(e[n],n)}catch(e){if(e instanceof S)return e;throw e}}}(o=o||{}),t.apply=o.apply,t.observe=o.observe,t.unobserve=o.unobserve,t.generate=o.generate,t.compare=o.compare,t.validate=o.validate,t.validator=o.validator,t.JsonPatchError=o.JsonPatchError,t.Error=o.Error},function(e,t,n){"use strict";var r=n(0);n(12),n(131),t.__esModule=!0,t.cleanPatches=function(e){var t=[],n=(0,o.arrayFilter)(e,function(e){return!/[/]length/gi.test(e.path)&&!!a(e.path)});return n=(0,o.arrayMap)(n,function(e){var t=a(e.path);return e.row=t.row,e.col=t.col,e}),n=(0,o.arrayFilter)(n,function(e){if(-1!==["add","remove"].indexOf(e.op)&&!isNaN(e.col)){if(-1!==t.indexOf(e.col))return!1;t.push(e.col)}return!0}),t.length=0,n},t.parsePath=a;var i=r(n(18)),o=n(3);function a(e){var t=e.match(/^\/(\d+)\/?(.*)?$/);if(!t)return null;var n=(0,i.default)(t,3),r=n[1],o=n[2];return{row:parseInt(r,10),col:/^\d*$/.test(o)?parseInt(o,10):o}}},function(e,t,n){"use strict";var r=n(0);n(31),n(12),n(51),n(30),n(10),n(37),n(38),n(340),n(46),t.__esModule=!0,t.default=void 0;function o(e,t,n,r,o){e.getCellMeta(t,n).isSearchResult=o}function i(e,t){return!((0,m.isUndefined)(e)||null===e||!e.toLowerCase||0===e.length)&&(!(0,m.isUndefined)(t)&&null!==t&&-1!==t.toString().toLowerCase().indexOf(e.toLowerCase()))}var u=r(n(36)),a=r(n(1)),s=r(n(2)),l=r(n(7)),c=r(n(6)),h=r(n(13)),d=r(n(8)),f=r(n(21)),v=n(20),g=n(4),p=n(15),m=n(27),y=function(e){function n(e){var t;return(0,a.default)(this,n),(t=(0,l.default)(this,(0,c.default)(n).call(this,e))).callback=o,t.queryMethod=i,t.searchResultClass="htSearchResult",t}return(0,d.default)(n,e),(0,s.default)(n,[{key:"isEnabled",value:function(){return this.hot.getSettings().search}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){var t=this.hot.getSettings().search;this.updatePluginSettings(t),this.addHook("beforeRenderer",function(){return e.onBeforeRenderer.apply(e,arguments)}),(0,h.default)((0,c.default)(n.prototype),"enablePlugin",this).call(this)}}},{key:"disablePlugin",value:function(){function e(){return t.onBeforeRenderer.apply(t,arguments)}var t=this;this.hot.addHook("beforeRenderer",e),this.hot.addHookOnce("afterRender",function(){t.hot.removeHook("beforeRenderer",e)}),(0,h.default)((0,c.default)(n.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),(0,h.default)((0,c.default)(n.prototype),"updatePlugin",this).call(this)}},{key:"query",value:function(s,e,t){var l=this,u=1<arguments.length&&void 0!==e?e:this.getCallback(),c=2<arguments.length&&void 0!==t?t:this.getQueryMethod(),n=this.hot.countRows(),r=this.hot.countCols(),h=[],d=this.hot;return(0,p.rangeEach)(0,n-1,function(a){(0,p.rangeEach)(0,r-1,function(e){var t=l.hot.getDataAtCell(a,e),n=l.hot.getCellMeta(a,e),r=n.search.callback||u,o=(n.search.queryMethod||c)(s,t);if(o){var i={row:a,col:e,data:t};h.push(i)}r&&r(d,a,e,t,o)})}),h}},{key:"getCallback",value:function(){return this.callback}},{key:"setCallback",value:function(e){this.callback=e}},{key:"getQueryMethod",value:function(){return this.queryMethod}},{key:"setQueryMethod",value:function(e){this.queryMethod=e}},{key:"getSearchResultClass",value:function(){return this.searchResultClass}},{key:"setSearchResultClass",value:function(e){this.searchResultClass=e}},{key:"updatePluginSettings",value:function(e){(0,g.isObject)(e)&&(e.searchResultClass&&this.setSearchResultClass(e.searchResultClass),e.queryMethod&&this.setQueryMethod(e.queryMethod),e.callback&&this.setCallback(e.callback))}},{key:"onBeforeRenderer",value:function(e,t,n,r,o,i){var a,s=i.className||[],l=[];"string"==typeof s?l=s.split(" "):(a=l).push.apply(a,(0,u.default)(s));this.isEnabled()&&i.isSearchResult?l.includes(this.searchResultClass)||l.push("".concat(this.searchResultClass)):l.includes(this.searchResultClass)&&l.splice(l.indexOf(this.searchResultClass),1),i.className=l.join(" ")}},{key:"destroy",value:function(){(0,h.default)((0,c.default)(n.prototype),"destroy",this).call(this)}}]),n}(f.default);(0,v.registerPlugin)("search",y);var w=y;t.default=w},function(e,t,n){"use strict";var r=n(0);n(32),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(13)),u=r(n(8)),c=n(5),h=n(3),d=r(n(21)),f=n(20),v=n(73),g=function(e){function n(e){var t;return(0,o.default)(this,n),(t=(0,a.default)(this,(0,s.default)(n).call(this,e))).scrollbars=[],t.clones=[],t.lockedCollection=!1,t.freezeOverlays=!1,t}return(0,u.default)(n,e),(0,i.default)(n,[{key:"isEnabled",value:function(){return(0,v.isTouchSupported)()}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.addHook("afterRender",function(){return e.onAfterRender()}),this.registerEvents(),(0,l.default)((0,s.default)(n.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.lockedCollection=!1,(0,l.default)((0,s.default)(n.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){(0,l.default)((0,s.default)(n.prototype),"disablePlugin",this).call(this)}},{key:"registerEvents",value:function(){var e=this;this.addHook("beforeTouchScroll",function(){return e.onBeforeTouchScroll()}),this.addHook("afterMomentumScroll",function(){return e.onAfterMomentumScroll()})}},{key:"onAfterRender",value:function(){if(!this.lockedCollection){var e=this.hot.view.wt.wtOverlays,t=e.topOverlay,n=e.bottomOverlay,r=e.leftOverlay,o=e.topLeftCornerOverlay,i=e.bottomLeftCornerOverlay;this.lockedCollection=!0,this.scrollbars.length=0,this.scrollbars.push(t),n.clone&&this.scrollbars.push(n),this.scrollbars.push(r),o&&this.scrollbars.push(o),i&&i.clone&&this.scrollbars.push(i),this.clones.length=0,t.needFullRender&&this.clones.push(t.clone.wtTable.holder.parentNode),n.needFullRender&&this.clones.push(n.clone.wtTable.holder.parentNode),r.needFullRender&&this.clones.push(r.clone.wtTable.holder.parentNode),o&&this.clones.push(o.clone.wtTable.holder.parentNode),i&&i.clone&&this.clones.push(i.clone.wtTable.holder.parentNode)}}},{key:"onBeforeTouchScroll",value:function(){this.freezeOverlays=!0,(0,h.arrayEach)(this.clones,function(e){(0,c.addClass)(e,"hide-tween")})}},{key:"onAfterMomentumScroll",value:function(){var e=this;this.freezeOverlays=!1,(0,h.arrayEach)(this.clones,function(e){(0,c.removeClass)(e,"hide-tween"),(0,c.addClass)(e,"show-tween")}),setTimeout(function(){(0,h.arrayEach)(e.clones,function(e){(0,c.removeClass)(e,"show-tween")})},400),(0,h.arrayEach)(this.scrollbars,function(e){e.refresh(),e.resetFixedPosition()}),this.hot.view.wt.wtOverlays.syncScrollWithMaster()}}]),n}(d.default);(0,f.registerPlugin)("touchScroll",g);var p=g;t.default=p},function(e,t,n){"use strict";var r=n(0);n(53),n(31),n(12),n(40),n(64),n(30),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(8)),d=r(n(18)),u=r(n(43)),c=n(3),v=n(15),g=n(4),h=n(33),f=n(62);function p(d){var f=this;this.instance=d,this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,d.addHook("afterChange",function(e,t){var n=e&&e.length;if(n&&!["UndoRedo.undo","UndoRedo.redo","MergeCells"].includes(t)){var r=1<n?this.getSelected():[[e[0][0],e[0][1]]];f.done(new p.ChangeAction(e,r))}}),d.addHook("afterCreateRow",function(e,t,n){if("UndoRedo.undo"!==n&&"UndoRedo.undo"!==n&&"auto"!==n){var r=new p.CreateRowAction(e,t);f.done(r)}}),d.addHook("beforeRemoveRow",function(e,t,n,r){if("UndoRedo.undo"!==r&&"UndoRedo.redo"!==r&&"auto"!==r){var o=f.instance.getSourceDataArray(),i=(o.length+e)%o.length,a=d.toPhysicalRow(i),s=(0,g.deepClone)(o.slice(a,a+t));f.done(new p.RemoveRowAction(i,s))}}),d.addHook("afterCreateCol",function(e,t,n){"UndoRedo.undo"!==n&&"UndoRedo.redo"!==n&&"auto"!==n&&f.done(new p.CreateColumnAction(e,t))}),d.addHook("beforeRemoveCol",function(e,r,t,n){if("UndoRedo.undo"!==n&&"UndoRedo.redo"!==n&&"auto"!==n){var o=f.instance.getSourceDataArray(),i=(f.instance.countCols()+e)%f.instance.countCols(),a=[],s=[],l=[];(0,v.rangeEach)(o.length-1,function(e){var t=[],n=o[e];(0,v.rangeEach)(i,r-1+i,function(e){t.push(n[d.runHooks("modifyCol",e)])}),a.push(t)}),(0,v.rangeEach)(r-1,function(e){l.push(d.runHooks("modifyCol",i+e))}),Array.isArray(d.getSettings().colHeaders)&&(0,v.rangeEach)(r-1,function(e){s.push(d.getSettings().colHeaders[d.runHooks("modifyCol",i+e)]||null)});var u=f.instance.getPlugin("manualColumnMove"),c=u.isEnabled()?u.columnsMapper.__arrayMap:[],h=new p.RemoveColumnAction(i,l,a,s,c);f.done(h)}}),d.addHook("beforeCellAlignment",function(e,t,n,r){var o=new p.CellAlignmentAction(e,t,n,r);f.done(o)}),d.addHook("beforeFilter",function(e){f.done(new p.FiltersAction(e))}),d.addHook("beforeRowMove",function(e,t){!1!==e&&f.done(new p.RowMoveAction(e,t))}),d.addHook("beforeMergeCells",function(e,t){t||f.done(new p.MergeCellsAction(d,e))}),d.addHook("afterUnmergeCells",function(e,t){t||f.done(new p.UnmergeCellsAction(d,e))})}function m(){var e=this;void 0===e.getSettings().undo||e.getSettings().undo?e.undoRedo||(e.undoRedo=new p(e),function(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()}}(e),e.addHook("beforeKeyDown",y),e.addHook("afterChange",w)):e.undoRedo&&(delete e.undoRedo,function(e){delete e.undo,delete e.redo,delete e.isUndoAvailable,delete e.isRedoAvailable,delete e.clearUndo}(e),e.removeHook("beforeKeyDown",y),e.removeHook("afterChange",w))}function y(e){if(!(0,h.isImmediatePropagationStopped)(e)){var t=this.getActiveEditor();if(!t||!t.isOpened()){var n=e.altKey,r=e.ctrlKey,o=e.keyCode,i=e.metaKey,a=e.shiftKey;if((r||i)&&!n)89===o||a&&90===o?(this.undoRedo.redo(),(0,h.stopImmediatePropagation)(e)):90===o&&(this.undoRedo.undo(),(0,h.stopImmediatePropagation)(e))}}}function w(e,t){if("loadData"===t)return this.undoRedo.clear()}p.prototype.done=function(e){this.ignoreNewActions||(this.doneActions.push(e),this.undoneActions.length=0)},p.prototype.undo=function(){if(this.isUndoAvailable()){var e=this.doneActions.pop(),t=(0,g.deepClone)(e),n=this.instance;if(!1===n.runHooks("beforeUndo",t))return;this.ignoreNewActions=!0;var r=this;e.undo(this.instance,function(){r.ignoreNewActions=!1,r.undoneActions.push(e)}),n.runHooks("afterUndo",t)}},p.prototype.redo=function(){if(this.isRedoAvailable()){var e=this.undoneActions.pop(),t=(0,g.deepClone)(e),n=this.instance;if(!1===n.runHooks("beforeRedo",t))return;this.ignoreNewActions=!0;var r=this;e.redo(this.instance,function(){r.ignoreNewActions=!1,r.doneActions.push(e)}),n.runHooks("afterRedo",t)}},p.prototype.isUndoAvailable=function(){return 0<this.doneActions.length},p.prototype.isRedoAvailable=function(){return 0<this.undoneActions.length},p.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},(p.Action=function(){}).prototype.undo=function(){},p.Action.prototype.redo=function(){},p.ChangeAction=function(e,t){this.changes=e,this.selected=t,this.actionType="change"},(0,g.inherit)(p.ChangeAction,p.Action),p.ChangeAction.prototype.undo=function(e,t){for(var n=(0,g.deepClone)(this.changes),r=e.countEmptyRows(!0),o=e.countEmptyCols(!0),i=0,a=n.length;i<a;i++)n[i].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtRowProp(n,null,null,"UndoRedo.undo");for(var s=0,l=n.length;s<l;s++){var u=(0,d.default)(n[s],2),c=u[0],h=u[1];e.getSettings().minSpareRows&&c+1+e.getSettings().minSpareRows===e.countRows()&&r===e.getSettings().minSpareRows&&(e.alter("remove_row",parseInt(c+1,10),e.getSettings().minSpareRows),e.undoRedo.doneActions.pop()),e.getSettings().minSpareCols&&h+1+e.getSettings().minSpareCols===e.countCols()&&o===e.getSettings().minSpareCols&&(e.alter("remove_col",parseInt(h+1,10),e.getSettings().minSpareCols),e.undoRedo.doneActions.pop())}e.selectCells(this.selected,!1,!1)},p.ChangeAction.prototype.redo=function(e,t){for(var n=(0,g.deepClone)(this.changes),r=0,o=n.length;r<o;r++)n[r].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtRowProp(n,null,null,"UndoRedo.redo"),this.selected&&e.selectCells(this.selected,!1,!1)},p.CreateRowAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_row"},(0,g.inherit)(p.CreateRowAction,p.Action),p.CreateRowAction.prototype.undo=function(e,t){var n=e.countRows(),r=e.getSettings().minSpareRows;this.index>=n&&this.index-r<n&&(this.index-=r),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount,"UndoRedo.undo")},p.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row",this.index,this.amount,"UndoRedo.redo")},p.RemoveRowAction=function(e,t){this.index=e,this.data=t,this.actionType="remove_row"},(0,g.inherit)(p.RemoveRowAction,p.Action),p.RemoveRowAction.prototype.undo=function(e,t){e.alter("insert_row",this.index,this.data.length,"UndoRedo.undo"),e.addHookOnce("afterRender",t),e.populateFromArray(this.index,0,this.data,void 0,void 0,"UndoRedo.undo")},p.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length,"UndoRedo.redo")},p.CreateColumnAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_col"},(0,g.inherit)(p.CreateColumnAction,p.Action),p.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")},p.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col",this.index,this.amount,"UndoRedo.redo")},p.RemoveColumnAction=function(e,t,n,r,o){this.index=e,this.indexes=t,this.data=n,this.amount=this.data[0].length,this.headers=r,this.columnPositions=o.slice(0),this.actionType="remove_col"},(0,g.inherit)(p.RemoveColumnAction,p.Action),p.RemoveColumnAction.prototype.undo=function(n,e){function t(e,t,n){return n[o.indexes.indexOf(i[t])]}var r,o=this,i=this.indexes.slice(0).sort(),a=[];(0,v.rangeEach)(this.data.length-1,function(e){a[e]=(0,c.arrayMap)(o.data[e],t)});var s;s=(0,c.arrayMap)(this.headers,t);var l=[];n.runHooks("beforeCreateCol",this.indexes[0],this.indexes.length,"UndoRedo.undo"),(0,v.rangeEach)(this.data.length-1,function(t){r=n.getSourceDataAtRow(t),(0,v.rangeEach)(i.length-1,function(e){r.splice(i[e],0,a[t][e]),l.push([t,i[e],null,a[t][e]])})}),n.getPlugin("formulas")&&n.getPlugin("formulas").onAfterSetDataAtCell(l),void 0!==this.headers&&(0,v.rangeEach)(s.length-1,function(e){n.getSettings().colHeaders.splice(i[e],0,s[e])}),n.getPlugin("manualColumnMove")&&(n.getPlugin("manualColumnMove").columnsMapper.__arrayMap=this.columnPositions),n.addHookOnce("afterRender",e),n.runHooks("afterCreateCol",this.indexes[0],this.indexes.length,"UndoRedo.undo"),n.getPlugin("formulas")&&n.getPlugin("formulas").recalculateFull(),n.render()},p.RemoveColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")},(p.CellAlignmentAction=function(e,t,n,r){this.stateBefore=e,this.range=t,this.type=n,this.alignment=r}).prototype.undo=function(i,e){var a=this;(0,c.arrayEach)(this.range,function(e){for(var t=e.from,n=e.to,r=t.row;r<=n.row;r+=1)for(var o=t.col;o<=n.col;o+=1)i.setCellMeta(r,o,"className",a.stateBefore[r][o]||" htLeft")}),i.addHookOnce("afterRender",e),i.render()},p.CellAlignmentAction.prototype.redo=function(o,e){(0,f.align)(this.range,this.type,this.alignment,function(e,t){return o.getCellMeta(e,t)},function(e,t,n,r){return o.setCellMeta(e,t,n,r)}),o.addHookOnce("afterRender",e),o.render()},p.FiltersAction=function(e){this.conditionsStack=e,this.actionType="filter"},(0,g.inherit)(p.FiltersAction,p.Action),p.FiltersAction.prototype.undo=function(e,t){var n=e.getPlugin("filters");e.addHookOnce("afterRender",t),n.conditionCollection.importAllConditions(this.conditionsStack.slice(0,this.conditionsStack.length-1)),n.filter()},p.FiltersAction.prototype.redo=function(e,t){var n=e.getPlugin("filters");e.addHookOnce("afterRender",t),n.conditionCollection.importAllConditions(this.conditionsStack),n.filter()},p.MergeCellsAction=function(e){function r(e,t){var n;return(0,o.default)(this,r),(n=(0,a.default)(this,(0,s.default)(r).call(this))).cellRange=t,n.rangeData=e.getData(t.from.row,t.from.col,t.to.row,t.to.col),n}return(0,l.default)(r,e),(0,i.default)(r,[{key:"undo",value:function(e,t){var n=e.getPlugin("mergeCells");e.addHookOnce("afterRender",t),n.unmergeRange(this.cellRange,!0),e.populateFromArray(this.cellRange.from.row,this.cellRange.from.col,this.rangeData,void 0,void 0,"MergeCells")}},{key:"redo",value:function(e,t){var n=e.getPlugin("mergeCells");e.addHookOnce("afterRender",t),n.mergeRange(this.cellRange)}}]),r}(p.Action),p.UnmergeCellsAction=function(e){function r(e,t){var n;return(0,o.default)(this,r),(n=(0,a.default)(this,(0,s.default)(r).call(this))).cellRange=t,n}return(0,l.default)(r,e),(0,i.default)(r,[{key:"undo",value:function(e,t){var n=e.getPlugin("mergeCells");e.addHookOnce("afterRender",t),n.mergeRange(this.cellRange,!0)}},{key:"redo",value:function(e,t){var n=e.getPlugin("mergeCells");e.addHookOnce("afterRender",t),n.unmergeRange(this.cellRange,!0),e.render()}}]),r}(p.Action),p.RowMoveAction=function(e,t){this.rows=e.slice(),this.target=t},(0,g.inherit)(p.RowMoveAction,p.Action),p.RowMoveAction.prototype.undo=function(e,t){var n=e.getPlugin("manualRowMove");e.addHookOnce("afterRender",t);for(var r=this.rows[0]<this.target?-1*this.rows.length:0,o=this.rows[0]>this.target?this.rows[0]+this.rows.length:this.rows[0],i=[],a=this.rows.length+r,s=r;s<a;s+=1)i.push(this.target+s);n.moveRows(i.slice(),o),e.render(),e.selectCell(this.rows[0],0,this.rows[this.rows.length-1],e.countCols()-1,!1,!1)},p.RowMoveAction.prototype.redo=function(e,t){var n=e.getPlugin("manualRowMove");e.addHookOnce("afterRender",t),n.moveRows(this.rows.slice(),this.target),e.render();var r=this.rows[0]<this.target?this.target-this.rows.length:this.target;e.selectCell(r,0,r+this.rows.length-1,e.countCols()-1,!1,!1)};var C=u.default.getSingleton();C.add("afterInit",m),C.add("afterUpdateSettings",m),C.register("beforeUndo"),C.register("afterUndo"),C.register("beforeRedo"),C.register("afterRedo");var E=p;t.default=E},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(13)),u=r(n(8)),c=r(n(21)),h=n(15),d=n(20),f=r(n(556)),v=function(e){function r(e){var t;return(0,o.default)(this,r),(t=(0,a.default)(this,(0,s.default)(r).call(this,e))).bindStrategy=new f.default,t.removedRows=[],t}return(0,u.default)(r,e),(0,i.default)(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().bindRowsWithHeaders}},{key:"enablePlugin",value:function(){var n=this;if(!this.enabled){var e=this.hot.getSettings().bindRowsWithHeaders;"string"!=typeof e&&(e=f.default.DEFAULT_STRATEGY),this.bindStrategy.setStrategy(e),this.bindStrategy.createMap(this.hot.countSourceRows()),this.addHook("modifyRowHeader",function(e){return n.onModifyRowHeader(e)}),this.addHook("afterCreateRow",function(e,t){return n.onAfterCreateRow(e,t)}),this.addHook("beforeRemoveRow",function(e,t){return n.onBeforeRemoveRow(e,t)}),this.addHook("afterRemoveRow",function(){return n.onAfterRemoveRow()}),this.addHook("afterLoadData",function(e){return n.onAfterLoadData(e)}),(0,l.default)((0,s.default)(r.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){(0,l.default)((0,s.default)(r.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.removedRows.length=0,this.bindStrategy.clearMap(),(0,l.default)((0,s.default)(r.prototype),"disablePlugin",this).call(this)}},{key:"onModifyRowHeader",value:function(e){return this.bindStrategy.translate(this.hot.runHooks("modifyRow",e))}},{key:"onAfterCreateRow",value:function(e,t){this.bindStrategy.createRow(e,t)}},{key:"onBeforeRemoveRow",value:function(e,t){var n=this;this.removedRows.length=0,!1!==e&&(0,h.rangeEach)(e,e+t-1,function(e){n.removedRows.push(n.hot.runHooks("modifyRow",e))})}},{key:"onAfterRemoveRow",value:function(){this.bindStrategy.removeRow(this.removedRows)}},{key:"onAfterLoadData",value:function(e){e||this.bindStrategy.createMap(this.hot.countSourceRows())}},{key:"destroy",value:function(){this.bindStrategy.destroy(),(0,l.default)((0,s.default)(r.prototype),"destroy",this).call(this)}}]),r}(c.default);(0,d.registerPlugin)("bindRowsWithHeaders",v);var g=v;t.default=g},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.default=void 0;var i=o(n(1)),a=o(n(2)),s=n(15),l=n(68),u=r(n(557)),c=function(){function e(){(0,i.default)(this,e),this.strategy=null}return(0,a.default)(e,null,[{key:"DEFAULT_STRATEGY",get:function(){return"loose"}}]),(0,a.default)(e,[{key:"setStrategy",value:function(e){var t=u[(0,l.toUpperCaseFirst)(e)];if(!t)throw new Error('Bind strategy "'.concat(e,'" does not exist.'));this.strategy=new t}},{key:"createMap",value:function(e){var t=this.strategy,n=void 0===e?t._arrayMap.length:e;(t._arrayMap.length=0,s.rangeEach)(n-1,function(e){t._arrayMap.push(e)})}},{key:"createRow",value:function(){var e;(e=this.strategy).createRow.apply(e,arguments)}},{key:"removeRow",value:function(){var e;(e=this.strategy).removeRow.apply(e,arguments)}},{key:"translate",value:function(){var e;return(e=this.strategy).getValueByIndex.apply(e,arguments)}},{key:"clearMap",value:function(){this.strategy.clearMap()}},{key:"destroy",value:function(){this.strategy&&this.strategy.destroy(),this.strategy=null}}]),e}();t.default=c},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0;var o=r(n(558));t.Loose=o.default;var i=r(n(559));t.Strict=i.default},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(92)),s=n(4),l=function(){function e(){(0,o.default)(this,e)}return(0,i.default)(e,[{key:"createRow",value:function(e,t){this.shiftItems(e,t)}},{key:"removeRow",value:function(e,t){this.unshiftItems(e,t)}},{key:"destroy",value:function(){this._arrayMap=null}}],[{key:"STRATEGY_NAME",get:function(){return"loose"}}]),e}();(0,s.mixin)(l,a.default);var u=l;t.default=u},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(92)),s=n(4),l=function(){function e(){(0,o.default)(this,e)}return(0,i.default)(e,[{key:"createRow",value:function(e,t){this.insertItems(e,t)}},{key:"removeRow",value:function(e,t){this.removeItems(e,t)}},{key:"destroy",value:function(){this._arrayMap=null}}],[{key:"STRATEGY_NAME",get:function(){return"strict"}}]),e}();(0,s.mixin)(l,a.default);var u=l;t.default=u},function(e,t,n){"use strict";var r=n(0);n(12),n(30),n(76),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(13)),u=r(n(8)),c=n(4),h=n(3),d=n(15),f=n(57),v=n(5),g=r(n(23)),p=n(20),m=n(33),y=function(e){function n(e){var t;return(0,o.default)(this,n),(t=(0,a.default)(this,(0,s.default)(n).call(this,e))).settings=null,t.buttonEnabledList={},t.hiddenColumnsPlugin=null,t.nestedHeadersPlugin=null,t.collapsedSections={},t.columnHeaderLevelCount=null,t.eventManager=null,t}return(0,u.default)(n,e),(0,i.default)(n,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().collapsibleColumns}},{key:"enablePlugin",value:function(){var r=this;this.enabled||(this.settings=this.hot.getSettings().collapsibleColumns,"boolean"!=typeof this.settings&&this.parseSettings(),this.hiddenColumnsPlugin=this.hot.getPlugin("hiddenColumns"),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.checkDependencies(),this.addHook("afterRender",function(){return r.onAfterRender()}),this.addHook("afterInit",function(){return r.onAfterInit()}),this.addHook("afterGetColHeader",function(e,t){return r.onAfterGetColHeader(e,t)}),this.addHook("beforeOnCellMouseDown",function(e,t,n){return r.onBeforeOnCellMouseDown(e,t,n)}),this.eventManager=new g.default(this.hot),(0,l.default)((0,s.default)(n.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.settings=null,this.buttonEnabledList={},this.hiddenColumnsPlugin=null,this.collapsedSections={},this.clearButtons(),(0,l.default)((0,s.default)(n.prototype),"disablePlugin",this).call(this)}},{key:"clearButtons",value:function(){if(this.hot.view){var e=this.hot.view.wt.getSetting("columnHeaders").length,t=this.hot.view.wt.wtTable.THEAD,i=this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.THEAD,a=this.hot.view.wt.wtOverlays.topLeftCornerOverlay?this.hot.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.THEAD:null,s=function(e){e&&e.parentNode.removeChild(e)};(0,d.rangeEach)(0,e-1,function(e){var n=t.childNodes[e],r=i.childNodes[e],o=a?a.childNodes[e]:null;(0,d.rangeEach)(0,n.childNodes.length-1,function(e){var t=n.childNodes[e].querySelector(".collapsibleIndicator");s(t),r&&r.childNodes[e]&&(t=r.childNodes[e].querySelector(".collapsibleIndicator"),s(t)),a&&o&&o.childNodes[e]&&(t=o.childNodes[e].querySelector(".collapsibleIndicator"),s(t))})},!0)}}},{key:"parseSettings",value:function(){var t=this;(0,c.objectEach)(this.settings,function(e){t.buttonEnabledList[e.row]||(t.buttonEnabledList[e.row]={}),t.buttonEnabledList[e.row][e.col]=e.collapsible})}},{key:"meetsDependencies",value:function(){var e=this.hot.getSettings();return e.nestedHeaders&&e.hiddenColumns}},{key:"checkDependencies",value:function(){var e=this.hot.getSettings();this.meetsDependencies()||(e.nestedHeaders||(0,f.warn)("You need to configure the Nested Headers plugin in order to use collapsible headers."),e.hiddenColumns||(0,f.warn)("You need to configure the Hidden Columns plugin in order to use collapsible headers."))}},{key:"generateIndicator",value:function(e,t){var n=t.parentNode,r=n.parentNode,o=-1*r.childNodes.length+Array.prototype.indexOf.call(r.childNodes,n);if(0<Object.keys(this.buttonEnabledList).length&&(!this.buttonEnabledList[o]||!this.buttonEnabledList[o][e]))return null;var i=this.hot.rootDocument.createElement("DIV");return(0,v.addClass)(i,"collapsibleIndicator"),this.collapsedSections[o]&&!0===this.collapsedSections[o][e]?((0,v.addClass)(i,"collapsed"),(0,v.fastInnerText)(i,"+")):((0,v.addClass)(i,"expanded"),(0,v.fastInnerText)(i,"-")),i}},{key:"markSectionAs",value:function(e,t,n,r){switch(this.collapsedSections[t]||(this.collapsedSections[t]={}),e){case"collapsed":this.collapsedSections[t][n]=!0;break;case"expanded":this.collapsedSections[t][n]=void 0}if(r)for(var o=this.nestedHeadersPlugin.colspanArray,i=this.nestedHeadersPlugin.rowCoordsToLevel(t),a=this.nestedHeadersPlugin.getChildHeaders(t,n),s=o[i+1],l=1;l<a.length;l++)s&&1<s[a[l]].colspan&&this.markSectionAs(e,t+1,a[l],!0)}},{key:"expandSection",value:function(e){this.markSectionAs("expanded",e.row,e.col,!0),this.toggleCollapsibleSection(e,"expand")}},{key:"collapseSection",value:function(e){this.markSectionAs("collapsed",e.row,e.col,!0),this.toggleCollapsibleSection(e,"collapse")}},{key:"toggleAllCollapsibleSections",value:function(i){var a=this,e=this.nestedHeadersPlugin.colspanArray;!0===this.settings?(0,h.arrayEach)(e,function(e,o){(0,h.arrayEach)(e,function(e,t){if(1<e.colspan){var n=a.nestedHeadersPlugin.levelToRowCoords(parseInt(o,10)),r=parseInt(t,10);a.markSectionAs("collapse"===i?"collapsed":"expanded",n,r,!0),a.toggleCollapsibleSection({row:n,col:r},i)}})}):(0,c.objectEach)(this.buttonEnabledList,function(e,o){(0,c.objectEach)(e,function(e,t){var n=parseInt(o,10),r=parseInt(t,10);a.markSectionAs("collapse"===i?"collapsed":"expanded",n,r,!0),a.toggleCollapsibleSection({row:n,col:r},i)})})}},{key:"collapseAll",value:function(){this.toggleAllCollapsibleSections("collapse")}},{key:"expandAll",value:function(){this.toggleAllCollapsibleSections("expand")}},{key:"toggleCollapsibleSection",value:function(n,r){var o=this;n.row&&(n.row=parseInt(n.row,10)),n.col&&(n.col=parseInt(n.col,10));for(var i=this.hiddenColumnsPlugin.hiddenColumns,e=this.nestedHeadersPlugin.colspanArray,t=this.nestedHeadersPlugin.rowCoordsToLevel(n.row),a=e[t][n.col].colspan,s=this.nestedHeadersPlugin.getChildHeaders(n.row,n.col),l=t+1,u=e[l],c=u&&u[s[0]].colspan||1;c===a&&l<this.columnHeaderLevelCount;)c=(u=e[l+=1])&&u[s[0]].colspan||1;(0,d.rangeEach)(c,a-1,function(e){var t=n.col+e;switch(r){case"collapse":o.hiddenColumnsPlugin.isHidden(t)||i.push(t);break;case"expand":o.hiddenColumnsPlugin.isHidden(t)&&i.splice(i.indexOf(t),1)}}),this.hot.render(),this.hot.view.wt.wtOverlays.adjustElementsSize(!0)}},{key:"onAfterGetColHeader",value:function(e,t){if(t.hasAttribute("colspan")&&1<t.getAttribute("colspan")&&e>=this.hot.getSettings().fixedColumnsLeft){var n=this.generateIndicator(e,t);null!==n&&t.querySelector("div:first-child").appendChild(n)}}},{key:"onBeforeOnCellMouseDown",value:function(e,t){if((0,v.hasClass)(e.target,"collapsibleIndicator"))return(0,v.hasClass)(e.target,"expanded")?(this.collapsedSections[t.row]||(this.collapsedSections[t.row]=[]),this.markSectionAs("collapsed",t.row,t.col,!0),this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection(t,"collapse")):(0,v.hasClass)(e.target,"collapsed")&&(this.markSectionAs("expanded",t.row,t.col,!0),this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection(t,"expand")),(0,m.stopImmediatePropagation)(e),!1}},{key:"onAfterInit",value:function(){this.columnHeaderLevelCount=this.hot.view.wt.getSetting("columnHeaders").length}},{key:"onAfterRender",value:function(){this.nestedHeadersPlugin.enabled&&this.hiddenColumnsPlugin.enabled||this.disablePlugin()}},{key:"destroy",value:function(){this.settings=null,this.buttonEnabledList=null,this.hiddenColumnsPlugin=null,this.nestedHeadersPlugin=null,this.collapsedSections=null,this.columnHeaderLevelCount=null,(0,l.default)((0,s.default)(n.prototype),"destroy",this).call(this)}}]),n}(r(n(21)).default);(0,p.registerPlugin)("collapsibleColumns",y);var w=y;t.default=w},function(e,t,n){"use strict";var r=n(0);n(19),n(12),n(39),n(46),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(13)),u=r(n(8)),c=r(n(21)),h=n(4),d=n(20),f=r(n(562)),v=function(e){function n(e){var t;return(0,o.default)(this,n),(t=(0,a.default)(this,(0,s.default)(n).call(this,e))).endpoints=null,t}return(0,u.default)(n,e),(0,i.default)(n,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().columnSummary}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.settings=this.hot.getSettings().columnSummary,this.endpoints=new f.default(this,this.settings),this.addHook("afterInit",function(){return o.onAfterInit.apply(o,arguments)}),this.addHook("afterChange",function(){return o.onAfterChange.apply(o,arguments)}),this.addHook("beforeCreateRow",function(e,t,n){return o.endpoints.resetSetupBeforeStructureAlteration("insert_row",e,t,null,n)}),this.addHook("beforeCreateCol",function(e,t,n){return o.endpoints.resetSetupBeforeStructureAlteration("insert_col",e,t,null,n)}),this.addHook("beforeRemoveRow",function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.endpoints).resetSetupBeforeStructureAlteration.apply(e,["remove_row"].concat(n))}),this.addHook("beforeRemoveCol",function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.endpoints).resetSetupBeforeStructureAlteration.apply(e,["remove_col"].concat(n))}),this.addHook("beforeRowMove",function(){return o.onBeforeRowMove.apply(o,arguments)}),this.addHook("afterCreateRow",function(e,t,n){return o.endpoints.resetSetupAfterStructureAlteration("insert_row",e,t,null,n)}),this.addHook("afterCreateCol",function(e,t,n){return o.endpoints.resetSetupAfterStructureAlteration("insert_col",e,t,null,n)}),this.addHook("afterRemoveRow",function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.endpoints).resetSetupAfterStructureAlteration.apply(e,["remove_row"].concat(n))}),this.addHook("afterRemoveCol",function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.endpoints).resetSetupAfterStructureAlteration.apply(e,["remove_col"].concat(n))}),this.addHook("afterRowMove",function(){return o.onAfterRowMove.apply(o,arguments)}),(0,l.default)((0,s.default)(n.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.endpoints=null,this.settings=null,this.currentEndpoint=null}},{key:"calculate",value:function(e){switch(e.type.toLowerCase()){case"sum":e.result=this.calculateSum(e);break;case"min":case"max":e.result=this.calculateMinMax(e,e.type);break;case"count":e.result=this.countEntries(e);break;case"average":e.result=this.calculateAverage(e);break;case"custom":e.result=e.customFunction.call(this,e)}}},{key:"calculateSum",value:function(t){var n=this,r=0;return(0,h.objectEach)(t.ranges,function(e){r+=n.getPartialSum(e,t.sourceColumn)}),r}},{key:"getPartialSum",value:function(e,t){var n=0,r=e[1]||e[0],o=null,i=0;do{o=this.getCellValue(r,t)||0;var a=("".concat(o).split(".")[1]||[]).length||1;i<a&&(i=a),n+=o||0,r-=1}while(r>=e[0]);return Math.round(n*Math.pow(10,i))/Math.pow(10,i)}},{key:"calculateMinMax",value:function(n,r){var o=this,i=null;return(0,h.objectEach)(n.ranges,function(e){var t=o.getPartialMinMax(e,n.sourceColumn,r);if(null===i&&null!==t&&(i=t),null!==t)switch(r){case"min":i=Math.min(i,t);break;case"max":i=Math.max(i,t)}}),null===i?"Not enough data":i}},{key:"getPartialMinMax",value:function(e,t,n){var r,o=null,i=e[1]||e[0];do{if(r=this.getCellValue(i,t)||null,null===o)o=r;else if(null!==r)switch(n){case"min":o=Math.min(o,r);break;case"max":o=Math.max(o,r)}i-=1}while(i>=e[0]);return o}},{key:"countEmpty",value:function(e,t){for(var n=0,r=e[1]||e[0];this.getCellValue(r,t)||(n+=1),(r-=1)>=e[0];);return n}},{key:"countEntries",value:function(r){var o=this,i=0,e=r.ranges;return(0,h.objectEach)(e,function(e){var t=void 0===e[1]?1:e[1]-e[0]+1,n=o.countEmpty(e,r.sourceColumn);i+=t,i-=n}),i}},{key:"calculateAverage",value:function(e){return this.calculateSum(e)/this.countEntries(e)}},{key:"getCellValue",value:function(e,t){var n=this.endpoints.getVisualRowIndex(e),r=this.endpoints.getVisualColumnIndex(t),o=this.hot.getSourceDataAtCell(e,t);if(-1<(this.hot.getCellMeta(n,r).className||"").indexOf("columnSummaryResult"))return null;if(this.endpoints.currentEndpoint.forceNumeric&&("string"==typeof o&&(o=o.replace(/,/,".")),o=parseFloat(o)),isNaN(o)&&!this.endpoints.currentEndpoint.suppressDataTypeErrors)throw new Error("ColumnSummary plugin: cell at (".concat(e,", ").concat(t,") is not in a numeric format. Cannot do the calculation."));return o}},{key:"onAfterInit",value:function(){this.endpoints.endpoints=this.endpoints.parseSettings(),this.endpoints.refreshAllEndpoints(!0)}},{key:"onAfterChange",value:function(e,t){e&&"ColumnSummary.reset"!==t&&"ColumnSummary.set"!==t&&"loadData"!==t&&this.endpoints.refreshChangedEndpoints(e)}},{key:"onBeforeRowMove",value:function(e){this.endpoints.resetSetupBeforeStructureAlteration("move_row",e[0],e.length,e,this.pluginName)}},{key:"onAfterRowMove",value:function(e,t){this.endpoints.resetSetupAfterStructureAlteration("move_row",t,e.length,e,this.pluginName)}}]),n}(c.default);(0,d.registerPlugin)("columnSummary",v);var g=v;t.default=g},function(e,t,n){"use strict";var r=n(0);n(12),n(563),t.__esModule=!0,t.default=void 0;var c=r(n(18)),o=r(n(1)),i=r(n(2)),f=n(3),a=n(57),s=n(91),l=function(){function n(e,t){(0,o.default)(this,n),this.plugin=e,this.hot=this.plugin.hot,this.endpoints=[],this.settings=t,this.settingsType="array",this.currentEndpoint=null,this.cellsToSetCache=[],this.recordTranslator=(0,s.getTranslator)(this.hot)}return(0,i.default)(n,[{key:"getEndpoint",value:function(e){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings)[e]:this.endpoints[e]}},{key:"getAllEndpoints",value:function(){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings):this.endpoints}},{key:"fillMissingEndpointData",value:function(e){return this.parseSettings(e.call(this))}},{key:"parseSettings",value:function(e){var n=this,r=[],t=e;if(t||"function"!=typeof this.settings)return t=t||this.settings,(0,f.arrayEach)(t,function(e){var t={};n.assignSetting(e,t,"ranges",[[0,n.hot.countRows()-1]]),n.assignSetting(e,t,"reversedRowCoords",!1),n.assignSetting(e,t,"destinationRow",new Error("\n You must provide a destination row for the Column Summary plugin in order to work properly!\n ")),n.assignSetting(e,t,"destinationColumn",new Error("\n You must provide a destination column for the Column Summary plugin in order to work properly!\n ")),n.assignSetting(e,t,"sourceColumn",e.destinationColumn),n.assignSetting(e,t,"type","sum"),n.assignSetting(e,t,"forceNumeric",!1),n.assignSetting(e,t,"suppressDataTypeErrors",!0),n.assignSetting(e,t,"suppressDataTypeErrors",!0),n.assignSetting(e,t,"customFunction",null),n.assignSetting(e,t,"readOnly",!0),n.assignSetting(e,t,"roundFloat",!1),r.push(t)}),r;this.settingsType="function"}},{key:"assignSetting",value:function(e,t,n,r){if("ranges"!==n||void 0!==e[n]){if("ranges"!==n||0!==e[n].length)if(void 0===e[n]){if(r instanceof Error)throw r;t[n]=r}else"destinationRow"===n&&t.reversedRowCoords?t[n]=this.hot.countRows()-e[n]-1:t[n]=e[n]}else t[n]=r}},{key:"resetSetupBeforeStructureAlteration",value:function(t,n,r){if("function"===this.settingsType){var o=-1<t.indexOf("row")?"row":"col",e=this.getAllEndpoints();(0,f.arrayEach)(e,function(e){"row"==o&&e.destinationRow>=n&&("insert_row"===t?e.alterRowOffset=r:"remove_row"===t&&(e.alterRowOffset=-1*r)),"col"==o&&e.destinationColumn>=n&&("insert_col"===t?e.alterColumnOffset=r:"remove_col"===t&&(e.alterColumnOffset=-1*r))}),this.resetAllEndpoints(e,!1)}}},{key:"resetSetupAfterStructureAlteration",value:function(e,t,n,r,o,i){var a=this,s=!(5<arguments.length&&void 0!==i)||i;if("function"!==this.settingsType){var l=-1<e.indexOf("row")?"row":"col",u=-1<e.indexOf("remove")?-1:1,c=this.getAllEndpoints(),h=0===e.indexOf("move_row"),d=t;(0,f.arrayEach)(c,function(e){"row"==l&&e.destinationRow>=d&&(e.alterRowOffset=u*n),"col"==l&&e.destinationColumn>=d&&(e.alterColumnOffset=u*n)}),this.resetAllEndpoints(c,!h),h?(0,f.arrayEach)(c,function(e){a.extendEndpointRanges(e,d,r[0],r.length),a.recreatePhysicalRanges(e),a.clearOffsetInformation(e)}):(0,f.arrayEach)(c,function(e){a.shiftEndpointCoordinates(e,d)}),s&&this.refreshAllEndpoints()}else{this.hot.addHookOnce("beforeRender",function e(){return a.hot.removeHook("beforeRender",e),a.refreshAllEndpoints()})}}},{key:"clearOffsetInformation",value:function(e){e.alterRowOffset=void 0,e.alterColumnOffset=void 0}},{key:"extendEndpointRanges",value:function(e,t,n,r){(0,f.arrayEach)(e.ranges,function(e){e[1]&&(t>=e[0]&&t<=e[1]?n>e[1]?e[1]+=r:n<e[0]&&(e[0]-=r):n>=e[0]&&n<=e[1]&&(e[1]-=r,t<=e[0]&&(e[0]+=1,e[1]+=1)))})}},{key:"recreatePhysicalRanges",value:function(e){var r=this,t=e.ranges,o=[],i=[];(0,f.arrayEach)(t,function(e){var t=[];if(e[1])for(var n=e[0];n<=e[1];n++)t.push(r.recordTranslator.toPhysicalRow(n));else t.push(r.recordTranslator.toPhysicalRow(e[0]));i.push(t)}),(0,f.arrayEach)(i,function(n){var r=[];(0,f.arrayEach)(n,function(e,t){0===t?r.push(e):n[t]!==n[t-1]+1&&(r.push(n[t-1]),o.push(r),(r=[]).push(e)),t===n.length-1&&(r.push(e),o.push(r))})}),e.ranges=o}},{key:"shiftEndpointCoordinates",value:function(r,o){r.alterRowOffset&&0!==r.alterRowOffset?(r.destinationRow+=r.alterRowOffset||0,(0,f.arrayEach)(r.ranges,function(n){(0,f.arrayEach)(n,function(e,t){o<=e&&(n[t]+=r.alterRowOffset||0)})})):r.alterColumnOffset&&0!==r.alterColumnOffset&&(r.destinationColumn+=r.alterColumnOffset||0,r.sourceColumn+=r.alterColumnOffset||0)}},{key:"resetAllEndpoints",value:function(e,t){var n=this,r=!(1<arguments.length&&void 0!==t)||t,o=e;this.cellsToSetCache=[],o=o||this.getAllEndpoints(),(0,f.arrayEach)(o,function(e){n.resetEndpointValue(e,r)}),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}},{key:"refreshAllEndpoints",value:function(){var t=this;this.cellsToSetCache=[],(0,f.arrayEach)(this.getAllEndpoints(),function(e){t.currentEndpoint=e,t.plugin.calculate(e),t.setEndpointValue(e,"init")}),this.currentEndpoint=null,this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}},{key:"refreshChangedEndpoints",value:function(e){var o=this,i=[];this.cellsToSetCache=[],(0,f.arrayEach)(e,function(e,n,r){"".concat(e[2]||"")!=="".concat(e[3])&&(0,f.arrayEach)(o.getAllEndpoints(),function(e,t){o.hot.propToCol(r[n][1])===e.sourceColumn&&-1===i.indexOf(t)&&i.push(t)})}),(0,f.arrayEach)(i,function(e){o.refreshEndpoint(o.getEndpoint(e))}),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}},{key:"refreshEndpoint",value:function(e){this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e),this.currentEndpoint=null}},{key:"resetEndpointValue",value:function(e,t){var n=!(1<arguments.length&&void 0!==t)||t,r=e.alterRowOffset||0,o=e.alterColumnOffset||0,i=this.recordTranslator.toVisual(e.destinationRow,e.destinationColumn),a=(0,c.default)(i,2),s=a[0],l=a[1],u=this.hot.getCellMeta(s,l);u.readOnly=!1,u.className="",this.cellsToSetCache.push([this.recordTranslator.toVisualRow(e.destinationRow+(n?r:0)),this.recordTranslator.toVisualColumn(e.destinationColumn+(n?o:0)),""])}},{key:"setEndpointValue",value:function(e,t,n){var r=2<arguments.length&&void 0!==n&&n,o=-1*e.alterRowOffset||0,i=-1*e.alterColumnOffset||0,a=this.getVisualRowIndex(e.destinationRow),s=this.hot.getCellMeta(this.getVisualRowIndex(e.destinationRow+o),e.destinationColumn+i);a>this.hot.countRows()||e.destinationColumn>this.hot.countCols()?this.throwOutOfBoundsWarning():("init"!==t&&s.readOnly===e.readOnly||(s.readOnly=e.readOnly,s.className="columnSummaryResult"),e.roundFloat&&!isNaN(e.result)&&(e.result=e.result.toFixed(e.roundFloat)),r?this.hot.setDataAtCell(a,e.destinationColumn,e.result,"ColumnSummary.set"):this.cellsToSetCache.push([a,e.destinationColumn,e.result]),e.alterRowOffset=void 0,e.alterColumnOffset=void 0)}},{key:"getVisualRowIndex",value:function(e){return this.hot.runHooks("unmodifyRow",e,"columnSummary")}},{key:"getVisualColumnIndex",value:function(e){return this.hot.runHooks("unmodifyCol",e,"columnSummary")}},{key:"throwOutOfBoundsWarning",value:function(){(0,a.warn)("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}}]),n}();t.default=l},function(e,t,n){"use strict";function u(e,t){for(var n=-1,r=t;++n<6;)r+=e*s[n],s[n]=r%1e7,r=a(r/1e7)}function c(e){for(var t=6,n=0;0<=--t;)n+=s[t],s[t]=a(n/e),n=n%e*1e7}function h(){for(var e=6,t="";0<=--e;)if(""!==t||0===e||0!==s[e]){var n=String(s[e]);t=""===t?n:t+v.call("0",7-n.length)+n}return t}var r=n(22),d=n(87),f=n(564),v=n(206),o=n(29),i=1..toFixed,a=Math.floor,s=[0,0,0,0,0,0],g=function(e,t,n){return 0===t?n:t%2==1?g(e,t-1,n*e):g(e*e,t/2,n)};r({target:"Number",proto:!0,forced:i&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!o(function(){i.call({})})},{toFixed:function(e){var t,n,r,o,i=f(this),a=d(e),s="",l="0";if(a<0||20<a)throw RangeError("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||1e21<=i)return String(i);if(i<0&&(s="-",i=-i),1e-21<i)if(n=(t=function(e){for(var t=0,n=e;4096<=n;)t+=12,n/=4096;for(;2<=n;)t+=1,n/=2;return t}(i*g(2,69,1))-69)<0?i*g(2,-t,1):i/g(2,t,1),n*=4503599627370496,0<(t=52-t)){for(u(0,n),r=a;7<=r;)u(1e7,0),r-=7;for(u(g(10,r,1),0),r=t-1;23<=r;)c(1<<23),r-=23;c(1<<r),u(1,1),c(2),l=h()}else u(0,n),u(1<<-t,0),l=h()+v.call("0",a);return l=0<a?s+((o=l.length)<=a?"0."+v.call("0",a-o)+l:l.slice(0,o-a)+"."+l.slice(o-a)):s+l}})},function(e,t,n){var r=n(77);e.exports=function(e){if("number"!=typeof e&&"Number"!=r(e))throw TypeError("Incorrect invocation");return+e}},function(e,t,n){"use strict";var r=n(0);n(19),n(12),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(7)),a=r(n(26)),s=r(n(6)),l=r(n(13)),u=r(n(2)),c=r(n(8)),h=r(n(21)),d=n(3),f=r(n(361)),v=r(n(23)),g=n(5),p=r(n(362)),m=r(n(168)),y=n(20),w=r(n(43)),C=n(33),E=n(83);n(566),w.default.getSingleton().register("afterDropdownMenuDefaultOptions"),w.default.getSingleton().register("beforeDropdownMenuShow"),w.default.getSingleton().register("afterDropdownMenuShow"),w.default.getSingleton().register("afterDropdownMenuHide"),w.default.getSingleton().register("afterDropdownMenuExecute");var S="changeType",b=function(e){function r(e){var n;return(0,o.default)(this,r),(n=(0,i.default)(this,(0,s.default)(r).call(this,e))).eventManager=new v.default((0,a.default)(n)),n.commandExecutor=new f.default(n.hot),n.itemsFactory=null,n.menu=null,n.hot.addHook("afterGetColHeader",function(e,t){return n.onAfterGetColHeader(e,t)}),n}return(0,c.default)(r,e),(0,u.default)(r,null,[{key:"DEFAULT_ITEMS",get:function(){return[E.COLUMN_LEFT,E.COLUMN_RIGHT,E.SEPARATOR,E.REMOVE_COLUMN,E.SEPARATOR,E.CLEAR_COLUMN,E.SEPARATOR,E.READ_ONLY,E.SEPARATOR,E.ALIGNMENT]}}]),(0,u.default)(r,[{key:"isEnabled",value:function(){return this.hot.getSettings().dropdownMenu}},{key:"enablePlugin",value:function(){var o=this;if(!this.enabled){this.itemsFactory=new p.default(this.hot,r.DEFAULT_ITEMS);var t=this.hot.getSettings().dropdownMenu,n={items:this.itemsFactory.getItems(t)};this.registerEvents(),"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),(0,l.default)((0,s.default)(r.prototype),"enablePlugin",this).call(this),this.callOnPluginsReady(function(){o.hot.runHooks("afterDropdownMenuDefaultOptions",n),o.itemsFactory.setPredefinedItems(n.items);var e=o.itemsFactory.getItems(t);o.menu&&o.menu.destroy(),o.menu=new m.default(o.hot,{className:"htDropdownMenu",keepInViewport:!0}),o.hot.runHooks("beforeDropdownMenuSetItems",e),o.menu.setMenuItems(e),o.menu.addLocalHook("beforeOpen",function(){return o.onMenuBeforeOpen()}),o.menu.addLocalHook("afterOpen",function(){return o.onMenuAfterOpen()}),o.menu.addLocalHook("afterClose",function(){return o.onMenuAfterClose()}),o.menu.addLocalHook("executeCommand",function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.executeCommand).call.apply(e,[o].concat(n))}),(0,d.arrayEach)(e,function(e){return o.commandExecutor.registerCommand(e.key,e)})})}}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),(0,l.default)((0,s.default)(r.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.close(),this.menu&&this.menu.destroy(),(0,l.default)((0,s.default)(r.prototype),"disablePlugin",this).call(this)}},{key:"registerEvents",value:function(){var t=this;this.eventManager.addEventListener(this.hot.rootElement,"click",function(e){return t.onTableClick(e)})}},{key:"open",value:function(e){this.menu&&(this.menu.open(),e.width&&this.menu.setOffset("left",e.width),this.menu.setPosition(e),this.menu.hotMenu.isHotTableEnv=this.hot.isHotTableEnv)}},{key:"close",value:function(){this.menu&&this.menu.close()}},{key:"executeCommand",value:function(e){for(var t,n=arguments.length,r=new Array(1<n?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];(t=this.commandExecutor).execute.apply(t,[e].concat(r))}},{key:"setListening",value:function(e){var t=!(0<arguments.length&&void 0!==e)||e;this.menu.isOpened()&&(t?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}},{key:"onTableClick",value:function(e){if((0,C.stopPropagation)(e),(0,g.hasClass)(e.target,S)&&!this.menu.isOpened()){var t=e.target.getBoundingClientRect();this.open({left:t.left,top:t.top+e.target.offsetHeight+3,width:t.width,height:t.height})}}},{key:"onAfterGetColHeader",value:function(e,t){var n=t.parentNode;if(n){var r=n.parentNode.childNodes,o=Array.prototype.indexOf.call(r,n);if(!(e<0||o!==r.length-1)){var i=t.querySelector(".".concat(S));if(!this.enabled||!i)if(this.enabled){var a=this.hot.rootDocument.createElement("button");a.className=S,a.onclick=function(){return!1},t.firstChild.insertBefore(a,t.firstChild.firstChild)}else i&&i.parentNode.removeChild(i)}}}},{key:"onMenuBeforeOpen",value:function(){this.hot.runHooks("beforeDropdownMenuShow",this)}},{key:"onMenuAfterOpen",value:function(){this.hot.runHooks("afterDropdownMenuShow",this)}},{key:"onMenuAfterClose",value:function(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}},{key:"destroy",value:function(){this.close(),this.menu&&this.menu.destroy(),(0,l.default)((0,s.default)(r.prototype),"destroy",this).call(this)}}]),r}(h.default);b.SEPARATOR={name:E.SEPARATOR},(0,y.registerPlugin)("dropdownMenu",b);var R=b;t.default=R},function(e,t,n){},function(e,t,n){"use strict";var r=n(9),o=n(0);n(19),n(32),t.__esModule=!0,t.default=void 0;var i=o(n(1)),a=o(n(2)),s=o(n(7)),l=o(n(6)),u=o(n(8)),c=o(n(21)),h=n(20),d=o(n(568)),f=r(n(569)),v=function(e){function t(){return(0,i.default)(this,t),(0,s.default)(this,(0,l.default)(t).apply(this,arguments))}return(0,u.default)(t,e),(0,a.default)(t,[{key:"isEnabled",value:function(){return!0}},{key:"exportAsString",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:{};return this._createTypeFormatter(e,n).export()}},{key:"exportAsBlob",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:{};return this._createBlob(this._createTypeFormatter(e,n))}},{key:"downloadFile",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:{},r=this.hot,o=r.rootDocument,i=r.rootWindow,a=this._createTypeFormatter(e,n),s=this._createBlob(a),l=i.URL||i.webkitURL,u=o.createElement("a"),c="".concat(a.options.filename,".").concat(a.options.fileExtension);if(void 0!==u.download){var h=l.createObjectURL(s);u.style.display="none",u.setAttribute("href",h),u.setAttribute("download",c),o.body.appendChild(u),u.dispatchEvent(new MouseEvent("click")),o.body.removeChild(u),setTimeout(function(){l.revokeObjectURL(h)},100)}else navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob(s,c)}},{key:"_createTypeFormatter",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:{};if(!f.EXPORT_TYPES[e])throw new Error('Export format type "'.concat(e,'" is not supported.'));return(0,f.default)(e,new d.default(this.hot),n)}},{key:"_createBlob",value:function(e){var t=null;return"undefined"!=typeof Blob&&(t=new Blob([e.export()],{type:"".concat(e.options.mimeType,";charset=").concat(e.options.encoding)})),t}}]),t}(c.default);(0,h.registerPlugin)("exportFile",v);var g=v;t.default=g},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var h=r(n(18)),o=r(n(1)),i=r(n(2)),l=n(15),a=function(){function t(e){(0,o.default)(this,t),this.hot=e,this.options={}}return(0,i.default)(t,[{key:"setOptions",value:function(e){this.options=e}},{key:"getData",value:function(){var r=this,e=this._getDataRange(),t=e.startRow,o=e.startCol,n=e.endRow,i=e.endCol,a=this.options,s=[];return(0,l.rangeEach)(t,n,function(t){var n=[];!a.exportHiddenRows&&r._isHiddenRow(t)||((0,l.rangeEach)(o,i,function(e){!a.exportHiddenColumns&&r._isHiddenColumn(e)||n.push(r.hot.getDataAtCell(t,e))}),s.push(n))}),s}},{key:"getRowHeaders",value:function(){var t=this,n=[];if(this.options.rowHeaders){var e=this._getDataRange(),r=e.startRow,o=e.endRow,i=this.hot.getRowHeader();(0,l.rangeEach)(r,o,function(e){!t.options.exportHiddenRows&&t._isHiddenRow(e)||n.push(i[e])})}return n}},{key:"getColumnHeaders",value:function(){var t=this,n=[];if(this.options.columnHeaders){var e=this._getDataRange(),r=e.startCol,o=e.endCol,i=this.hot.getColHeader();(0,l.rangeEach)(r,o,function(e){!t.options.exportHiddenColumns&&t._isHiddenColumn(e)||n.push(i[e])})}return n}},{key:"_getDataRange",value:function(){var e=this.hot.countCols()-1,t=this.hot.countRows()-1,n=(0,h.default)(this.options.range,4),r=n[0],o=void 0===r?0:r,i=n[1],a=void 0===i?0:i,s=n[2],l=void 0===s?t:s,u=n[3],c=void 0===u?e:u;return{startRow:o=Math.max(o,0),startCol:a=Math.max(a,0),endRow:l=Math.min(l,t),endCol:c=Math.min(c,e)}}},{key:"_isHiddenRow",value:function(e){return this.hot.hasHook("hiddenRow")&&this.hot.runHooks("hiddenRow",e)}},{key:"_isHiddenColumn",value:function(e){return this.hot.hasHook("hiddenColumn")&&this.hot.runHooks("hiddenColumn",e)}}]),t}();t.default=a},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=function(e,t,n){return"function"!=typeof a[e]?null:new a[e](t,n)},t.EXPORT_TYPES=t.TYPE_PDF=t.TYPE_EXCEL=t.TYPE_CSV=void 0;var o=r(n(71)),i=r(n(570));t.TYPE_CSV="csv";t.TYPE_EXCEL="excel";t.TYPE_PDF="pdf";var a=(0,o.default)({},"csv",i.default);t.EXPORT_TYPES=a},function(e,t,n){"use strict";var r=n(0);n(12),n(51),n(165),n(130),n(37),n(39),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(8)),u=n(3),c=n(27),h=r(n(571)),d=String.fromCharCode(13),f=String.fromCharCode(34),v=String.fromCharCode(10),g=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(0,s.default)(t).apply(this,arguments))}return(0,l.default)(t,e),(0,i.default)(t,[{key:"export",value:function(){var n=this,r=this.options,e=this.dataProvider.getData(),t=this.dataProvider.getColumnHeaders(),o=0<t.length,i=this.dataProvider.getRowHeaders(),a=0<i.length,s=r.bom?String.fromCharCode(65279):"";return o&&(t=(0,u.arrayMap)(t,function(e){return n._escapeCell(e,!0)}),a&&(s+=r.columnDelimiter),s+=t.join(r.columnDelimiter),s+=r.rowDelimiter),(0,u.arrayEach)(e,function(e,t){0<t&&(s+=r.rowDelimiter),a&&(s+=n._escapeCell(i[t])+r.columnDelimiter),s+=e.map(function(e){return n._escapeCell(e)}).join(r.columnDelimiter)}),s}},{key:"_escapeCell",value:function(e,t){var n=1<arguments.length&&void 0!==t&&t,r=(0,c.stringify)(e);return""!==r&&(n||0<=r.indexOf(d)||0<=r.indexOf(f)||0<=r.indexOf(v)||0<=r.indexOf(this.options.columnDelimiter))&&(r=r.replace(new RegExp('"',"g"),'""'),r='"'.concat(r,'"')),r}}],[{key:"DEFAULT_OPTIONS",get:function(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n"}}}]),t}(h.default);t.default=g},function(e,t,n){"use strict";var r=n(0);n(205),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(4),s=n(68),l=function(){function r(e,t){(0,o.default)(this,r),this.dataProvider=e,this.options=this._mergeOptions(t),this.dataProvider.setOptions(this.options)}return(0,i.default)(r,null,[{key:"DEFAULT_OPTIONS",get:function(){return{mimeType:"text/plain",fileExtension:"txt",filename:"Handsontable [YYYY]-[MM]-[DD]",encoding:"utf-8",bom:!1,columnHeaders:!1,rowHeaders:!1,exportHiddenColumns:!1,exportHiddenRows:!1,range:[]}}}]),(0,i.default)(r,[{key:"_mergeOptions",value:function(e){var t=(0,a.clone)(this.constructor.DEFAULT_OPTIONS),n=new Date;return t=(0,a.extend)((0,a.clone)(r.DEFAULT_OPTIONS),t),(t=(0,a.extend)(t,e)).filename=(0,s.substitute)(t.filename,{YYYY:n.getFullYear(),MM:"".concat(n.getMonth()+1).padStart(2,"0"),DD:"".concat(n.getDate()).padStart(2,"0")}),t}}]),r}();t.default=l},function(e,t,n){"use strict";var r=n(0);n(19),n(64),t.__esModule=!0,t.default=void 0;var o=r(n(1)),a=r(n(2)),s=r(n(7)),l=r(n(6)),u=r(n(13)),c=r(n(8)),i=r(n(357)),h=n(88),d=n(166),f=n(20),v=n(136),g=n(5),p=n(573),m=n(574),y=n(575);n(576);var w="multiColumnSorting",C="columnSorting";(0,h.registerRootComparator)(w,p.rootComparator);var E=function(e){function i(e){var t;return(0,o.default)(this,i),(t=(0,s.default)(this,(0,l.default)(i).call(this,e))).pluginKey=w,t}return(0,c.default)(i,e),(0,a.default)(i,[{key:"isEnabled",value:function(){return(0,u.default)((0,l.default)(i.prototype),"isEnabled",this).call(this)}},{key:"enablePlugin",value:function(){return!this.enabled&&this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[C]&&(0,m.warnAboutPluginsConflict)(),(0,u.default)((0,l.default)(i.prototype),"enablePlugin",this).call(this)}},{key:"disablePlugin",value:function(){return(0,u.default)((0,l.default)(i.prototype),"disablePlugin",this).call(this)}},{key:"sort",value:function(e){return(0,u.default)((0,l.default)(i.prototype),"sort",this).call(this,e)}},{key:"clearSort",value:function(){return(0,u.default)((0,l.default)(i.prototype),"clearSort",this).call(this)}},{key:"isSorted",value:function(){return(0,u.default)((0,l.default)(i.prototype),"isSorted",this).call(this)}},{key:"getSortConfig",value:function(e){return(0,u.default)((0,l.default)(i.prototype),"getSortConfig",this).call(this,e)}},{key:"setSortConfig",value:function(e){return(0,u.default)((0,l.default)(i.prototype),"setSortConfig",this).call(this,e)}},{key:"getNormalizedSortConfigs",value:function(e){var t=0<arguments.length&&void 0!==e?e:[];return Array.isArray(t)?t:[t]}},{key:"updateHeaderClasses",value:function(e){for(var t,n=arguments.length,r=new Array(1<n?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];(t=(0,u.default)((0,l.default)(i.prototype),"updateHeaderClasses",this)).call.apply(t,[this,e].concat(r)),(0,g.removeClass)(e,(0,y.getClassedToRemove)(e)),!1!==this.enabled&&(0,g.addClass)(e,y.getClassesToAdd.apply(void 0,r))}},{key:"onUpdateSettings",value:function(e){return this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[C]&&(0,m.warnAboutPluginsConflict)(),(0,u.default)((0,l.default)(i.prototype),"onUpdateSettings",this).call(this,e)}},{key:"onAfterOnCellMouseDown",value:function(e,t){!1!==(0,d.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&((0,v.isPressedCtrlKey)()?(this.hot.deselectCell(),this.hot.selectColumns(t.col),this.sort(this.getNextSortConfig(t.col,"append"))):this.sort(this.getColumnNextConfig(t.col)))}}]),i}(i.default);(0,f.registerPlugin)(w,E);var S=E;t.default=S},function(e,t,n){"use strict";var r=n(0);n(40),t.__esModule=!0,t.rootComparator=function(h,d){return function(e,t){var u=(0,o.default)(e).slice(1),c=(0,o.default)(t).slice(1);return function e(t){var n=h[t],r=d[t],o=u[t],i=c[t],a=r.multiColumnSorting,s=(a.compareFunctionFactory?a.compareFunctionFactory:(0,f.getCompareFunctionFactory)(r.type))(n,r,a)(o,i);if(s===f.DO_NOT_SWAP){var l=t+1;if(void 0!==d[l])return e(l)}return s}(0)}};var o=r(n(359)),f=n(88)},function(e,t,n){"use strict";t.__esModule=!0,t.warnAboutPluginsConflict=function(){(0,r.warn)("Plugins `columnSorting` and `multiColumnSorting` should not be enabled simultaneously.")};var r=n(57)},function(e,t,n){"use strict";n(53),n(130),n(37),n(46),t.__esModule=!0,t.getClassesToAdd=function(e,t,n){var r=[];if(!1===n)return r;e.isColumnSorted(t)&&1<e.getNumberOfSortedColumns()&&r.push("".concat(o,"-").concat(e.getIndexOfColumnInSortQueue(t)+1));return r},t.getClassedToRemove=function(e){var t=e.className.split(" "),n=new RegExp("^".concat(o,"-[0-9]{1,2}$"));return t.filter(function(e){return n.test(e)})};var o="sort"},function(e,t,n){},function(e,t,n){"use strict";var r=n(9),o=n(0);n(19),n(53),n(31),n(12),n(16),n(30),n(54),n(70),n(10),n(38),n(14),n(355),n(17),t.__esModule=!0,t.default=void 0;var i=o(n(66)),a=o(n(18)),s=o(n(1)),l=o(n(2)),u=o(n(7)),c=o(n(26)),h=o(n(6)),d=o(n(13)),f=o(n(8)),v=o(n(21)),g=n(3),p=n(67),m=n(57),y=n(15),w=o(n(23)),C=n(5),E=n(20),S=n(83),b=r(n(11)),R=o(n(578)),T=o(n(599)),O=o(n(601)),k=o(n(607)),M=o(n(374)),N=o(n(375)),_=o(n(608)),A=n(108),I=n(170);function D(){var e=(0,i.default)(["The filter conditions have been applied properly, but couldnt be displayed visually.\n The overall amount of conditions exceed the capability of the dropdown menu.\n For more details see the documentation."]);return D=function(){return e},e}n(609);var L=function(e){function o(e){var n;return(0,s.default)(this,o),(n=(0,u.default)(this,(0,h.default)(o).call(this,e))).eventManager=new w.default((0,c.default)(n)),n.trimRowsPlugin=null,n.dropdownMenuPlugin=null,n.conditionCollection=null,n.conditionUpdateObserver=null,n.components=new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]]),n.lastSelectedColumn=null,n.hiddenRowsCache=new Map,n.hot.addHook("afterGetColHeader",function(e,t){return n.onAfterGetColHeader(e,t)}),n}return(0,f.default)(o,e),(0,l.default)(o,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().filters}},{key:"enablePlugin",value:function(){var n=this;if(!this.enabled){this.trimRowsPlugin=this.hot.getPlugin("trimRows"),this.dropdownMenuPlugin=this.hot.getPlugin("dropdownMenu");var e=function(t){return t.addLocalHook("accept",function(){return n.onActionBarSubmit("accept")}),t.addLocalHook("cancel",function(){return n.onActionBarSubmit("cancel")}),t.addLocalHook("change",function(e){return n.onComponentChange(t,e)}),t};if(!this.components.get("filter_by_condition")){var t=new R.default(this.hot,{id:"filter_by_condition",name:function(){return"".concat(n.hot.getTranslatedPhrase(b.FILTERS_DIVS_FILTER_BY_CONDITION),":")},addSeparator:!1});t.addLocalHook("afterClose",function(){return n.onSelectUIClosed()}),this.components.set("filter_by_condition",e(t))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new T.default(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){var r=new R.default(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0});r.addLocalHook("afterClose",function(){return n.onSelectUIClosed()}),this.components.set("filter_by_condition2",e(r))}this.components.get("filter_by_value")||this.components.set("filter_by_value",e(new O.default(this.hot,{id:"filter_by_value",name:function(){return"".concat(n.hot.getTranslatedPhrase(b.FILTERS_DIVS_FILTER_BY_VALUE),":")}}))),this.components.get("filter_action_bar")||this.components.set("filter_action_bar",e(new k.default(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new M.default),this.conditionUpdateObserver||(this.conditionUpdateObserver=new _.default(this.conditionCollection,function(e){return n.getDataMapAtColumn(e)}),this.conditionUpdateObserver.addLocalHook("update",function(e){return n.updateComponents(e)})),this.components.forEach(function(e){e.show()}),this.registerEvents(),this.addHook("beforeDropdownMenuSetItems",function(e){return n.onBeforeDropdownMenuSetItems(e)}),this.addHook("afterDropdownMenuDefaultOptions",function(e){return n.onAfterDropdownMenuDefaultOptions(e)}),this.addHook("afterDropdownMenuShow",function(){return n.onAfterDropdownMenuShow()}),this.addHook("afterDropdownMenuHide",function(){return n.onAfterDropdownMenuHide()}),this.addHook("afterChange",function(e){return n.onAfterChange(e)}),this.hot.getSettings().trimRows=!0,this.trimRowsPlugin.enablePlugin(),this.hot.getSettings().dropdownMenu&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),(0,d.default)((0,h.default)(o.prototype),"enablePlugin",this).call(this)}}},{key:"registerEvents",value:function(){var t=this;this.eventManager.addEventListener(this.hot.rootElement,"click",function(e){return t.onTableClick(e)})}},{key:"disablePlugin",value:function(){this.enabled&&(this.dropdownMenuPlugin.enabled&&this.dropdownMenuPlugin.menu.clearLocalHooks(),this.components.forEach(function(e){e.hide()}),this.conditionCollection.clean(),this.trimRowsPlugin.untrimAll()),(0,d.default)((0,h.default)(o.prototype),"disablePlugin",this).call(this)}},{key:"addCondition",value:function(e,t,n,r){var o=3<arguments.length&&void 0!==r?r:I.OPERATION_AND,i=this.t.toPhysicalColumn(e);this.conditionCollection.addCondition(i,{command:{key:t},args:n},o)}},{key:"removeConditions",value:function(e){var t=this.t.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}},{key:"clearConditions",value:function(e){if(void 0===e)this.conditionCollection.clean();else{var t=this.t.toPhysicalColumn(e);this.conditionCollection.clearConditions(t)}}},{key:"filter",value:function(){var e=this._createDataFilter(),t=!this.conditionCollection.isEmpty(),n=[],r=this.conditionCollection.exportAllConditions();if(!1!==this.hot.runHooks("beforeFilter",r))if(t){var o=[];n=(this.trimRowsPlugin.trimmedRows.length=0,g.arrayMap)(e.filter(),function(e){return e.meta.visualRow});var i=(0,A.createArrayAssertion)(n);(0,y.rangeEach)(this.hot.countSourceRows()-1,function(e){i(e)||o.push(e)}),this.trimRowsPlugin.trimRows(o),n.length||this.hot.deselectCell()}else this.trimRowsPlugin.untrimAll();this.hot.view.wt.wtOverlays.adjustElementsSize(!0),this.hot.render(),this.clearColumnSelection(),this.hot.runHooks("afterFilter",r)}},{key:"getSelectedColumn",value:function(){return this.lastSelectedColumn}},{key:"clearColumnSelection",value:function(){var e=this.hot.getSelectedLast()||[],t=(0,a.default)(e,2),n=t[0],r=t[1];void 0!==n&&void 0!==r&&this.hot.selectCell(n,r)}},{key:"getDataMapAtColumn",value:function(e){var c=this,h=this.t.toVisualColumn(e),d=[];return(0,g.arrayEach)(this.hot.getSourceDataAtCol(h),function(e,t){var n=c.hot.getCellMeta(t,h),r=n.row,o=n.col,i=n.visualCol,a=n.visualRow,s=n.type,l=n.instance,u=n.dateFormat;d.push({meta:{row:r,col:o,visualCol:i,visualRow:a,type:s,instance:l,dateFormat:u},value:(0,A.toEmptyString)(e)})}),d}},{key:"onAfterChange",value:function(e){var r=this;e&&(0,g.arrayEach)(e,function(e){var t=(0,a.default)(e,2)[1],n=r.hot.propToCol(t);r.conditionCollection.hasConditions(n)&&r.updateValueComponentCondition(n)})}},{key:"updateValueComponentCondition",value:function(e){var t=this.hot.getDataAtCol(e),n=(0,A.unifyColumnValues)(t);this.conditionUpdateObserver.updateStatesAtColumn(e,n)}},{key:"restoreComponents",value:function(e){var t=this.getSelectedColumn(),n=t&&t.physicalIndex;e.forEach(function(e){!1===e.isHidden()&&e.restoreState(n)})}},{key:"onAfterDropdownMenuShow",value:function(){this.restoreComponents([this.components.get("filter_by_condition"),this.components.get("filter_operators"),this.components.get("filter_by_condition2"),this.components.get("filter_by_value")])}},{key:"onAfterDropdownMenuHide",value:function(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}},{key:"onBeforeDropdownMenuSetItems",value:function(e){var t=(0,g.arrayMap)(e,function(e){return e.key});this.components.forEach(function(e){e[-1===t.indexOf(e.getMenuItemDescriptor().key)?"hide":"show"]()}),this.initHiddenRowsCache()}},{key:"onAfterDropdownMenuDefaultOptions",value:function(t){t.items.push({name:S.SEPARATOR}),this.components.forEach(function(e){t.items.push(e.getMenuItemDescriptor())})}},{key:"getOperationBasedOnArguments",value:function(e,t,n,r){var o=e;return o===I.OPERATION_OR&&t.command.key!==I.CONDITION_NONE&&n.command.key!==I.CONDITION_NONE&&r.command.key!==I.CONDITION_NONE?o=I.OPERATION_OR_THEN_VARIABLE:r.command.key!==I.CONDITION_NONE&&(t.command.key!==I.CONDITION_NONE&&n.command.key!==I.CONDITION_NONE||(o=I.OPERATION_AND)),o}},{key:"onActionBarSubmit",value:function(e){if("accept"===e){var t=this.getSelectedColumn(),n=t&&t.physicalIndex,r=this.components.get("filter_by_condition").getState(),o=this.components.get("filter_by_condition2").getState(),i=this.components.get("filter_by_value").getState(),a=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),r,o,i);this.conditionUpdateObserver.groupChanges(),this.conditionCollection.clearConditions(n),r.command.key===I.CONDITION_NONE&&o.command.key===I.CONDITION_NONE&&i.command.key===I.CONDITION_NONE?this.conditionCollection.removeConditions(n):(r.command.key!==I.CONDITION_NONE&&(this.conditionCollection.addCondition(n,r,a),o.command.key!==I.CONDITION_NONE&&this.conditionCollection.addCondition(n,o,a)),i.command.key!==I.CONDITION_NONE&&this.conditionCollection.addCondition(n,i,a)),this.conditionUpdateObserver.flush(),this.components.get("filter_operators").saveState(n),this.components.get("filter_by_value").saveState(n),this.saveHiddenRowsCache(n),this.trimRowsPlugin.trimmedRows.length=0,this.filter()}this.dropdownMenuPlugin.close()}},{key:"onComponentChange",value:function(e,t){e===this.components.get("filter_by_condition")&&(t.showOperators?this.showComponents(this.components.get("filter_by_condition2"),this.components.get("filter_operators")):this.hideComponents(this.components.get("filter_by_condition2"),this.components.get("filter_operators"))),e.constructor!==R.default||t.inputsCount||this.setListeningDropdownMenu()}},{key:"onSelectUIClosed",value:function(){this.setListeningDropdownMenu()}},{key:"setListeningDropdownMenu",value:function(){this.dropdownMenuPlugin.setListening()}},{key:"onAfterGetColHeader",value:function(e,t){var n=this.t.toPhysicalColumn(e);this.enabled&&this.conditionCollection.hasConditions(n)?(0,C.addClass)(t,"htFiltersActive"):(0,C.removeClass)(t,"htFiltersActive")}},{key:"onTableClick",value:function(e){var t=(0,C.closest)(e.target,"TH");if(t){var n=this.hot.getCoords(t).col,r=this.t.toPhysicalColumn(n);this.lastSelectedColumn={visualIndex:n,physicalIndex:r}}}},{key:"destroy",value:function(){this.enabled&&(this.components.forEach(function(e){e.destroy()}),this.conditionCollection.destroy(),this.conditionUpdateObserver.destroy(),this.hiddenRowsCache.clear(),this.trimRowsPlugin.disablePlugin()),(0,d.default)((0,h.default)(o.prototype),"destroy",this).call(this)}},{key:"_createDataFilter",value:function(e){var t=this,n=0<arguments.length&&void 0!==e?e:this.conditionCollection;return new N.default(n,function(e){return t.getDataMapAtColumn(e)})}},{key:"updateComponents",value:function(e){if(this.dropdownMenuPlugin.enabled){var t=e.editedConditionStack.conditions,n=e.editedConditionStack.column,r=t.filter(function(e){return e.name===I.CONDITION_BY_VALUE}),o=t.filter(function(e){return e.name!==I.CONDITION_BY_VALUE}),i=this.conditionCollection.columnTypes[n];2===r.length||3===o.length?(0,m.warn)((0,p.toSingleLine)(D())):(0<o.length&&this.showComponentForParticularColumn(this.components.get("filter_operators"),n),this.components.get("filter_by_condition").updateState(o[0],n),this.components.get("filter_by_condition2").updateState(o[1],n),this.components.get("filter_by_value").updateState(e),this.components.get("filter_operators").updateState(i,n))}}},{key:"showComponentForParticularColumn",value:function(e,t){if(this.hiddenRowsCache.has(t)){var n=this.getIndexesOfComponents(e);this.removeIndexesFromHiddenRowsCache(t,n)}else this.hiddenRowsCache.set(t,[])}},{key:"removeIndexesFromHiddenRowsCache",value:function(e,t){var n=this.hiddenRowsCache.get(e);(0,g.arrayEach)(t,function(e){n.includes(e)&&n.splice(n.indexOf(e),1)})}},{key:"getIndexesOfComponents",value:function(){for(var e=this.dropdownMenuPlugin.menu,r=[],t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return(0,g.arrayEach)(n,function(n){(0,g.arrayEach)(e.menuItems,function(e,t){e.key===n.getMenuItemDescriptor().key&&r.push(t)})}),r}},{key:"changeComponentsVisibility",value:function(e){for(var t=!(0<arguments.length&&void 0!==e)||e,n=this.dropdownMenuPlugin.menu.hotMenu,r=n.getPlugin("hiddenRows"),o=arguments.length,i=new Array(1<o?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];var s=this.getIndexesOfComponents.apply(this,i);t?r.showRows(s):r.hideRows(s),n.render()}},{key:"initHiddenRowsCache",value:function(){var t=this;this.dropdownMenuPlugin.menu.addLocalHook("afterOpen",function(){var e=t.lastSelectedColumn.physicalIndex;t.hiddenRowsCache.has(e)||t.hiddenRowsCache.set(e,t.getIndexesOfComponents(t.components.get("filter_operators"),t.components.get("filter_by_condition2"))),t.dropdownMenuPlugin.menu.hotMenu.updateSettings({hiddenRows:{rows:t.hiddenRowsCache.get(e)}})})}},{key:"saveHiddenRowsCache",value:function(e){this.hiddenRowsCache.set(e,this.dropdownMenuPlugin.menu.hotMenu.getPlugin("hiddenRows").hiddenRows)}},{key:"hideComponents",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.changeComponentsVisibility.apply(this,[!1].concat(t))}},{key:"showComponents",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.changeComponentsVisibility.apply(this,[!0].concat(t))}}]),o}(v.default);(0,E.registerPlugin)("filters",L);var H=L;t.default=H},function(e,t,n){"use strict";var r=n(9),o=n(0);n(53),n(54),n(138),n(32),t.__esModule=!0,t.default=void 0;var a=o(n(36)),s=o(n(1)),l=o(n(2)),u=o(n(7)),c=o(n(6)),h=o(n(13)),d=o(n(8)),f=n(5),v=n(33),g=n(3),p=n(52),m=n(4),y=r(n(11)),i=o(n(139)),w=r(n(170)),C=o(n(172)),E=o(n(598)),S=n(28),b=function(e){function i(e,t){var n;return(0,s.default)(this,i),(n=(0,u.default)(this,(0,c.default)(i).call(this,e))).id=t.id,n.name=t.name,n.addSeparator=t.addSeparator,n.elements.push(new E.default(n.hot)),n.elements.push(new C.default(n.hot,{placeholder:y.FILTERS_BUTTONS_PLACEHOLDER_VALUE})),n.elements.push(new C.default(n.hot,{placeholder:y.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE})),n.registerHooks(),n}return(0,d.default)(i,e),(0,l.default)(i,[{key:"registerHooks",value:function(){var t=this;this.getSelectElement().addLocalHook("select",function(e){return t.onConditionSelect(e)}),this.getSelectElement().addLocalHook("afterClose",function(){return t.onSelectUIClosed()}),(0,g.arrayEach)(this.getInputElements(),function(e){e.addLocalHook("keydown",function(e){return t.onInputKeyDown(e)})})}},{key:"setState",value:function(e){var r=this;if(this.reset(),e){var o=(0,m.clone)(e.command);o.name.startsWith(y.FILTERS_CONDITIONS_NAMESPACE)&&(o.name=this.hot.getTranslatedPhrase(o.name)),this.getSelectElement().setValue(o),(0,g.arrayEach)(e.args,function(e,t){if(t>o.inputsCount-1)return!1;var n=r.getInputElement(t);n.setValue(e),n[o.inputsCount>t?"show":"hide"](),t||setTimeout(function(){return n.focus()},10)})}}},{key:"getState",value:function(){var n=this.getSelectElement().getValue()||(0,S.getConditionDescriptor)(w.CONDITION_NONE),r=[];return(0,g.arrayEach)(this.getInputElements(),function(e,t){n.inputsCount>t&&r.push(e.getValue())}),{command:n,args:r}}},{key:"updateState",value:function(e,t){var n=e?(0,S.getConditionDescriptor)(e.name):(0,S.getConditionDescriptor)(w.CONDITION_NONE);this.setCachedState(t,{command:n,args:e?e.args:[]}),e||(0,g.arrayEach)(this.getInputElements(),function(e){return e.setValue(null)})}},{key:"getSelectElement",value:function(){return this.elements.filter(function(e){return e instanceof E.default})[0]}},{key:"getInputElement",value:function(e){var t=0<arguments.length&&void 0!==e?e:0;return this.getInputElements()[t]}},{key:"getInputElements",value:function(){return this.elements.filter(function(e){return e instanceof C.default})}},{key:"getMenuItemDescriptor",value:function(){var s=this;return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:function(){return s.isHidden()},renderer:function(e,t,n,r,o,i){(0,f.addClass)(t.parentNode,"htFiltersMenuCondition"),s.addSeparator&&(0,f.addClass)(t.parentNode,"border");var a=s.hot.rootDocument.createElement("div");return(0,f.addClass)(a,"htFiltersMenuLabel"),a.textContent=i,t.appendChild(a),t.parentNode.hasAttribute("ghost-table")||(0,g.arrayEach)(s.elements,function(e){return t.appendChild(e.element)}),t}}}},{key:"reset",value:function(){var e,t=this.hot.getPlugin("filters").getSelectedColumn(),n=t&&t.visualIndex,r=(e=this.hot).getDataType.apply(e,(0,a.default)(this.hot.getSelectedLast()||[0,n])),o=(0,w.default)(r);(0,g.arrayEach)(this.getInputElements(),function(e){return e.hide()}),this.getSelectElement().setItems(o),(0,h.default)((0,c.default)(i.prototype),"reset",this).call(this),this.getSelectElement().setValue(o[0])}},{key:"onConditionSelect",value:function(n){(0,g.arrayEach)(this.getInputElements(),function(e,t){e[n.inputsCount>t?"show":"hide"](),t||setTimeout(function(){return e.focus()},10)}),this.runLocalHooks("change",n)}},{key:"onSelectUIClosed",value:function(){this.runLocalHooks("afterClose")}},{key:"onInputKeyDown",value:function(e){(0,p.isKey)(e.keyCode,"ENTER")?(this.runLocalHooks("accept"),(0,v.stopImmediatePropagation)(e)):(0,p.isKey)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,v.stopImmediatePropagation)(e))}}]),i}(i.default);t.default=b},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;function o(e,t){return e[u]["state_"+t]}function i(e,t,n){e[u]["state_"+t]=n}var a,s=r(n(71)),l=n(4),u="_states",c=(a={},(0,s.default)(a,u,{}),(0,s.default)(a,"getCachedState",function(e){return o(this,e)}),(0,s.default)(a,"setCachedState",function(e,t){i(this,e,t)}),(0,s.default)(a,"saveState",function(e){i(this,e,this.getState())}),(0,s.default)(a,"restoreState",function(e){this.setState(o(this,e))}),(0,s.default)(a,"hasSavedState",function(e){return void 0!==o(this,e)}),(0,s.default)(a,"clearState",function(e){i(this,e)}),(0,s.default)(a,"clearStates",function(){this[u]={}}),a);(0,l.defineGetter)(c,"MIXIN_NAME","stateSaver",{writable:!1,enumerable:!1});var h=c;t.default=h},function(e,t,n){"use strict";var r=n(9);t.__esModule=!0,t.condition=a,t.CONDITION_NAME=void 0;var o=r(n(11)),i=n(28);function a(){return!0}t.CONDITION_NAME="none",(0,i.registerCondition)("none",a,{name:o.FILTERS_CONDITIONS_NONE,inputsCount:0,showOperators:!1})},function(e,t,n){"use strict";var r=n(9);t.__esModule=!0,t.condition=s,t.CONDITION_NAME=void 0;var o=r(n(11)),i=n(28),a=n(366);function s(e,t){return!(0,i.getCondition)(a.CONDITION_NAME,t)(e)}t.CONDITION_NAME="not_empty",(0,i.registerCondition)("not_empty",s,{name:o.FILTERS_CONDITIONS_NOT_EMPTY,inputsCount:0,showOperators:!0})},function(e,t,n){"use strict";var r=n(9);t.__esModule=!0,t.condition=s,t.CONDITION_NAME=void 0;var o=r(n(11)),i=n(28),a=n(367);function s(e,t){return!(0,i.getCondition)(a.CONDITION_NAME,t)(e)}t.CONDITION_NAME="neq",(0,i.registerCondition)("neq",s,{name:o.FILTERS_CONDITIONS_NOT_EQUAL,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.condition=l,t.CONDITION_NAME=void 0;var i=o(n(18)),a=r(n(11)),s=n(28);function l(e,t){var n=(0,i.default)(t,1)[0];return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value>n}t.CONDITION_NAME="gt",(0,s.registerCondition)("gt",l,{name:a.FILTERS_CONDITIONS_GREATER_THAN,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.condition=l,t.CONDITION_NAME=void 0;var i=o(n(18)),a=r(n(11)),s=n(28);function l(e,t){var n=(0,i.default)(t,1)[0];return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value>=n}t.CONDITION_NAME="gte",(0,s.registerCondition)("gte",l,{name:a.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.condition=l,t.CONDITION_NAME=void 0;var i=o(n(18)),a=r(n(11)),s=n(28);function l(e,t){var n=(0,i.default)(t,1)[0];return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value<n}t.CONDITION_NAME="lt",(0,s.registerCondition)("lt",l,{name:a.FILTERS_CONDITIONS_LESS_THAN,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.condition=l,t.CONDITION_NAME=void 0;var i=o(n(18)),a=r(n(11)),s=n(28);function l(e,t){var n=(0,i.default)(t,1)[0];return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value<=n}t.CONDITION_NAME="lte",(0,s.registerCondition)("lte",l,{name:a.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";var r=n(9);t.__esModule=!0,t.condition=l,t.CONDITION_NAME=void 0;var o=r(n(11)),i=n(28),a=n(368),s="not_between";function l(e,t){return!(0,i.getCondition)(a.CONDITION_NAME,t)(e)}t.CONDITION_NAME=s,(0,i.registerCondition)(s,l,{name:o.FILTERS_CONDITIONS_NOT_BETWEEN,inputsCount:2,showOperators:!0})},function(e,t,n){"use strict";var r=n(9),o=n(0);n(138),t.__esModule=!0,t.condition=c,t.CONDITION_NAME=void 0;var i=o(n(18)),a=r(n(11)),s=n(27),l=n(28),u="begins_with";function c(e,t){var n=(0,i.default)(t,1)[0];return(0,s.stringify)(e.value).toLowerCase().startsWith((0,s.stringify)(n))}t.CONDITION_NAME=u,(0,l.registerCondition)(u,c,{name:a.FILTERS_CONDITIONS_BEGINS_WITH,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";var r=n(9),o=n(0);n(590),t.__esModule=!0,t.condition=u,t.CONDITION_NAME=void 0;var i=o(n(18)),a=r(n(11)),s=n(27),l=n(28);function u(e,t){var n=(0,i.default)(t,1)[0];return(0,s.stringify)(e.value).toLowerCase().endsWith((0,s.stringify)(n))}t.CONDITION_NAME="ends_with",(0,l.registerCondition)("ends_with",u,{name:a.FILTERS_CONDITIONS_ENDS_WITH,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";var r=n(22),s=n(50),l=n(157),o=n(158),u="endsWith",c=""[u],h=Math.min;r({target:"String",proto:!0,forced:!o(u)},{endsWith:function(e,t){var n=l(this,e,u),r=1<arguments.length?t:void 0,o=s(n.length),i=void 0===r?o:h(s(r),o),a=String(e);return c?c.call(n,a,i):n.slice(i-a.length,i)===a}})},function(e,t,n){"use strict";var r=n(9);t.__esModule=!0,t.condition=l,t.CONDITION_NAME=void 0;var o=r(n(11)),i=n(28),a=n(371),s="not_contains";function l(e,t){return!(0,i.getCondition)(a.CONDITION_NAME,t)(e)}t.CONDITION_NAME=s,(0,i.registerCondition)(s,l,{name:o.FILTERS_CONDITIONS_NOT_CONTAIN,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.condition=u,t.CONDITION_NAME=void 0;var i=o(n(61)),a=r(n(11)),s=n(28),l="date_tomorrow";function u(e){var t=(0,i.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,i.default)().subtract(-1,"days").startOf("day"),"d")}t.CONDITION_NAME=l,(0,s.registerCondition)(l,u,{name:a.FILTERS_CONDITIONS_TOMORROW,inputsCount:0})},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.condition=u,t.CONDITION_NAME=void 0;var i=o(n(61)),a=r(n(11)),s=n(28),l="date_today";function u(e){var t=(0,i.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,i.default)().startOf("day"),"d")}t.CONDITION_NAME=l,(0,s.registerCondition)(l,u,{name:a.FILTERS_CONDITIONS_TODAY,inputsCount:0})},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.condition=u,t.CONDITION_NAME=void 0;var i=o(n(61)),a=r(n(11)),s=n(28),l="date_yesterday";function u(e){var t=(0,i.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,i.default)().subtract(1,"days").startOf("day"),"d")}t.CONDITION_NAME=l,(0,s.registerCondition)(l,u,{name:a.FILTERS_CONDITIONS_YESTERDAY,inputsCount:0})},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.condition=s,t.CONDITION_NAME=void 0;var o=r(n(18)),i=n(28),a=n(108);function s(e,t){return(0,(0,o.default)(t,1)[0])(e.value)}t.CONDITION_NAME="by_value",(0,i.registerCondition)("by_value",s,{name:"By value",inputsCount:0,inputValuesDecorator:function(e){var t=(0,o.default)(e,1)[0];return[(0,a.createArrayAssertion)(t)]},showOperators:!1})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=o,t.CONDITION_NAME=void 0;var r=n(28);function o(){return!0}t.CONDITION_NAME="true",(0,r.registerCondition)("true",o,{name:"True"})},function(e,t,n){"use strict";t.__esModule=!0,t.condition=o,t.CONDITION_NAME=void 0;var r=n(28);function o(){return!1}t.CONDITION_NAME="false",(0,r.registerCondition)("false",o,{name:"False"})},function(e,t,n){"use strict";var r=n(9),o=n(0);n(16),n(54),n(10),n(14),n(24),n(17),t.__esModule=!0,t.default=void 0;var i=o(n(1)),a=o(n(7)),s=o(n(26)),l=o(n(6)),u=o(n(13)),c=o(n(2)),h=o(n(8)),d=o(n(168)),f=n(4),v=n(3),g=r(n(11)),p=n(83),m=o(n(110)),y=new WeakMap,w=function(e){function o(e,t){var n;return(0,i.default)(this,o),n=(0,a.default)(this,(0,l.default)(o).call(this,e,(0,f.extend)(o.DEFAULTS,t))),y.set((0,s.default)(n),{}),n.menu=null,n.items=[],n.registerHooks(),n}return(0,h.default)(o,e),(0,c.default)(o,null,[{key:"DEFAULTS",get:function(){return(0,f.clone)({className:"htUISelect",wrapIt:!1})}}]),(0,c.default)(o,[{key:"registerHooks",value:function(){var e=this;this.addLocalHook("click",function(){return e.onClick()})}},{key:"setItems",value:function(e){this.items=this.translateNames(e),this.menu&&this.menu.setMenuItems(this.items)}},{key:"translateNames",value:function(e){var t=this;return(0,v.arrayEach)(e,function(e){e.name=t.translateIfPossible(e.name)}),e}},{key:"build",value:function(){var t=this;(0,u.default)((0,l.default)(o.prototype),"build",this).call(this),this.menu=new d.default(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0}),this.menu.setMenuItems(this.items);var e=new m.default(this.hot,{className:"htUISelectCaption"}),n=new m.default(this.hot,{className:"htUISelectDropdown"}),r=y.get(this);r.caption=e,r.captionElement=e.element,r.dropdown=n,(0,v.arrayEach)([e,n],function(e){return t._element.appendChild(e.element)}),this.menu.addLocalHook("select",function(e){return t.onMenuSelect(e)}),this.menu.addLocalHook("afterClose",function(){return t.onMenuClosed()}),this.update()}},{key:"update",value:function(){var e;this.isBuilt()&&(e=this.options.value?this.options.value.name:this.menu.hot.getTranslatedPhrase(g.FILTERS_CONDITIONS_NONE),y.get(this).captionElement.textContent=e,(0,u.default)((0,l.default)(o.prototype),"update",this).call(this))}},{key:"openOptions",value:function(){var e=this.element.getBoundingClientRect();this.menu&&(this.menu.open(),this.menu.setPosition({left:e.left-5,top:e.top,width:e.width,height:e.height}))}},{key:"closeOptions",value:function(){this.menu&&this.menu.close()}},{key:"onMenuSelect",value:function(e){e.name!==p.SEPARATOR&&(this.options.value=e,this.closeOptions(),this.update(),this.runLocalHooks("select",this.options.value))}},{key:"onMenuClosed",value:function(){this.runLocalHooks("afterClose")}},{key:"onClick",value:function(){this.openOptions()}},{key:"destroy",value:function(){this.menu&&(this.menu.destroy(),this.menu=null);var e=y.get(this),t=e.caption,n=e.dropdown;t&&t.destroy(),n&&n.destroy(),(0,u.default)((0,l.default)(o.prototype),"destroy",this).call(this)}}]),o}(m.default);t.default=w},function(e,t,n){"use strict";var r=n(0);n(159),n(54),t.__esModule=!0,t.default=void 0;var o=r(n(66)),i=r(n(1)),a=r(n(2)),s=r(n(7)),l=r(n(6)),u=r(n(8)),c=n(5),h=n(3),d=n(67),f=r(n(139)),v=n(109),g=n(171),p=n(372),m=n(373),y=r(n(600));function w(){var e=(0,o.default)(["Radio button with index "," doesn't exist."]);return w=function(){return e},e}var C=function(e){function r(e,t){var n;return(0,i.default)(this,r),(n=(0,s.default)(this,(0,l.default)(r).call(this,e))).id=t.id,n.name=t.name,n.buildOperatorsElement(),n}return(0,u.default)(r,e),(0,a.default)(r,[{key:"getMenuItemDescriptor",value:function(){var n=this;return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:function(){return n.isHidden()},renderer:function(e,t){return(0,c.addClass)(t.parentNode,"htFiltersMenuOperators"),t.parentNode.hasAttribute("ghost-table")||(0,h.arrayEach)(n.elements,function(e){return t.appendChild(e.element)}),t}}}},{key:"buildOperatorsElement",value:function(){var n=this,r=[g.OPERATION_ID,p.OPERATION_ID];(0,h.arrayEach)(r,function(e){var t=new y.default(n.hot,{name:"operator",label:{htmlFor:e,textContent:(0,v.getOperationName)(e)},value:e,checked:e===r[0],id:e});t.addLocalHook("change",function(e){return n.onRadioInputChange(e)}),n.elements.push(t)})}},{key:"setChecked",value:function(n){if(this.elements.length<n)throw Error((0,d.toSingleLine)(w(),n));(0,h.arrayEach)(this.elements,function(e,t){e.setChecked(t===n)})}},{key:"getActiveOperationId",value:function(){var e=this.elements.find(function(e){return e instanceof y.default&&e.isChecked()});return e?e.getValue():g.OPERATION_ID}},{key:"getState",value:function(){return this.getActiveOperationId()}},{key:"setState",value:function(t){this.reset(),t&&this.getActiveOperationId()!==t&&(0,h.arrayEach)(this.elements,function(e){e.setChecked(e.getValue()===t)})}},{key:"updateState",value:function(e,t){var n=0<arguments.length&&void 0!==e?e:g.OPERATION_ID,r=1<arguments.length?t:void 0,o=n;o===m.OPERATION_ID&&(o=p.OPERATION_ID),this.setCachedState(r,o)}},{key:"reset",value:function(){this.setChecked(0)}},{key:"onRadioInputChange",value:function(e){this.setState(e.realTarget.value)}}]),r}(f.default);t.default=C},function(e,t,n){"use strict";var r=n(0);n(16),n(10),n(14),n(24),n(17),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(7)),a=r(n(26)),s=r(n(6)),l=r(n(13)),u=r(n(2)),c=r(n(8)),h=n(4),d=r(n(110)),f=new WeakMap,v=function(e){function r(e,t){var n;return(0,o.default)(this,r),n=(0,i.default)(this,(0,s.default)(r).call(this,e,(0,h.extend)(r.DEFAULTS,t))),f.set((0,a.default)(n),{}),n}return(0,c.default)(r,e),(0,u.default)(r,null,[{key:"DEFAULTS",get:function(){return(0,h.clone)({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}}]),(0,u.default)(r,[{key:"build",value:function(){(0,l.default)((0,s.default)(r.prototype),"build",this).call(this);var e=f.get(this);e.input=this._element.firstChild;var t=this.hot.rootDocument.createElement("label");t.textContent=this.translateIfPossible(this.options.label.textContent),t.htmlFor=this.translateIfPossible(this.options.label.htmlFor),e.label=t,this._element.appendChild(t),this.update()}},{key:"update",value:function(){if(this.isBuilt()){var e=f.get(this);e.input.checked=this.options.checked,e.label.textContent=this.translateIfPossible(this.options.label.textContent)}}},{key:"isChecked",value:function(){return this.options.checked}},{key:"setChecked",value:function(e){var t=!(0<arguments.length&&void 0!==e)||e;this.options.checked=t,this.update()}},{key:"focus",value:function(){this.isBuilt()&&f.get(this).input.focus()}}]),r}(d.default);t.default=v},function(e,t,n){"use strict";var r=n(9),o=n(0);n(53),n(54),t.__esModule=!0,t.default=void 0;var f=o(n(18)),i=o(n(1)),a=o(n(2)),s=o(n(7)),l=o(n(6)),u=o(n(13)),c=o(n(8)),h=n(5),d=n(33),v=n(3),g=n(52),p=r(n(11)),m=n(108),y=o(n(139)),w=o(n(602)),C=n(170),E=n(28),S=function(e){function r(e,t){var n;return(0,i.default)(this,r),(n=(0,s.default)(this,(0,l.default)(r).call(this,e))).id=t.id,n.name=t.name,n.elements.push(new w.default(n.hot)),n.registerHooks(),n}return(0,c.default)(r,e),(0,a.default)(r,[{key:"registerHooks",value:function(){var t=this;this.getMultipleSelectElement().addLocalHook("keydown",function(e){return t.onInputKeyDown(e)})}},{key:"setState",value:function(e){if(this.reset(),e&&e.command.key===C.CONDITION_BY_VALUE){var t=this.getMultipleSelectElement();t.setItems(e.itemsSnapshot),t.setValue(e.args[0])}}},{key:"getState",value:function(){var e=this.getMultipleSelectElement(),t=e.getItems();return{command:{key:e.isSelectedAllValues()||!t.length?C.CONDITION_NONE:C.CONDITION_BY_VALUE},args:[e.getValue()],itemsSnapshot:t}}},{key:"updateState",value:function(e){function t(e,t,n,r,o){var i=(0,v.arrayFilter)(t,function(e){return e.name===C.CONDITION_BY_VALUE}),a=(0,f.default)(i,1)[0],s={},l=d.hot.getTranslatedPhrase(p.FILTERS_VALUES_BLANK_CELLS);if(a){var u=(0,v.arrayMap)(r(e,o),function(e){return e.value});u=(0,m.unifyColumnValues)(u),n&&(a.args[0]=n);var c=[],h=(0,m.intersectValues)(u,a.args[0],l,function(e){e.checked&&c.push(e.value)});s.args=[c],s.command=(0,E.getConditionDescriptor)(C.CONDITION_BY_VALUE),s.itemsSnapshot=h}else s.args=[],s.command=(0,E.getConditionDescriptor)(C.CONDITION_NONE);d.setCachedState(e,s)}var d=this;t(e.editedConditionStack.column,e.editedConditionStack.conditions,e.conditionArgsChange,e.filteredRowsFactory),e.dependentConditionStacks.length&&t(e.dependentConditionStacks[0].column,e.dependentConditionStacks[0].conditions,e.conditionArgsChange,e.filteredRowsFactory,e.editedConditionStack)}},{key:"getMultipleSelectElement",value:function(){return this.elements.filter(function(e){return e instanceof w.default})[0]}},{key:"getMenuItemDescriptor",value:function(){var s=this;return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:function(){return s.isHidden()},renderer:function(e,t,n,r,o,i){(0,h.addClass)(t.parentNode,"htFiltersMenuValue");var a=s.hot.rootDocument.createElement("div");return(0,h.addClass)(a,"htFiltersMenuLabel"),a.textContent=i,t.appendChild(a),t.parentNode.hasAttribute("ghost-table")||(0,v.arrayEach)(s.elements,function(e){return t.appendChild(e.element)}),t}}}},{key:"reset",value:function(){var e=this.hot.getTranslatedPhrase(p.FILTERS_VALUES_BLANK_CELLS),t=(0,m.unifyColumnValues)(this._getColumnVisibleValues()),n=(0,m.intersectValues)(t,t,e);this.getMultipleSelectElement().setItems(n),(0,u.default)((0,l.default)(r.prototype),"reset",this).call(this),this.getMultipleSelectElement().setValue(t)}},{key:"onInputKeyDown",value:function(e){(0,g.isKey)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,d.stopImmediatePropagation)(e))}},{key:"_getColumnVisibleValues",value:function(){var e=this.hot.getPlugin("filters").getSelectedColumn(),t=e&&e.visualIndex;return(0,v.arrayMap)(this.hot.getDataAtCol(t),function(e){return(0,m.toEmptyString)(e)})}}]),r}(y.default);t.default=S},function(e,t,n){"use strict";var r=n(9),o=n(0);n(12),n(16),n(10),n(14),n(24),n(17),n(32),t.__esModule=!0,t.default=void 0;var a=o(n(36)),s=o(n(1)),l=o(n(7)),u=o(n(26)),c=o(n(6)),h=o(n(13)),d=o(n(2)),f=o(n(8)),v=n(5),g=n(4),p=n(3),m=n(52),y=n(75),w=r(n(11)),C=n(33),E=o(n(110)),S=o(n(172)),b=o(n(603)),R=n(108),T=new WeakMap,i=function(e){function i(e,t){var n;return(0,s.default)(this,i),n=(0,l.default)(this,(0,c.default)(i).call(this,e,(0,g.extend)(i.DEFAULTS,t))),T.set((0,u.default)(n),{}),n.searchInput=new S.default(n.hot,{placeholder:w.FILTERS_BUTTONS_PLACEHOLDER_SEARCH,className:"htUIMultipleSelectSearch"}),n.selectAllUI=new b.default(n.hot,{textContent:w.FILTERS_BUTTONS_SELECT_ALL,className:"htUISelectAll"}),n.clearAllUI=new b.default(n.hot,{textContent:w.FILTERS_BUTTONS_CLEAR,className:"htUIClearAll"}),n.items=[],n.itemsBox=null,n.registerHooks(),n}return(0,f.default)(i,e),(0,d.default)(i,null,[{key:"DEFAULTS",get:function(){return(0,g.clone)({className:"htUIMultipleSelect",value:[]})}}]),(0,d.default)(i,[{key:"registerHooks",value:function(){var t=this;this.searchInput.addLocalHook("keydown",function(e){return t.onInputKeyDown(e)}),this.searchInput.addLocalHook("input",function(e){return t.onInput(e)}),this.selectAllUI.addLocalHook("click",function(e){return t.onSelectAllClick(e)}),this.clearAllUI.addLocalHook("click",function(e){return t.onClearAllClick(e)})}},{key:"setItems",value:function(e){this.items=e,this.itemsBox&&this.itemsBox.loadData(this.items)}},{key:"getItems",value:function(){return(0,a.default)(this.items)}},{key:"getValue",value:function(){return function(e){var t=[];return(0,p.arrayEach)(e,function(e){e.checked&&t.push(e.value)}),t}(this.items)}},{key:"isSelectedAllValues",value:function(){return this.items.length===this.getValue().length}},{key:"build",value:function(){var t=this;(0,h.default)((0,c.default)(i.prototype),"build",this).call(this);var n=this.hot.rootDocument,e=n.createElement("div"),r=new E.default(this.hot,{className:"htUISelectionControls",children:[this.selectAllUI,this.clearAllUI]});this._element.appendChild(this.searchInput.element),this._element.appendChild(r.element),this._element.appendChild(e);function o(e){t._element&&(t.itemsBox&&t.itemsBox.destroy(),(0,v.addClass)(e,"htUIMultipleSelectHot"),t.itemsBox=new t.hot.constructor(e,{data:t.items,columns:[{data:"checked",type:"checkbox",label:{property:"visualValue",position:"after"}}],beforeRenderer:function(e,t,n,r,o,i){e.title=i.instance.getDataAtRowProp(t,i.label.property)},autoWrapCol:!0,height:110,colWidths:function(){return t.itemsBox.container.scrollWidth-(0,v.getScrollbarWidth)(n)},copyPaste:!1,disableVisualSelection:"area",fillHandle:!1,fragmentSelection:"cell",tabMoves:{row:1,col:0},beforeKeyDown:function(e){return t.onItemsBoxBeforeKeyDown(e)}}),t.itemsBox.init())}o(e),setTimeout(function(){return o(e)},100)}},{key:"reset",value:function(){this.searchInput.reset(),this.selectAllUI.reset(),this.clearAllUI.reset()}},{key:"update",value:function(){this.isBuilt()&&(this.itemsBox.loadData(function(e,t){var n=(0,R.createArrayAssertion)(t);return(0,p.arrayMap)(e,function(e){return e.checked=n(e.value),e})}(this.items,this.options.value)),(0,h.default)((0,c.default)(i.prototype),"update",this).call(this))}},{key:"destroy",value:function(){this.itemsBox&&this.itemsBox.destroy(),this.searchInput.destroy(),this.clearAllUI.destroy(),this.selectAllUI.destroy(),this.searchInput=null,this.clearAllUI=null,this.selectAllUI=null,this.itemsBox=null,this.items=null,(0,h.default)((0,c.default)(i.prototype),"destroy",this).call(this)}},{key:"onInput",value:function(e){var t,n=e.target.value.toLowerCase();t=""===n?(0,a.default)(this.items):(0,p.arrayFilter)(this.items,function(e){return 0<="".concat(e.value).toLowerCase().indexOf(n)}),this.itemsBox.loadData(t)}},{key:"onInputKeyDown",value:function(e){this.runLocalHooks("keydown",e,this),(0,y.partial)(m.isKey,e.keyCode)("ARROW_DOWN|TAB")&&!this.itemsBox.isListening()&&((0,C.stopImmediatePropagation)(e),this.itemsBox.listen(),this.itemsBox.selectCell(0,0))}},{key:"onItemsBoxBeforeKeyDown",value:function(e){var t=(0,y.partial)(m.isKey,e.keyCode);t("ESCAPE")&&this.runLocalHooks("keydown",e,this),t("ARROW_UP|ARROW_DOWN|ARROW_LEFT|ARROW_RIGHT|TAB|SPACE|ENTER")||((0,C.stopImmediatePropagation)(e),this.itemsBox.unlisten(),this.itemsBox.deselectCell(),this.searchInput.focus())}},{key:"onSelectAllClick",value:function(e){e.preventDefault(),(0,p.arrayEach)(this.itemsBox.getSourceData(),function(e){e.checked=!0}),this.itemsBox.render()}},{key:"onClearAllClick",value:function(e){e.preventDefault(),(0,p.arrayEach)(this.itemsBox.getSourceData(),function(e){e.checked=!1}),this.itemsBox.render()}}]),i}(E.default);t.default=i},function(e,t,n){"use strict";var r=n(0);n(16),n(10),n(14),n(604),n(24),n(17),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(7)),a=r(n(26)),s=r(n(6)),l=r(n(13)),u=r(n(2)),c=r(n(8)),h=n(4),d=r(n(110)),f=new WeakMap,v=function(e){function r(e,t){var n;return(0,o.default)(this,r),n=(0,i.default)(this,(0,s.default)(r).call(this,e,(0,h.extend)(r.DEFAULTS,t))),f.set((0,a.default)(n),{}),n}return(0,c.default)(r,e),(0,u.default)(r,null,[{key:"DEFAULTS",get:function(){return(0,h.clone)({href:"#",tagName:"a"})}}]),(0,u.default)(r,[{key:"build",value:function(){(0,l.default)((0,s.default)(r.prototype),"build",this).call(this),f.get(this).link=this._element.firstChild}},{key:"update",value:function(){this.isBuilt()&&(f.get(this).link.textContent=this.translateIfPossible(this.options.textContent))}}]),r}(d.default);t.default=v},function(e,t,n){"use strict";var r=n(22),o=n(605);r({target:"String",proto:!0,forced:n(606)("link")},{link:function(e){return o(this,"a","href",e)}})},function(e,t,n){var a=n(59),s=/"/g;e.exports=function(e,t,n,r){var o=String(a(e)),i="<"+t;return""!==n&&(i+=" "+n+'="'+String(r).replace(s,"&quot;")+'"'),i+">"+o+"</"+t+">"}},function(e,t,n){var r=n(29);e.exports=function(t){return r(function(){var e=""[t]('"');return e!==e.toLowerCase()||3<e.split('"').length})}},function(e,t,n){"use strict";var r=n(9),o=n(0);n(54),t.__esModule=!0,t.default=void 0;var i=o(n(1)),a=o(n(7)),s=o(n(6)),l=o(n(2)),u=o(n(8)),c=n(5),h=n(3),d=r(n(11)),f=o(n(139)),v=o(n(172)),g=function(e){function r(e,t){var n;return(0,i.default)(this,r),(n=(0,a.default)(this,(0,s.default)(r).call(this,e))).id=t.id,n.name=t.name,n.elements.push(new v.default(n.hot,{type:"button",value:d.FILTERS_BUTTONS_OK,className:"htUIButton htUIButtonOK",identifier:r.BUTTON_OK})),n.elements.push(new v.default(n.hot,{type:"button",value:d.FILTERS_BUTTONS_CANCEL,className:"htUIButton htUIButtonCancel",identifier:r.BUTTON_CANCEL})),n.registerHooks(),n}return(0,u.default)(r,e),(0,l.default)(r,null,[{key:"BUTTON_OK",get:function(){return"ok"}},{key:"BUTTON_CANCEL",get:function(){return"cancel"}}]),(0,l.default)(r,[{key:"registerHooks",value:function(){var n=this;(0,h.arrayEach)(this.elements,function(e){e.addLocalHook("click",function(e,t){return n.onButtonClick(e,t)})})}},{key:"getMenuItemDescriptor",value:function(){var n=this;return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:function(){return n.isHidden()},renderer:function(e,t){return(0,c.addClass)(t.parentNode,"htFiltersMenuActionBar"),t.parentNode.hasAttribute("ghost-table")||(0,h.arrayEach)(n.elements,function(e){return t.appendChild(e.element)}),t}}}},{key:"accept",value:function(){this.runLocalHooks("accept")}},{key:"cancel",value:function(){this.runLocalHooks("cancel")}},{key:"onButtonClick",value:function(e,t){t.options.identifier===r.BUTTON_OK?this.accept():this.cancel()}}]),r}(f.default);t.default=g},function(e,t,n){"use strict";var r=n(0);n(19),n(53),n(12),n(40),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),u=n(3),a=n(4),c=n(75),s=r(n(58)),h=r(n(374)),d=r(n(375)),f=n(108),l=function(){function r(e){var t=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(){return[]};(0,o.default)(this,r),this.conditionCollection=e,this.columnDataFactory=n,this.changes=[],this.grouping=!1,this.latestEditedColumnPosition=-1,this.latestOrderStack=[],this.conditionCollection.addLocalHook("beforeRemove",function(e){return t._onConditionBeforeModify(e)}),this.conditionCollection.addLocalHook("afterAdd",function(e){return t.updateStatesAtColumn(e)}),this.conditionCollection.addLocalHook("afterClear",function(e){return t.updateStatesAtColumn(e)}),this.conditionCollection.addLocalHook("beforeClean",function(){return t._onConditionBeforeClean()}),this.conditionCollection.addLocalHook("afterClean",function(){return t._onConditionAfterClean()})}return(0,i.default)(r,[{key:"groupChanges",value:function(){this.grouping=!0}},{key:"flush",value:function(){var t=this;this.grouping=!1,(0,u.arrayEach)(this.changes,function(e){t.updateStatesAtColumn(e)}),this.changes.length=0}},{key:"_onConditionBeforeModify",value:function(e){this.latestEditedColumnPosition=this.conditionCollection.orderStack.indexOf(e)}},{key:"updateStatesAtColumn",value:function(e,t){var l=this;if(this.grouping)-1===this.changes.indexOf(e)&&this.changes.push(e);else{var n=this.conditionCollection.exportAllConditions(),r=this.conditionCollection.orderStack.indexOf(e);-1===r&&(r=this.latestEditedColumnPosition);var o=n.slice(0,r),i=n.slice(r);i.length&&i[0].column===e&&i.shift();var a=(0,c.curry)(function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],r=new h.default,o=[].concat(e,n);r.importAllConditions(o);var i,a=l.columnDataFactory(t);i=r.isEmpty()?a:new d.default(r,function(e){return l.columnDataFactory(e)}).filter(),i=(0,u.arrayMap)(i,function(e){return e.meta.visualRow});var s=(0,f.createArrayAssertion)(i);return(0,u.arrayFilter)(a,function(e){return s(e.meta.visualRow)})})(o),s=[].concat(this.conditionCollection.getConditions(e));this.runLocalHooks("update",{editedConditionStack:{column:e,conditions:s},dependentConditionStacks:i,filteredRowsFactory:a,conditionArgsChange:t})}}},{key:"_onConditionBeforeClean",value:function(){this.latestOrderStack=[].concat(this.conditionCollection.orderStack)}},{key:"_onConditionAfterClean",value:function(){var t=this;(0,u.arrayEach)(this.latestOrderStack,function(e){t.updateStatesAtColumn(e)})}},{key:"destroy",value:function(){var n=this;this.clearLocalHooks(),(0,a.objectEach)(this,function(e,t){n[t]=null})}}]),r}();(0,a.mixin)(l,s.default);var v=l;t.default=v},function(e,t,n){},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var c=r(n(18)),o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(26)),l=r(n(6)),u=r(n(13)),h=r(n(8)),d=r(n(21)),f=n(3),v=n(4),g=r(n(23)),p=n(20),m=n(84),y=r(n(611)),w=r(n(620)),C=r(n(621)),E=function(e){function r(e){var t;return(0,o.default)(this,r),(t=(0,a.default)(this,(0,l.default)(r).call(this,e))).eventManager=new g.default((0,s.default)(t)),t.dataProvider=new w.default(t.hot),t.sheet=new y.default(t.hot,t.dataProvider),t.undoRedoSnapshot=new C.default(t.sheet),t._skipRendering=!1,t}return(0,h.default)(r,e),(0,i.default)(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().formulas}},{key:"enablePlugin",value:function(){var n=this;if(!this.enabled){var e=this.hot.getSettings().formulas;(0,v.isObject)(e)&&(0,v.isObject)(e.variables)&&(0,v.objectEach)(e.variables,function(e,t){return n.setVariable(t,e)}),this.addHook("afterColumnSort",function(){return n.onAfterColumnSort.apply(n,arguments)}),this.addHook("afterCreateCol",function(){return n.onAfterCreateCol.apply(n,arguments)}),this.addHook("afterCreateRow",function(){return n.onAfterCreateRow.apply(n,arguments)}),this.addHook("afterLoadData",function(){return n.onAfterLoadData()}),this.addHook("afterRemoveCol",function(){return n.onAfterRemoveCol.apply(n,arguments)}),this.addHook("afterRemoveRow",function(){return n.onAfterRemoveRow.apply(n,arguments)}),this.addHook("afterSetDataAtCell",function(){return n.onAfterSetDataAtCell.apply(n,arguments)}),this.addHook("afterSetDataAtRowProp",function(){return n.onAfterSetDataAtCell.apply(n,arguments)}),this.addHook("beforeColumnSort",function(){return n.onBeforeColumnSort.apply(n,arguments)}),this.addHook("beforeCreateCol",function(){return n.onBeforeCreateCol.apply(n,arguments)}),this.addHook("beforeCreateRow",function(){return n.onBeforeCreateRow.apply(n,arguments)}),this.addHook("beforeRemoveCol",function(){return n.onBeforeRemoveCol.apply(n,arguments)}),this.addHook("beforeRemoveRow",function(){return n.onBeforeRemoveRow.apply(n,arguments)}),this.addHook("beforeValidate",function(){return n.onBeforeValidate.apply(n,arguments)}),this.addHook("beforeValueRender",function(){return n.onBeforeValueRender.apply(n,arguments)}),this.addHook("modifyData",function(){return n.onModifyData.apply(n,arguments)}),this.sheet.addLocalHook("afterRecalculate",function(){return n.onSheetAfterRecalculate.apply(n,arguments)}),(0,u.default)((0,l.default)(r.prototype),"enablePlugin",this).call(this)}}},{key:"disablePlugin",value:function(){(0,u.default)((0,l.default)(r.prototype),"disablePlugin",this).call(this)}},{key:"getCellValue",value:function(e,t){var n=this.sheet.getCellAt(e,t);return n?n.getError()||n.getValue():void 0}},{key:"hasComputedCellValue",value:function(e,t){return null!==this.sheet.getCellAt(e,t)}},{key:"recalculate",value:function(){this.sheet.recalculate()}},{key:"recalculateFull",value:function(){this.sheet.recalculateFull()}},{key:"recalculateOptimized",value:function(){this.sheet.recalculateOptimized()}},{key:"setVariable",value:function(e,t){this.sheet.setVariable(e,t)}},{key:"getVariable",value:function(e){return this.sheet.getVariable(e)}},{key:"onSheetAfterRecalculate",value:function(e){if(this._skipRendering)this._skipRendering=!1;else{var r=this.hot;(0,f.arrayEach)(e,function(e){var t=e.row,n=e.column;r.validateCell(r.getDataAtCell(t,n),r.getCellMeta(t,n),function(){})}),r.render()}}},{key:"onModifyData",value:function(e,t,n,r){"get"===r&&this.hasComputedCellValue(e,t)?n.value=this.getCellValue(e,t):"set"===r&&(0,m.isFormulaExpression)(n.value)&&(n.value=(0,m.toUpperCaseFormula)(n.value))}},{key:"onBeforeValueRender",value:function(e){var t=e;return(0,m.isFormulaExpressionEscaped)(t)&&(t=(0,m.unescapeFormulaExpression)(t)),t}},{key:"onBeforeValidate",value:function(e,t,n){var r=this.hot.propToCol(n),o=e;return this.hasComputedCellValue(t,r)&&(o=this.getCellValue(t,r)),o}},{key:"onAfterSetDataAtCell",value:function(e,t){var u=this;"loadData"!==t&&(this.dataProvider.clearChanges(),(0,f.arrayEach)(e,function(e){var t=(0,c.default)(e,4),n=t[0],r=t[1],o=t[2],i=t[3],a=u.hot.propToCol(r),s=u.t.toPhysicalRow(n),l=i;(0,m.isFormulaExpression)(l)&&(l=(0,m.toUpperCaseFormula)(l)),u.dataProvider.collectChanges(s,a,l),o!==l&&u.sheet.applyChanges(s,a,l)}),this.recalculate())}},{key:"onBeforeCreateRow",value:function(e,t,n){"UndoRedo.undo"===n&&this.undoRedoSnapshot.restore()}},{key:"onAfterCreateRow",value:function(e,t,n){this.sheet.alterManager.triggerAlter("insert_row",e,t,"UndoRedo.undo"!==n)}},{key:"onBeforeRemoveRow",value:function(e,t){this.undoRedoSnapshot.save("row",e,t)}},{key:"onAfterRemoveRow",value:function(e,t){this.sheet.alterManager.triggerAlter("remove_row",e,t)}},{key:"onBeforeCreateCol",value:function(e,t,n){"UndoRedo.undo"===n&&this.undoRedoSnapshot.restore()}},{key:"onAfterCreateCol",value:function(e,t,n){this.sheet.alterManager.triggerAlter("insert_column",e,t,"UndoRedo.undo"!==n)}},{key:"onBeforeRemoveCol",value:function(e,t){this.undoRedoSnapshot.save("column",e,t)}},{key:"onAfterRemoveCol",value:function(e,t){this.sheet.alterManager.triggerAlter("remove_column",e,t)}},{key:"onBeforeColumnSort",value:function(e,t){this.sheet.alterManager.prepareAlter("column_sorting",e,t)}},{key:"onAfterColumnSort",value:function(e,t){this.sheet.alterManager.triggerAlter("column_sorting",e,t)}},{key:"onAfterLoadData",value:function(){this._skipRendering=!0,this.recalculateFull()}},{key:"destroy",value:function(){this.dataProvider.destroy(),this.dataProvider=null,this.sheet.destroy(),this.sheet=null,(0,u.default)((0,l.default)(r.prototype),"destroy",this).call(this)}}]),r}(d.default);(0,p.registerPlugin)("formulas",E);var S=E;t.default=S},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(36)),i=r(n(1)),a=r(n(2)),v=n(111),s=n(3),l=r(n(58)),u=n(91),c=n(4),h=r(n(85)),g=r(n(612)),p=n(84),d=r(n(613)),f=r(n(614)),m=function(){function r(e,t){var n=this;(0,i.default)(this,r),this.hot=e,this.t=(0,u.getTranslator)(this.hot),this.dataProvider=t,this.parser=new v.Parser,this.matrix=new d.default(this.t),this.alterManager=new f.default(this),this._processingCell=null,this._state=3,this.parser.on("callCellValue",function(){return n._onCallCellValue.apply(n,arguments)}),this.parser.on("callRangeValue",function(){return n._onCallRangeValue.apply(n,arguments)}),this.alterManager.addLocalHook("afterAlter",function(){return n._onAfterAlter.apply(n,arguments)})}return(0,a.default)(r,[{key:"recalculate",value:function(){switch(this._state){case 3:this.recalculateFull();break;case 2:this.recalculateOptimized()}}},{key:"recalculateOptimized",value:function(){var n=this,e=this.matrix.getOutOfDateCells();(0,s.arrayEach)(e,function(e){var t=n.dataProvider.getSourceDataAtCell(e.row,e.column);(0,p.isFormulaExpression)(t)&&n.parseExpression(e,t.substr(1))}),this._state=1,this.runLocalHooks("afterRecalculate",e,"optimized")}},{key:"recalculateFull",value:function(){var r=this,e=this.dataProvider.getSourceDataByRange();this.matrix.reset(),(0,s.arrayEach)(e,function(e,n){(0,s.arrayEach)(e,function(e,t){(0,p.isFormulaExpression)(e)&&r.parseExpression(new h.default(n,t),e.substr(1))})}),this._state=1,this.runLocalHooks("afterRecalculate",e,"full")}},{key:"setVariable",value:function(e,t){this.parser.setVariable(e,t)}},{key:"getVariable",value:function(e){return this.parser.getVariable(e)}},{key:"applyChanges",value:function(e,t,n){this.matrix.remove({row:e,column:t}),(0,p.isFormulaExpression)(n)&&this.parseExpression(new h.default(e,t),n.substr(1));var r=this.getCellDependencies.apply(this,(0,o.default)(this.t.toVisual(e,t)));(0,s.arrayEach)(r,function(e){e.setState(h.default.STATE_OUT_OFF_DATE)}),this._state=2}},{key:"parseExpression",value:function(e,t){e.setState(h.default.STATE_COMPUTING),this._processingCell=e;var n=this.parser.parse((0,p.toUpperCaseFormula)(t)),r=n.error,o=n.result;(0,p.isFormulaExpression)(o)?this.parseExpression(e,o.substr(1)):(e.setValue(o),e.setError(r),e.setState(h.default.STATE_UP_TO_DATE)),this.matrix.add(e),this._processingCell=null}},{key:"getCellAt",value:function(e,t){return this.matrix.getCellAt(e,t)}},{key:"getCellDependencies",value:function(e,t){return this.matrix.getDependencies({row:e,column:t})}},{key:"_onCallCellValue",value:function(e,t){var n=e.row,r=e.column,o=new g.default(n,r);if(!this.dataProvider.isInDataRange(o.row,o.column))throw Error(v.ERROR_REF);this.matrix.registerCellRef(o),this._processingCell.addPrecedent(o);var i=this.dataProvider.getRawDataAtCell(n.index,r.index);if((0,v.error)(i)){var a=this.matrix.getCellAt(n.index,r.index);if(a&&a.hasError())throw Error(i)}if((0,p.isFormulaExpression)(i)){var s=this.parser.parse(i.substr(1)),l=s.error,u=s.result;if(l)throw Error(l);t(u)}else t(i)}},{key:"_onCallRangeValue",value:function(e,t,n){var h=this,d=e.row,f=e.column,r=t.row,o=t.column,i=this.dataProvider.getRawDataByRange(d.index,f.index,r.index,o.index);n((0,s.arrayMap)(i,function(e,t){return function(e,c){return(0,s.arrayMap)(e,function(e,t){var n=d.index+c,r=f.index+t,o=new g.default(n,r);if(!h.dataProvider.isInDataRange(o.row,o.column))throw Error(v.ERROR_REF);h.matrix.registerCellRef(o),h._processingCell.addPrecedent(o);var i=e;if((0,v.error)(i)){var a=h.matrix.getCellAt(o.row,o.column);if(a&&a.hasError())throw Error(i)}if((0,p.isFormulaExpression)(i)){var s=h.parser.parse(i.substr(1)),l=s.error,u=s.result;if(l)throw Error(l);i=u}return i})}(e,t)}))}},{key:"_onAfterAlter",value:function(){this.recalculateOptimized()}},{key:"destroy",value:function(){this.hot=null,this.t=null,this.dataProvider.destroy(),this.dataProvider=null,this.alterManager.destroy(),this.alterManager=null,this.parser=null,this.matrix.reset(),this.matrix=null}}]),r}();(0,c.mixin)(m,l.default);var y=m;t.default=y},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(8)),u=n(111),c=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(0,s.default)(t).apply(this,arguments))}return(0,l.default)(t,e),(0,i.default)(t,[{key:"toString",value:function(){return(0,u.toLabel)({index:this.row,isAbsolute:!1},{index:this.column,isAbsolute:!1})}}]),t}(r(n(376)).default);t.default=c},function(e,t,n){"use strict";var r=n(0);n(19),n(12),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),s=n(3),a=r(n(85)),l=function(){function t(e){(0,o.default)(this,t),this.t=e,this.data=[],this.cellReferences=[]}return(0,i.default)(t,[{key:"getCellAt",value:function(t,n){var r=null;return(0,s.arrayEach)(this.data,function(e){if(e.row===t&&e.column===n)return r=e,!1}),r}},{key:"getOutOfDateCells",value:function(){return(0,s.arrayFilter)(this.data,function(e){return e.isState(a.default.STATE_OUT_OFF_DATE)})}},{key:"add",value:function(t){(0,s.arrayFilter)(this.data,function(e){return e.isEqual(t)}).length||this.data.push(t)}},{key:"remove",value:function(t){var r=Array.isArray(t);this.data=(0,s.arrayFilter)(this.data,function(e){return!function(t,e){var n=!1;return r?(0,s.arrayEach)(e,function(e){if(t.isEqual(e))return!(n=!0)}):n=t.isEqual(e),n}(e,t)})}},{key:"getDependencies",value:function(e){function r(n){return(0,s.arrayReduce)(o.data,function(e,t){return t.hasPrecedent(n)&&-1===e.indexOf(t)&&e.push(t),e},[])}var o=this;return function t(e){var n=r(e);return n.length&&(0,s.arrayEach)(n,function(e){e.hasPrecedents()&&(n=n.concat(t(o.t.toVisual(e))))}),n}(e)}},{key:"registerCellRef",value:function(t){(0,s.arrayFilter)(this.cellReferences,function(e){return e.isEqual(t)}).length||this.cellReferences.push(t)}},{key:"removeCellRefsAtRange",value:function(e,t){var n=e.row,r=e.column,o=t.row,i=t.column,a=[];return this.cellReferences=(0,s.arrayFilter)(this.cellReferences,function(e){return!function(e){return void 0===n||e.row>=n&&e.row<=o}(e)||!function(e){return void 0===r||e.column>=r&&e.column<=i}(e)||(a.push(e),!1)}),a}},{key:"reset",value:function(){this.data.length=0,this.cellReferences.length=0}}]),t}();t.default=l},function(e,t,n){"use strict";var r=n(9),o=n(0);n(19),n(16),n(70),n(10),n(14),n(17),t.__esModule=!0,t.registerOperation=y,t.default=void 0;var i=o(n(1)),a=o(n(2)),s=n(4),l=o(n(58)),u=r(n(615)),c=r(n(616)),h=r(n(617)),d=r(n(618)),f=r(n(619)),v=new Map;y(u.OPERATION_NAME,u),y(c.OPERATION_NAME,c),y(h.OPERATION_NAME,h),y(d.OPERATION_NAME,d),y(f.OPERATION_NAME,f);var g=function(){function t(e){(0,i.default)(this,t),this.sheet=e,this.hot=e.hot,this.dataProvider=e.dataProvider,this.matrix=e.matrix}return(0,a.default)(t,[{key:"prepareAlter",value:function(e){if(!v.has(e))throw Error('Alter operation "'.concat(e,'" not exist.'));for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];v.get(e).prepare.apply(this,n)}},{key:"triggerAlter",value:function(e){if(!v.has(e))throw Error('Alter operation "'.concat(e,'" not exist.'));for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];v.get(e).operate.apply(this,n),this.runLocalHooks.apply(this,["afterAlter"].concat(n))}},{key:"destroy",value:function(){this.sheet=null,this.hot=null,this.dataProvider=null,this.matrix=null}}]),t}();(0,s.mixin)(g,l.default);var p=g;t.default=p;var m=function(){};function y(e,t){v.has(e)||v.set(e,{prepare:t.prepare||m,operate:t.operate||m})}},function(e,t,n){"use strict";var r=n(0);n(16),n(10),n(37),n(14),n(24),n(17),t.__esModule=!0,t.prepare=function(){var e=this.matrix,t=this.dataProvider;s=new WeakMap,(0,o.arrayEach)(e.data,function(e){s.set(e,t.t.toVisualRow(e.row))})},t.operate=function(){var e=this.matrix,a=this.dataProvider;(e.cellReferences.length=0,o.arrayEach)(e.data,function(e){e.setState(u.default.STATE_OUT_OFF_DATE),e.clearPrecedents();var t=e.row,n=e.column,r=a.getSourceDataAtCell(t,n);if((0,l.isFormulaExpression)(r)){var o=s.get(e),i=new c.default(r);i.translate({row:a.t.toVisualRow(t)-o}),a.updateSourceData(t,n,i.toString())}}),s=null},t.OPERATION_NAME=void 0;var s,o=n(3),l=n(84),u=r(n(85)),c=r(n(112));t.OPERATION_NAME="column_sorting"},function(e,t,n){"use strict";var r=n(0);n(10),n(37),t.__esModule=!0,t.operate=function(l,u){var c=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],e=this.matrix,h=this.dataProvider,d=[0,u];(0,o.arrayEach)(e.cellReferences,function(e){e.column>=l&&e.translateTo.apply(e,d)}),(0,o.arrayEach)(e.data,function(e){var t=e.row,n=e.column;if(e.column>=l&&(e.translateTo.apply(e,d),e.setState(v.default.STATE_OUT_OFF_DATE)),c){var r=e.row,o=e.column,i=h.getSourceDataAtCell(r,o);if((0,f.isFormulaExpression)(i)){var a=(0,f.cellCoordFactory)("column",l),s=new g.default(i);s.useCustomModifier(p),s.translate({column:u},a({row:t,column:n})),h.updateSourceData(r,o,s.toString())}}})},t.OPERATION_NAME=void 0;var o=n(3),f=n(84),v=r(n(85)),g=r(n(112));function p(e,t,n,r){var o=e.start,i=e.end,a=n,s=n;return o[t].index<r&&(a=0),i[t].index<r&&(s=0),[a,s,!1]}t.OPERATION_NAME="insert_column"},function(e,t,n){"use strict";var r=n(0);n(10),n(37),t.__esModule=!0,t.operate=function(l,u){var c=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],e=this.matrix,h=this.dataProvider,d=[u,0];(0,o.arrayEach)(e.cellReferences,function(e){e.row>=l&&e.translateTo.apply(e,d)}),(0,o.arrayEach)(e.data,function(e){var t=e.row,n=e.column;if(e.row>=l&&(e.translateTo.apply(e,d),e.setState(v.default.STATE_OUT_OFF_DATE)),c){var r=e.row,o=e.column,i=h.getSourceDataAtCell(r,o);if((0,f.isFormulaExpression)(i)){var a=(0,f.cellCoordFactory)("row",l),s=new g.default(i);s.useCustomModifier(p),s.translate({row:u},a({row:t,column:n})),h.updateSourceData(r,o,s.toString())}}})},t.OPERATION_NAME=void 0;var o=n(3),f=n(84),v=r(n(85)),g=r(n(112));function p(e,t,n,r){var o=e.start,i=e.end,a=n,s=n;return o[t].index<r&&(a=0),i[t].index<r&&(s=0),[a,s,!1]}t.OPERATION_NAME="insert_row"},function(e,t,n){"use strict";var r=n(0);n(10),n(37),t.__esModule=!0,t.operate=function(l,e){var u=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],c=-e,t=this.matrix,h=this.dataProvider,n=this.sheet,d=[0,c],r=Math.abs(c)-1,o=t.removeCellRefsAtRange({column:l},{column:l+r}),i=[];(0,a.arrayEach)(t.data,function(t){(0,a.arrayEach)(o,function(e){t.hasPrecedent(e)&&(t.removePrecedent(e),t.setState(v.default.STATE_OUT_OFF_DATE),(0,a.arrayEach)(n.getCellDependencies(t.row,t.column),function(e){e.setState(v.default.STATE_OUT_OFF_DATE)}))}),t.column>=l&&t.column<=l+r&&i.push(t)}),t.remove(i),(0,a.arrayEach)(t.cellReferences,function(e){e.column>=l&&e.translateTo.apply(e,d)}),(0,a.arrayEach)(t.data,function(e){var t=e.row,n=e.column;if(e.column>=l&&(e.translateTo.apply(e,d),e.setState(v.default.STATE_OUT_OFF_DATE)),u){var r=e.row,o=e.column,i=h.getSourceDataAtCell(r,o);if((0,f.isFormulaExpression)(i)){var a=(0,f.cellCoordFactory)("column",l),s=new g.default(i);s.useCustomModifier(p),s.translate({column:c},a({row:t,column:n})),h.updateSourceData(r,o,s.toString())}}})},t.OPERATION_NAME=void 0;var a=n(3),f=n(84),v=r(n(85)),g=r(n(112));function p(e,t,n,r){var o=e.start,i=e.end,a=e.type,s=o[t].index,l=i[t].index,u=Math.abs(n)-1,c=n,h=n,d=!1;return r<=s&&l<=r+u&&(d=!0),d||"cell"!==a||s<=r&&(h=c=0),d||"range"!==a||(s<=r&&(c=0),l<r?h=0:l<=r+u&&(h-=Math.min(l-(r+u),0))),s+c<0&&(c-=s+c),[c,h,d]}t.OPERATION_NAME="remove_column"},function(e,t,n){"use strict";var r=n(0);n(10),n(37),t.__esModule=!0,t.operate=function(l,e){var u=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],c=-e,t=this.matrix,h=this.dataProvider,n=this.sheet,d=[c,0],r=Math.abs(c)-1,o=t.removeCellRefsAtRange({row:l},{row:l+r}),i=[];(0,a.arrayEach)(t.data,function(t){(0,a.arrayEach)(o,function(e){t.hasPrecedent(e)&&(t.removePrecedent(e),t.setState(v.default.STATE_OUT_OFF_DATE),(0,a.arrayEach)(n.getCellDependencies(t.row,t.column),function(e){e.setState(v.default.STATE_OUT_OFF_DATE)}))}),t.row>=l&&t.row<=l+r&&i.push(t)}),t.remove(i),(0,a.arrayEach)(t.cellReferences,function(e){e.row>=l&&e.translateTo.apply(e,d)}),(0,a.arrayEach)(t.data,function(e){var t=e.row,n=e.column;if(e.row>=l&&(e.translateTo.apply(e,d),e.setState(v.default.STATE_OUT_OFF_DATE)),u){var r=e.row,o=e.column,i=h.getSourceDataAtCell(r,o);if((0,f.isFormulaExpression)(i)){var a=(0,f.cellCoordFactory)("row",l),s=new g.default(i);s.useCustomModifier(p),s.translate({row:c},a({row:t,column:n})),h.updateSourceData(r,o,s.toString())}}})},t.OPERATION_NAME=void 0;var a=n(3),f=n(84),v=r(n(85)),g=r(n(112));function p(e,t,n,r){var o=e.start,i=e.end,a=e.type,s=o[t].index,l=i[t].index,u=Math.abs(n)-1,c=n,h=n,d=!1;return r<=s&&l<=r+u&&(d=!0),d||"cell"!==a||s<=r&&(h=c=0),d||"range"!==a||(s<=r&&(c=0),l<r?h=0:l<=r+u&&(h-=Math.min(l-(r+u),0))),s+c<0&&(c-=s+c),[c,h,d]}t.OPERATION_NAME="remove_row"},function(e,t,n){"use strict";var r=n(0);n(19),t.__esModule=!0,t.default=void 0;var u=r(n(18)),l=r(n(36)),o=r(n(1)),i=r(n(2)),c=n(3),h=n(15),d=n(4),a=n(91),s=function(){function t(e){(0,o.default)(this,t),this.hot=e,this.changes={},this.t=(0,a.getTranslator)(this.hot)}return(0,i.default)(t,[{key:"collectChanges",value:function(e,t,n){this.changes[this._coordId(e,t)]=n}},{key:"clearChanges",value:function(){this.changes={}}},{key:"isInDataRange",value:function(e,t){return 0<=e&&e<this.hot.countRows()&&0<=t&&t<this.hot.countCols()}},{key:"getDataAtCell",value:function(e,t){var n=this._coordId.apply(this,(0,l.default)(this.t.toPhysical(e,t)));return(0,d.hasOwnProperty)(this.changes,n)?this.changes[n]:this.hot.getDataAtCell(e,t)}},{key:"getDataByRange",value:function(o,i,e,t){var a=this,s=this.hot.getData(o,i,e,t);return(0,c.arrayEach)(s,function(e,r){(0,c.arrayEach)(e,function(e,t){var n=a._coordId.apply(a,(0,l.default)(a.t.toPhysical(r+o,t+i)));(0,d.hasOwnProperty)(a.changes,n)&&(s[r][t]=a.changes[n])})}),s}},{key:"getSourceDataAtCell",value:function(e,t){var n=this._coordId(e,t);return(0,d.hasOwnProperty)(this.changes,n)?this.changes[n]:this.hot.getSourceDataAtCell(e,t)}},{key:"getSourceDataByRange",value:function(e,t,n,r){return this.hot.getSourceDataArray(e,t,n,r)}},{key:"getRawDataAtCell",value:function(e,t){return this.getSourceDataAtCell.apply(this,(0,l.default)(this.t.toPhysical(e,t)))}},{key:"getRawDataByRange",value:function(e,t,n,r){var l=this,o=[];return(0,h.rangeEach)(e,n,function(a){var s=[];(0,h.rangeEach)(t,r,function(e){var t=l.t.toPhysical(a,e),n=(0,u.default)(t,2),r=n[0],o=n[1],i=l._coordId(r,o);(0,d.hasOwnProperty)(l.changes,i)?s.push(l.changes[i]):s.push(l.getSourceDataAtCell(r,o))}),o.push(s)}),o}},{key:"updateSourceData",value:function(e,t,n){this.hot.getSourceData()[e][this.hot.colToProp(t)]=n}},{key:"_coordId",value:function(e,t){return"".concat(e,":").concat(t)}},{key:"destroy",value:function(){this.hot=null,this.changes=null,this.t=null}}]),t}();t.default=s},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),u=n(3),a=r(n(622)),c=r(n(85)),s=function(){function t(e){(0,o.default)(this,t),this.sheet=e,this.stack=new a.default}return(0,i.default)(t,[{key:"save",value:function(o,i,a){var e=this.sheet,t=e.matrix,s=e.dataProvider,l=[];(0,u.arrayEach)(t.data,function(e){var t=e.row,n=e.column;if(e[o]<i||e[o]>i+(a-1)){var r=s.getSourceDataAtCell(t,n);l.push({row:t,column:n,value:r})}}),this.stack.push({axis:o,index:i,amount:a,changes:l})}},{key:"restore",value:function(){var e=this.sheet,o=e.matrix,i=e.dataProvider,t=this.stack.pop(),a=t.axis,s=t.index,l=t.amount,n=t.changes;n&&(0,u.arrayEach)(n,function(e){e[a]>s+(l-1)&&(e[a]-=l);var t=e.row,n=e.column,r=e.value;i.getSourceDataAtCell(t,n)!==r&&(i.updateSourceData(t,n,r),o.getCellAt(t,n).setState(c.default.STATE_OUT_OFF_DATE))})}},{key:"destroy",value:function(){this.sheet=null,this.stack=null}}]),t}();t.default=s},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=function(){function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];(0,o.default)(this,t),this.items=e}return(0,i.default)(t,[{key:"push",value:function(){var e;(e=this.items).push.apply(e,arguments)}},{key:"pop",value:function(){return this.items.pop()}},{key:"peek",value:function(){return this.isEmpty()?void 0:this.items[this.items.length-1]}},{key:"isEmpty",value:function(){return!this.size()}},{key:"size",value:function(){return this.items.length}}]),t}();t.default=a},function(e,t,n){"use strict";var r=n(0);n(19),n(40),n(39),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(13)),u=r(n(8)),c=r(n(21)),h=n(5),d=n(4),f=n(57),v=n(132),g=n(20),p=n(173),m=r(n(624)),y=r(n(625));n(626);var w=function(e){function n(e){var t;return(0,o.default)(this,n),(t=(0,a.default)(this,(0,s.default)(n).call(this,e))).settings={},t.dateCalculator=null,t.currentYear=null,t.monthList=[],t.monthHeadersArray=[],t.weekHeadersArray=[],t.rangeBars={},t.rangeList={},t.nestedHeadersPlugin=null,t.hotSource=null,t.overallWeekSectionCount=null,t.initialSettings=null,t.dataFeed=null,t.colorData={},t.rangeBarMeta=Object.create(null),t}return(0,u.default)(n,e),(0,i.default)(n,[{key:"checkDependencies",value:function(){this.hot.getSettings().colHeaders||(0,f.warn)("You need to enable the colHeaders property in your Gantt Chart Handsontable in order for it to work properly.")}},{key:"isEnabled",value:function(){return!!this.hot.getSettings().ganttChart}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.checkDependencies(),this.parseSettings(),this.currentYear=this.settings.startYear||(new Date).getFullYear(),this.dateCalculator=new m.default({year:this.currentYear,allowSplitWeeks:this.settings.allowSplitWeeks,hideDaysBeforeFullWeeks:this.settings.hideDaysBeforeFullWeeks,hideDaysAfterFullWeeks:this.settings.hideDaysAfterFullWeeks}),this.dateCalculator.setFirstWeekDay(this.settings.firstWeekDay),this.monthList=this.dateCalculator.getMonthList(),this.monthHeadersArray=this.generateMonthHeaders(),this.weekHeadersArray=this.generateWeekHeaders(),this.overallWeekSectionCount=this.dateCalculator.countWeekSections(),this.assignGanttSettings(),this.nestedHeadersPlugin&&(this.applyDataSource(),this.colorData&&this.setRangeBarColors(this.colorData)),this.addHook("afterInit",function(){return e.onAfterInit()}),(0,h.addClass)(this.hot.rootElement,"ganttChart"),(0,l.default)((0,s.default)(n.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.internalUpdateSettings||(this.dataFeed&&this.dataFeed.hotSource&&this.dataFeed.removeSourceHotHooks(this.dataFeed.hotSource),this.settings={},this.dataFeed={},this.currentYear=null,this.monthList=[],this.rangeBars={},this.rangeList={},this.rangeBarMeta={},this.hotSource=null,this.deassignGanttSettings(),(0,h.removeClass)(this.hot.rootElement,"ganttChart"),(0,l.default)((0,s.default)(n.prototype),"disablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),(0,l.default)((0,s.default)(n.prototype),"updatePlugin",this).call(this)}},{key:"parseSettings",value:function(){this.settings=this.hot.getSettings().ganttChart,"boolean"==typeof this.settings&&(this.settings={}),this.settings.firstWeekDay||(this.settings.firstWeekDay="monday"),void 0===this.settings.allowSplitWeeks&&(this.settings.allowSplitWeeks=!0),"function"!=typeof this.settings.weekHeaderGenerator&&(this.settings.weekHeaderGenerator=null)}},{key:"applyDataSource",value:function(){if(this.settings.dataSource){var e=this.settings.dataSource;e.instance?this.loadData(e.instance,e.startDateColumn,e.endDateColumn,e.additionalData,e.asyncUpdates):this.loadData(e)}}},{key:"loadData",value:function(e,t,n,r,o){this.dataFeed=new y.default(this.hot,e,t,n,r,o),this.hot.render()}},{key:"clearRangeBars",value:function(){this.rangeBars={}}},{key:"clearRangeList",value:function(){this.rangeList={}}},{key:"getRangeBarCoordinates",value:function(e){return this.rangeList[e]}},{key:"generateMonthHeaders",value:function(e){var t=0<arguments.length&&void 0!==e?e:this.currentYear;return this.dateCalculator.generateHeaderSet("months",this.settings.weekHeaderGenerator,t)}},{key:"generateWeekHeaders",value:function(e){var t=0<arguments.length&&void 0!==e?e:this.currentYear;return this.dateCalculator.generateHeaderSet("weeks",this.settings.weekHeaderGenerator,t)}},{key:"assignGanttSettings",value:function(){var s=this;this.initialSettings=(0,d.deepClone)(this.hot.getSettings());var e={data:(0,v.createEmptySpreadsheetData)(1,this.overallWeekSectionCount),readOnly:!0,renderer:function(e,t,n,r,o,i,a){return s.uniformBackgroundRenderer(e,t,n,r,o,i,a)},colWidths:60,hiddenColumns:!this.hot.getSettings().hiddenColumns||this.hot.getSettings().hiddenColumns,nestedHeaders:[this.monthHeadersArray.slice(),this.weekHeadersArray.slice()],collapsibleColumns:!this.hot.getSettings().collapsibleColumns||this.hot.getSettings().collapsibleColumns,columnSorting:!1,copyPaste:!1};this.internalUpdateSettings=!0,this.hot.updateSettings(e),this.internalUpdateSettings=void 0}},{key:"deassignGanttSettings",value:function(){this.internalUpdateSettings=!0,this.initialSettings&&this.hot.updateSettings(this.initialSettings),this.internalUpdateSettings=void 0}},{key:"cacheRangeBarMeta",value:function(e,t,n,r){this.rangeBarMeta[e]||(this.rangeBarMeta[e]={}),this.rangeBarMeta[e][t]||(this.rangeBarMeta[e][t]={}),this.rangeBarMeta[e][t][n]=r}},{key:"applyRangeBarMetaCache",value:function(){var o=this;(0,d.objectEach)(this.rangeBarMeta,function(e,r){(0,d.objectEach)(e,function(e,n){(0,d.objectEach)(e,function(e,t){o.hot.setCellMeta(r,n,t,e)})})})}},{key:"getAdjacentWeekColumn",value:function(e,t,n){var r=(0,p.parseDate)(e),o=!0===n?-7:7,i=r.setDate(r.getDate()+o);return this.dateCalculator.dateToColumn(i)}},{key:"addRangeBar",value:function(n,e,t,r){var o=this;null!==e&&null!==t&&this.prepareDaysInColumnsInfo((0,p.parseDate)(e),(0,p.parseDate)(t));var i=this.dateCalculator.dateToColumn(e),a=this.dateCalculator.dateToColumn(t),s=(0,p.getDateYear)(e),l=!1,u=!1;return null===i&&this.settings.hideDaysBeforeFullWeeks&&!1!==(i=this.getAdjacentWeekColumn(e,!0,!1))&&(l=!0),null===a&&this.settings.hideDaysAfterFullWeeks&&!1!==(a=this.getAdjacentWeekColumn(t,!1,!0))&&(u=!0),!(!this.dateCalculator.isValidRangeBarData(e,t)||!1===i||!1===a)&&(this.rangeBars[s]||(this.rangeBars[s]={}),this.rangeBars[s][n]||(this.rangeBars[s][n]={}),this.rangeBars[s][n][i]={barLength:a-i+1,partialStart:!l&&!this.dateCalculator.isOnTheEdgeOfWeek(e)[0],partialEnd:!u&&!this.dateCalculator.isOnTheEdgeOfWeek(t)[1],additionalData:{}},(0,d.objectEach)(r,function(e,t){o.rangeBars[s][n][i].additionalData[t]=e}),s===this.dateCalculator.getYear()&&(this.colorData[n]&&(this.rangeBars[s][n][i].colors=this.colorData[n]),this.rangeList[n]=[n,i],this.renderRangeBar(n,i,a,r)),[n,i])}},{key:"prepareDaysInColumnsInfo",value:function(e,t){for(var n=e.getFullYear();n<=t.getFullYear();n++)void 0===this.dateCalculator.daysInColumns[n]&&(this.dateCalculator.calculateWeekStructure(n),this.dateCalculator.generateHeaderSet("weeks",null,n))}},{key:"getRangeBarData",value:function(e,t){var n=this.dateCalculator.getYear(),r=this.getRangeBarCoordinates(e);if(!r)return!1;var o=this.rangeBars[n][r[0]][r[1]];return!(!o||e!==r[0]||!(t===r[1]||t>r[1]&&t<r[1]+o.barLength))&&o}},{key:"updateRangeBarData",value:function(e,t,n){var r=this.getRangeBarData(e,t);(0,d.objectEach)(n,function(e,t){r[t]!==e&&(r[t]=e)})}},{key:"renderRangeBar",value:function(e,t,n){for(var r=this.dateCalculator.getYear(),o=this.rangeBars[r][e][t],i=t;i<=n;i++){var a=this.hot.getCellMeta(e,i),s="".concat(a.className||""," rangeBar");(i===t&&o.partialStart||i===n&&o.partialEnd)&&(s+=" partial"),i===n&&(s+=" last"),this.hot.setCellMeta(e,i,"originalClassName",a.className),this.hot.setCellMeta(e,i,"className",s),this.hot.setCellMeta(e,i,"additionalData",o.additionalData),this.cacheRangeBarMeta(e,i,"originalClassName",a.className),this.cacheRangeBarMeta(e,i,"className",s),this.cacheRangeBarMeta(e,i,"additionalData",o.additionalData)}}},{key:"removeRangeBarByDate",value:function(e,t){var n=this.dateCalculator.dateToColumn(t);this.removeRangeBarByColumn(e,n)}},{key:"removeRangeBarByColumn",value:function(r,o){var i=this,e=this.dateCalculator.getYear(),t=this.rangeBars[e][r][o];t&&(this.unrenderRangeBar(r,o,o+t.barLength-1),this.rangeBars[e][r][o]=null,(0,d.objectEach)(this.rangeList,function(e,t){var n=parseInt(t,10);JSON.stringify(e)===JSON.stringify([r,o])&&(i.rangeList[n]=null)}))}},{key:"removeAllRangeBars",value:function(){var r=this;(0,d.objectEach)(this.rangeBars,function(e,n){(0,d.objectEach)(e,function(e,t){r.removeRangeBarByColumn(n,t)})})}},{key:"unrenderRangeBar",value:function(e,t,n){for(var r=t;r<=n;r++){var o=this.hot.getCellMeta(e,r);this.hot.setCellMeta(e,r,"className",o.originalClassName),this.hot.setCellMeta(e,r,"originalClassName",void 0),this.cacheRangeBarMeta(e,r,"className",o.originalClassName),this.cacheRangeBarMeta(e,r,"originalClassName",void 0)}this.hot.render()}},{key:"uniformBackgroundRenderer",value:function(e,t,n,r,o,i,a){var s=this.getRangeBarData(n,r),l=this.getRangeBarCoordinates(n);t.innerHTML="",a.className&&(t.className=a.className);var u="";(0,d.objectEach)(a.additionalData,function(e,t){u+="".concat(t,": ").concat(e,"\n")}),u=u.replace(/\n$/,""),t.title=u,s&&s.colors?r===l[1]&&s.partialStart||r===l[1]+s.barLength-1&&s.partialEnd?t.style.background=s.colors[1]:t.style.background=s.colors[0]:t.style.background=""}},{key:"setRangeBarColors",value:function(e){var r=this;this.colorData=e,(0,d.objectEach)(e,function(e,t){var n=r.getRangeBarCoordinates(t);n&&r.updateRangeBarData(n[0],n[1],{colors:e})}),this.hot.render()}},{key:"setYear",value:function(e){var t=(0,d.extend)(this.hot.getSettings().ganttChart,{startYear:e});this.hot.updateSettings({ganttChart:t})}},{key:"onAfterInit",value:function(){this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.applyDataSource()}},{key:"onUpdateSettings",value:function(){this.internalUpdateSettings?this.applyRangeBarMetaCache():(0,l.default)((0,s.default)(n.prototype),"onUpdateSettings",this).call(this)}},{key:"destroy",value:function(){this.hotSource&&this.dataFeed.removeSourceHotHooks(this.hotSource),(0,l.default)((0,s.default)(n.prototype),"destroy",this).call(this)}}]),n}(c.default);(0,g.registerPlugin)("ganttChart",w);var C=w;t.default=C},function(e,t,n){"use strict";var r=n(0);n(19),n(12),n(40),n(30),n(54),n(76),t.__esModule=!0,t.default=void 0;var E=r(n(18)),u=r(n(1)),o=r(n(2)),v=n(3),c=n(4),i=n(57),g=n(173),a=function(){function l(e){var t=e.year,n=e.allowSplitWeeks,r=void 0===n||n,o=e.hideDaysBeforeFullWeeks,i=void 0!==o&&o,a=e.hideDaysAfterFullWeeks,s=void 0!==a&&a;(0,u.default)(this,l),this.year=t,this.firstWeekDay="monday",this.allowSplitWeeks=r,this.hideDaysBeforeFullWeeks=i,this.hideDaysAfterFullWeeks=s,this.weekSectionCount=0,this.monthListCache={},this.daysInColumns={},this.calculateWeekStructure()}return(0,o.default)(l,[{key:"setYear",value:function(e){this.year=e,this.monthListCache[e]=this.calculateMonthData(e),this.calculateWeekStructure(e)}},{key:"setFirstWeekDay",value:function(e){var t=e.toLowerCase();"monday"!==t&&"sunday"!==t&&(0,i.warn)("First day of the week must be set to either Monday or Sunday"),this.firstWeekDay=t,this.calculateWeekStructure()}},{key:"countWeekSections",value:function(){return this.weekSectionCount}},{key:"getFirstWeekDay",value:function(){return this.firstWeekDay}},{key:"getYear",value:function(){return this.year}},{key:"getMonthList",value:function(e){var t=0<arguments.length&&void 0!==e?e:this.year;return this.monthListCache[t]||(this.monthListCache[t]=this.calculateMonthData(t)),this.monthListCache[t]}},{key:"getFullMonthList",value:function(){return this.monthListCache}},{key:"dateToColumn",value:function(e){var t=(0,g.parseDate)(e);if(!t)return!1;var n=t.getMonth(),r=t.getDate()-1,o=t.getFullYear();return this.getWeekColumn(r,n,o)}},{key:"getWeekColumn",value:function(n,e,t){var r=2<arguments.length&&void 0!==t?t:this.getYear(),o=null,i=this.getMonthCacheArray(e,r);return(0,v.arrayEach)(i,function(e){if((0,c.objectEach)(e,function(e,t){if(-1<e.indexOf(n+1))return o=parseInt(t,10),!1}),o)return!1}),o}},{key:"getMonthCacheArray",value:function(r,e){var o=this,i=1<arguments.length&&void 0!==e?e:this.getYear(),a=this.getMonthList(i),s=[];if(this.allowSplitWeeks)s.push(this.daysInColumns[i][r]);else{var l=-1;(0,c.objectEach)(this.daysInColumns[i],function(e,t){var n=a[t];if(1<Object.keys(e).length&&(l+=1),l===r)return 0<n.daysBeforeFullWeeks&&s.push(o.daysInColumns[i][parseInt(t,10)-1]),s.push(e),0<n.daysAfterFullWeeks&&s.push(o.daysInColumns[i][parseInt(t,10)+1]),!1})}return s}},{key:"columnToDate",value:function(n,e){var t=1<arguments.length&&void 0!==e?e:this.getYear(),r=null;(0,c.objectEach)(this.daysInColumns[t],function(e,t){if(e[n])return r=t,!1});var o=this.daysInColumns[t][r][n];if(1!==o.length)return{start:new Date(t,r,o[0]),end:new Date(t,r,o[o.length-1])};var i=new Date(t,r,o[0]);return{start:i,end:i}}},{key:"isOnTheEdgeOfWeek",value:function(e){var n=this,r=(0,g.parseDate)(e);if(!r)return null;var t=r.getMonth(),o=r.getDate()-1,i=r.getFullYear(),a=this.getMonthCacheArray(t,i),s=!1;return(0,v.arrayEach)(a,function(e){if((0,c.objectEach)(e,function(e){if(!n.allowSplitWeeks&&7!==e.length&&(0==o||o==new Date(r.getYear(),r.getMonth()+1,0).getDate()-1))return!0;var t=e.indexOf(1+o);return 0===t?!(s=[1,0]):t===e.length-1?!(s=[0,1]):void 0}),s)return!1}),s}},{key:"generateHeaderSet",value:function(p,m,e){var y=this,w=2<arguments.length&&void 0!==e?e:this.year,t=this.getMonthList(w),C=[];return(0,c.objectEach)(t,function(e,t){var n=0<e.daysBeforeFullWeeks?1:0,r=0<e.daysAfterFullWeeks?1:0,o=y.hideDaysBeforeFullWeeks?0:n,i=y.hideDaysAfterFullWeeks?0:r,a=e.fullWeeks+(y.allowSplitWeeks?o+i:0),s=parseInt(t,10),l="";if("months"===p)C.push({label:e.name,colspan:a});else if("weeks"===p)for(var u=0;u<a;u++){var c=null,h=null;if(y.allowSplitWeeks||1!==e.fullWeeks){var d=y.getWeekColumnRange({monthObject:e,monthNumber:s,headerIndex:u,areDaysBeforeFullWeeksVisible:o,areDaysAfterFullWeeksVisible:i,headerCount:a,year:w}),f=(0,E.default)(d,2);c=f[0],h=f[1]}else{var v=y.getWeekColumnRange({monthObject:e,monthNumber:s,headerIndex:u,headerCount:a,areDaysBeforeFullWeeksVisible:o,areDaysAfterFullWeeksVisible:i,mixedMonth:!0,year:w}),g=(0,E.default)(v,2);c=g[0],h=g[1]}l=c===h?"".concat(c):"".concat(c," - ").concat(h),C.push(m?m.call(y,c,h):l),y.addDaysToCache(s,C.length-1,c,h,w)}}),C}},{key:"getWeekColumnRange",value:function(e){var t=e.monthObject,n=e.monthNumber,r=e.headerIndex,o=e.headerCount,i=e.areDaysBeforeFullWeeksVisible,a=e.areDaysAfterFullWeeksVisible,s=e.mixedMonth,l=void 0!==s&&s,u=e.year,c=void 0===u?this.year:u,h=this.getMonthList(c),d=this.allowSplitWeeks,f=null,v=null;return l?f=0===n?(v=h[n+1].daysBeforeFullWeeks,g.DEC_LENGTH-(g.WEEK_LENGTH-v)+1):n===h.length-1?(v=g.WEEK_LENGTH-h[n-1].daysAfterFullWeeks,h[n-1].days-h[n-1].daysAfterFullWeeks+1):(v=h[n+1].daysBeforeFullWeeks,h[n-1].days-(g.WEEK_LENGTH-v)+1):v=d&&i&&0===r?(f=r+1,t.daysBeforeFullWeeks):d&&a&&r===o-1?(f=t.days-t.daysAfterFullWeeks+1,t.days):(f=null,(f=d?t.daysBeforeFullWeeks+(r-i)*g.WEEK_LENGTH+1:t.daysBeforeFullWeeks+r*g.WEEK_LENGTH+1)+g.WEEK_LENGTH-1),[f,v]}},{key:"addDaysToCache",value:function(e,t,n,r,o){var i=4<arguments.length&&void 0!==o?o:this.getYear();if(this.daysInColumns[i]||(this.daysInColumns[i]={}),this.daysInColumns[i][e]||(this.daysInColumns[i][e]={}),this.daysInColumns[i][e][t]||(this.daysInColumns[i][e][t]=[]),n<=r)for(var a=n;a<=r;a++)this.daysInColumns[i][e][t].push(a);else{for(var s=0<=e-1?this.countMonthDays(e):31,l=n;l<=s;l++)this.daysInColumns[i][e][t].push(l);for(var u=1;u<=r;u++)this.daysInColumns[i][e][t].push(u)}}},{key:"isValidRangeBarData",value:function(e,t){var n=(0,g.parseDate)(e),r=(0,g.parseDate)(t);return n&&r&&n.getTime()<=r.getTime()}},{key:"calculateMonthData",value:function(e){var t=0<arguments.length&&void 0!==e?e:this.year;return[{name:"January",days:31},{name:"February",days:new Date(t,2,0).getDate()},{name:"March",days:31},{name:"April",days:30},{name:"May",days:31},{name:"June",days:30},{name:"July",days:31},{name:"August",days:31},{name:"September",days:30},{name:"October",days:31},{name:"November",days:30},{name:"December",days:31}].slice(0)}},{key:"countMonths",value:function(e){var t=0<arguments.length&&void 0!==e?e:this.getYear();return this.monthListCache[t].length}},{key:"countMonthDays",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:this.getYear();return this.monthListCache[n][e-1].days}},{key:"countMonthFullWeeks",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:this.getYear();return this.monthListCache[n][e-1].fullWeeks}},{key:"calculateWeekStructure",value:function(e){var a=this,s=0<arguments.length&&void 0!==e?e:this.getYear();this.monthListCache[s]=this.calculateMonthData(s);var t=this.getFirstWeekDay(),l=this.getMonthList(s),u=[],c=this.hideDaysBeforeFullWeeks?0:1,h=this.hideDaysAfterFullWeeks?0:1,d=0,f=0;"monday"===t&&(d=1),(0,v.arrayEach)(l,function(e,t){var n=new Date(s,t,1).getDay(),r=0;if(e.daysBeforeFullWeeks=(7-n+d)%7,!a.allowSplitWeeks&&e.daysBeforeFullWeeks&&(u.push((0,g.getMixedMonthObject)((0,g.getMixedMonthName)(t,l),t)),r+=1),e.fullWeeks=Math.floor((e.days-e.daysBeforeFullWeeks)/7),e.daysAfterFullWeeks=e.days-e.daysBeforeFullWeeks-7*e.fullWeeks,a.allowSplitWeeks){var o=c*(e.daysBeforeFullWeeks?1:0),i=h*(e.daysAfterFullWeeks?1:0);f+=e.fullWeeks+o+i}else t===l.length-1&&e.daysAfterFullWeeks&&(u.push((0,g.getMixedMonthObject)((0,g.getMixedMonthName)(t,l),null)),r+=1),f+=e.fullWeeks+r}),(0,v.arrayEach)(u,function(e,t){var n=e.index;delete e.index,a.addMixedMonth(null===n?n:t+n,e,s)}),s===this.getYear()&&(this.weekSectionCount=f)}},{key:"addMixedMonth",value:function(e,t,n){null===e?this.monthListCache[n].push(t):this.monthListCache[n].splice(e,0,t)}}]),l}();t.default=a},function(e,t,n){"use strict";var r=n(0);n(19),n(10),n(37),n(32),t.__esModule=!0,t.default=void 0;var s=r(n(1)),o=r(n(2)),l=n(4),i=n(3),u=n(15),c=n(173),a=function(){function a(e,t,n,r,o,i){(0,s.default)(this,a),this.data=t,this.chartInstance=e,this.chartPlugin=this.chartInstance.getPlugin("ganttChart"),this.hotSource=null,this.sourceHooks={},this.ongoingAsync=!1,this.applyData(t,n,r,o,i||!1)}return(0,o.default)(a,[{key:"applyData",value:function(e,t,n,r,o){if("[object Array]"===Object.prototype.toString.call(e))1<e.length&&this.chartInstance.alter("insert_row",0,e.length-1,"".concat(this.pluginName,".loadData")),this.loadData(e);else if(e instanceof this.chartInstance.constructor){var i=e.countRows();1<i&&this.chartInstance.alter("insert_row",0,i-1,"".concat(this.pluginName,".loadData")),this.bindWithHotInstance(e,t,n,r,o)}}},{key:"bindWithHotInstance",value:function(e,t,n,r,o){this.hotSource={instance:e,startColumn:t,endColumn:n,additionalData:r,asyncUpdates:o},this.addSourceHotHooks(),this.asyncCall(this.updateFromSource)}},{key:"asyncCall",value:function(e){var t=this;this.hotSource.asyncUpdates?(this.asyncStart(),setTimeout(function(){e.call(t),t.asyncEnd()},0)):e.call(this)}},{key:"asyncStart",value:function(){this.ongoingAsync=!0}},{key:"asyncEnd",value:function(){this.ongoingAsync=!1}},{key:"addSourceHotHooks",value:function(){var t=this;this.sourceHooks={afterLoadData:function(){return t.onAfterSourceLoadData()},afterChange:function(e){return t.onAfterSourceChange(e)},afterColumnSort:function(){return t.onAfterColumnSort()}},this.hotSource.instance.addHook("afterLoadData",this.sourceHooks.afterLoadData),this.hotSource.instance.addHook("afterChange",this.sourceHooks.afterChange),this.hotSource.instance.addHook("afterColumnSort",this.sourceHooks.afterColumnSort)}},{key:"removeSourceHotHooks",value:function(e){this.sourceHooks.afterLoadData&&e.instance.removeHook("afterLoadData",this.sourceHooks.afterLoadData),this.sourceHooks.afterChange&&e.instance.removeHook("afterChange",this.sourceHooks.afterChange),this.sourceHooks.afterColumnSort&&e.instance.removeHook("afterColumnSort",this.sourceHooks.afterColumnSort)}},{key:"getDataFromSource",value:function(e){var r,o={},i=this.hotSource,a=[];void 0===e?r=i.instance.getData(0,0,i.instance.countRows()-1,i.instance.countCols()-1):(r=[])[e]=i.instance.getDataAtRow(e);for(var t=function(e,t){o={};var n=r[e];if(null===n[i.startColumn]||""===n[i.startColumn])return"continue";(0,l.objectEach)(i.additionalData,function(e,t){o[t]=n[e]}),a.push([e,n[i.startColumn],n[i.endColumn],o,e])},n=e||0,s=r.length;n<(e?e+1:s);n++)t(n);return a}},{key:"updateFromSource",value:function(e){var t=this.getDataFromSource(e);!e&&isNaN(e)&&(this.chartPlugin.clearRangeBars(),this.chartPlugin.clearRangeList()),this.loadData(t),this.chartInstance.render()}},{key:"loadData",value:function(e){var r=this,o=[];(0,i.arrayEach)(e,function(e,t){e.row=t;var n=r.splitRangeIfNeeded(e);o=o.concat(n)}),(0,i.arrayEach)(o,function(e){r.chartPlugin.addRangeBar(e.row,(0,c.getStartDate)(e),(0,c.getEndDate)(e),(0,c.getAdditionalData)(e)),delete e.row})}},{key:"splitRangeIfNeeded",value:function(n){var r=[],e=new Date((0,c.getStartDate)(n)),t=new Date((0,c.getEndDate)(n));if("string"==typeof e||"string"==typeof t)return!1;var o=e.getFullYear(),i=t.getFullYear();return o===i?[n]:((0,u.rangeEach)(o,i,function(e){var t=(0,l.clone)(n);e!==o&&(0,c.setStartDate)(t,"01/01/".concat(e)),e!==i&&(0,c.setEndDate)(t,"12/31/".concat(e)),r.push(t)}),r)}},{key:"onAfterSourceChange",value:function(a){var s=this;this.asyncCall(function(){if(a){for(var e={},t=0,n=a.length;t<n;t++){var r=a[t],o=parseInt(r[0],10),i=parseInt(r[1],10);e[o]||(e[o]={}),e[o][i]=[r[2],r[3]]}(0,l.objectEach)(e,function(e,t){var n=parseInt(t,10);s.chartPlugin.getRangeBarCoordinates(n)&&s.chartPlugin.removeRangeBarByColumn(n,s.chartPlugin.rangeList[n][1]),s.updateFromSource(t)})}})}},{key:"onAfterSourceLoadData",value:function(){var e=this;this.asyncCall(function(){e.chartPlugin.removeAllRangeBars(),e.updateFromSource()})}},{key:"onAfterColumnSort",value:function(){var e=this;this.asyncCall(function(){e.chartPlugin.removeAllRangeBars(),e.updateFromSource()})}}]),a}();t.default=a},function(e,t,n){},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(6)),l=r(n(13)),u=r(n(8)),c=n(5),h=n(20),d=n(15),f=function(e){function r(e){var t;return(0,o.default)(this,r),(t=(0,a.default)(this,(0,s.default)(r).call(this,e))).settings=null,t}return(0,u.default)(r,e),(0,i.default)(r,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().headerTooltips}},{key:"enablePlugin",value:function(){var n=this;this.enabled||(this.settings=this.hot.getSettings().headerTooltips,this.parseSettings(),this.addHook("afterGetColHeader",function(e,t){return n.onAfterGetHeader(e,t)}),this.addHook("afterGetRowHeader",function(e,t){return n.onAfterGetHeader(e,t)}),(0,l.default)((0,s.default)(r.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.settings=null,this.clearTitleAttributes(),(0,l.default)((0,s.default)(r.prototype),"disablePlugin",this).call(this)}},{key:"parseSettings",value:function(){"boolean"==typeof this.settings&&(this.settings={rows:!0,columns:!0,onlyTrimmed:!1})}},{key:"clearTitleAttributes",value:function(){var e=this.hot.view.wt.getSetting("columnHeaders").length,o=this.hot.view.wt.wtTable.THEAD,i=this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.THEAD,t=this.hot.view.wt.wtOverlays.topLeftCornerOverlay,a=t?t.clone.wtTable.THEAD:null;(0,d.rangeEach)(0,e-1,function(e){var t=o.childNodes[e],n=i.childNodes[e],r=a?a.childNodes[e]:null;(0,d.rangeEach)(0,t.childNodes.length-1,function(e){t.childNodes[e].removeAttribute("title"),n&&n.childNodes[e]&&n.childNodes[e].removeAttribute("title"),a&&r&&r.childNodes[e]&&r.childNodes[e].removeAttribute("title")})},!0)}},{key:"onAfterGetHeader",value:function(e,t){var n=t.querySelector("span"),r="THEAD"===t.parentNode.parentNode.nodeName;(r&&this.settings.columns||!r&&this.settings.rows)&&(this.settings.onlyTrimmed?(0,c.outerWidth)(n)>=(0,c.outerWidth)(t)&&0!==(0,c.outerWidth)(n)&&t.setAttribute("title",n.textContent):t.setAttribute("title",n.textContent))}},{key:"destroy",value:function(){this.settings=null,(0,l.default)((0,s.default)(r.prototype),"destroy",this).call(this)}}]),r}(r(n(21)).default);(0,h.registerPlugin)("headerTooltips",f);var v=f;t.default=v},function(e,t,n){"use strict";var r=n(0);n(12),t.__esModule=!0,t.default=void 0;var o=r(n(66)),i=r(n(1)),a=r(n(2)),s=r(n(7)),l=r(n(26)),u=r(n(6)),c=r(n(13)),h=r(n(8)),g=n(5),p=n(15),m=n(3),d=n(4),f=n(67),v=n(57),y=n(20),w=r(n(21)),C=n(25),E=r(n(629));function S(){var e=(0,o.default)(["Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\n is currently not supported and might result in glitches."]);return S=function(){return e},e}function b(){var e=(0,o.default)(["You have declared a Nested Header overlapping the Fixed Columns section - it may lead to visual\n glitches. To prevent that kind of problems, split the nested headers between the fixed and non-fixed columns."]);return b=function(){return e},e}n(630);var R=function(e){function n(e){var t;return(0,i.default)(this,n),(t=(0,s.default)(this,(0,u.default)(n).call(this,e))).settings=[],t.columnHeaderLevelCount=0,t.colspanArray=[],t.ghostTable=new E.default((0,l.default)(t)),t}return(0,h.default)(n,e),(0,a.default)(n,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().nestedHeaders}},{key:"enablePlugin",value:function(){var o=this;this.enabled||(this.settings=this.hot.getSettings().nestedHeaders,this.addHook("afterGetColumnHeaderRenderers",function(e){return o.onAfterGetColumnHeaderRenderers(e)}),this.addHook("afterInit",function(){return o.onAfterInit()}),this.addHook("afterOnCellMouseDown",function(e,t){return o.onAfterOnCellMouseDown(e,t)}),this.addHook("beforeOnCellMouseOver",function(e,t,n,r){return o.onBeforeOnCellMouseOver(e,t,n,r)}),this.addHook("afterViewportColumnCalculatorOverride",function(e){return o.onAfterViewportColumnCalculatorOverride(e)}),this.addHook("modifyColWidth",function(e,t){return o.onModifyColWidth(e,t)}),this.setupColspanArray(),this.checkForFixedColumnsCollision(),this.columnHeaderLevelCount=this.hot.view?this.hot.view.wt.getSetting("columnHeaders").length:0,(0,c.default)((0,u.default)(n.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.clearColspans(),this.settings=[],this.columnHeaderLevelCount=0,this.colspanArray=[],this.ghostTable.clear(),(0,c.default)((0,u.default)(n.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),(0,c.default)((0,u.default)(n.prototype),"updatePlugin",this).call(this),this.ghostTable.buildWidthsMapper()}},{key:"clearColspans",value:function(){if(this.hot.view)for(var e=this.hot.view.wt.getSetting("columnHeaders").length,t=this.hot.view.wt.wtTable.THEAD,n=this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.THEAD,r=this.hot.view.wt.wtOverlays.topLeftCornerOverlay?this.hot.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.THEAD:null,o=0;o<e;o++){var i=t.childNodes[o];if(!i)break;for(var a=n.childNodes[o],s=r?r.childNodes[o]:null,l=0,u=i.childNodes.length;l<u;l++)i.childNodes[l].removeAttribute("colspan"),a&&a.childNodes[l]&&a.childNodes[l].removeAttribute("colspan"),r&&s&&s.childNodes[l]&&s.childNodes[l].removeAttribute("colspan")}}},{key:"checkForFixedColumnsCollision",value:function(){var n=this,r=this.hot.getSettings().fixedColumnsLeft;(0,m.arrayEach)(this.colspanArray,function(e,t){n.getNestedParent(t,r)!==r&&(0,v.warn)((0,f.toSingleLine)(b()))})}},{key:"checkForOverlappingHeaders",value:function(){var a=this;(0,m.arrayEach)(this.colspanArray,function(e,i){(0,m.arrayEach)(a.colspanArray[i],function(e,t){if(1<e.colspan){var n=a.levelToRowCoords(i),r=a.getChildHeaders(n,t);if(0<r.length){var o=0;return(0,m.arrayEach)(r,function(e){o+=a.getColspan(n+1,e)}),o>e.colspan&&(0,v.warn)((0,f.toSingleLine)(S())),!1}}})})}},{key:"setupColspanArray",value:function(){var i=this;(0,d.objectEach)(this.settings,function(e,o){(0,d.objectEach)(e,function(e,t,n){if(function(e,t){e[t]||(e[t]=[])}(i.colspanArray,o),void 0===n[t].colspan)i.colspanArray[o].push({label:n[t]||"",colspan:1,hidden:!1});else{var r=n[t].colspan||1;i.colspanArray[o].push({label:n[t].label||"",colspan:r,hidden:!1}),i.fillColspanArrayWithDummies(r,o)}})})}},{key:"fillColspanArrayWithDummies",value:function(e,t){var n=this;(0,p.rangeEach)(0,e-2,function(){n.colspanArray[t].push({label:"",colspan:1,hidden:!0})})}},{key:"headerRendererFactory",value:function(d){var f=this;return function(e,t){var n=f.hot.rootDocument;if(t.removeAttribute("colspan"),(0,g.removeClass)(t,"hiddenHeader"),f.colspanArray[d][e]&&f.colspanArray[d][e].colspan){var r=f.colspanArray[d][e].colspan,o=f.hot.getSettings().fixedColumnsLeft||0,i=f.hot.view.wt.wtOverlays,a=i.leftOverlay,s=i.topLeftCornerOverlay,l=!!s&&s.clone.wtTable.THEAD.contains(t),u=!!a&&a.clone.wtTable.THEAD.contains(t);1<r&&t.setAttribute("colspan",l||u?Math.min(r,o-e):r),(l||u&&e===o-1)&&(0,g.addClass)(t,"overlayEdge")}f.colspanArray[d][e]&&f.colspanArray[d][e].hidden&&(0,g.addClass)(t,"hiddenHeader"),(0,g.empty)(t);var c=n.createElement("DIV");(0,g.addClass)(c,"relative");var h=n.createElement("SPAN");(0,g.addClass)(h,"colHeader"),(0,g.fastInnerHTML)(h,f.colspanArray[d][e]&&f.colspanArray[d][e].label||""),c.appendChild(h),t.appendChild(c),f.hot.runHooks("afterGetColHeader",e,t)}}},{key:"getColspan",value:function(e,t){var n=this.colspanArray[this.rowCoordsToLevel(e)][t];return n?n.colspan:1}},{key:"levelToRowCoords",value:function(e){return e-this.columnHeaderLevelCount}},{key:"rowCoordsToLevel",value:function(e){return e+this.columnHeaderLevelCount}},{key:"getNestedParent",value:function(e,t){if(e<0)return!1;var n=this.colspanArray[e][t]?this.colspanArray[e][t].colspan:1,r=!!this.colspanArray[e][t]&&this.colspanArray[e][t].hidden;if(1<n||1===n&&!1===r)return t;var o=t-1;do{if(1<this.colspanArray[e][o].colspan)break;o-=1}while(0<=t);return o}},{key:"getChildHeaders",value:function(e,t){var n=this.rowCoordsToLevel(e),r=this.colspanArray[n+1],o=this.getNestedParent(n,t),i=this.colspanArray[n][t].colspan,a=[];return r&&(0,p.rangeEach)(o,o+i-1,function(e){r[e]&&1<r[e].colspan&&(i-=r[e].colspan-1),r[e]&&!r[e].hidden&&-1===a.indexOf(e)&&a.push(e)}),a}},{key:"fillTheRemainingColspans",value:function(){var r=this;(0,d.objectEach)(this.settings,function(t,n){(0,p.rangeEach)(r.colspanArray[n].length-1,r.hot.countCols()-1,function(e){r.colspanArray[n].push({label:t[e]||"",colspan:1,hidden:!1})},!0)})}},{key:"updateHeadersHighlight",value:function(){var a=this,e=this.hot.getSelectedLast();if(void 0!==e){var s=this.hot.view.wt.wtOverlays,l=this.hot.selection.isSelectedByColumnHeader(),u=Math.min(e[1],e[3]),c=Math.max(e[1],e[3]),h=l?-1:this.columnHeaderLevelCount-1,d=[],t=function(n){return function(e,t){return function(){return t(e,n)}}},f=t("ht__highlight"),v=t("ht__active_highlight");(0,p.rangeEach)(u,c,function(i){for(var e=function(t){var e=a.getNestedParent(t,i),n=[s.topOverlay?s.topOverlay.clone.wtTable.getColumnHeader(e,t):void 0,s.topLeftCornerOverlay?s.topLeftCornerOverlay.clone.wtTable.getColumnHeader(e,t):void 0],r=a.getColspan(t-a.columnHeaderLevelCount,e),o=u<=e&&e+r-1<=c;(0,m.arrayEach)(n,function(e){if(void 0===e)return!1;!l&&t<h||l&&!o?(d.push(f(e,g.removeClass)),l&&d.push(v(e,g.removeClass))):(d.push(f(e,g.addClass)),l&&d.push(v(e,g.addClass)))})},t=a.columnHeaderLevelCount-1;-1<t;t--)e(t)}),(0,m.arrayEach)(d,function(e){e()}),d.length=0}}},{key:"onAfterViewportColumnCalculatorOverride",value:function(n){var r=this,o=n.startColumn;(0,p.rangeEach)(0,Math.max(this.columnHeaderLevelCount-1,0),function(e){var t=r.getNestedParent(e,n.startColumn);t<n.startColumn&&(o=Math.min(o,t))}),n.startColumn=o}},{key:"onAfterOnCellMouseDown",value:function(e,t){if(t.row<0){var n=this.getColspan(t.row,t.col),r=t.col+n-1;if(1<n){var o=this.hot.countRows()-1;this.hot.selection.setRangeEnd(new C.CellCoords(o,r))}}}},{key:"onBeforeOnCellMouseOver",value:function(e,t,n,r){if(!(0<=t.row||t.col<0)&&this.hot.view.isMouseDown()){var o=this.hot.getSelectedRangeLast(),i=o.from,a=o.to,s=this.getColspan(t.row,t.col),l=t.col+s-1,u=!1;if(i.col<=a.col?(t.col<i.col&&l===a.col||t.col<i.col&&l<i.col||t.col<i.col&&l>=i.col&&l<a.col)&&(u=!0):(t.col<a.col&&l>i.col||t.col>i.col||t.col<=a.col&&l>i.col||t.col>a.col&&l>i.col)&&(u=!0),u){var c=[a.col,i.col];i.col=c[0],a.col=c[1]}if(1<s){var h;r.column=!0,r.cell=!0;var d=[];i.col===a.col&&(l<=i.col&&t.col<i.col?d.push(a.col,t.col):d.push(t.col<i.col?t.col:i.col,l>a.col?l:a.col)),i.col<a.col&&d.push(t.col<i.col?t.col:i.col,l),i.col>a.col&&d.push(i.col,t.col),(h=this.hot).selectColumns.apply(h,d)}}}},{key:"onAfterInit",value:function(){this.columnHeaderLevelCount=this.hot.view.wt.getSetting("columnHeaders").length,this.fillTheRemainingColspans(),this.checkForOverlappingHeaders(),this.ghostTable.buildWidthsMapper()}},{key:"onAfterGetColumnHeaderRenderers",value:function(e){if(e){e.length=0;for(var t=this.colspanArray.length-1;0<=t;t--)e.push(this.headerRendererFactory(t));e.reverse()}this.updateHeadersHighlight()}},{key:"onModifyColWidth",value:function(e,t){var n=this.ghostTable.widthsCache[t];return n<e?e:n}},{key:"destroy",value:function(){this.settings=null,this.columnHeaderLevelCount=null,this.colspanArray=null,(0,c.default)((0,u.default)(n.prototype),"destroy",this).call(this)}}]),n}(w.default);(0,y.registerPlugin)("nestedHeaders",R);var T=R;t.default=T},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),m=n(5),y=n(4),a=function(){function t(e){(0,o.default)(this,t),this.nestedHeaders=e,this.container=void 0,this.widthsCache=[]}return(0,i.default)(t,[{key:"buildWidthsMapper",value:function(){this.container=this.nestedHeaders.hot.rootDocument.createElement("div"),this.buildGhostTable(this.container),this.nestedHeaders.hot.rootElement.appendChild(this.container);for(var e=this.container.querySelectorAll("tr:last-of-type th"),t=e.length,n=0;n<t;n++)this.widthsCache.push(e[n].offsetWidth);this.container.parentNode.removeChild(this.container),this.container=null,this.nestedHeaders.hot.render()}},{key:"buildGhostTable",value:function(e){for(var t=this.nestedHeaders.hot.rootDocument,n=t.createDocumentFragment(),r=t.createElement("table"),o=!1,i=!!this.nestedHeaders.hot.getSettings().dropdownMenu,a=this.nestedHeaders.colspanArray.length,s=this.nestedHeaders.hot.countCols(),l=a-1,u=0;u<a;u++){var c=t.createElement("tr");o=!1;for(var h=0;h<s;h++){var d=t.createElement("th"),f=(0,y.clone)(this.nestedHeaders.colspanArray[u][h]);f&&!f.hidden&&(u===l&&(1<f.colspan&&(o=!0),i&&(f.label+='<button class="changeType"></button>')),(0,m.fastInnerHTML)(d,f.label),d.colSpan=f.colspan,c.appendChild(d))}r.appendChild(c)}if(o){for(var v=t.createElement("tr"),g=0;g<s;g++){var p=t.createElement("th");v.appendChild(p)}r.appendChild(v)}n.appendChild(r),e.appendChild(n)}},{key:"clear",value:function(){this.container=null,this.widthsCache.length=0}}]),t}();t.default=a},function(e,t,n){},function(e,t,n){"use strict";var r=n(0);n(12),n(16),n(10),n(14),n(24),n(17),n(32),t.__esModule=!0,t.default=void 0;var c=r(n(36)),o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(26)),l=r(n(6)),u=r(n(13)),h=r(n(8)),d=r(n(21)),f=n(20),v=n(15),g=n(3),p=n(25),m=r(n(632)),y=r(n(633)),w=r(n(377)),C=r(n(634));n(635);var E=new WeakMap,S=function(e){function n(e){var t;return(0,o.default)(this,n),(t=(0,a.default)(this,(0,l.default)(n).call(this,e))).sourceData=null,t.trimRowsPlugin=null,t.bindRowsWithHeadersPlugin=null,t.dataManager=null,t.headersUI=null,E.set((0,s.default)(t),{changeSelection:!1,movedToFirstChild:!1,movedToCollapsed:!1,skipRender:null}),t}return(0,h.default)(n,e),(0,i.default)(n,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().nestedRows}},{key:"enablePlugin",value:function(){var e=this;this.sourceData=this.hot.getSourceData(),this.trimRowsPlugin=this.hot.getPlugin("trimRows"),this.manualRowMovePlugin=this.hot.getPlugin("manualRowMove"),this.bindRowsWithHeadersPlugin=this.hot.getPlugin("bindRowsWithHeaders"),this.dataManager=new m.default(this,this.hot,this.sourceData),this.collapsingUI=new y.default(this,this.hot,this.trimRowsPlugin),this.headersUI=new w.default(this,this.hot),this.contextMenuUI=new C.default(this,this.hot),this.dataManager.rewriteCache(),this.addHook("afterInit",function(){return e.onAfterInit.apply(e,arguments)}),this.addHook("beforeRender",function(){return e.onBeforeRender.apply(e,arguments)}),this.addHook("modifyRowData",function(){return e.onModifyRowData.apply(e,arguments)}),this.addHook("modifySourceLength",function(){return e.onModifySourceLength.apply(e,arguments)}),this.addHook("beforeDataSplice",function(){return e.onBeforeDataSplice.apply(e,arguments)}),this.addHook("beforeDataFilter",function(){return e.onBeforeDataFilter.apply(e,arguments)}),this.addHook("afterContextMenuDefaultOptions",function(){return e.onAfterContextMenuDefaultOptions.apply(e,arguments)}),this.addHook("afterGetRowHeader",function(){return e.onAfterGetRowHeader.apply(e,arguments)}),this.addHook("beforeOnCellMouseDown",function(){return e.onBeforeOnCellMouseDown.apply(e,arguments)}),this.addHook("afterRemoveRow",function(){return e.onAfterRemoveRow.apply(e,arguments)}),this.addHook("modifyRemovedAmount",function(){return e.onModifyRemovedAmount.apply(e,arguments)}),this.addHook("beforeAddChild",function(){return e.onBeforeAddChild.apply(e,arguments)}),this.addHook("afterAddChild",function(){return e.onAfterAddChild.apply(e,arguments)}),this.addHook("beforeDetachChild",function(){return e.onBeforeDetachChild.apply(e,arguments)}),this.addHook("afterDetachChild",function(){return e.onAfterDetachChild.apply(e,arguments)}),this.addHook("modifyRowHeaderWidth",function(){return e.onModifyRowHeaderWidth.apply(e,arguments)}),this.addHook("afterCreateRow",function(){return e.onAfterCreateRow.apply(e,arguments)}),this.addHook("beforeRowMove",function(){return e.onBeforeRowMove.apply(e,arguments)}),this.addHook("afterRowMove",function(){return e.onAfterRowMove.apply(e,arguments)}),this.trimRowsPlugin.isEnabled()||(this.trimRowsPlugin.enablePlugin(),this.hot.getSettings().trimRows=!0),(0,u.default)((0,l.default)(n.prototype),"enablePlugin",this).call(this)}},{key:"disablePlugin",value:function(){(0,u.default)((0,l.default)(n.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),(0,u.default)((0,l.default)(n.prototype),"updatePlugin",this).call(this)}},{key:"onBeforeRowMove",value:function(e,t){var n,r,o,i=E.get(this),a=e.length,s=[],l=this.dataManager.translateTrimmedRow(t),u=!0,c=null;for(n=0;n<a;n++)s.push(this.dataManager.translateTrimmedRow(e[n])),this.dataManager.isParent(s[n])&&(u=!1);if(-1<s.indexOf(l)||!u)return!1;if(r=this.dataManager.getRowParent(s[0]),null==(c=this.dataManager.getRowParent(l))&&(c=this.dataManager.getRowParent(l-1)),null==c&&(c=this.dataManager.getDataObject(l-1),i.movedToFirstChild=!0),!c)return!1;for(o=r===c,i.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(c),this.collapsingUI.collapsedRowsStash.stash(),o||(Math.max.apply(Math,s)<=l?this.collapsingUI.collapsedRowsStash.shiftStash(s[0],-1*e.length):this.collapsingUI.collapsedRowsStash.shiftStash(l,e.length)),i.changeSelection=!0,(s[a-1]<=l&&o||!0===i.movedToFirstChild)&&(e.reverse(),s.reverse(),!0!==i.movedToFirstChild&&(l-=1)),n=0;n<a;n++)this.dataManager.moveRow(s[n],l);if(s[s.length-1]<l)for(n=a-1;0<=n;n--)this.dataManager.moveCellMeta(s[n],l);else for(n=0;n<a;n++)this.dataManager.moveCellMeta(s[n],l);return(s[a-1]<=l&&o||this.dataManager.isParent(l))&&e.reverse(),this.dataManager.rewriteCache(),!1}},{key:"onAfterRowMove",value:function(e,t){var n=E.get(this);if(n.changeSelection){var r,o,i=e.length,a=0,s=0,l=null;if(this.collapsingUI.collapsedRowsStash.applyStash(),r=this.dataManager.translateTrimmedRow(t),n.movedToFirstChild)n.movedToFirstChild=!1,s=(a=t)+i-1,t>=Math.max.apply(Math,(0,c.default)(e))&&(a-=i,s-=i);else if(n.movedToCollapsed){var u=this.dataManager.getRowParent(r-1);null==u&&(u=this.dataManager.getDataObject(r-1)),s=a=this.dataManager.getRowIndex(u)}else e[i-1]<t?a=(s=t-1)-i+1:s=(a=t)+i-1;l=this.hot.selection,o=this.hot.countCols()-1,l.setRangeStart(new p.CellCoords(a,0)),l.setRangeEnd(new p.CellCoords(s,o),!0),n.changeSelection=!1}}},{key:"onBeforeOnCellMouseDown",value:function(e,t,n){this.collapsingUI.toggleState(e,t,n)}},{key:"onModifyRowData",value:function(e){return this.dataManager.getDataObject(e)}},{key:"onModifySourceLength",value:function(){return this.dataManager.countAllRows()}},{key:"onBeforeDataSplice",value:function(e,t,n){return this.dataManager.spliceData(e,t,n),!1}},{key:"onBeforeDataFilter",value:function(e,t){var n=[],r=this.dataManager.translateTrimmedRow(e),o=E.get(this);return(0,v.rangeEach)(r,r+t-1,function(e){n.push(e)}),this.collapsingUI.collapsedRowsStash.stash(),this.collapsingUI.collapsedRowsStash.trimStash(r,t),this.collapsingUI.collapsedRowsStash.shiftStash(r,-1*t),this.dataManager.filterData(e,t,n),!(o.skipRender=!0)}},{key:"onAfterContextMenuDefaultOptions",value:function(e){return this.contextMenuUI.appendOptions(e)}},{key:"onAfterGetRowHeader",value:function(e,t){this.headersUI.appendLevelIndicators(e,t)}},{key:"onModifyRowHeaderWidth",value:function(e){return this.headersUI.rowHeaderWidthCache||e}},{key:"onAfterRemoveRow",value:function(e,t,n,r){var o=this;if(r!==this.pluginName){var i=E.get(this);setTimeout(function(){i.skipRender=null,o.headersUI.updateRowHeaderWidth(),o.collapsingUI.collapsedRowsStash.applyStash()},0)}}},{key:"onModifyRemovedAmount",value:function(e,t){var o=this,i=[],a=0;return(0,v.rangeEach)(t,t+e-1,function(e){var t=!1,n=o.collapsingUI.translateTrimmedRow(e),r=o.dataManager.getDataObject(n);o.dataManager.hasChildren(r)&&(i.push(r),(0,g.arrayEach)(i,function(e){if(-1<e.__children.indexOf(r))return!(t=!0)}),t||(a+=o.dataManager.countChildren(r))),t=!1,(0,g.arrayEach)(i,function(e){if(-1<e.__children.indexOf(r))return!(t=!0)}),t&&(a-=1)}),e+a}},{key:"onBeforeAddChild",value:function(){this.collapsingUI.collapsedRowsStash.stash()}},{key:"onAfterAddChild",value:function(e,t){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(t)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}},{key:"onBeforeDetachChild",value:function(){this.collapsingUI.collapsedRowsStash.stash()}},{key:"onAfterDetachChild",value:function(e,t){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(t)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}},{key:"onAfterCreateRow",value:function(e,t,n){n!==this.pluginName&&this.dataManager.rewriteCache()}},{key:"onAfterInit",value:function(){this.bindRowsWithHeadersPlugin.bindStrategy.strategy&&this.bindRowsWithHeadersPlugin.bindStrategy.createMap(this.hot.countSourceRows());var e=Math.max.apply(Math,(0,c.default)(this.dataManager.cache.levels));0<e&&this.headersUI.updateRowHeaderWidth(e)}},{key:"onBeforeRender",value:function(e,t){E.get(this).skipRender&&(t.skipRender=!0)}}]),n}(d.default);(0,f.registerPlugin)("nestedRows",S);var b=S;t.default=b},function(e,t,n){"use strict";var r=n(0);n(12),n(16),n(40),n(30),n(10),n(14),n(24),n(17),t.__esModule=!0,t.default=void 0;var o=r(n(44)),i=r(n(1)),a=r(n(2)),d=n(15),s=n(4),l=n(3),u=n(91),c=function(){function r(e,t,n){(0,i.default)(this,r),this.hot=t,this.data=n,this.plugin=e,this.parentReference=new WeakMap,this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},this.recordTranslator=(0,u.getTranslator)(this.hot)}return(0,a.default)(r,[{key:"rewriteCache",value:function(){var t=this;this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},(0,d.rangeEach)(0,this.data.length-1,function(e){t.cacheNode(t.data[e],0,null)})}},{key:"cacheNode",value:function(t,n,e){var r=this;this.cache.levels[n]||(this.cache.levels[n]=[],this.cache.levelCount+=1),this.cache.levels[n].push(t),this.cache.rows.push(t),this.cache.nodeInfo.set(t,{parent:e,row:this.cache.rows.length-1,level:n}),this.hasChildren(t)&&(0,l.arrayEach)(t.__children,function(e){r.cacheNode(e,n+1,t)})}},{key:"getDataObject",value:function(e){return null==e?null:this.cache.rows[e]}},{key:"readTreeNodes",value:function(e,t,n,r){var o=this,i=!1,a=t;if(isNaN(a)&&a.end)return a;var s=e;return s||(s={__children:this.data},i=!0,a-=1),null!=n&&a===n?{result:s,end:!0}:null!=r&&s===r?{result:a,end:!0}:(a+=1,s.__children&&(0,l.arrayEach)(s.__children,function(e){if(o.parentReference.set(e,i?null:s),a=o.readTreeNodes(e,a,n,r),isNaN(a)&&a.end)return!1}),a)}},{key:"updateParentReference",value:function(){this.readTreeNodes({__children:this.data},0,this.hot.countRows())}},{key:"mockParent",value:function(){var e=this.mockNode();return e.__children=this.data,e}},{key:"mockNode",value:function(){var n={};return(0,s.objectEach)(this.data[0],function(e,t){n[t]=null}),n}},{key:"getRowIndex",value:function(e){return null==e?null:this.cache.nodeInfo.get(e).row}},{key:"getRowIndexWithinParent",value:function(e){var t=null;t=isNaN(e)?e:this.getDataObject(e);var n=this.getRowParent(e);return null==n?this.data.indexOf(t):n.__children.indexOf(t)}},{key:"countAllRows",value:function(){var e={__children:this.data};return this.countChildren(e)}},{key:"countChildren",value:function(e){var t=this,n=0,r=e;return isNaN(r)||(r=this.getDataObject(r)),r&&r.__children?((0,l.arrayEach)(r.__children,function(e){n+=1,e.__children&&(n+=t.countChildren(e))}),n):0}},{key:"getRowParent",value:function(e){var t;return t=isNaN(e)?e:this.getDataObject(e),this.getRowObjectParent(t)}},{key:"getRowObjectParent",value:function(e){return"object"!==(0,o.default)(e)?null:this.cache.nodeInfo.get(e).parent}},{key:"getRowLevel",value:function(e){var t=null;return(t=isNaN(e)?e:this.getDataObject(e))?this.getRowObjectLevel(t):null}},{key:"getRowObjectLevel",value:function(e){return null==e?null:this.cache.nodeInfo.get(e).level}},{key:"hasChildren",value:function(e){var t=e;return isNaN(t)||(t=this.getDataObject(t)),!(!t.__children||!t.__children.length)}},{key:"isParent",value:function(e){var t=e;return isNaN(t)||(t=this.getDataObject(t)),!!(0,s.hasOwnProperty)(t,"__children")}},{key:"addChild",value:function(e,t){var n=t;this.hot.runHooks("beforeAddChild",e,n);var r=null;e&&(r=this.getRowIndex(e)),this.hot.runHooks("beforeCreateRow",r+this.countChildren(e)+1,1);var o=e;e||(o=this.mockParent()),o.__children||(o.__children=[]),n=n||this.mockNode(),o.__children.push(n),this.rewriteCache();var i=this.getRowIndex(n);this.hot.runHooks("afterCreateRow",i,1),this.hot.runHooks("afterAddChild",e,n)}},{key:"addChildAtIndex",value:function(e,t,n,r){var o=n;this.hot.runHooks("beforeAddChild",e,o,t),this.hot.runHooks("beforeCreateRow",r+1,1);var i=e;e||(i=this.mockParent()),i.__children||(i.__children=[]),o=o||this.mockNode(),i.__children.splice(t,null,o),this.rewriteCache(),this.hot.runHooks("afterCreateRow",r+1,1),this.hot.runHooks("afterAddChild",e,o,t)}},{key:"addSibling",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:"below",r=this.translateTrimmedRow(e),o=this.getRowParent(r),i=this.getRowIndexWithinParent(r);switch(n){case"below":this.addChildAtIndex(o,i+1,null,e);break;case"above":this.addChildAtIndex(o,i,null,e)}}},{key:"detachFromParent",value:function(e,t){var n=this,r=!(1<arguments.length&&void 0!==t)||t,o=null,i=[];o=Array.isArray(e)?((0,d.rangeEach)(e[0],e[2],function(e){var t=n.translateTrimmedRow(e);i.push(n.getDataObject(t))}),(0,d.rangeEach)(0,i.length-2,function(e){n.detachFromParent(i[e],!1)}),i[i.length-1]):e;var a=this.getRowIndex(o),s=this.getRowIndexWithinParent(o),l=this.getRowParent(o),u=this.getRowParent(l),c=this.getRowIndex(u),h=null;this.hot.runHooks("beforeDetachChild",l,o),null!=s&&(this.hot.runHooks("beforeRemoveRow",a,1,[a],this.plugin.pluginName),l.__children.splice(s,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",a,1,[a],this.plugin.pluginName),u?(h=c+this.countChildren(u),this.hot.runHooks("beforeCreateRow",h,1,this.plugin.pluginName),u.__children.push(o)):(h=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",h,1,this.plugin.pluginName),this.data.push(o))),this.rewriteCache(),this.hot.runHooks("afterCreateRow",h,1,this.plugin.pluginName),r&&this.hot.render(),this.hot.runHooks("afterDetachChild",l,o)}},{key:"filterData",value:function(e,t,n){var r=this,o=[];(0,l.arrayEach)(n,function(e){o.push(r.getDataObject(e))}),(0,l.arrayEach)(o,function(e){var t=r.getRowIndexWithinParent(e),n=r.getRowParent(e);null===n?r.data.splice(t,1):n.__children.splice(t,1)}),this.rewriteCache()}},{key:"spliceData",value:function(e,t,n){var r=this.translateTrimmedRow(e);if(null!=r){var o=this.getDataObject(r-1),i=null,a=null;a=o&&o.__children&&0===o.__children.length?(i=o,0):(i=this.getRowParent(r),this.getRowIndexWithinParent(r)),i?n?i.__children.splice(a,t,n):i.__children.splice(a,t):n?this.data.splice(a,t,n):this.data.splice(a,t),this.rewriteCache()}}},{key:"moveRow",value:function(e,t){var n=this.isParent(t),r=this.getRowParent(e),o=this.getRowIndexWithinParent(e),i=this.getRowParent(t);null==i&&(i=this.getRowParent(t-1)),null==i&&(i=this.getDataObject(t-1)),i?i.__children||(i.__children=[]):(i=this.getDataObject(t)).__children=[];var a=this.getRowParent(t-1),s=n?this.countChildren(a):this.getRowIndexWithinParent(t),l=r.__children.slice(o,o+1);r.__children.splice(o,1),i.__children.splice(s,0,l[0])}},{key:"moveCellMeta",value:function(e,t){var n=this.hot.getCellMetaAtRow(e);this.hot.spliceCellsMeta(t,0,n),this.hot.spliceCellsMeta(e+(e<t?0:1),1)}},{key:"translateTrimmedRow",value:function(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.translateTrimmedRow(e):e}}]),r}();t.default=c},function(e,t,n){"use strict";var r=n(0);n(12),n(40),n(30),t.__esModule=!0,t.default=void 0;var s=r(n(36)),i=r(n(1)),o=r(n(2)),a=r(n(7)),l=r(n(6)),u=r(n(8)),c=n(33),h=n(3),d=n(15),f=n(5),v=r(n(174)),g=r(n(377)),p=function(e){function n(e,t){var o;return(0,i.default)(this,n),(o=(0,a.default)(this,(0,l.default)(n).call(this,e,t))).trimRowsPlugin=e.trimRowsPlugin,o.dataManager=o.plugin.dataManager,o.collapsedRows=[],o.collapsedRowsStash={stash:function(){o.lastCollapsedRows=o.collapsedRows.slice(0),o.expandMultipleChildren(o.lastCollapsedRows,!1)},shiftStash:function(e,t){var n=1<arguments.length&&void 0!==t?t:1,r=o.translateTrimmedRow(e);(0,h.arrayEach)(o.lastCollapsedRows,function(e,t){r-1<e&&(o.lastCollapsedRows[t]=e+n)})},applyStash:function(){o.hot.runHooks("skipLengthCache",100),o.collapseMultipleChildren(o.lastCollapsedRows,!0),o.lastCollapsedRows=void 0},trimStash:function(e,t){(0,d.rangeEach)(e,e+t-1,function(e){var t=o.lastCollapsedRows.indexOf(e);-1<t&&o.lastCollapsedRows.splice(t,1)})}},o}return(0,u.default)(n,e),(0,o.default)(n,[{key:"collapseChildren",value:function(e,t,n){var r,o=this,i=!(1<arguments.length&&void 0!==t)||t,a=!(2<arguments.length&&void 0!==n)||n,s=[],l=null,u=null;return u=isNaN(e)?(l=e,this.dataManager.getRowIndex(l)):(l=this.dataManager.getDataObject(e),e),this.dataManager.hasChildren(l)&&(0,h.arrayEach)(l.__children,function(e){s.push(o.dataManager.getRowIndex(e))}),r=this.collapseRows(s,!0,!1),a&&this.trimRowsPlugin.trimRows(r),i&&this.renderAndAdjust(),-1===this.collapsedRows.indexOf(u)&&this.collapsedRows.push(u),r}},{key:"collapseMultipleChildren",value:function(e,t,n){var r=this,o=!(1<arguments.length&&void 0!==t)||t,i=!(2<arguments.length&&void 0!==n)||n,a=[];(0,h.arrayEach)(e,function(e){a.push.apply(a,(0,s.default)(r.collapseChildren(e,!1,!1)))}),i&&this.trimRowsPlugin.trimRows(a),o&&this.renderAndAdjust()}},{key:"collapseRow",value:function(e,t){var n=!(1<arguments.length&&void 0!==t)||t;this.collapseRows([e],n)}},{key:"collapseRows",value:function(e,t,n){var r=this,o=!(1<arguments.length&&void 0!==t)||t,i=2<arguments.length&&void 0!==n&&n,a=[];return(0,h.arrayEach)(e,function(e){a.push(e),o&&r.collapseChildRows(e,a)}),i&&this.trimRowsPlugin.trimRows(a),a}},{key:"collapseChildRows",value:function(e,t,n,r){var o=this,i=1<arguments.length&&void 0!==t?t:[],a=3<arguments.length&&void 0!==r&&r;if(this.dataManager.hasChildren(e)){var s=this.dataManager.getDataObject(e);(0,h.arrayEach)(s.__children,function(e){var t=o.dataManager.getRowIndex(e);i.push(t),o.collapseChildRows(t,i)})}a&&this.trimRowsPlugin.trimRows(i)}},{key:"expandRow",value:function(e,t){var n=!(1<arguments.length&&void 0!==t)||t;this.expandRows([e],n)}},{key:"expandRows",value:function(e,t,n){var r=this,o=!(1<arguments.length&&void 0!==t)||t,i=2<arguments.length&&void 0!==n&&n,a=[];return(0,h.arrayEach)(e,function(e){a.push(e),o&&r.expandChildRows(e,a)}),i&&this.trimRowsPlugin.untrimRows(a),a}},{key:"expandChildRows",value:function(e,t,n,r){var o=this,i=1<arguments.length&&void 0!==t?t:[],a=3<arguments.length&&void 0!==r&&r;if(this.dataManager.hasChildren(e)){var s=this.dataManager.getDataObject(e);(0,h.arrayEach)(s.__children,function(e){if(!o.isAnyParentCollapsed(e)){var t=o.dataManager.getRowIndex(e);i.push(t),o.expandChildRows(t,i)}})}a&&this.trimRowsPlugin.untrimRows(i)}},{key:"expandChildren",value:function(e,t,n){var r,o=this,i=!(1<arguments.length&&void 0!==t)||t,a=!(2<arguments.length&&void 0!==n)||n,s=[],l=null,u=null;return u=isNaN(e)?(l=e,this.dataManager.getRowIndex(e)):(l=this.dataManager.getDataObject(e),e),this.collapsedRows.splice(this.collapsedRows.indexOf(u),1),this.dataManager.hasChildren(l)&&(0,h.arrayEach)(l.__children,function(e){var t=o.dataManager.getRowIndex(e);s.push(t)}),r=this.expandRows(s,!0,!1),a&&this.trimRowsPlugin.untrimRows(r),i&&this.renderAndAdjust(),r}},{key:"expandMultipleChildren",value:function(e,t,n){var r=this,o=!(1<arguments.length&&void 0!==t)||t,i=!(2<arguments.length&&void 0!==n)||n,a=[];(0,h.arrayEach)(e,function(e){a.push.apply(a,(0,s.default)(r.expandChildren(e,!1,!1)))}),i&&this.trimRowsPlugin.untrimRows(a),o&&this.renderAndAdjust()}},{key:"collapseAll",value:function(){var t=this,e=this.hot.getSourceData(),n=[];(0,h.arrayEach)(e,function(e){t.dataManager.hasChildren(e)&&n.push(e)}),this.collapseMultipleChildren(n),this.renderAndAdjust()}},{key:"expandAll",value:function(){var t=this,e=this.hot.getSourceData(),n=[];(0,h.arrayEach)(e,function(e){t.dataManager.hasChildren(e)&&n.push(e)}),this.expandMultipleChildren(n),this.renderAndAdjust()}},{key:"areChildrenCollapsed",value:function(e){var n=this,t=null,r=!0;return t=isNaN(e)?e:this.dataManager.getDataObject(e),this.dataManager.hasChildren(t)&&(0,h.arrayEach)(t.__children,function(e){var t=n.dataManager.getRowIndex(e);if(!n.trimRowsPlugin.isTrimmed(t))return r=!1}),r}},{key:"isAnyParentCollapsed",value:function(e){for(var t=e;null!==t;){t=this.dataManager.getRowParent(t);var n=this.dataManager.getRowIndex(t);if(-1<this.collapsedRows.indexOf(n))return!0}return!1}},{key:"toggleState",value:function(e,t){if(!(0<=t.col)){var n=this.translateTrimmedRow(t.row);(0,f.hasClass)(e.target,g.default.CSS_CLASSES.button)&&(this.areChildrenCollapsed(n)?this.expandChildren(n):this.collapseChildren(n),(0,c.stopImmediatePropagation)(e))}}},{key:"translateTrimmedRow",value:function(e){return this.trimRowsPlugin.rowsMapper.getValueByIndex(e)}},{key:"renderAndAdjust",value:function(){this.hot.render(),this.hot.view.wt.wtOverlays.adjustElementsSize()}}]),n}(v.default);t.default=p},function(e,t,n){"use strict";var r=n(9),o=n(0);n(16),n(30),n(10),n(14),n(24),n(17),t.__esModule=!0,t.default=void 0;var i=o(n(1)),a=o(n(2)),s=o(n(7)),l=o(n(6)),u=o(n(26)),c=o(n(8)),h=n(15),d=n(3),f=r(n(11)),v=o(n(174)),g=new WeakMap,p=function(e){function r(e,t){var n;return(0,i.default)(this,r),n=(0,s.default)(this,(0,l.default)(r).call(this,e,t)),g.set((0,u.default)(n),{row_above:function(e,t){n.dataManager.addSibling(t.start.row,"above")},row_below:function(e,t){n.dataManager.addSibling(t.start.row,"below")}}),n.dataManager=n.plugin.dataManager,n}return(0,c.default)(r,e),(0,a.default)(r,[{key:"appendOptions",value:function(r){var n=this,e=[{key:"add_child",name:function(){return this.getTranslatedPhrase(f.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD)},callback:function(){var e=n.dataManager.translateTrimmedRow(n.hot.getSelectedLast()[0]),t=n.dataManager.getDataObject(e);n.dataManager.addChild(t)},disabled:function(){var e=n.hot.getSelectedLast();return!e||e[0]<0||n.hot.selection.isSelectedByColumnHeader()||n.hot.countRows()>=n.hot.getSettings().maxRows}},{key:"detach_from_parent",name:function(){return this.getTranslatedPhrase(f.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD)},callback:function(){n.dataManager.detachFromParent(n.hot.getSelectedLast())},disabled:function(){var e=n.hot.getSelectedLast(),t=n.dataManager.translateTrimmedRow(e[0]);return!n.dataManager.getRowParent(t)||!e||e[0]<0||n.hot.selection.isSelectedByColumnHeader()||n.hot.countRows()>=n.hot.getSettings().maxRows}},{name:"---------"}];return(0,h.rangeEach)(0,r.items.length-1,function(n){if(0===n)return(0,d.arrayEach)(e,function(e,t){r.items.splice(n+t,0,e)}),!1}),this.modifyRowInsertingOptions(r)}},{key:"modifyRowInsertingOptions",value:function(n){var r=g.get(this);return(0,h.rangeEach)(0,n.items.length-1,function(e){var t=r[n.items[e].key];null!=t&&(n.items[e].callback=t)}),n}}]),r}(v.default);t.default=p},function(e,t,n){},function(e,t,n){"use strict";var r=n(0);n(19),n(53),n(56),n(31),n(12),n(16),n(51),n(30),n(80),n(81),n(10),n(82),n(38),n(14),n(46),n(17),t.__esModule=!0,t.default=void 0;var o=r(n(44)),i=r(n(1)),a=r(n(2)),s=r(n(7)),l=r(n(6)),u=r(n(13)),c=r(n(8)),h=r(n(21)),d=n(5),f=n(15),v=n(3),g=n(20),p=n(83),m=r(n(43)),y=r(n(637)),w=r(n(638));n(639),m.default.getSingleton().register("beforeHideColumns"),m.default.getSingleton().register("afterHideColumns"),m.default.getSingleton().register("beforeUnhideColumns"),m.default.getSingleton().register("afterUnhideColumns");var C=function(e){function n(e){var t;return(0,i.default)(this,n),(t=(0,s.default)(this,(0,l.default)(n).call(this,e))).settings={},t.hiddenColumns=[],t.lastSelectedColumn=-1,t}return(0,c.default)(n,e),(0,a.default)(n,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().hiddenColumns}},{key:"enablePlugin",value:function(){var r=this;this.enabled||(this.hot.hasColHeaders()?this.addHook("afterGetColHeader",function(e,t){return r.onAfterGetColHeader(e,t)}):this.addHook("afterRenderer",function(e,t,n){return r.onAfterGetColHeader(n,e)}),this.addHook("afterContextMenuDefaultOptions",function(e){return r.onAfterContextMenuDefaultOptions(e)}),this.addHook("afterGetCellMeta",function(e,t,n){return r.onAfterGetCellMeta(e,t,n)}),this.addHook("modifyColWidth",function(e,t){return r.onModifyColWidth(e,t)}),this.addHook("beforeSetRangeStartOnly",function(e){return r.onBeforeSetRangeStart(e)}),this.addHook("beforeSetRangeEnd",function(e){return r.onBeforeSetRangeEnd(e)}),this.addHook("hiddenColumn",function(e){return r.isHidden(e)}),this.addHook("beforeStretchingColumnWidth",function(e,t){return r.onBeforeStretchingColumnWidth(e,t)}),this.addHook("afterCreateCol",function(e,t){return r.onAfterCreateCol(e,t)}),this.addHook("afterRemoveCol",function(e,t){return r.onAfterRemoveCol(e,t)}),this.addHook("init",function(){return r.onInit()}),this.hot.view&&this.onInit(),(0,u.default)((0,l.default)(n.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),(0,u.default)((0,l.default)(n.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.settings={},this.hiddenColumns=[],this.lastSelectedColumn=-1,this.hot.render(),(0,u.default)((0,l.default)(n.prototype),"disablePlugin",this).call(this),this.resetCellsMeta()}},{key:"showColumns",value:function(t){var e=this.hiddenColumns,n=this.isColumnDataValid(t),r=e;n&&(r=this.hiddenColumns.filter(function(e){return!1===t.includes(e)})),!1!==this.hot.runHooks("beforeUnhideColumns",e,r,n)&&(n&&(this.hiddenColumns=r),this.hot.runHooks("afterUnhideColumns",e,r,n,n&&r.length<e.length))}},{key:"showColumn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.showColumns(t)}},{key:"hideColumns",value:function(e){var t=this.hiddenColumns,n=this.isColumnDataValid(e),r=t;n&&(r=Array.from(new Set(t.concat(e)))),!1!==this.hot.runHooks("beforeHideColumns",t,r,n)&&(n&&(this.hiddenColumns=r),this.hot.runHooks("afterHideColumns",t,r,n,n&&r.length>t.length))}},{key:"hideColumn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.hideColumns(t)}},{key:"isHidden",value:function(e,t){var n=e;return 1<arguments.length&&void 0!==t&&t||(n=this.hot.toPhysicalColumn(e)),this.hiddenColumns.includes(n)}},{key:"isColumnDataValid",value:function(e){var t=this;return e.every(function(e){return Number.isInteger(e)&&0<=e&&e<t.hot.countCols()})}},{key:"resetCellsMeta",value:function(){(0,v.arrayEach)(this.hot.getCellsMeta(),function(e){e&&(e.skipColumnOnPaste=!1,null!==e.baseRenderer&&(e.renderer=e.baseRenderer,e.baseRenderer=null))})}},{key:"onBeforeStretchingColumnWidth",value:function(e,t){var n=e;return this.isHidden(t)&&(n=0),n}},{key:"onModifyColWidth",value:function(e,t){return this.isHidden(t)?.1:this.settings.indicators&&(this.isHidden(t+1)||this.isHidden(t-1))?e+(this.hot.hasColHeaders()?15:0):void 0}},{key:"onAfterGetCellMeta",value:function(e,t,n){var r=this.hot.runHooks("unmodifyCol",t);if(!1===this.settings.copyPasteEnabled&&this.isHidden(t)&&(n.skipColumnOnPaste=!0),this.isHidden(r)?(n.renderer!==E&&(n.baseRenderer=n.renderer),n.renderer=E):null!==n.baseRenderer&&(n.renderer=n.baseRenderer,n.baseRenderer=null),this.isHidden(n.visualCol-1)){var o=!0,i=n.visualCol-1;n.className=n.className||"",-1===n.className.indexOf("afterHiddenColumn")&&(n.className+=" afterHiddenColumn");do{if(!this.isHidden(i)){o=!1;break}i-=1}while(0<=i);o&&-1===n.className.indexOf("firstVisibleColumn")&&(n.className+=" firstVisibleColumn")}else if(n.className){var a=n.className.split(" ");if(a.length){var s=a.indexOf("afterHiddenColumn");-1<s&&a.splice(s,1);var l=a.indexOf("firstVisibleColumn");-1<l&&a.splice(l,1),n.className=a.join(" ")}}}},{key:"onModifyCopyableRange",value:function(e){function o(e,t,n,r){a.push({startRow:e,endRow:t,startCol:n,endCol:r})}var i=this,a=[];return(0,v.arrayEach)(e,function(t){var n=!0,r=0;(0,f.rangeEach)(t.startCol,t.endCol,function(e){n=i.isHidden(e)?(n||o(t.startRow,t.endRow,r,e-1),!0):(n&&(r=e),e===t.endCol&&o(t.startRow,t.endRow,r,e),!1)})}),a}},{key:"onAfterGetColHeader",value:function(e,t){if(!this.isHidden(e)){var n=!0,r=e-1;do{if(!this.isHidden(r)){n=!1;break}r-=1}while(0<=r);n&&(0,d.addClass)(t,"firstVisibleColumn"),this.settings.indicators&&(this.isHidden(e-1)&&(0,d.addClass)(t,"afterHiddenColumn"),this.isHidden(e+1)&&-1<e&&(0,d.addClass)(t,"beforeHiddenColumn"))}}},{key:"onBeforeSetRangeStart",value:function(e){var o=this;if(!(0<e.col)){e.col=0;e.col=function e(t){var n=t,r=o.hot.toPhysicalColumn(n);return o.isHidden(r,!0)&&(n=e(n+=1)),n}(e.col)}}},{key:"onBeforeSetRangeEnd",value:function(o){var i=this,a=this.hot.countCols();o.col=function e(t){var n=t,r=i.hot.toPhysicalColumn(n);return i.isHidden(r,!0)&&(i.lastSelectedColumn>n||o.col===a-1?0<n?n=e(n-=1):(0,f.rangeEach)(0,i.lastSelectedColumn,function(e){if(!i.isHidden(e))return n=e,!1}):n=e(n+=1)),n}(o.col),this.lastSelectedColumn=o.col}},{key:"onAfterContextMenuDefaultOptions",value:function(e){e.items.push({name:p.SEPARATOR},(0,y.default)(this),(0,w.default)(this))}},{key:"onAfterCreateCol",value:function(n,r){var o=[];(0,v.arrayEach)(this.hiddenColumns,function(e){var t=e;n<=t&&(t+=r),o.push(t)}),this.hiddenColumns=o}},{key:"onAfterRemoveCol",value:function(n,r){var o=[];(0,v.arrayEach)(this.hiddenColumns,function(e){var t=e;n<=t&&(t-=r),o.push(t)}),this.hiddenColumns=o}},{key:"onInit",value:function(){var t=this,e=this.hot.getSettings().hiddenColumns;"object"===(0,o.default)(e)&&(void 0===(this.settings=e).copyPasteEnabled&&(e.copyPasteEnabled=!0),Array.isArray(e.columns)&&this.hideColumns(e.columns),e.copyPasteEnabled||this.addHook("modifyCopyableRange",function(e){return t.onModifyCopyableRange(e)}))}},{key:"destroy",value:function(){(0,u.default)((0,l.default)(n.prototype),"destroy",this).call(this)}}]),n}(h.default);function E(e,t){t.textContent=""}(0,g.registerPlugin)("hiddenColumns",C);var S=C;t.default=S},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.default=function(i){return{key:"hidden_columns_hide",name:function(){var e=this.getSelectedLast(),t=0;if(Array.isArray(e)){var n=(0,a.default)(e,4);n[1]-n[3]!=0&&(t=1)}return this.getTranslatedPhrase(l.CONTEXTMENU_ITEMS_HIDE_COLUMN,t)},callback:function(){var e=this.getSelectedRangeLast(),t=e.from,n=e.to,r=Math.min(t.col,n.col),o=Math.max(t.col,n.col);(0,s.rangeEach)(r,o,function(e){return i.hideColumn(e)}),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},disabled:!1,hidden:function(){return!this.selection.isSelectedByColumnHeader()}}};var a=o(n(18)),s=n(15),l=r(n(11))},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.default=function(s){var l=[],u=[];return{key:"hidden_columns_show",name:function(){var e=this.getSelectedLast(),t=0;if(Array.isArray(e)){var n=(0,c.default)(e,4),r=n[1],o=n[3];if(o<r){var i=[o,r];r=i[0],o=i[1]}var a=0;r===o?a=l.length+u.length:(0,h.rangeEach)(r,o,function(e){s.isHidden(e)&&(a+=1)}),t=a<=1?0:1}return this.getTranslatedPhrase(d.CONTEXTMENU_ITEMS_SHOW_COLUMN,t)},callback:function(){var e=this.getSelectedRangeLast(),t=e.from,n=e.to,r=Math.min(t.col,n.col),o=Math.max(t.col,n.col);r===o?(l.length===r&&(s.showColumns(l),l.length=0),u.length===this.countSourceCols()-(r+1)&&(s.showColumns(u),u.length=0)):(0,h.rangeEach)(r,o,function(e){return s.showColumn(e)}),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},disabled:!1,hidden:function(){if(!s.hiddenColumns.length||!this.selection.isSelectedByColumnHeader())return!0;l.length=0,u.length=0;var e=this.getSelectedRangeLast(),t=e.from,n=e.to,r=Math.min(t.col,n.col),o=Math.max(t.col,n.col),i=!1;if(r===o){var a=this.countSourceCols();(0,h.rangeEach)(0,a,function(e){if(l.length+u.length===s.hiddenColumns.length)return!1;e<r&&s.isHidden(e)?l.push(e):s.isHidden(e)&&u.push(e)}),a-=1,(l.length===r&&0<r||u.length===a-r&&r<a)&&(i=!0)}else(0,h.rangeEach)(r,o,function(e){if(s.isHidden(e))return!(i=!0)});return!i}}};var c=o(n(18)),h=n(15),d=r(n(11))},function(e,t,n){},function(e,t,n){"use strict";var r=n(0);n(19),n(53),n(56),n(31),n(12),n(16),n(51),n(30),n(80),n(81),n(10),n(82),n(38),n(14),n(46),n(17),t.__esModule=!0,t.default=void 0;var o=r(n(44)),i=r(n(1)),a=r(n(2)),s=r(n(7)),l=r(n(6)),u=r(n(13)),c=r(n(8)),h=r(n(21)),d=n(5),f=n(15),v=n(3),g=n(20),p=r(n(43)),m=r(n(641)),y=r(n(642));n(643),p.default.getSingleton().register("beforeHideRows"),p.default.getSingleton().register("afterHideRows"),p.default.getSingleton().register("beforeUnhideRows"),p.default.getSingleton().register("afterUnhideRows");var w=function(e){function n(e){var t;return(0,i.default)(this,n),(t=(0,s.default)(this,(0,l.default)(n).call(this,e))).settings={},t.hiddenRows=[],t.lastSelectedRow=-1,t}return(0,c.default)(n,e),(0,a.default)(n,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().hiddenRows}},{key:"enablePlugin",value:function(){var r=this;this.enabled||(this.hot.hasRowHeaders()?this.addHook("afterGetRowHeader",function(e,t){return r.onAfterGetRowHeader(e,t)}):this.addHook("afterRenderer",function(e,t){return r.onAfterGetRowHeader(t,e)}),this.addHook("afterContextMenuDefaultOptions",function(e){return r.onAfterContextMenuDefaultOptions(e)}),this.addHook("afterGetCellMeta",function(e,t,n){return r.onAfterGetCellMeta(e,t,n)}),this.addHook("modifyRowHeight",function(e,t){return r.onModifyRowHeight(e,t)}),this.addHook("beforeSetRangeStartOnly",function(e){return r.onBeforeSetRangeStartOnly(e)}),this.addHook("beforeSetRangeStart",function(e){return r.onBeforeSetRangeStart(e)}),this.addHook("beforeSetRangeEnd",function(e){return r.onBeforeSetRangeEnd(e)}),this.addHook("hiddenRow",function(e){return r.isHidden(e)}),this.addHook("afterCreateRow",function(e,t){return r.onAfterCreateRow(e,t)}),this.addHook("afterRemoveRow",function(e,t){return r.onAfterRemoveRow(e,t)}),this.addHook("init",function(){return r.onInit()}),this.hot.view&&this.onInit(),(0,u.default)((0,l.default)(n.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.onInit(),(0,u.default)((0,l.default)(n.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.settings={},this.hiddenRows=[],this.lastSelectedRow=-1,(0,u.default)((0,l.default)(n.prototype),"disablePlugin",this).call(this),this.resetCellsMeta()}},{key:"showRows",value:function(e){var t=this,n=this.hiddenRows,r=this.isRowDataValid(e),o=(0,v.arrayMap)(e,function(e){return t.hot.toPhysicalRow(e)}),i=n;r&&(i=this.hiddenRows.filter(function(e){return!1===o.includes(e)})),!1!==this.hot.runHooks("beforeUnhideRows",n,i,r)&&(r&&(this.hiddenRows=i),this.hot.runHooks("afterUnhideRows",n,i,r,r&&i.length<n.length))}},{key:"showRow",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.showRows(t)}},{key:"hideRows",value:function(e){var t=this,n=this.hiddenRows,r=this.isRowDataValid(e),o=(0,v.arrayMap)(e,function(e){return t.hot.toPhysicalRow(e)}),i=n;r&&(i=Array.from(new Set(n.concat(o)))),!1!==this.hot.runHooks("beforeHideRows",n,i,r)&&(r&&(this.hiddenRows=i),this.hot.runHooks("afterHideRows",n,i,r,r&&i.length>n.length))}},{key:"hideRow",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.hideRows(t)}},{key:"isHidden",value:function(e,t){var n=e;return 1<arguments.length&&void 0!==t&&t||(n=this.hot.toPhysicalRow(e)),this.hiddenRows.includes(n)}},{key:"isRowDataValid",value:function(e){var t=this;return e.every(function(e){return Number.isInteger(e)&&0<=e&&e<t.hot.countRows()})}},{key:"resetCellsMeta",value:function(){(0,v.arrayEach)(this.hot.getCellsMeta(),function(e){e&&(e.skipRowOnPaste=!1)})}},{key:"onAfterGetCellMeta",value:function(e,t,n){var r=this.hot.runHooks("unmodifyRow",e);if(!1===this.settings.copyPasteEnabled&&this.isHidden(r)?n.skipRowOnPaste=!0:n.skipRowOnPaste=!1,this.isHidden(r-1)){var o=!0,i=r-1;n.className=n.className||"",-1===n.className.indexOf("afterHiddenRow")&&(n.className+=" afterHiddenRow");do{if(!this.isHidden(i)){o=!1;break}i-=1}while(0<=i);o&&-1===n.className.indexOf("firstVisibleRow")&&(n.className+=" firstVisibleRow")}else if(n.className){var a=n.className.split(" ");if(a.length){var s=a.indexOf("afterHiddenRow");-1<s&&a.splice(s,1);var l=a.indexOf("firstVisibleRow");-1<l&&a.splice(l,1),n.className=a.join(" ")}}}},{key:"onAfterGetRowHeader",value:function(e,t){var n=t.parentNode;n&&(this.isHidden(e)?(0,d.addClass)(n,"hide"):(0,d.removeClass)(n,"hide"));var r=!0,o=e-1;do{if(!this.isHidden(o)){r=!1;break}o-=1}while(0<=o);r&&(0,d.addClass)(t,"firstVisibleRow"),this.settings.indicators&&this.hot.hasRowHeaders()&&(this.isHidden(e-1)&&(0,d.addClass)(t,"afterHiddenRow"),this.isHidden(e+1)&&(0,d.addClass)(t,"beforeHiddenRow"))}},{key:"onModifyRowHeight",value:function(e,t){return this.isHidden(t)?.1:e}},{key:"onModifyCopyableRange",value:function(e){function o(e,t,n,r){a.push({startRow:e,endRow:t,startCol:n,endCol:r})}var i=this,a=[];return(0,v.arrayEach)(e,function(t){var n=!0,r=0;(0,f.rangeEach)(t.startRow,t.endRow,function(e){n=i.isHidden(e)?(n||o(r,e-1,t.startCol,t.endCol),!0):(n&&(r=e),e===t.endRow&&o(r,e,t.startCol,t.endCol),!1)})}),a}},{key:"onBeforeSetRangeStart",value:function(e){var o=this,i=this.hot.getSelectedLast()||!1,a=this.hot.countRows()-1;e.row=function e(t){var n=0,r=t;return i&&(n=r>i[0]?1:-1,o.lastSelectedRow=i[0]),a<r||r<0?o.lastSelectedRow:(o.isHidden(r)&&(r=e(r+n)),r)}(e.row)}},{key:"onBeforeSetRangeStartOnly",value:function(e){var r=this;if(!(0<e.row)){e.row=0;e.row=function e(t){var n=t;return r.isHidden(n)&&(n=e(n+=1)),n}(e.row)}}},{key:"onBeforeSetRangeEnd",value:function(r){var o=this,i=this.hot.countRows();r.row=function e(t){var n=t;return o.isHidden(n)&&(o.lastSelectedRow>n||r.row===i-1?0<n?n=e(n-=1):(0,f.rangeEach)(0,o.lastSelectedRow,function(e){if(!o.isHidden(e))return n=e,!1}):n=e(n+=1)),n}(r.row),this.lastSelectedRow=r.row}},{key:"onAfterContextMenuDefaultOptions",value:function(e){e.items.push({name:"---------"},(0,m.default)(this),(0,y.default)(this))}},{key:"onAfterCreateRow",value:function(n,r){var o=[];(0,v.arrayEach)(this.hiddenRows,function(e){var t=e;n<=t&&(t+=r),o.push(t)}),this.hiddenRows=o}},{key:"onAfterRemoveRow",value:function(n,r){var o=[];(0,v.arrayEach)(this.hiddenRows,function(e){var t=e;n<=t&&(t-=r),o.push(t)}),this.hiddenRows=o}},{key:"onInit",value:function(){var t=this,e=this.hot.getSettings().hiddenRows;"object"===(0,o.default)(e)&&(void 0===(this.settings=e).copyPasteEnabled&&(e.copyPasteEnabled=!0),Array.isArray(e.rows)&&this.hideRows(e.rows),e.copyPasteEnabled||this.addHook("modifyCopyableRange",function(e){return t.onModifyCopyableRange(e)}))}},{key:"destroy",value:function(){(0,u.default)((0,l.default)(n.prototype),"destroy",this).call(this)}}]),n}(h.default);(0,g.registerPlugin)("hiddenRows",w);var C=w;t.default=C},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.default=function(i){return{key:"hidden_rows_hide",name:function(){var e=this.getSelectedLast(),t=0;if(Array.isArray(e)){var n=(0,a.default)(e,3);n[0]-n[2]!=0&&(t=1)}return this.getTranslatedPhrase(l.CONTEXTMENU_ITEMS_HIDE_ROW,t)},callback:function(){var e=this.getSelectedRangeLast(),t=e.from,n=e.to,r=Math.min(t.row,n.row),o=Math.max(t.row,n.row);(0,s.rangeEach)(r,o,function(e){return i.hideRow(e)}),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},disabled:!1,hidden:function(){return!this.selection.isSelectedByRowHeader()}}};var a=o(n(18)),s=n(15),l=r(n(11))},function(e,t,n){"use strict";var r=n(9),o=n(0);t.__esModule=!0,t.default=function(s){var l=[],u=[];return{key:"hidden_rows_show",name:function(){var e=this.getSelectedLast(),t=0;if(Array.isArray(e)){var n=(0,c.default)(e,3),r=n[0],o=n[2];if(o<r){var i=[o,r];r=i[0],o=i[1]}var a=0;r===o?a=l.length+u.length:(0,h.rangeEach)(r,o,function(e){s.isHidden(e)&&(a+=1)}),t=a<=1?0:1}return this.getTranslatedPhrase(d.CONTEXTMENU_ITEMS_SHOW_ROW,t)},callback:function(){var e=this.getSelectedRangeLast(),t=e.from,n=e.to,r=Math.min(t.row,n.row),o=Math.max(t.row,n.row);r===o?(l.length===r&&(s.showRows(l),l.length=0),u.length===this.countSourceRows()-(r+1)&&(s.showRows(u),u.length=0)):(0,h.rangeEach)(r,o,function(e){return s.showRow(e)}),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},disabled:!1,hidden:function(){if(!s.hiddenRows.length||!this.selection.isSelectedByRowHeader())return!0;l.length=0,u.length=0;var e=this.getSelectedRangeLast(),t=e.from,n=e.to,r=Math.min(t.row,n.row),o=Math.max(t.row,n.row),i=!1;if(r===o){var a=this.countSourceRows();(0,h.rangeEach)(0,a,function(e){if(l.length+u.length===s.hiddenRows.length)return!1;e<r?s.isHidden(e)&&l.push(e):s.isHidden(e)&&u.push(e)}),a-=1,(l.length===r&&0<r||u.length===a-r&&r<a)&&(i=!0)}else(0,h.rangeEach)(r,o,function(e){if(s.isHidden(e))return!(i=!0)});return!i}}};var c=o(n(18)),h=n(15),d=r(n(11))},function(e,t,n){},function(e,t,n){"use strict";var r=n(0);n(19),n(53),n(56),n(31),n(16),n(80),n(81),n(10),n(82),n(38),n(14),n(17),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(7)),s=r(n(26)),l=r(n(6)),u=r(n(13)),c=r(n(8)),h=r(n(21)),d=n(15),f=n(20),v=r(n(645)),g=n(3),p=function(e){function n(e){var t;return(0,o.default)(this,n),(t=(0,a.default)(this,(0,l.default)(n).call(this,e))).trimmedRows=[],t.removedRows=[],t.rowsMapper=new v.default((0,s.default)(t)),t}return(0,c.default)(n,e),(0,i.default)(n,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().trimRows}},{key:"enablePlugin",value:function(){var r=this;if(!this.enabled){var e=this.hot.getSettings().trimRows;Array.isArray(e)&&(this.trimmedRows=e),this.rowsMapper.createMap(this.hot.countSourceRows()),this.addHook("modifyRow",function(e,t){return r.onModifyRow(e,t)}),this.addHook("unmodifyRow",function(e,t){return r.onUnmodifyRow(e,t)}),this.addHook("beforeCreateRow",function(e,t,n){return r.onBeforeCreateRow(e,t,n)}),this.addHook("afterCreateRow",function(e,t){return r.onAfterCreateRow(e,t)}),this.addHook("beforeRemoveRow",function(e,t){return r.onBeforeRemoveRow(e,t)}),this.addHook("afterRemoveRow",function(){return r.onAfterRemoveRow()}),this.addHook("afterLoadData",function(e){return r.onAfterLoadData(e)}),(0,u.default)((0,l.default)(n.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){var e=this.hot.getSettings().trimRows;Array.isArray(e)&&(this.disablePlugin(),this.enablePlugin()),(0,u.default)((0,l.default)(n.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.trimmedRows=[],this.removedRows.length=0,this.rowsMapper.clearMap(),(0,u.default)((0,l.default)(n.prototype),"disablePlugin",this).call(this)}},{key:"trimRows",value:function(e){var t=this.trimmedRows,n=this.isValidConfig(e),r=t;n&&(r=Array.from(new Set(t.concat(e)))),!1!==this.hot.runHooks("beforeTrimRow",t,r,n)&&(n&&(this.trimmedRows=r,this.hot.runHooks("skipLengthCache",100),this.rowsMapper.createMap(this.hot.countSourceRows())),this.hot.runHooks("afterTrimRow",t,r,n,n&&r.length>t.length))}},{key:"trimRow",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.trimRows(t)}},{key:"untrimRows",value:function(t){var e=this.trimmedRows,n=this.isValidConfig(t),r=e;n&&(r=this.trimmedRows.filter(function(e){return!1===t.includes(e)})),!1!==this.hot.runHooks("beforeUntrimRow",e,r,n)&&(n&&(this.trimmedRows=r,this.hot.runHooks("skipLengthCache",100),this.rowsMapper.createMap(this.hot.countSourceRows())),this.hot.runHooks("afterUntrimRow",e,r,n,n&&r.length<e.length))}},{key:"untrimRow",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.untrimRows(t)}},{key:"isTrimmed",value:function(e){return this.trimmedRows.includes(e)}},{key:"untrimAll",value:function(){this.untrimRows([].concat(this.trimmedRows))}},{key:"isValidConfig",value:function(e){var t=this;return e.every(function(e){return Number.isInteger(e)&&0<=e&&e<t.hot.countSourceRows()})}},{key:"onModifyRow",value:function(e,t){var n=e;return t!==this.pluginName&&(n=this.rowsMapper.getValueByIndex(n)),n}},{key:"onUnmodifyRow",value:function(e,t){var n=e;return t!==this.pluginName&&(n=this.rowsMapper.getIndexByValue(n)),n}},{key:"onBeforeCreateRow",value:function(e,t,n){if(this.isEnabled()&&0<this.trimmedRows.length&&"auto"===n)return!1}},{key:"onAfterCreateRow",value:function(t,n){var r=this;this.rowsMapper.shiftItems(t,n),this.trimmedRows=(0,g.arrayMap)(this.trimmedRows,function(e){return e>=r.rowsMapper.getValueByIndex(t)?e+n:e})}},{key:"onBeforeRemoveRow",value:function(e,t){var n=this;this.removedRows.length=0,!1!==e&&(0,d.rangeEach)(e,e+t-1,function(e){n.removedRows.push(n.hot.runHooks("modifyRow",e,n.pluginName))})}},{key:"onAfterRemoveRow",value:function(){var e=this;this.rowsMapper.unshiftItems(this.removedRows),this.trimmedRows=(0,g.arrayMap)(this.trimmedRows,function(t){return t-e.removedRows.filter(function(e){return e<t}).length})}},{key:"onAfterLoadData",value:function(e){e||this.rowsMapper.createMap(this.hot.countSourceRows())}},{key:"destroy",value:function(){this.rowsMapper.destroy(),(0,u.default)((0,l.default)(n.prototype),"destroy",this).call(this)}}]),n}(h.default);(0,f.registerPlugin)("trimRows",p);var m=p;t.default=m},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(92)),s=n(4),l=n(15),u=function(){function t(e){(0,o.default)(this,t),this.trimRows=e}return(0,i.default)(t,[{key:"createMap",value:function(e){var t=this,n=0,r=void 0===e?this._arrayMap.length:e;(this._arrayMap.length=0,l.rangeEach)(r-1,function(e){t.trimRows.isTrimmed(e)?n+=1:t._arrayMap[e-n]=e})}},{key:"destroy",value:function(){this._arrayMap=null}}]),t}();(0,s.mixin)(u,a.default);var c=u;t.default=c}],o.c=a,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=378)).default;function o(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var n,a});