Created
January 8, 2020 17:03
-
-
Save aninde/d78aa1e84304254cda4629f7b5673d40 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*! | |
| * 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.2.2 | |
| * Release date: 23/10/2019 (built at 08/01/2020 17:58:03) | |
| */ | |
| !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 function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=406)}([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 n(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,r){return t&&n(e.prototype,t),r&&n(e,r),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(17),n(52),n(15),n(12),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 e>t?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){if(!e.length)return 0;return i(e)/e.length},t.arrayFlatten=function e(t){return r(t,(function(t,n){return t.concat(Array.isArray(n)?e(n):n)}),[])},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(9),n(39),n(53),t.__esModule=!0,t.duckSchema=function e(t){var n;Array.isArray(t)?n=[]:(n={},u(t,(function(t,r){"__children"!==r&&(t&&"object"===(0,i.default)(t)&&!Array.isArray(t)?n[r]=e(t):Array.isArray(t)?t.length&&"object"===(0,i.default)(t[0])&&!Array.isArray(t[0])?n[r]=[e(t[0])]:n[r]=[]:n[r]=null)})));return n},t.inherit=function(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e},t.extend=function(e,t){return u(t,(function(t,n){e[n]=t})),e},t.deepExtend=function e(t,n){u(n,(function(r,o){n[o]&&"object"===(0,i.default)(n[o])?(t[o]||(Array.isArray(n[o])?t[o]=[]:"[object Date]"===Object.prototype.toString.call(n[o])?t[o]=n[o]:t[o]={}),e(t[o],n[o])):t[o]=n[o]}))},t.deepClone=s,t.clone=function(e){var t={};return u(e,(function(e,n){t[n]=e})),t},t.mixin=function(e){e.MIXINS||(e.MIXINS=[]);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return(0,a.arrayEach)(n,(function(t){e.MIXINS.push(t.MIXIN_NAME),u(t,(function(t,n){if(void 0!==e.prototype[n])throw new Error("Mixin conflict. Property '".concat(n,"' already exist and cannot be overwritten."));if("function"==typeof t)e.prototype[n]=t;else{Object.defineProperty(e.prototype,n,{get:(r=n,o=t,i="_".concat(r),function(){var e;return void 0===this[i]&&(this[i]=(e=o,(Array.isArray(e)||l(e))&&(e=s(e)),e)),this[i]}),set:function(e){var t="_".concat(e);return function(e){this[t]=e}}(n),configurable:!0})}var r,o,i}))})),e},t.isObjectEqual=function(e,t){return JSON.stringify(e)===JSON.stringify(t)},t.isObject=l,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=u,t.getProperty=function(e,t){var n=t.split("."),r=e;return u(n,(function(e){if(void 0===(r=r[e]))return r=void 0,!1})),r},t.deepObjectSize=function(e){if(!l(e))return 0;return function e(t){var n=0;return l(t)?u(t,(function(t){n+=e(t)})):n+=1,n}(e)},t.createObjectPropListener=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value",r="_".concat(n),i=(t={_touched:!1},(0,o.default)(t,r,e),(0,o.default)(t,"isTouched",(function(){return this._touched})),t);return Object.defineProperty(i,n,{get:function(){return this[r]},set:function(e){this._touched=!0,this[r]=e},enumerable:!0,configurable:!0}),i},t.hasOwnProperty=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o=r(n(75)),i=r(n(46)),a=n(3);function s(e){return"object"===(0,i.default)(e)?JSON.parse(JSON.stringify(e)):e}function l(e){return"[object Object]"===Object.prototype.toString.call(e)}function u(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){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(46),o=n(30);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){var r=n(216);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,n){"use strict";var r=n(0);n(17),n(41),n(27),n(15),n(48),n(31),n(167),n(9),n(112),n(39),n(35),n(42),n(53),n(137),t.__esModule=!0,t.getParent=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1,r=null,o=e;for(;null!==o;){if(n===t){r=o;break}o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o=o.host:(n+=1,o=o.parentNode)}return r},t.getFrameElement=c,t.getParentWindow=function(e){return c(e)&&e.parent},t.hasAccessToParentWindow=function(e){return!!Object.getPrototypeOf(e.parent)},t.closest=h,t.closestDown=function(e,t,n){var r=[],o=e;for(;o&&(o=h(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=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(t),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):r.push(t);for(;null!==n;){if(r.indexOf(n)>-1)return!0;n=n.parentNode}return!1},t.isChildOfWebComponentTable=function(e){var t="hot-table",n=!1,r=d(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=d,t.polymerUnwrap=f,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(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(t.nodeName)>-1)for(var r=t.childNodes,o=r.length-1;o>=0;o--)e(r[o],t)},t.empty=m,t.fastInnerHTML=function(e,t){w.test(t)?e.innerHTML=t:C(e,t)},t.fastInnerText=C,t.isVisible=function e(t){var n=t.ownerDocument.documentElement,r=t;for(;f(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,u.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=E,t.getWindowScrollLeft=S,t.getScrollTop=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return E(t);return e.scrollTop},t.getScrollLeft=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return S(t);return e.scrollLeft},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,u.isGetComputedStyleSupported)(),i=e.parentNode;for(;i&&i.style&&t.body!==i;){var a=i.style,s=a.overflow,l=a.overflowX,c=a.overflowY;if([s,l,c].includes("scroll"))return i;if(o){var h=n.getComputedStyle(i);if(s=h.overflow,l=h.overflowX,c=h.overflowY,r.includes(s)||r.includes(l)||r.includes(c))return i}if(i.clientHeight<=i.scrollHeight+1&&(r.includes(c)||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=b(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=arguments.length>2&&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=b(e,n);if(""!==o[t]&&void 0!==o[t])return o[t]},t.matchesCSSRules=function(e,t){var n=t.selectorText,r=!1;t.type===CSSRule.STYLE_RULE&&n&&(e.msMatchesSelector?r=e.msMatchesSelector(n):e.matches&&(r=e.matches(n)));return r},t.getComputedStyle=b,t.outerWidth=function(e){return e.offsetWidth},t.outerHeight=function(e){if((0,u.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=arguments.length>0&&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=arguments.length>0&&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(e,t,n){void 0===n&&(n=t);if(e.setSelectionRange){e.focus();try{e.setSelectionRange(t,n)}catch(i){var r=e.parentNode,o=r.style.display;r.style.display="block",e.setSelectionRange(t,n),r.style.display=o}}else if(e.createTextRange){var i=e.createTextRange();i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",t),i.select()}},t.getScrollbarWidth=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;void 0===y&&(y=function(){var e=arguments.length>0&&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 y},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=R,t.isOutsideInput=T,t.selectElementIfAllowed=function(e){T(e.ownerDocument.activeElement)||e.select()},t.HTML_CHARACTERS=void 0;var o,i,a,s=r(n(33)),l=n(76),u=n(81);function c(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function h(e,t,n){for(var r=e;null!==r&&r!==n;){if(r.nodeType===Node.ELEMENT_NODE&&(t.indexOf(r.nodeName)>-1||t.indexOf(r)>-1))return r;r=r.host&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r.host:r.parentNode}return null}function d(e){return"undefined"!=typeof Polymer&&"function"==typeof wrap?wrap(e):e}function f(e){return"undefined"!=typeof Polymer&&"function"==typeof unwrap?unwrap(e):e}function v(e){return e&&e.length?e.filter((function(e){return!!e})):[]}if((0,u.isClassListSupported)()){var g=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(" ")),(o=v(o)).length>0)if(g(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;if("string"==typeof r&&(r=r.split(" ")),(r=v(r)).length>0)if(g)(n=e.classList).remove.apply(n,(0,s.default)(r));else for(var o=0;r&&r[o];)e.classList.remove(r[o]),o+=1}}else{var p=function(e){return new RegExp("(\\s|^)".concat(e,"(\\s|$)"))};o=function(e,t){return void 0!==e.className&&p(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];)p(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(p(o[n])," ").trim(),n+=1;e.className!==r&&(e.className=r)}}function m(e){for(var t;t=e.lastChild;)e.removeChild(t)}var y,w=/(<(.*)>|&(.*);)/;function C(e,t){var n=e.firstChild;n&&3===n.nodeType&&null===n.nextSibling?u.isTextContentSupported?n.textContent=t:n.data=t:(m(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function E(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.scrollY;return void 0===t&&(t=e.document.documentElement.scrollTop),t}function S(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.scrollX;return void 0===t&&(t=e.document.documentElement.scrollLeft),t}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}function R(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function T(e){return R(e)&&-1===e.className.indexOf("handsontableInput")&&-1===e.className.indexOf("HandsontableCopyPaste")}t.HTML_CHARACTERS=w},function(e,t,n){var r=n(74),o=n(416),i=Object.prototype;o!==i.toString&&r(i,"toString",o,{unsafe:!0})},function(e,t){function n(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return n=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;var t=n();if(t&&t.has(e))return t.get(e);var r={};if(null!=e){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}}return r.default=e,t&&t.set(e,r),r}},function(e,t,n){"use strict";var r=n(67),o=n(102),i=n(104),a=n(88),s=n(151),l=a.set,u=a.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){l(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=u(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value: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){"use strict";var r=n(153).charAt,o=n(88),i=n(151),a=o.set,s=o.getterFor("String Iterator");i(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=s(this),n=t.string,o=t.index;return o>=n.length?{value:void 0,done:!0}:(e=r(n,o),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){var r=n(38),o=n(210),i=n(11),a=n(68),s=n(37),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){"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;t.CONTEXT_MENU_ITEMS_NAMESPACE="ContextMenu:items";var r="".concat("ContextMenu:items",".noItems");t.CONTEXTMENU_ITEMS_NO_ITEMS=r;var o="".concat("ContextMenu:items",".insertRowAbove");t.CONTEXTMENU_ITEMS_ROW_ABOVE=o;var i="".concat("ContextMenu:items",".insertRowBelow");t.CONTEXTMENU_ITEMS_ROW_BELOW=i;var a="".concat("ContextMenu:items",".insertColumnOnTheLeft");t.CONTEXTMENU_ITEMS_INSERT_LEFT=a;var s="".concat("ContextMenu:items",".insertColumnOnTheRight");t.CONTEXTMENU_ITEMS_INSERT_RIGHT=s;var l="".concat("ContextMenu:items",".removeRow");t.CONTEXTMENU_ITEMS_REMOVE_ROW=l;var u="".concat("ContextMenu:items",".removeColumn");t.CONTEXTMENU_ITEMS_REMOVE_COLUMN=u;var c="".concat("ContextMenu:items",".undo");t.CONTEXTMENU_ITEMS_UNDO=c;var h="".concat("ContextMenu:items",".redo");t.CONTEXTMENU_ITEMS_REDO=h;var d="".concat("ContextMenu:items",".readOnly");t.CONTEXTMENU_ITEMS_READ_ONLY=d;var f="".concat("ContextMenu:items",".clearColumn");t.CONTEXTMENU_ITEMS_CLEAR_COLUMN=f;var v="".concat("ContextMenu:items",".copy");t.CONTEXTMENU_ITEMS_COPY=v;var g="".concat("ContextMenu:items",".cut");t.CONTEXTMENU_ITEMS_CUT=g;var p="".concat("ContextMenu:items",".freezeColumn");t.CONTEXTMENU_ITEMS_FREEZE_COLUMN=p;var m="".concat("ContextMenu:items",".unfreezeColumn");t.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN=m;var y="".concat("ContextMenu:items",".mergeCells");t.CONTEXTMENU_ITEMS_MERGE_CELLS=y;var w="".concat("ContextMenu:items",".unmergeCells");t.CONTEXTMENU_ITEMS_UNMERGE_CELLS=w;var C="".concat("ContextMenu:items",".addComment");t.CONTEXTMENU_ITEMS_ADD_COMMENT=C;var E="".concat("ContextMenu:items",".editComment");t.CONTEXTMENU_ITEMS_EDIT_COMMENT=E;var S="".concat("ContextMenu:items",".removeComment");t.CONTEXTMENU_ITEMS_REMOVE_COMMENT=S;var b="".concat("ContextMenu:items",".readOnlyComment");t.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT=b;var R="".concat("ContextMenu:items",".align");t.CONTEXTMENU_ITEMS_ALIGNMENT=R;var T="".concat("ContextMenu:items",".align.left");t.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT=T;var M="".concat("ContextMenu:items",".align.center");t.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER=M;var O="".concat("ContextMenu:items",".align.right");t.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT=O;var k="".concat("ContextMenu:items",".align.justify");t.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY=k;var N="".concat("ContextMenu:items",".align.top");t.CONTEXTMENU_ITEMS_ALIGNMENT_TOP=N;var _="".concat("ContextMenu:items",".align.middle");t.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE=_;var A="".concat("ContextMenu:items",".align.bottom");t.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM=A;var I="".concat("ContextMenu:items",".borders");t.CONTEXTMENU_ITEMS_BORDERS=I;var D="".concat("ContextMenu:items",".borders.top");t.CONTEXTMENU_ITEMS_BORDERS_TOP=D;var L="".concat("ContextMenu:items",".borders.right");t.CONTEXTMENU_ITEMS_BORDERS_RIGHT=L;var x="".concat("ContextMenu:items",".borders.bottom");t.CONTEXTMENU_ITEMS_BORDERS_BOTTOM=x;var H="".concat("ContextMenu:items",".borders.left");t.CONTEXTMENU_ITEMS_BORDERS_LEFT=H;var P="".concat("ContextMenu:items",".borders.remove");t.CONTEXTMENU_ITEMS_REMOVE_BORDERS=P;var F="".concat("ContextMenu:items",".nestedHeaders.insertChildRow");t.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD=F;var B="".concat("ContextMenu:items",".nestedHeaders.detachFromParent");t.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD=B;var V="".concat("ContextMenu:items",".hideColumn");t.CONTEXTMENU_ITEMS_HIDE_COLUMN=V;var W="".concat("ContextMenu:items",".showColumn");t.CONTEXTMENU_ITEMS_SHOW_COLUMN=W;var U="".concat("ContextMenu:items",".hideRow");t.CONTEXTMENU_ITEMS_HIDE_ROW=U;var Y="".concat("ContextMenu:items",".showRow");t.CONTEXTMENU_ITEMS_SHOW_ROW=Y;t.FILTERS_NAMESPACE="Filters:";var j="".concat("Filters:","conditions");t.FILTERS_CONDITIONS_NAMESPACE=j;var z="".concat(j,".none");t.FILTERS_CONDITIONS_NONE=z;var G="".concat(j,".isEmpty");t.FILTERS_CONDITIONS_EMPTY=G;var X="".concat(j,".isNotEmpty");t.FILTERS_CONDITIONS_NOT_EMPTY=X;var K="".concat(j,".isEqualTo");t.FILTERS_CONDITIONS_EQUAL=K;var q="".concat(j,".isNotEqualTo");t.FILTERS_CONDITIONS_NOT_EQUAL=q;var $="".concat(j,".beginsWith");t.FILTERS_CONDITIONS_BEGINS_WITH=$;var Q="".concat(j,".endsWith");t.FILTERS_CONDITIONS_ENDS_WITH=Q;var Z="".concat(j,".contains");t.FILTERS_CONDITIONS_CONTAINS=Z;var J="".concat(j,".doesNotContain");t.FILTERS_CONDITIONS_NOT_CONTAIN=J;var ee="".concat(j,".byValue");t.FILTERS_CONDITIONS_BY_VALUE=ee;var te="".concat(j,".greaterThan");t.FILTERS_CONDITIONS_GREATER_THAN=te;var ne="".concat(j,".greaterThanOrEqualTo");t.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL=ne;var re="".concat(j,".lessThan");t.FILTERS_CONDITIONS_LESS_THAN=re;var oe="".concat(j,".lessThanOrEqualTo");t.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL=oe;var ie="".concat(j,".isBetween");t.FILTERS_CONDITIONS_BETWEEN=ie;var ae="".concat(j,".isNotBetween");t.FILTERS_CONDITIONS_NOT_BETWEEN=ae;var se="".concat(j,".after");t.FILTERS_CONDITIONS_AFTER=se;var le="".concat(j,".before");t.FILTERS_CONDITIONS_BEFORE=le;var ue="".concat(j,".today");t.FILTERS_CONDITIONS_TODAY=ue;var ce="".concat(j,".tomorrow");t.FILTERS_CONDITIONS_TOMORROW=ce;var he="".concat(j,".yesterday");t.FILTERS_CONDITIONS_YESTERDAY=he;var de="".concat("Filters:","labels.filterByCondition");t.FILTERS_DIVS_FILTER_BY_CONDITION=de;var fe="".concat("Filters:","labels.filterByValue");t.FILTERS_DIVS_FILTER_BY_VALUE=fe;var ve="".concat("Filters:","labels.conjunction");t.FILTERS_LABELS_CONJUNCTION=ve;var ge="".concat("Filters:","labels.disjunction");t.FILTERS_LABELS_DISJUNCTION=ge;var pe="".concat("Filters:","values.blankCells");t.FILTERS_VALUES_BLANK_CELLS=pe;var me="".concat("Filters:","buttons.selectAll");t.FILTERS_BUTTONS_SELECT_ALL=me;var ye="".concat("Filters:","buttons.clear");t.FILTERS_BUTTONS_CLEAR=ye;var we="".concat("Filters:","buttons.ok");t.FILTERS_BUTTONS_OK=we;var Ce="".concat("Filters:","buttons.cancel");t.FILTERS_BUTTONS_CANCEL=Ce;var Ee="".concat("Filters:","buttons.placeholder.search");t.FILTERS_BUTTONS_PLACEHOLDER_SEARCH=Ee;var Se="".concat("Filters:","buttons.placeholder.value");t.FILTERS_BUTTONS_PLACEHOLDER_VALUE=Se;var be="".concat("Filters:","buttons.placeholder.secondValue");t.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE=be},function(e,t,n){"use strict";var r=n(21),o=n(148).indexOf,i=n(107),a=[].indexOf,s=!!a&&1/[1].indexOf(1,-0)<0,l=i("indexOf");r({target:"Array",proto:!0,forced:s||l},{indexOf:function(e){return s?a.apply(this,arguments)||0:o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(459);function o(t,n,i){return"undefined"!=typeof Reflect&&Reflect.get?e.exports=o=Reflect.get:e.exports=o=function(e,t,n){var o=r(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(n):i.value}},o(t,n,i||t)}e.exports=o},function(e,t,n){"use strict";var r=n(21),o=n(28),i=n(106),a=n(44),s=n(62),l=n(51),u=n(108),c=n(159),h=n(109),d=n(37)("isConcatSpreadable"),f=!o((function(){var e=[];return e[d]=!1,e.concat()[0]!==e})),v=h("concat"),g=function(e){if(!a(e))return!1;var t=e[d];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,forced:!f||!v},{concat:function(e){var t,n,r,o,i,a=s(this),h=c(a,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(i=-1===t?a:arguments[t],g(i)){if(d+(o=l(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<o;n++,d++)n in i&&u(h,d,i[n])}else{if(d>=9007199254740991)throw TypeError("Maximum allowed index exceeded");u(h,d++,i)}return h.length=d,h}})},function(e,t,n){var r=n(223),o=n(424),i=n(224);e.exports=function(e,t){return r(e)||o(e,t)||i()}},function(e,t,n){"use strict";var r=n(0);n(9),n(39),n(42),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(46))},function(e,t,n){"use strict";var r=n(0);n(11),n(65),n(9),n(12),n(23),n(13),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);if(!s.has(e)||!s.get(e)[n])return;return s.get(e)[n]},t.getRegistredPluginNames=function(e){return s.has(e)?Object.keys(s.get(e)):[]},t.getPluginName=function(e,t){var n=null;s.has(e)&&(0,i.objectEach)(s.get(e),(function(e,r){e===t&&(n=r)}));return n};var o=r(n(45)),i=n(4),a=n(77),s=new WeakMap},function(e,t,n){var r=n(38),o=n(93).f,i=n(68),a=n(74),s=n(147),l=n(194),u=n(130);e.exports=function(e,t){var n,c,h,d,f,v=e.target,g=e.global,p=e.stat;if(n=g?r:p?r[v]||s(v,{}):(r[v]||{}).prototype)for(c in t){if(d=t[c],h=e.noTargetGet?(f=o(n,c))&&f.value:n[c],!u(g?c:v+(p?".":"#")+c,e.forced)&&void 0!==h){if(typeof d==typeof h)continue;l(d,h)}(e.sham||h&&h.sham)&&i(d,"sham",!0),a(n,c,d,e)}}},function(e,t,n){"use strict";var r=n(0);n(15),n(11),n(34),n(9),n(12),n(23),n(13),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(4),s=n(3),l=n(20),u=new WeakMap,c=null,h=function(){function e(t){var n=this;(0,o.default)(this,e),(0,a.defineGetter)(this,"hot",t,{writable:!1}),u.set(this,{hooks:{}}),c=null,this.pluginName=null,this.pluginsInitializedCallbacks=[],this.isPluginsReady=!1,this.enabled=!1,this.initialized=!1,this.hot.addHook("afterPluginsInitialized",(function(){return n.onAfterPluginsInitialized()})),this.hot.addHook("afterUpdateSettings",(function(e){return n.onUpdateSettings(e)})),this.hot.addHook("beforeInit",(function(){return n.init()}))}return(0,i.default)(e,[{key:"init",value:function(){this.pluginName=(0,l.getPluginName)(this.hot,this),this.isEnabled&&this.isEnabled()&&this.enablePlugin(),c||(c=(0,l.getRegistredPluginNames)(this.hot)),c.indexOf(this.pluginName)>=0&&c.splice(c.indexOf(this.pluginName),1),c.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){u.get(this).hooks[e]=u.get(this).hooks[e]||[];var n=u.get(this).hooks[e];this.hot.addHook(e,t),n.push(t),u.get(this).hooks[e]=n}},{key:"removeHooks",value:function(e){var t=this;(0,s.arrayEach)(u.get(this).hooks[e]||[],(function(n){t.hot.removeHook(e,n)}))}},{key:"clearHooks",value:function(){var e=this,t=u.get(this).hooks;(0,a.objectEach)(t,(function(t,n){return e.removeHooks(n)})),t.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 e=this;this.eventManager&&this.eventManager.destroy(),this.clearHooks(),(0,a.objectEach)(this,(function(t,n){"hot"!==n&&(e[n]=null)})),delete this.t,delete this.hot}}]),e}();t.default=h},function(e,t,n){"use strict";var r,o=n(38),i=n(154),a=n(133),s=n(134),l=n(209),u=n(44),c=n(88).enforce,h=n(193),d=!o.ActiveXObject&&"ActiveXObject"in o,f=Object.isExtensible,v=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},g=e.exports=s("WeakMap",v,l,!0,!0);if(h&&d){r=l.getConstructor(v,"WeakMap",!0),a.REQUIRED=!0;var p=g.prototype,m=p.delete,y=p.has,w=p.get,C=p.set;i(p,{delete:function(e){if(u(e)&&!f(e)){var t=c(this);return t.frozen||(t.frozen=new r),m.call(this,e)||t.frozen.delete(e)}return m.call(this,e)},has:function(e){if(u(e)&&!f(e)){var t=c(this);return t.frozen||(t.frozen=new r),y.call(this,e)||t.frozen.has(e)}return y.call(this,e)},get:function(e){if(u(e)&&!f(e)){var t=c(this);return t.frozen||(t.frozen=new r),y.call(this,e)?w.call(this,e):t.frozen.get(e)}return w.call(this,e)},set:function(e,t){if(u(e)&&!f(e)){var n=c(this);n.frozen||(n.frozen=new r),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);n(9),n(39),n(433),n(228),n(42),n(53),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=v,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="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,a.default)("23/10/2019","DD/MM/YYYY"),c=Math.floor(u.toDate().getTime()/864e5),h=S(e);if(n=(0,a.default)(864e5*(h+1),"x").format("MMMM DD, YYYY"),c>h){var d=(0,a.default)().diff(u,"days");i=d<=1?"valid":"expired",s=d<=15?"valid":"expired"}else i="valid",s="valid"}else o?(i="non_commercial",s="valid"):(i="invalid",s="invalid");else i="missing",s="missing";b()&&(i="valid",s="valid");if(!R&&"valid"!==i){T[i]({keyValidityDate:n,hotVersion:"7.2.2"})&&console["non_commercial"===i?"info":"warn"](T[i]({keyValidityDate:n,hotVersion:"7.2.2"})),R=!0}if("valid"!==s&&t.parentNode){if(M[s]({keyValidityDate:n,hotVersion:"7.2.2"})){var f=document.createElement("div");f.id="hot-display-license-info",f.innerHTML=M[s]({keyValidityDate:n,hotVersion:"7.2.2"}),t.parentNode.insertBefore(f,t.nextSibling)}}};var o=r(n(70)),i=r(n(46)),a=r(n(64)),s=n(71);function l(){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:[email protected]">[email protected]</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:[email protected]">[email protected]</a>.']);return l=function(){return e},e}function u(){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:[email protected]">[email protected]</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:[email protected]">[email protected]</a>.']);return u=function(){return e},e}function c(){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:[email protected]">[email protected]</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:[email protected]">[email protected]</a>.']);return c=function(){return e},e}function h(){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 [email protected]."],["\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 [email protected]."]);return h=function(){return e},e}function d(){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 [email protected]."],["\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 [email protected]."]);return d=function(){return e},e}function f(){var e=(0,o.default)(["\n The license key for Handsontable is invalid. \n If you need any help, contact us at [email protected]."],["\n The license key for Handsontable is invalid.\\x20\n If you need any help, contact us at [email protected]."]);return f=function(){return e},e}function v(e){return void 0===e}function g(e){return null===e||""===e||v(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,s.toSingleLine)(f())},expired:function(e){var t=e.keyValidityDate,n=e.hotVersion;return(0,s.toSingleLine)(d(),t,n,t)},missing:function(){return(0,s.toSingleLine)(h())},non_commercial:function(){return""}},M={invalid:function(){return(0,s.toSingleLine)(c())},expired:function(e){var t=e.keyValidityDate,n=e.hotVersion;return(0,s.toSingleLine)(u(),t,n,t)},missing:function(){return(0,s.toSingleLine)(l())},non_commercial:function(){return""}}},function(e,t,n){"use strict";var r=n(0);n(34),t.__esModule=!0,t.getListenersCounter=function(){return c},t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(8),s=n(4),l=n(81),u=n(32),c=0,h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,o.default)(this,e),this.context=t||this,this.context.eventListeners||(this.context.eventListeners=[])}return(0,i.default)(e,[{key:"addEventListener",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.context;function a(e){n.call(this,d(i,e))}return"boolean"==typeof o||(0,l.isPassiveEventSupported)()||(o=!1),this.context.eventListeners.push({element:e,event:t,callback:n,callbackProxy:a,options:o,eventManager:this}),e.addEventListener(t,a,o),c+=1,function(){r.removeEventListener(e,t,n)}}},{key:"removeEventListener",value:function(e,t,n){for(var r,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.context.eventListeners.length;i;)if(i-=1,(r=this.context.eventListeners[i]).event===t&&r.element===e){if(n&&n!==r.callback)continue;if(o&&r.eventManager!==this)continue;this.context.eventListeners.splice(i,1),r.element.removeEventListener(r.event,r.callbackProxy,r.options),c-=1}}},{key:"clearEvents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.context)for(var t=this.context.eventListeners.length;t;){t-=1;var n=this.context.eventListeners[t];n&&this.removeEventListener(n.element,n.event,n.callback,e)}}},{key:"clear",value:function(){this.clearEvents()}},{key:"destroy",value:function(){this.clearEvents(),this.context=null}},{key:"destroyWithOwnEventsOnly",value:function(){this.clearEvents(!0),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)}}]),e}();function d(e,t){var n,r,o,i,c;t.isTargetWebComponent=!1,t.realTarget=t.target;var d=t.stopImmediatePropagation;if(t.stopImmediatePropagation=function(){d.apply(this),(0,u.stopImmediatePropagation)(this)},!h.isHotTableEnv)return t;for(c=(t=(0,a.polymerWrap)(t)).path?t.path.length:0;c;){if(c-=1,"HOT-TABLE"===t.path[c].nodeName)n=!0;else if(n&&t.path[c].shadowRoot){i=t.path[c];break}0!==c||i||(i=t.path[c])}return i||(i=t.target),t.isTargetWebComponent=!0,(0,l.isWebComponentSupportedNatively)()?t.realTarget=t.srcElement||t.toElement:((0,s.hasOwnProperty)(e,"hot")||e.isHotTableEnv||e.wtTable)&&((0,s.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,a.closest)(t.target,["HOT-TABLE"],r),t.realTarget=o&&r.querySelector("HOT-TABLE")||t.target),Object.defineProperty(t,"target",{get:function(){return(0,a.polymerWrap)(i)},enumerable:!0,configurable:!0}),t}var f=h;t.default=f},function(e,t,n){"use strict";var r=n(10),o=n(0);t.__esModule=!0,t.Renderer=void 0;var i=o(n(217));t.ViewportColumnsCalculator=i.default;var a=o(n(218));t.ViewportRowsCalculator=a.default;var s=o(n(111));t.CellCoords=s.default;var l=o(n(219));t.CellRange=l.default;var u=o(n(220));t.ColumnFilter=u.default;var c=o(n(221));t.RowFilter=c.default;var h=o(n(222));t.MasterTable=h.default;var d=o(n(447));t.LeftOverlay=d.default;var f=o(n(449));t.TopOverlay=f.default;var v=o(n(451));t.TopLeftCornerOverlay=v.default;var g=o(n(453));t.BottomOverlay=g.default;var p=o(n(455));t.BottomLeftCornerOverlay=p.default;var m=o(n(359));t.SelectionHandle=m.default;var y=o(n(349));t.default=y.default,t.Core=y.default;var w=o(n(350));t.Event=w.default;var C=o(n(351));t.Overlays=C.default;var E=o(n(352));t.Scroll=E.default;var S=o(n(457));t.Selection=S.default;var b=o(n(353));t.Settings=b.default;var R=r(n(225));t.Renderer=R;var T=n(138);t.OrderView=T.OrderView,t.SharedOrderView=T.SharedOrderView;var M=o(n(354));t.Viewport=M.default;var O=n(25);t.getListenersCounter=O.getListenersCounter;var k=r(n(170));t.getSvgPathsRenderer=k.default,t.precalculateStylesAndCommands=k.precalculateStylesAndCommands,t.compareStrokePriority=k.compareStrokePriority;var N=o(n(171));t.getSvgResizer=N.default;var _=n(169);t.setCurrentWindowContext=_.setCurrentWindowContext,t.convertCssColorToRGBA=_.convertCssColorToRGBA,t.getLuminance=_.getLuminance,t.compareLuminance=_.compareLuminance;var A=n(76);t.setBrowserMeta=A.setBrowserMeta},function(e,t,n){"use strict";var r=n(21),o=n(148).includes,i=n(102);r({target:"Array",proto:!0},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i("includes")},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";n(17),t.__esModule=!0,t.getCondition=function(e,t){if(!r[e])throw Error('Filter condition "'.concat(e,'" does not exist.'));var n=r[e],o=n.condition,i=n.descriptor,a=t;i.inputValuesDecorator&&(a=i.inputValuesDecorator(a));return function(e){return o.apply(e.meta.instance,[].concat([e],[a]))}},t.getConditionDescriptor=function(e){if(!r[e])throw Error('Filter condition "'.concat(e,'" does not exist.'));return r[e].descriptor},t.registerCondition=function(e,t,n){n.key=e,r[e]={condition:t,descriptor:n}},t.conditions=void 0;var r={};t.conditions=r},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(21),o=n(44),i=n(106),a=n(129),s=n(51),l=n(67),u=n(108),c=n(109),h=n(37)("species"),d=[].slice,f=Math.max;r({target:"Array",proto:!0,forced:!c("slice")},{slice:function(e,t){var n,r,c,v=l(this),g=s(v.length),p=a(e,g),m=a(void 0===t?g:t,g);if(i(v)&&("function"!=typeof(n=v.constructor)||n!==Array&&!i(n.prototype)?o(n)&&null===(n=n[h])&&(n=void 0):n=void 0,n===Array||void 0===n))return d.call(v,p,m);for(r=new(void 0===n?Array:n)(f(m-p,0)),c=0;p<m;p++,c++)p in v&&u(r,c,v[p]);return r.length=c,r}})},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,n=(0,r.getWindowScrollTop)(t);t=(0,r.getParentWindow)(t);for(;t;)n-=(0,r.getWindowScrollTop)(t),t=(0,r.getParentWindow)(t);return e.clientY+n},t.isRightClick=function(e){return 2===e.button},t.isLeftClick=function(e){return 0===e.button};var r=n(8)},function(e,t,n){var r=n(418),o=n(213),i=n(419);e.exports=function(e){return r(e)||o(e)||i()}},function(e,t,n){"use strict";var r=n(21),o=n(129),i=n(79),a=n(51),s=n(62),l=n(159),u=n(108),c=n(109),h=Math.max,d=Math.min;r({target:"Array",proto:!0,forced:!c("splice")},{splice:function(e,t){var n,r,c,f,v,g,p=s(this),m=a(p.length),y=o(e,m),w=arguments.length;if(0===w?n=r=0:1===w?(n=0,r=m-y):(n=w-2,r=d(h(i(t),0),m-y)),m+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(c=l(p,r),f=0;f<r;f++)(v=y+f)in p&&u(c,f,p[v]);if(c.length=r,n<r){for(f=y;f<m-r;f++)g=f+n,(v=f+r)in p?p[g]=p[v]:delete p[g];for(f=m;f>m-r+n;f--)delete p[f-1]}else if(n>r)for(f=m-r;f>y;f--)g=f+n-1,(v=f+r-1)in p?p[g]=p[v]:delete p[g];for(f=0;f<n;f++)p[f+y]=arguments[f+2];return p.length=m-r+n,c}})},function(e,t,n){"use strict";var r=n(21),o=n(165),i=n(54);r({target:"String",proto:!0,forced:!n(166)("includes")},{includes:function(e){return!!~String(i(this)).indexOf(o(e),arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(21),o=n(38),i=n(168),a=[].slice,s=function(e){return function(t,n){var r=arguments.length>2,o=r?a.call(arguments,2):void 0;return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,o)}:t,n)}};r({global:!0,bind:!0,forced:/MSIE .\./.test(i)},{setTimeout:s(o.setTimeout),setInterval:s(o.setInterval)})},function(e,t,n){var r=n(38),o=n(99),i=n(127),a=n(199),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){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof global&&global)||Function("return this")()},function(e,t,n){"use strict";var r=n(74),o=n(47),i=n(28),a=n(160),s=RegExp.prototype,l=s.toString,u=i((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),c="toString"!=l.name;(u||c)&&r(RegExp.prototype,"toString",(function(){var e=o(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in s)?a.call(e):n)}),{unsafe:!0})},function(e,t,n){"use strict";var r=n(134),o=n(211);e.exports=r("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),o,!0)},function(e,t,n){"use strict";var r=n(21),o=n(89).filter;r({target:"Array",proto:!0,forced:!n(109)("filter")},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(135),o=n(47),i=n(62),a=n(51),s=n(79),l=n(54),u=n(163),c=n(136),h=Math.max,d=Math.min,f=Math.floor,v=/\$([$&'`]|\d\d?|<[^>]*>)/g,g=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(e,t,n){return[function(n,r){var o=l(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):t.call(String(o),n,r)},function(e,i){var l=n(t,e,this,i);if(l.done)return l.value;var f=o(e),v=String(this),g="function"==typeof i;g||(i=String(i));var p=f.global;if(p){var m=f.unicode;f.lastIndex=0}for(var y=[];;){var w=c(f,v);if(null===w)break;if(y.push(w),!p)break;""===String(w[0])&&(f.lastIndex=u(v,a(f.lastIndex),m))}for(var C,E="",S=0,b=0;b<y.length;b++){w=y[b];for(var R=String(w[0]),T=h(d(s(w.index),v.length),0),M=[],O=1;O<w.length;O++)M.push(void 0===(C=w[O])?C:String(C));var k=w.groups;if(g){var N=[R].concat(M,T,v);void 0!==k&&N.push(k);var _=String(i.apply(void 0,N))}else _=r(R,v,T,M,k,i);T>=S&&(E+=v.slice(S,T)+_,S=T+R.length)}return E+v.slice(S)}];function r(e,n,r,o,a,s){var l=r+e.length,u=o.length,c=g;return void 0!==a&&(a=i(a),c=v),t.call(s,c,(function(t,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(l);case"<":s=a[i.slice(1,-1)];break;default:var c=+i;if(0===c)return t;if(c>u){var h=f(c/10);return 0===h?t:h<=u?void 0===o[h-1]?i.charAt(1):o[h-1]+i.charAt(1):t}s=o[c-1]}return void 0===s?"":s}))}}))},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))throw Error('No registered renderer found under "'.concat(e,'" name'));return v(e)},t.getRegisteredRenderers=t.getRegisteredRendererNames=t.hasRenderer=t.registerRenderer=void 0;var o=r(n(80)),i=r(n(460)),a=r(n(461)),s=r(n(462)),l=r(n(463)),u=r(n(464)),c=r(n(465)),h=r(n(466)),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,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(15),n(34),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(3),s=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","beforeLoadData","beforeKeyDown","beforeOnCellMouseDown","beforeOnCellMouseUp","beforeOnCellContextMenu","beforeOnCellMouseOver","beforeOnCellMouseOut","beforeRemoveCol","beforeRemoveRow","beforeRender","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyColHeader","modifyColWidth","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","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","beforeColumnCollapse","afterColumnCollapse","beforeColumnExpand","afterColumnExpand"],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 e=Object.create(null);return(0,a.arrayEach)(l,(function(t){return e[t]=[]})),e}},{key:"getBucket",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket}},{key:"add",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))(0,a.arrayEach)(t,(function(t){return n.add(e,t,r)}));else{var o=this.getBucket(r);if(void 0===o[e]&&(this.register(e),o[e]=[]),t.skip=!1,-1===o[e].indexOf(t)){var i=!1;t.initialHook&&(0,a.arrayEach)(o[e],(function(n,r){if(n.initialHook)return o[e][r]=t,i=!0,!1})),i||o[e].push(t)}}return this}},{key:"once",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Array.isArray(t)?(0,a.arrayEach)(t,(function(t){return n.once(e,t,r)})):(t.runOnce=!0,this.add(e,t,r))}},{key:"remove",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.getBucket(n);return void 0!==r[e]&&r[e].indexOf(t)>=0&&(t.skip=!0,!0)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getBucket(t);return!(void 0===n[e]||!n[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(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,s.objectEach)(this.getBucket(e),(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 l.indexOf(e)>=0}},{key:"getRegistered",value:function(){return l}}]),e}(),c=new u;var h=u;t.default=h},function(e,t){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(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t,n){var r=n(44);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(21),o=n(124),i=n(67),a=n(107),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";t.__esModule=!0,t.default=void 0;var r=n(3),o=n(4),i={_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,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];this._localHooks[e]&&(0,r.arrayEach)(this._localHooks[e],(function(e){return e.apply(t,o)}))},clearLocalHooks:function(){return this._localHooks={},this}};(0,o.defineGetter)(i,"MIXIN_NAME","localHooks",{writable:!1,enumerable:!1});var a=i;t.default=a},function(e,t,n){var r=n(28);e.exports=!r((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(79),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(21),o=n(420);r({target:"Array",stat:!0,forced:!n(208)((function(e){Array.from(e)}))},{from:o})},function(e,t,n){"use strict";var r=n(135),o=n(162),i=n(47),a=n(54),s=n(421),l=n(163),u=n(51),c=n(136),h=n(161),d=n(28),f=[].push,v=Math.min,g=!d((function(){return!RegExp(4294967295,"y")}));r("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(a(this)),i=void 0===n?4294967295:n>>>0;if(0===i)return[];if(void 0===e)return[r];if(!o(e))return t.call(r,e,i);for(var s,l,u,c=[],d=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),v=0,g=new RegExp(e.source,d+"g");(s=h.call(g,r))&&!((l=g.lastIndex)>v&&(c.push(r.slice(v,s.index)),s.length>1&&s.index<r.length&&f.apply(c,s.slice(1)),u=s[0].length,v=l,c.length>=i));)g.lastIndex===s.index&&g.lastIndex++;return v===r.length?!u&&g.test("")||c.push(""):c.push(r.slice(v)),c.length>i?c.slice(0,i):c}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var o=a(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,o,n):r.call(String(o),t,n)},function(e,o){var a=n(r,e,this,o,r!==t);if(a.done)return a.value;var h=i(e),d=String(this),f=s(h,RegExp),p=h.unicode,m=(h.ignoreCase?"i":"")+(h.multiline?"m":"")+(h.unicode?"u":"")+(g?"y":"g"),y=new f(g?h:"^(?:"+h.source+")",m),w=void 0===o?4294967295:o>>>0;if(0===w)return[];if(0===d.length)return null===c(y,d)?[d]:[];for(var C=0,E=0,S=[];E<d.length;){y.lastIndex=g?E:0;var b,R=c(y,g?d:d.slice(E));if(null===R||(b=v(u(y.lastIndex+(g?0:E)),d.length))===C)E=l(d,E,p);else{if(S.push(d.slice(C,E)),S.length===w)return S;for(var T=1;T<=R.length-1;T++)if(S.push(R[T]),S.length===w)return S;E=C=b}}return S.push(d.slice(C)),S}]}),!g)},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(50),o=n(191),i=n(47),a=n(98),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(38),o=n(210),i=n(423),a=n(68);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";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(24)},function(e,t,n){"use strict";n(27),n(15),n(35),n(53),t.__esModule=!0,t.isPrintableChar=function(e){return 32===e||e>=48&&e<=57||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||e>=226||e>=65&&e<=90},t.isMetaKey=function(e){return-1!==[o.ARROW_DOWN,o.ARROW_UP,o.ARROW_LEFT,o.ARROW_RIGHT,o.HOME,o.END,o.DELETE,o.BACKSPACE,o.F1,o.F2,o.F3,o.F4,o.F5,o.F6,o.F7,o.F8,o.F9,o.F10,o.F11,o.F12,o.TAB,o.PAGE_DOWN,o.PAGE_UP,o.ENTER,o.ESCAPE,o.SHIFT,o.CAPS_LOCK,o.ALT].indexOf(e)},t.isCtrlKey=function(e){var t=[];navigator.platform.includes("Mac")?t.push(o.COMMAND_LEFT,o.COMMAND_RIGHT,o.COMMAND_FIREFOX):t.push(o.CONTROL);return t.includes(e)},t.isCtrlMetaKey=function(e){return[o.CONTROL,o.COMMAND_LEFT,o.COMMAND_RIGHT,o.COMMAND_FIREFOX].includes(e)},t.isKey=function(e,t){var n=t.split("|"),i=!1;return(0,r.arrayEach)(n,(function(t){if(e===o[t])return i=!0,!1})),i},t.KEY_CODES=void 0;var r=n(3),o={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=o},function(e,t,n){var r=n(50),o=n(56).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(11),n(9),n(12),n(23),n(13),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)throw Error('No editor registered under name "'.concat(e,'"'));return n.getInstance(t)},t.registerEditor=R,t.getEditor=function(e){if(!C(e))throw Error('No registered editor found under "'.concat(e,'" name'));return w(e).getConstructor()},t.getRegisteredEditors=t.getRegisteredEditorNames=t.hasEditor=void 0;var o=r(n(80)),i=r(n(45)),a=r(n(110)),s=r(n(360)),l=r(n(468)),u=r(n(469)),c=r(n(472)),h=r(n(362)),d=r(n(473)),f=r(n(474)),v=r(n(475)),g=r(n(116)),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(54);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";n(17),n(113),n(31),n(36),t.__esModule=!0,t.isFunction=function(e){return"function"==typeof e},t.throttle=o,t.throttleAfterHits=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=o(e,t),i=n;function a(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return i?(i-=1,e.apply(this,n)):r.apply(this,n)}return a.clearHits=function(){i=n},a},t.debounce=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=null;return function(){for(var o=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r&&clearTimeout(r),r=setTimeout((function(){t=e.apply(o,a)}),n),t}},t.pipe=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=t[0],i=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,r.arrayReduce)(i,(function(e,t){return t(e)}),o.apply(this,t))}},t.partial=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return e.apply(this,n.concat(r))}},t.curry=function(e){var t=e.length;return function n(r){return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=r.concat(i);return s.length>=t?e.apply(this,s):n(s)}}([])},t.curryRight=function(e){var t=e.length;return function n(r){return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=r.concat(i.reverse());return s.length>=t?e.apply(this,s):n(s)}}([])};var r=n(3);function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=0,r={lastCallThrottled:!0},o=null;return function(){for(var i=this,a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var u=Date.now(),c=!1;r.lastCallThrottled=!0,n||(n=u,c=!0);var h=t-(u-n);return c?(r.lastCallThrottled=!1,e.apply(this,s)):(o&&clearTimeout(o),o=setTimeout((function(){r.lastCallThrottled=!1,e.apply(i,s),n=0,o=void 0}),h)),r}}},function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function o(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function c(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 It(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=r.call(t.parsedDateParts,(function(e){return null!=e})),o=!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&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return o;e._isValid=o}return e._isValid}function p(e){var t=f(NaN);return null!=e?d(v(t),e):v(t).userInvalidated=!0,t}r=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=o.momentProperties=[];function y(e,t){var n,r,o;if(s(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),s(t._i)||(e._i=t._i),s(t._f)||(e._f=t._f),s(t._l)||(e._l=t._l),s(t._strict)||(e._strict=t._strict),s(t._tzm)||(e._tzm=t._tzm),s(t._isUTC)||(e._isUTC=t._isUTC),s(t._offset)||(e._offset=t._offset),s(t._pf)||(e._pf=v(t)),s(t._locale)||(e._locale=t._locale),m.length>0)for(n=0;n<m.length;n++)s(o=t[r=m[n]])||(e[r]=o);return e}var w=!1;function C(e){y(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===w&&(w=!0,o.updateOffset(this),w=!1)}function E(e){return e instanceof C||null!=e&&null!=e._isAMomentObject}function S(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function b(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=S(t)),n}function R(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&&b(e[r])!==b(t[r]))&&a++;return a+i}function T(e){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function M(e,t){var n=!0;return d((function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,e),n){for(var r,i=[],a=0;a<arguments.length;a++){if(r="","object"==typeof arguments[a]){for(var s in r+="\n["+a+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[a];i.push(r)}T(e+"\nArguments: "+Array.prototype.slice.call(i).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var O,k={};function N(e,t){null!=o.deprecationHandler&&o.deprecationHandler(e,t),k[e]||(T(t),k[e]=!0)}function _(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function A(e,t){var n,r=d({},e);for(n in t)h(t,n)&&(a(e[n])&&a(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)&&a(e[n])&&(r[n]=d({},r[n]));return r}function I(e){null!=e&&this.set(e)}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,O=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)h(e,t)&&n.push(t);return n};var D={};function L(e,t){var n=e.toLowerCase();D[n]=D[n+"s"]=D[t]=e}function x(e){return"string"==typeof e?D[e]||D[e.toLowerCase()]:void 0}function H(e){var t,n,r={};for(n in e)h(e,n)&&(t=x(n))&&(r[t]=e[n]);return r}var P={};function F(e,t){P[e]=t}function B(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var V=/(\[[^\[]*\])|(\\)?([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,U={},Y={};function j(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(Y[e]=o),t&&(Y[t[0]]=function(){return B(o.apply(this,arguments),t[1],t[2])}),n&&(Y[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function z(e,t){return e.isValid()?(t=G(t,e.localeData()),U[t]=U[t]||function(e){var t,n,r,o=e.match(V);for(t=0,n=o.length;t<n;t++)Y[o[t]]?o[t]=Y[o[t]]:o[t]=(r=o[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,i="";for(r=0;r<n;r++)i+=_(o[r])?o[r].call(t,e):o[r];return i}}(t),U[t](e)):e.localeData().invalidDate()}function G(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(W.lastIndex=0;n>=0&&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,t,n){ue[e]=_(t)?t:function(e,r){return e&&n?n:t}}function he(e,t){return h(ue,e)?ue[e](t._strict,t._locale):new RegExp(de(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,o){return t||n||r||o}))))}function de(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var fe={};function ve(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),l(t)&&(r=function(e,n){n[t]=b(e)}),n=0;n<e.length;n++)fe[e[n]]=r}function ge(e,t){ve(e,(function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)}))}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 Me(e){return Oe(e)?366:365}function Oe(e){return e%4==0&&e%100!=0||e%400==0}j("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),j(0,["YY",2],0,(function(){return this.year()%100})),j(0,["YYYY",4],0,"year"),j(0,["YYYYY",5],0,"year"),j(0,["YYYYYY",6,!0],0,"year"),L("year","y"),F("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?o.parseTwoDigitYear(e):b(e)})),ve("YY",(function(e,t){t[me]=o.parseTwoDigitYear(e)})),ve("Y",(function(e,t){t[me]=parseInt(e,10)})),o.parseTwoDigitYear=function(e){return b(e)+(b(e)>68?1900:2e3)};var ke,Ne=_e("FullYear",!0);function _e(e,t){return function(n){return null!=n?(Ie(this,e,n),o.updateOffset(this,t),this):Ae(this,e)}}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&&Oe(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,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?Oe(e)?29:28:31-r%7%2}ke=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},j("M",["MM",2],"Mo",(function(){return this.month()+1})),j("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),j("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),L("month","M"),F("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]=b(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?/,xe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),He="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=ke.call(this._shortMonthsParse,a))?o:null:-1!==(o=ke.call(this._longMonthsParse,a))?o:null:"MMM"===t?-1!==(o=ke.call(this._shortMonthsParse,a))?o:-1!==(o=ke.call(this._longMonthsParse,a))?o:null:-1!==(o=ke.call(this._longMonthsParse,a))?o:-1!==(o=ke.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=b(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),o.updateOffset(this,!0),this):Ae(this,"Month")}var Ve=le,We=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,t,n,r,o,i,a){var s=new Date(e,t,n,r,o,i,a);return e<100&&e>=0&&isFinite(s.getFullYear())&&s.setFullYear(e),s}function je(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function ze(e,t,n){var r=7+t-n;return-(7+je(e,0,r).getUTCDay()-t)%7+r-1}function Ge(e,t,n,r,o){var i,a,s=1+7*(t-1)+(7+n-r)%7+ze(e,r,o);return s<=0?a=Me(i=e-1)+s:s>Me(e)?(i=e+1,a=s-Me(e)):(i=e,a=s),{year:i,dayOfYear:a}}function Xe(e,t,n){var r,o,i=ze(e.year(),t,n),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?r=a+Ke(o=e.year()-1,t,n):a>Ke(e.year(),t,n)?(r=a-Ke(e.year(),t,n),o=e.year()+1):(o=e.year(),r=a),{week:r,year:o}}function Ke(e,t,n){var r=ze(e,t,n),o=ze(e+1,t,n);return(Me(e)-r+o)/7}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),F("week",5),F("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)]=b(e)})),j("d",0,"do","day"),j("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),j("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),j("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),F("day",11),F("weekday",11),F("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]=b(e)}));var qe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),$e="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Qe="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Ze(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=ke.call(this._weekdaysParse,a))?o:null:"ddd"===t?-1!==(o=ke.call(this._shortWeekdaysParse,a))?o:null:-1!==(o=ke.call(this._minWeekdaysParse,a))?o:null:"dddd"===t?-1!==(o=ke.call(this._weekdaysParse,a))?o:-1!==(o=ke.call(this._shortWeekdaysParse,a))?o:-1!==(o=ke.call(this._minWeekdaysParse,a))?o:null:"ddd"===t?-1!==(o=ke.call(this._shortWeekdaysParse,a))?o:-1!==(o=ke.call(this._weekdaysParse,a))?o:-1!==(o=ke.call(this._minWeekdaysParse,a))?o:null:-1!==(o=ke.call(this._minWeekdaysParse,a))?o:-1!==(o=ke.call(this._weekdaysParse,a))?o:-1!==(o=ke.call(this._shortWeekdaysParse,a))?o:null}var Je=le,et=le,tt=le;function nt(){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 rt(){return this.hours()%12||12}function ot(e,t){j(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function it(e,t){return t._meridiemParse}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,rt),j("k",["kk",2],0,(function(){return this.hours()||24})),j("hmm",0,0,(function(){return""+rt.apply(this)+B(this.minutes(),2)})),j("hmmss",0,0,(function(){return""+rt.apply(this)+B(this.minutes(),2)+B(this.seconds(),2)})),j("Hmm",0,0,(function(){return""+this.hours()+B(this.minutes(),2)})),j("Hmmss",0,0,(function(){return""+this.hours()+B(this.minutes(),2)+B(this.seconds(),2)})),ot("a",!0),ot("A",!1),L("hour","h"),F("hour",13),ce("a",it),ce("A",it),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=b(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]=b(e),v(n).bigHour=!0})),ve("hmm",(function(e,t,n){var r=e.length-2;t[Ce]=b(e.substr(0,r)),t[Ee]=b(e.substr(r)),v(n).bigHour=!0})),ve("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[Ce]=b(e.substr(0,r)),t[Ee]=b(e.substr(r,2)),t[Se]=b(e.substr(o)),v(n).bigHour=!0})),ve("Hmm",(function(e,t,n){var r=e.length-2;t[Ce]=b(e.substr(0,r)),t[Ee]=b(e.substr(r))})),ve("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[Ce]=b(e.substr(0,r)),t[Ee]=b(e.substr(r,2)),t[Se]=b(e.substr(o))}));var at,st=_e("Hours",!0),lt={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:xe,monthsShort:He,week:{dow:0,doy:6},weekdays:qe,weekdaysMin:Qe,weekdaysShort:$e,meridiemParse:/[ap]\.?m?\.?/i},ut={},ct={};function ht(e){return e?e.toLowerCase().replace("_","-"):e}function dt(t){var r=null;if(!ut[t]&&void 0!==e&&e&&e.exports)try{r=at._abbr,n(437)("./"+t),ft(r)}catch(e){}return ut[t]}function ft(e,t){var n;return e&&(n=s(t)?gt(e):vt(e,t))&&(at=n),at._abbr}function vt(e,t){if(null!==t){var n=lt;if(t.abbr=e,null!=ut[e])N("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=ut[e]._config;else if(null!=t.parentLocale){if(null==ut[t.parentLocale])return ct[t.parentLocale]||(ct[t.parentLocale]=[]),ct[t.parentLocale].push({name:e,config:t}),null;n=ut[t.parentLocale]._config}return ut[e]=new I(A(n,t)),ct[e]&&ct[e].forEach((function(e){vt(e.name,e.config)})),ft(e),ut[e]}return delete ut[e],null}function gt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return at;if(!i(e)){if(t=dt(e))return t;e=[e]}return function(e){for(var t,n,r,o,i=0;i<e.length;){for(t=(o=ht(e[i]).split("-")).length,n=(n=ht(e[i+1]))?n.split("-"):null;t>0;){if(r=dt(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&R(o,n,!0)>=t-1)break;t--}i++}return null}(e)}function pt(e){var t,n=e._a;return n&&-2===v(e).overflow&&(t=n[ye]<0||n[ye]>11?ye:n[we]<1||n[we]>De(n[me],n[ye])?we:n[Ce]<0||n[Ce]>24||24===n[Ce]&&(0!==n[Ee]||0!==n[Se]||0!==n[be])?Ce:n[Ee]<0||n[Ee]>59?Ee:n[Se]<0||n[Se]>59?Se:n[be]<0||n[be]>999?be:-1,v(e)._overflowDayOfYear&&(t<me||t>we)&&(t=we),v(e)._overflowWeeks&&-1===t&&(t=Re),v(e)._overflowWeekday&&-1===t&&(t=Te),v(e).overflow=t),e}function mt(e,t,n){return null!=e?e:null!=t?t:n}function yt(e){var t,n,r,i,a,s=[];if(!e._d){for(r=function(e){var t=new Date(o.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[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=mt(t.GG,e._a[me],Xe(Dt(),1,4).year),r=mt(t.W,1),((o=mt(t.E,1))<1||o>7)&&(l=!0);else{i=e._locale._week.dow,a=e._locale._week.doy;var u=Xe(Dt(),i,a);n=mt(t.gg,e._a[me],u.year),r=mt(t.w,u.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(l=!0)):o=i}r<1||r>Ke(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&&(a=mt(e._a[me],r[me]),(e._dayOfYear>Me(a)||0===e._dayOfYear)&&(v(e)._overflowDayOfYear=!0),n=je(a,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]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[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?je:Ye).apply(null,s),i=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!==i&&(v(e).weekdayMismatch=!0)}}var 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=/^\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)?)?$/,Et=/Z|[+-]\d\d(?::?\d\d)?/,St=[["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}/]],bt=[["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/]],Rt=/^\/?Date\((\-?\d+)/i;function Tt(e){var t,n,r,o,i,a,s=e._i,l=wt.exec(s)||Ct.exec(s);if(l){for(v(e).iso=!0,t=0,n=St.length;t<n;t++)if(St[t][1].exec(l[1])){o=St[t][0],r=!1!==St[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=bt.length;t<n;t++)if(bt[t][1].exec(l[3])){i=(l[2]||" ")+bt[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(l[4]){if(!Et.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=o+(i||"")+(a||""),_t(e)}else e._isValid=!1}var Mt=/^(?:(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){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}var kt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Nt(e){var t,n,r,o,i,a,s,l=Mt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim());if(l){var u=(t=l[4],n=l[3],r=l[2],o=l[5],i=l[6],a=l[7],s=[Ot(t),He.indexOf(n),parseInt(r,10),parseInt(o,10),parseInt(i,10)],a&&s.push(parseInt(a,10)),s);if(!function(e,t,n){return!e||$e.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(v(n).weekdayMismatch=!0,n._isValid=!1,!1)}(l[1],u,e))return;e._a=u,e._tzm=function(e,t,n){if(e)return kt[e];if(t)return 0;var r=parseInt(n,10),o=r%100;return(r-o)/100*60+o}(l[8],l[9],l[10]),e._d=je.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),v(e).rfc2822=!0}else e._isValid=!1}function _t(e){if(e._f!==o.ISO_8601)if(e._f!==o.RFC_2822){e._a=[],v(e).empty=!0;var t,n,r,i,a,s=""+e._i,l=s.length,u=0;for(r=G(e._f,e._locale).match(V)||[],t=0;t<r.length;t++)i=r[t],(n=(s.match(he(i,e))||[])[0])&&((a=s.substr(0,s.indexOf(n))).length>0&&v(e).unusedInput.push(a),s=s.slice(s.indexOf(n)+n.length),u+=n.length),Y[i]?(n?v(e).empty=!1:v(e).unusedTokens.push(i),pe(i,n,e)):e._strict&&!n&&v(e).unusedTokens.push(i);v(e).charsLeftOver=l-u,s.length>0&&v(e).unusedInput.push(s),e._a[Ce]<=12&&!0===v(e).bigHour&&e._a[Ce]>0&&(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;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[Ce],e._meridiem),yt(e),pt(e)}else Nt(e);else Tt(e)}function At(e){var t=e._i,n=e._f;return e._locale=e._locale||gt(e._l),null===t||void 0===n&&""===t?p({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),E(t)?new C(pt(t)):(u(t)?e._d=t:i(n)?function(e){var t,n,r,o,i;if(0===e._f.length)return v(e).invalidFormat=!0,void(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],_t(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?_t(e):function(e){var t=e._i;s(t)?e._d=new Date(o.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=Rt.exec(e._i);null===t?(Tt(e),!1===e._isValid&&(delete e._isValid,Nt(e),!1===e._isValid&&(delete e._isValid,o.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=c(t.slice(0),(function(e){return parseInt(e,10)})),yt(e)):a(t)?function(e){if(!e._d){var t=H(e._i);e._a=c([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),yt(e)}}(e):l(t)?e._d=new Date(t):o.createFromInputFallback(e)}(e),g(e)||(e._d=null),e))}function It(e,t,n,r,o){var s,l={};return!0!==n&&!1!==n||(r=n,n=void 0),(a(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)||i(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=o,l._l=n,l._i=e,l._f=t,l._strict=r,(s=new C(pt(At(l))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Dt(e,t,n,r){return It(e,t,n,r,!1)}o.createFromInputFallback=M("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":""))})),o.ISO_8601=function(){},o.RFC_2822=function(){};var Lt=M("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Dt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:p()})),xt=M("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Dt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:p()}));function Ht(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Dt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Pt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ft(e){var t=H(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===ke.call(Pt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,r=0;r<Pt.length;++r)if(e[Pt[r]]){if(n)return!1;parseFloat(e[Pt[r]])!==b(e[Pt[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=gt(),this._bubble()}function Bt(e){return e instanceof Ft}function Vt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Wt(e,t){j(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+B(~~(e/60),2)+t+B(~~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=Yt(se,e)}));var Ut=/([\+\-]|\d\d)/gi;function Yt(e,t){var n=(t||"").match(e);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Ut)||["-",0,0],o=60*r[1]+b(r[2]);return 0===o?0:"+"===r[0]?o:-o}function jt(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(E(e)||u(e)?e.valueOf():Dt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),o.updateOffset(n,!1),n):Dt(e).local()}function zt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Gt(){return!!this.isValid()&&this._isUTC&&0===this._offset}o.updateOffset=function(){};var Xt=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Kt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function qt(e,t){var n,r,o,i,a,s,u=e,c=null;return Bt(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:l(e)?(u={},t?u[t]=e:u.milliseconds=e):(c=Xt.exec(e))?(n="-"===c[1]?-1:1,u={y:0,d:b(c[we])*n,h:b(c[Ce])*n,m:b(c[Ee])*n,s:b(c[Se])*n,ms:b(Vt(1e3*c[be]))*n}):(c=Kt.exec(e))?(n="-"===c[1]?-1:(c[1],1),u={y:$t(c[2],n),M:$t(c[3],n),w:$t(c[4],n),d:$t(c[5],n),h:$t(c[6],n),m:$t(c[7],n),s:$t(c[8],n)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(i=Dt(u.from),a=Dt(u.to),o=i.isValid()&&a.isValid()?(a=jt(a,i),i.isBefore(a)?s=Qt(i,a):((s=Qt(a,i)).milliseconds=-s.milliseconds,s.months=-s.months),s):{milliseconds:0,months:0},(u={}).ms=o.milliseconds,u.M=o.months),r=new Ft(u),Bt(e)&&h(e,"_locale")&&(r._locale=e._locale),r}function $t(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Qt(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 Zt(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(N(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),Jt(this,qt(n="string"==typeof n?+n:n,r),e),this}}function Jt(e,t,n,r){var i=t._milliseconds,a=Vt(t._days),s=Vt(t._months);e.isValid()&&(r=null==r||r,s&&Fe(e,Ae(e,"Month")+s*n),a&&Ie(e,"Date",Ae(e,"Date")+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&o.updateOffset(e,a||s))}qt.fn=Ft.prototype,qt.invalid=function(){return qt(NaN)};var en=Zt(1,"add"),tn=Zt(-1,"subtract");function nn(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function rn(e){var t;return void 0===e?this._locale._abbr:(null!=(t=gt(e))&&(this._locale=t),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var on=M("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 an(){return this._locale}function sn(e,t){j(0,[e,e.length],0,t)}function ln(e,t,n,r,o){var i;return null==e?Xe(this,r,o).year:(t>(i=Ke(e,r,o))&&(t=i),un.call(this,e,t,n,r,o))}function un(e,t,n,r,o){var i=Ge(e,t,n,r,o),a=je(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}j(0,["gg",2],0,(function(){return this.weekYear()%100})),j(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),sn("gggg","weekYear"),sn("ggggg","weekYear"),sn("GGGG","isoWeekYear"),sn("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),F("weekYear",1),F("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)]=b(e)})),ge(["gg","GG"],(function(e,t,n,r){t[r]=o.parseTwoDigitYear(e)})),j("Q",0,"Qo","quarter"),L("quarter","Q"),F("quarter",7),ce("Q",X),ve("Q",(function(e,t){t[ye]=3*(b(e)-1)})),j("D",["DD",2],"Do","date"),L("date","D"),F("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]=b(e.match(Z)[0])}));var cn=_e("Date",!0);j("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),F("dayOfYear",4),ce("DDD",te),ce("DDDD",q),ve(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=b(e)})),j("m",["mm",2],0,"minute"),L("minute","m"),F("minute",14),ce("m",Z),ce("mm",Z,K),ve(["m","mm"],Ee);var hn=_e("Minutes",!1);j("s",["ss",2],0,"second"),L("second","s"),F("second",15),ce("s",Z),ce("ss",Z,K),ve(["s","ss"],Se);var dn,fn=_e("Seconds",!1);for(j("S",0,0,(function(){return~~(this.millisecond()/100)})),j(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),j(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),j(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),j(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),j(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),j(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),L("millisecond","ms"),F("millisecond",16),ce("S",te,X),ce("SS",te,K),ce("SSS",te,q),dn="SSSS";dn.length<=9;dn+="S")ce(dn,oe);function vn(e,t){t[be]=b(1e3*("0."+e))}for(dn="S";dn.length<=9;dn+="S")ve(dn,vn);var gn=_e("Milliseconds",!1);j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");var pn=C.prototype;function mn(e){return e}pn.add=en,pn.calendar=function(e,t){var n=e||Dt(),r=jt(n,this).startOf("day"),i=o.calendarFormat(this,r)||"sameElse",a=t&&(_(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,Dt(n)))},pn.clone=function(){return new C(this)},pn.diff=function(e,t,n){var r,o,i;if(!this.isValid())return NaN;if(!(r=jt(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=x(t)){case"year":i=nn(this,r)/12;break;case"month":i=nn(this,r);break;case"quarter":i=nn(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:S(i)},pn.endOf=function(e){return void 0===(e=x(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},pn.format=function(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=z(this,e);return this.localeData().postformat(t)},pn.from=function(e,t){return this.isValid()&&(E(e)&&e.isValid()||Dt(e).isValid())?qt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},pn.fromNow=function(e){return this.from(Dt(),e)},pn.to=function(e,t){return this.isValid()&&(E(e)&&e.isValid()||Dt(e).isValid())?qt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},pn.toNow=function(e){return this.to(Dt(),e)},pn.get=function(e){return _(this[e=x(e)])?this[e]():this},pn.invalidAt=function(){return v(this).overflow},pn.isAfter=function(e,t){var n=E(e)?e:Dt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=x(s(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},pn.isBefore=function(e,t){var n=E(e)?e:Dt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=x(s(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},pn.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))},pn.isSame=function(e,t){var n,r=E(e)?e:Dt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=x(t||"millisecond"))?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},pn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},pn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},pn.isValid=function(){return g(this)},pn.lang=on,pn.locale=rn,pn.localeData=an,pn.max=xt,pn.min=Lt,pn.parsingFlags=function(){return d({},v(this))},pn.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:P[n]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=H(e)),r=0;r<n.length;r++)this[n[r].unit](e[n[r].unit]);else if(_(this[e=x(e)]))return this[e](t);return this},pn.startOf=function(e){switch(e=x(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)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},pn.subtract=tn,pn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},pn.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()}},pn.toDate=function(){return new Date(this.valueOf())},pn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?z(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):_(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",z(n,"Z")):z(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},pn.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)},pn.toJSON=function(){return this.isValid()?this.toISOString():null},pn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},pn.unix=function(){return Math.floor(this.valueOf()/1e3)},pn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},pn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},pn.year=Ne,pn.isLeapYear=function(){return Oe(this.year())},pn.weekYear=function(e){return ln.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},pn.isoWeekYear=function(e){return ln.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},pn.quarter=pn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},pn.month=Be,pn.daysInMonth=function(){return De(this.year(),this.month())},pn.week=pn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},pn.isoWeek=pn.isoWeeks=function(e){var t=Xe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},pn.weeksInYear=function(){var e=this.localeData()._week;return Ke(this.year(),e.dow,e.doy)},pn.isoWeeksInYear=function(){return Ke(this.year(),1,4)},pn.date=cn,pn.day=pn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},pn.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")},pn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},pn.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")},pn.hour=pn.hours=st,pn.minute=pn.minutes=hn,pn.second=pn.seconds=fn,pn.millisecond=pn.milliseconds=gn,pn.utcOffset=function(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Yt(se,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=zt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?Jt(this,qt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:zt(this)},pn.utc=function(e){return this.utcOffset(0,e)},pn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(zt(this),"m")),this},pn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Yt(ae,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},pn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Dt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},pn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},pn.isLocal=function(){return!!this.isValid()&&!this._isUTC},pn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},pn.isUtc=Gt,pn.isUTC=Gt,pn.zoneAbbr=function(){return this._isUTC?"UTC":""},pn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},pn.dates=M("dates accessor is deprecated. Use date instead.",cn),pn.months=M("months accessor is deprecated. Use month instead",Be),pn.years=M("years accessor is deprecated. Use year instead",Ne),pn.zone=M("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()})),pn.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),(e=At(e))._a){var t=e._isUTC?f(e._a):Dt(e._a);this._isDSTShifted=this.isValid()&&R(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var yn=I.prototype;function wn(e,t,n,r){var o=gt(),i=f().set(r,t);return o[n](i,e)}function Cn(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return wn(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=wn(e,r,n,"month");return o}function En(e,t,n,r){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var o,i=gt(),a=e?i._week.dow:0;if(null!=n)return wn(t,(n+a)%7,r,"day");var s=[];for(o=0;o<7;o++)s[o]=wn(t,(o+a)%7,r,"day");return s}yn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return _(r)?r.call(t,n):r},yn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},yn.invalidDate=function(){return this._invalidDate},yn.ordinal=function(e){return this._ordinal.replace("%d",e)},yn.preparse=mn,yn.postformat=mn,yn.relativeTime=function(e,t,n,r){var o=this._relativeTime[n];return _(o)?o(e,t,n,r):o.replace(/%d/i,e)},yn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return _(n)?n(t):n.replace(/%s/i,t)},yn.set=function(e){var t,n;for(n in e)_(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)},yn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Le).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},yn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Le.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},yn.monthsParse=function(e,t,n){var r,o,i;if(this._monthsParseExact)return Pe.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),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}},yn.monthsRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||Ue.call(this),e?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=We),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},yn.monthsShortRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||Ue.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Ve),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},yn.week=function(e){return Xe(e,this._week.dow,this._week.doy).week},yn.firstDayOfYear=function(){return this._week.doy},yn.firstDayOfWeek=function(){return this._week.dow},yn.weekdays=function(e,t){return e?i(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:i(this._weekdays)?this._weekdays:this._weekdays.standalone},yn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},yn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},yn.weekdaysParse=function(e,t,n){var r,o,i;if(this._weekdaysParseExact)return Ze.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),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}},yn.weekdaysRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=Je),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},yn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=et),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},yn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=tt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},yn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},yn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ft("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===b(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),o.lang=M("moment.lang is deprecated. Use moment.locale instead.",ft),o.langData=M("moment.langData is deprecated. Use moment.localeData instead.",gt);var Sn=Math.abs;function bn(e,t,n,r){var o=qt(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function Rn(e){return e<0?Math.floor(e):Math.ceil(e)}function Tn(e){return 4800*e/146097}function Mn(e){return 146097*e/4800}function On(e){return function(){return this.as(e)}}var kn=On("ms"),Nn=On("s"),_n=On("m"),An=On("h"),In=On("d"),Dn=On("w"),Ln=On("M"),xn=On("y");function Hn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Pn=Hn("milliseconds"),Fn=Hn("seconds"),Bn=Hn("minutes"),Vn=Hn("hours"),Wn=Hn("days"),Un=Hn("months"),Yn=Hn("years"),jn=Math.round,zn={ss:44,s:45,m:45,h:22,d:26,M:11};function Gn(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}var Xn=Math.abs;function Kn(e){return(e>0)-(e<0)||+e}function qn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Xn(this._milliseconds)/1e3,r=Xn(this._days),o=Xn(this._months);e=S(n/60),t=S(e/60),n%=60,e%=60;var i=S(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=Kn(this._months)!==Kn(h)?"-":"",v=Kn(this._days)!==Kn(h)?"-":"",g=Kn(this._milliseconds)!==Kn(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 $n=Ft.prototype;return $n.isValid=function(){return this._isValid},$n.abs=function(){var e=this._data;return this._milliseconds=Sn(this._milliseconds),this._days=Sn(this._days),this._months=Sn(this._months),e.milliseconds=Sn(e.milliseconds),e.seconds=Sn(e.seconds),e.minutes=Sn(e.minutes),e.hours=Sn(e.hours),e.months=Sn(e.months),e.years=Sn(e.years),this},$n.add=function(e,t){return bn(this,e,t,1)},$n.subtract=function(e,t){return bn(this,e,t,-1)},$n.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=x(e))||"year"===e)return t=this._days+r/864e5,n=this._months+Tn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(Mn(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)}},$n.asMilliseconds=kn,$n.asSeconds=Nn,$n.asMinutes=_n,$n.asHours=An,$n.asDays=In,$n.asWeeks=Dn,$n.asMonths=Ln,$n.asYears=xn,$n.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*b(this._months/12):NaN},$n._bubble=function(){var e,t,n,r,o,i=this._milliseconds,a=this._days,s=this._months,l=this._data;return i>=0&&a>=0&&s>=0||i<=0&&a<=0&&s<=0||(i+=864e5*Rn(Mn(s)+a),a=0,s=0),l.milliseconds=i%1e3,e=S(i/1e3),l.seconds=e%60,t=S(e/60),l.minutes=t%60,n=S(t/60),l.hours=n%24,a+=S(n/24),o=S(Tn(a)),s+=o,a-=Rn(Mn(o)),r=S(s/12),s%=12,l.days=a,l.months=s,l.years=r,this},$n.clone=function(){return qt(this)},$n.get=function(e){return e=x(e),this.isValid()?this[e+"s"]():NaN},$n.milliseconds=Pn,$n.seconds=Fn,$n.minutes=Bn,$n.hours=Vn,$n.days=Wn,$n.weeks=function(){return S(this.days()/7)},$n.months=Un,$n.years=Yn,$n.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var r=qt(e).abs(),o=jn(r.as("s")),i=jn(r.as("m")),a=jn(r.as("h")),s=jn(r.as("d")),l=jn(r.as("M")),u=jn(r.as("y")),c=o<=zn.ss&&["s",o]||o<zn.s&&["ss",o]||i<=1&&["m"]||i<zn.m&&["mm",i]||a<=1&&["h"]||a<zn.h&&["hh",a]||s<=1&&["d"]||s<zn.d&&["dd",s]||l<=1&&["M"]||l<zn.M&&["MM",l]||u<=1&&["y"]||["yy",u];return c[2]=t,c[3]=+e>0,c[4]=n,Gn.apply(null,c)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},$n.toISOString=qn,$n.toString=qn,$n.toJSON=qn,$n.locale=rn,$n.localeData=an,$n.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",qn),$n.lang=on,j("X",0,0,"unix"),j("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(b(e))})),o.version="2.20.1",t=Dt,o.fn=pn,o.min=function(){return Ht("isBefore",[].slice.call(arguments,0))},o.max=function(){return Ht("isAfter",[].slice.call(arguments,0))},o.now=function(){return Date.now?Date.now():+new Date},o.utc=f,o.unix=function(e){return Dt(1e3*e)},o.months=function(e,t){return Cn(e,t,"months")},o.isDate=u,o.locale=ft,o.invalid=p,o.duration=qt,o.isMoment=E,o.weekdays=function(e,t,n){return En(e,t,n,"weekdays")},o.parseZone=function(){return Dt.apply(null,arguments).parseZone()},o.localeData=gt,o.isDuration=Bt,o.monthsShort=function(e,t){return Cn(e,t,"monthsShort")},o.weekdaysMin=function(e,t,n){return En(e,t,n,"weekdaysMin")},o.defineLocale=vt,o.updateLocale=function(e,t){if(null!=t){var n,r,o=lt;null!=(r=dt(e))&&(o=r._config),t=A(o,t),(n=new I(t)).parentLocale=ut[e],ut[e]=n,ft(e)}else null!=ut[e]&&(null!=ut[e].parentLocale?ut[e]=ut[e].parentLocale:null!=ut[e]&&delete ut[e]);return ut[e]},o.locales=function(){return O(ut)},o.weekdaysShort=function(e,t,n){return En(e,t,n,"weekdaysShort")},o.normalizeUnits=x,o.relativeTimeRounding=function(e){return void 0===e?jn:"function"==typeof e&&(jn=e,!0)},o.relativeTimeThreshold=function(e,t){return void 0!==zn[e]&&(void 0===t?zn[e]:(zn[e]=t,"s"===e&&(zn.ss=t-1),!0))},o.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"},o.prototype=pn,o.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"},o}(),window.moment=n(64)}).call(this,n(436)(e))},function(e,t,n){var r=n(21),o=n(62),i=n(131);r({target:"Object",stat:!0,forced:n(28)((function(){i(1)}))},{keys:function(e){return i(o(e))}})},function(e,t,n){"use strict";n(17),n(15),n(113),n(31),n(60),n(42),t.__esModule=!0,t.normalizeSelection=function(e){return(0,r.arrayMap)(e,(function(e){return{start:e.getTopLeftCorner(),end:e.getBottomRightCorner()}}))},t.isSeparator=function(e){return(0,o.hasClass)(e,"htSeparator")},t.hasSubMenu=function(e){return(0,o.hasClass)(e,"htSubmenu")},t.isDisabled=function(e){return(0,o.hasClass)(e,"htDisabled")},t.isSelectionDisabled=function(e){return(0,o.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=a,t.prepareHorizontalAlignClass=s,t.getAlignmentClasses=function(e,t){var n={};return(0,r.arrayEach)(e,(function(e){for(var r=e.from,o=e.to,i=r.row;i<=o.row;i++)for(var a=r.col;a<=o.col;a++)n[i]||(n[i]=[]),n[i][a]=t(i,a)})),n},t.align=function(e,t,n,o,i){(0,r.arrayEach)(e,(function(e){var r=e.from,a=e.to;if(r.row===a.row&&r.col===a.col)l(r.row,r.col,t,n,o,i);else for(var s=r.row;s<=a.row;s++)for(var u=r.col;u<=a.col;u++)l(s,u,t,n,o,i)}))},t.checkSelectionConsistency=function(e,t){var n=!1;Array.isArray(e)&&(0,r.arrayEach)(e,(function(e){return e.forAll((function(e,r){if(t(e,r))return n=!0,!1})),n}));return n},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=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.KEY,n=e.slice(0);return n=function(e){var t=[];return(0,r.arrayEach)(e,(function(e,n){n>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)})),t}(n=function(e,t){var n=e.slice(0);return n.reverse(),(n=u(n,t)).reverse(),n}(n=u(n,t),t))};var r=n(3),o=n(8),i=n(183);function a(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 s(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 l(e,t,n,r,o,i){var l=o(e,t),u=r;l.className&&(u="vertical"===n?a(l.className,r):s(l.className,r)),i(e,t,"className",u)}function u(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(124),o=n(54);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(50),o=n(56),i=n(97);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(134),o=n(211);e.exports=r("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),o)},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(42),n(137),t.__esModule=!0,t.toSingleLine=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return(0,r.arrayReduce)(e,(function(e,t,r){return e+t.replace(/(?:\r?\n\s+)/g,"")+(n[r]?n[r]:"")}),"").trim()};var r=n(3)},function(e,t,n){"use strict";var r=n(21),o=n(156),i=n(62),a=n(28),s=n(107),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){"use strict";var r=n(0);t.__esModule=!0;var o=r(n(501));t.IndexMapper=o.default;var i=r(n(371));t.PhysicalIndexToValueMap=i.default;var a=r(n(368));t.VisualIndexToPhysicalIndexMap=a.default;var s=r(n(370));t.SkipMap=s.default;var l=r(n(179));t.IndexMap=l.default;var u=n(502);t.getIncreasedIndexes=u.getIncreasedIndexes,t.getDecreasedIndexes=u.getDecreasedIndexes,t.alterUtilsFactory=u.alterUtilsFactory},function(e,t,n){var r=n(38),o=n(99),i=n(68),a=n(55),s=n(147),l=n(192),u=n(88),c=u.get,h=u.enforce,d=String(l).split("toString");o("inspectSource",(function(e){return l.call(e)})),(e.exports=function(e,t,n,o){var l=!!o&&!!o.unsafe,u=!!o&&!!o.enumerable,c=!!o&&!!o.noTargetGet;"function"==typeof n&&("string"!=typeof t||a(n,"name")||i(n,"name",t),h(n).source=d.join("string"==typeof t?t:"")),e!==r?(l?!c&&e[t]&&(u=!0):delete e[t],u?e[t]=n:i(e,t,n)):u?e[t]=n:s(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||l.call(this)}))},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=a,t.isChrome=function(){return i.chrome.value},t.isEdge=function(){return i.edge.value},t.isIE=function(){return i.ie.value},t.isIE8=function(){return i.ie8.value},t.isIE9=function(){return i.ie9.value},t.isMSBrowser=function(){return i.ie.value||i.edge.value},t.isMobileBrowser=function(){return i.mobile.value},t.isSafari=function(){return i.safari.value},t.isFirefox=function(){return i.firefox.value};var r=n(4),o=function(e){var t={value:!1,test:function(n,r){t.value=e(n,r)}};return t},i={chrome:o((function(e,t){return/Chrome/.test(e)&&/Google/.test(t)})),edge:o((function(e){return/Edge/.test(e)})),firefox:o((function(e){return/Firefox/.test(e)})),ie:o((function(e){return/Trident/.test(e)})),ie8:o((function(){return!document.createTextNode("test").textContent})),ie9:o((function(){return!!document.documentMode})),mobile:o((function(e){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)})),safari:o((function(e,t){return/Safari/.test(e)&&/Apple Computer/.test(t)}))};function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.userAgent,n=void 0===t?navigator.userAgent:t,o=e.vendor,a=void 0===o?navigator.vendor:o;(0,r.objectEach)(i,(function(e){(0,e.test)(n,a)}))}a()},function(e,t,n){"use strict";n(15),n(9),n(39),n(42),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),o=0;o<t;o++)n[o]=arguments[o];var i=n.length;for(;i;){i-=1;var a=(0,r.stringify)(n[i]).toLowerCase();-1===e.indexOf(a)&&e.push(a)}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 t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"".concat(e).replace(/(?:\\)?\[([^[\]]+)]/g,(function(e,n){return"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[n]?"":t[n]}))},t.stripTags=function(e){return"".concat(e).replace(o,"")};var r=n(24);var o=/<\/?\w+\/?>|<\w+[\s|/][^>]*>/gi},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){"use strict";var r=n(0);n(11),n(40),n(9),n(12),n(13),t.__esModule=!0,t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";i.has(e)||i.set(e,new Map);var t=i.get(e);return{register:function(e,n){t.set(e,n)},getItem:function(e){return t.get(e)},hasItem:function(e){return t.has(e)},getNames:function(){return(0,o.default)(t.keys())},getValues:function(){return(0,o.default)(t.values())}}},t.collection=void 0;var o=r(n(33)),i=new Map;t.collection=i},function(e,t,n){"use strict";var r=n(0);n(9),n(39),n(90),n(36),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=arguments.length>1&&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:e>t?-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(46)),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);t.__esModule=!0,t.getValidator=function(e){if("function"==typeof e)return e;if(!d(e))throw Error('No registered validator found under "'.concat(e,'" name'));return h(e)},t.getRegisteredValidators=t.getRegisteredValidatorNames=t.hasValidator=t.registerValidator=void 0;var o=r(n(80)),i=r(n(476)),a=r(n(477)),s=r(n(479)),l=r(n(480)),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,c("autocomplete",i.default),c("date",a.default),c("numeric",s.default),c("time",l.default)},function(e,t,n){"use strict";var r=n(50),o=n(38),i=n(130),a=n(74),s=n(55),l=n(78),u=n(158),c=n(98),h=n(28),d=n(103),f=n(101).f,v=n(93).f,g=n(56).f,p=n(214).trim,m=o.Number,y=m.prototype,w="Number"==l(d(y)),C=function(e){var t,n,r,o,i,a,s,l,u=c(e,!1);if("string"==typeof u&&u.length>2)if(43===(t=(u=p(u)).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||l>o)return NaN;return parseInt(i,r)}return+u};if(i("Number",!m(" 0o1")||!m("0b1")||m("+0x1"))){for(var E,S=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof S&&(w?h((function(){y.valueOf.call(n)})):"Number"!=l(n))?u(new m(C(t)),n,S):C(t)},b=r?f(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),R=0;b.length>R;R++)s(m,E=b[R])&&!s(S,E)&&g(S,E,v(m,E));S.prototype=y,y.constructor=S,a(o,"Number",S)}},function(e,t,n){n(21)({target:"Number",stat:!0},{isInteger:n(490)})},function(e,t,n){"use strict";var r=n(0),o=n(10);n(15),t.__esModule=!0,t.predefinedItems=function(){var e={};return(0,a.objectEach)(S,(function(t,n){e[n]=t()})),e},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(75)),a=n(4),s=o(n(543));t.ALIGNMENT=s.KEY;var l=o(n(544));t.CLEAR_COLUMN=l.KEY;var u=o(n(545));t.COLUMN_LEFT=u.KEY;var c=o(n(546));t.COLUMN_RIGHT=c.KEY;var h=o(n(547));t.READ_ONLY=h.KEY;var d=o(n(548));t.REDO=d.KEY;var f=o(n(549));t.REMOVE_COLUMN=f.KEY;var v=o(n(550));t.REMOVE_ROW=v.KEY;var g=o(n(551));t.ROW_ABOVE=g.KEY;var p=o(n(552));t.ROW_BELOW=p.KEY;var m=o(n(183));t.SEPARATOR=m.KEY;var y=o(n(553));t.NO_ITEMS=y.KEY;var w,C=o(n(554));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(90),n(42),t.__esModule=!0,t.isFormulaExpression=function(e){return"string"==typeof e&&e.length>=2&&"="===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(e,t){return function(n){return{row:"row"===e?t:n.row,column:"column"===e?t:n.column}}}},function(e,t,n){"use strict";var r=n(0);n(15),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(6)),a=r(n(5)),s=r(n(2)),l=r(n(7)),u=n(122),c=n(3),h=r(n(404)),d=[1,2,3],f=function(e){function t(e,n){var r;return(0,o.default)(this,t),(r=(0,i.default)(this,(0,a.default)(t).call(this,e,n))).precedents=[],r.value=null,r.error=null,r.state=t.STATE_UP_TO_DATE,r}return(0,l.default)(t,e),(0,s.default)(t,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)(t,[{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(e){if(this.isEqual(e))throw Error(u.ERROR_REF);this.precedents=(0,c.arrayFilter)(this.precedents,(function(t){return!t.isEqual(e)}))}},{key:"clearPrecedents",value:function(){this.precedents.length=0}},{key:"getPrecedents",value:function(){return this.precedents}},{key:"hasPrecedents",value:function(){return this.precedents.length>0}},{key:"hasPrecedent",value:function(e){return(0,c.arrayFilter)(this.precedents,(function(t){return t.isEqual(e)})).length>0}}]),t}(h.default);t.default=f},function(e,t,n){var r,o,i,a=n(193),s=n(38),l=n(44),u=n(68),c=n(55),h=n(126),d=n(100),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(e){return function(t){var n;if(!l(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(105),o=n(124),i=n(62),a=n(51),s=n(159),l=[].push,u=function(e){var t=1==e,n=2==e,u=3==e,c=4==e,h=6==e,d=5==e||h;return function(f,v,g,p){for(var m,y,w=i(f),C=o(w),E=r(v,g,3),S=a(C.length),b=0,R=p||s,T=t?R(f,S):n?R(f,0):void 0;S>b;b++)if((d||b in C)&&(y=E(m=C[b],b,w),e))if(t)T[b]=y;else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return b;case 2:l.call(T,m)}else if(c)return!1;return h?-1:u||c?c:T}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6)}},function(e,t,n){"use strict";var r=n(135),o=n(47),i=n(51),a=n(54),s=n(163),l=n(136);r("match",1,(function(e,t,n){return[function(t){var n=a(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=o(e),u=String(this);if(!a.global)return l(a,u);var c=a.unicode;a.lastIndex=0;for(var h,d=[],f=0;null!==(h=l(a,u));){var v=String(h[0]);d[f]=v,""===v&&(a.lastIndex=s(u,i(a.lastIndex),c)),f++}return 0===f?null:d}]}))},function(e,t,n){"use strict";var r=n(0);n(15),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(8),s=n(4),l=n(3),u=n(58),c=r(n(25)),h=r(n(349)),d={},f=function(){function e(t){(0,o.default)(this,e),(0,s.defineGetter)(this,"wot",t,{writable:!1});var n=this.wot.wtTable,r=n.TABLE,i=n.hider,l=n.spreader,u=n.holder,c=n.wtRootElement;this.instance=this.wot,this.type="",this.mainTableScrollableElement=null,this.TABLE=r,this.hider=i,this.spreader=l,this.holder=u,this.wtRootElement=c,this.trimmingContainer=(0,a.getTrimmingContainer)(this.hider.parentNode.parentNode),this.areElementSizesAdjusted=!1,this.updateStateOfRendering()}return(0,i.default)(e,null,[{key:"registerOverlay",value:function(t,n){if(-1===e.CLONE_TYPES.indexOf(t))throw new Error("Unsupported overlay (".concat(t,")."));d[t]=n}},{key:"createOverlay",value:function(e,t){return new d[e](t)}},{key:"hasOverlay",value:function(e){return void 0!==d[e]}},{key:"isOverlayTypeOf",value:function(e,t){return!(!e||!d[t])&&e instanceof d[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[e.CLONE_TOP,e.CLONE_BOTTOM,e.CLONE_LEFT,e.CLONE_TOP_LEFT_CORNER,e.CLONE_BOTTOM_LEFT_CORNER,e.CLONE_DEBUG]}}]),(0,i.default)(e,[{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,a.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,a.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,u.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(t){if(-1===e.CLONE_TYPES.indexOf(t))throw new Error('Clone type "'.concat(t,'" is not supported.'));var n=this.wot,r=n.wtTable,o=n.rootDocument,i=n.rootWindow,s=o.createElement("DIV"),l=o.createElement("TABLE");s.className="ht_clone_".concat(t," handsontable"),s.style.position="absolute",s.style.top=0,s.style.left=0,s.style.overflow="visible",l.className=r.TABLE.className,s.appendChild(l),this.type=t,r.wtRootElement.parentNode.appendChild(s);var u=this.wot.getSetting("preventOverflow");return!0===u||"horizontal"===u&&this.type===e.CLONE_TOP||"vertical"===u&&this.type===e.CLONE_LEFT?this.mainTableScrollableElement=i:"hidden"===i.getComputedStyle(r.wtRootElement.parentNode).getPropertyValue("overflow")?this.mainTableScrollableElement=r.holder:this.mainTableScrollableElement=(0,a.getScrollableElement)(r.TABLE),new h.default({cloneSource:this.wot,cloneOverlay:this,table:l})}},{key:"refresh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.shouldBeRendered();this.clone&&(this.needFullRender||t)&&this.clone.draw(e),this.needFullRender=t}},{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,l.arrayEach)([n,r,o],(function(e){e.width="",e.height=""}))}}},{key:"destroy",value:function(){new c.default(this.clone).destroy()}}]),e}();t.default=f},function(e,t,n){"use strict";n(72),t.__esModule=!0;var r=n(388);t.registerRootComparator=r.registerRootComparator,t.getRootComparator=r.getRootComparator,t.getCompareFunctionFactory=r.getCompareFunctionFactory;var o=n(535);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(50),o=n(145),i=n(97),a=n(67),s=n(98),l=n(55),u=n(191),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){"use strict";var r=n(0);n(11),n(9),n(69),n(12),n(57),n(13),t.__esModule=!0,t.default=void 0;var o=r(n(33)),i=r(n(18)),a=r(n(1)),s=r(n(2)),l=n(8),u=n(63),c=r(n(111)),h=r(n(220)),d=r(n(221)),f=n(225),v=r(n(91)),g=r(n(441)),p=r(n(442)),m=n(443),y=function(){function e(t,n){var r=this;(0,a.default)(this,e),this.isMaster=!t.cloneOverlay,this.wot=t,this.instance=this.wot,this.TABLE=n,this.TBODY=null,this.THEAD=null,this.COLGROUP=null,this.tableOffset=0,this.holderOffset=0,this.hasTableHeight=!0,this.hasTableWidth=!0,this.isTableVisible=!1,(0,l.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.isMaster&&this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;var o=this.wot.wtSettings.settings.rowHeaderWidth;this.wot.wtSettings.settings.rowHeaderWidth=function(){return r._modifyRowHeaderWidth(o)},this.rowUtils=new p.default(this.wot),this.columnUtils=new g.default(this.wot),this.tableRenderer=new f.Renderer({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wot.wtSettings.settings.cellRenderer}),this.borderRenderer=new m.BorderRenderer(this.spreader)}return(0,s.default)(e,[{key:"is",value:function(e){return v.default.isOverlayTypeOf(this.wot.cloneOverlay,e)}},{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&&n.nodeType===Node.ELEMENT_NODE&&(0,l.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&&n.nodeType===Node.ELEMENT_NODE&&(0,l.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&&n.nodeType===Node.ELEMENT_NODE&&(0,l.hasClass)(n,"wtHolder")||((t=this.wot.rootDocument.createElement("div")).style.position="relative",t.className="wtHolder",n&&n.insertBefore(t,e),this.isMaster&&(t.parentNode.className+="ht_master handsontable"),t.appendChild(e)),t}},{key:"draw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.wot,n=t.wtOverlays,r=t.wtViewport,o=t.getSetting("totalRows"),i=t.getSetting("totalColumns"),a=t.getSetting("rowHeaders"),s=a.length,u=t.getSetting("columnHeaders"),c=u.length,f=!1,g=e;if(this.isMaster&&(this.holderOffset=(0,l.offset)(this.holder),g=r.createRenderCalculators(g),s&&!t.getSetting("fixedColumnsLeft"))){var p=n.leftOverlay.getScrollPosition(),m=this.correctHeaderWidth;this.correctHeaderWidth=p>0,m!==this.correctHeaderWidth&&(g=!1)}if(this.isMaster&&(f=n.prepareOverlays()),g)this.isMaster&&r.createVisibleCalculators(),n&&n.refresh(!0);else{this.isMaster?this.tableOffset=(0,l.offset)(this.TABLE):this.tableOffset=this.wot.cloneSource.wtTable.tableOffset;var y=o>0?this.getFirstRenderedRow():0,w=i>0?this.getFirstRenderedColumn():0;this.rowFilter=new d.default(y,o,c),this.columnFilter=new h.default(w,i,s);var C,E=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();var S={};this.wot.getSetting("beforeDraw",!0,S),E=!0!==S.skipRender}if(E)if(this.tableRenderer.setHeaderContentRenderers(a,u),(this.is(v.default.CLONE_BOTTOM)||this.is(v.default.CLONE_BOTTOM_LEFT_CORNER))&&this.tableRenderer.setHeaderContentRenderers(a,[]),this.resetOversizedRows(),this.tableRenderer.setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&(C=this.wot.wtViewport.getWorkspaceWidth(),this.wot.wtViewport.containerWidth=null,this.markOversizedColumnHeaders()),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(v.default.CLONE_BOTTOM))&&this.markOversizedRows(),this.isMaster){this.wot.wtViewport.createVisibleCalculators(),this.wot.wtOverlays.refresh(!1),this.wot.wtOverlays.applyToDOM();var b=(0,l.outerWidth)(this.hider),R=(0,l.outerWidth)(this.TABLE);0!==b&&R!==b&&(this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),C!==this.wot.wtViewport.getWorkspaceWidth()&&(this.wot.wtViewport.containerWidth=null,this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),this.wot.getSetting("onDraw",!0)}else this.is(v.default.CLONE_BOTTOM)&&this.wot.cloneSource.wtOverlays.adjustElementsSize()}return this.isMaster&&(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()),this.refreshSelections(g),f&&n.syncScrollWithMaster(),t.drawn=!0,this}},{key:"markIfOversizedColumnHeader",value:function(e){for(var t,n,r,o=this.wot.wtTable.columnFilter.renderedToSource(e),i=this.wot.getSetting("columnHeaders").length,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,l.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:"adjustColumnHeaderHeights",value:function(){for(var e=this.wot,t=e.wtTable.THEAD.childNodes,n=e.wtViewport.oversizedColumnHeaders,r=0,o=e.getSetting("columnHeaders").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:"resetOversizedRows",value:function(){var e=this.wot;if((this.isMaster||this.is(v.default.CLONE_BOTTOM))&&!e.getSetting("externalRowCalculator"))for(var t=this.getRenderedRowsCount(),n=0;n<t;n++){var r=this.rowFilter.renderedToSource(n);e.wtViewport.oversizedRows&&e.wtViewport.oversizedRows[r]&&(e.wtViewport.oversizedRows[r]=void 0)}}},{key:"removeClassFromCells",value:function(e){for(var t=this.TABLE.querySelectorAll(".".concat(e)),n=0,r=t.length;n<r;n++)(0,l.removeClass)(t[n],e)}},{key:"refreshSelections",value:function(e){var t=this.wot;if(t.selections){var n=Array.isArray(t.selections)?t.selections:t.selections.getAll(),r=n.length;if(e){for(var o=new Set,i=t.getSetting("onBeforeRemoveCellClassNames"),a=0;a<r;a++){var s=n[a].settings,l=s.highlightHeaderClassName,u=s.highlightRowClassName,c=s.highlightColumnClassName;n[a].classNames.forEach(o.add,o),l&&o.add(l),u&&o.add(u),c&&o.add(c)}Array.isArray(i)&&i.forEach(o.add,o),o.forEach(this.removeClassFromCells,this)}var h=this.getRenderedRowsCount(),d=this.getRenderedColumnsCount(),f=this.getFirstRenderedRow(),v=this.getFirstRenderedColumn(),g=this.getLastRenderedRow(),p=this.getLastRenderedColumn(),m=[],y=0,w=0,C=0;this.getTableNeighborEast&&this.getTableNeighborEast().getFirstVisibleColumn()===this.getLastVisibleColumn()+1&&(y=1),this.getTableNeighborSouth&&this.getTableNeighborSouth().getFirstVisibleRow()===this.getLastVisibleRow()+1&&(w=1),this.getTableNeighborNorth&&this.getTableNeighborNorth().getLastVisibleRow()===this.getFirstVisibleRow()-1&&(C=-1);for(var E=0;E<r;E++){var S=n[E].draw(t,h,d,f,v,g,p,y,w,C);S&&m.push(S)}this.borderRenderer.skipFirstRowTopEdge=!!this.wot.getSetting("columnHeaders").length,this.borderRenderer.skipFirstColumnLeftEdge=!!this.wot.getSetting("rowHeaders").length,this.borderRenderer.render(this.TABLE,m)}}},{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,i.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;if(t<0){var a=this.wot.getSetting("columnHeaders").length+t;return this.getColumnHeader(n,a)}var s=this.TBODY.childNodes[this.rowFilter.sourceToRendered(t)];if(!s&&t>=0)throw new Error("TR was expected to be rendered but is not");var l=s.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(n)];if(!l&&n>=0)throw new Error("TD or TH was expected to be rendered but is not");return l}},{key:"getColumnHeader",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.THEAD.childNodes[t];if(n)return n.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,l.closest)(t,["TD","TH"])),null===t)return null;var n=t.parentNode,r=n.parentNode,o=(0,l.index)(n),i=t.cellIndex;if((0,l.overlayContainsElement)(v.default.CLONE_TOP_LEFT_CORNER,t,this.wtRootElement)||(0,l.overlayContainsElement)(v.default.CLONE_TOP,t,this.wtRootElement))"THEAD"===r.nodeName&&(o-=r.childNodes.length);else if((0,l.overlayContainsElement)(v.default.CLONE_BOTTOM_LEFT_CORNER,t,this.wtRootElement)||(0,l.overlayContainsElement)(v.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,l.overlayContainsElement)(v.default.CLONE_TOP_LEFT_CORNER,t,this.wtRootElement)||(0,l.overlayContainsElement)(v.default.CLONE_LEFT,t,this.wtRootElement)||(0,l.overlayContainsElement)(v.default.CLONE_BOTTOM_LEFT_CORNER,t,this.wtRootElement)?this.columnFilter.offsettedTH(i):this.columnFilter.visibleRowHeadedColumnToSourceColumn(i),new c.default(o,i)}},{key:"markOversizedRows",value:function(){if(!this.wot.getSetting("externalRowCalculator")){var e,t,n,r,o,i=this.TBODY.childNodes.length;if(i*this.wot.wtSettings.settings.defaultRowHeight!==(0,l.innerHeight)(this.TBODY)-1||this.wot.getSetting("fixedRowsBottom"))for(;i;)i-=1,n=this.rowFilter.renderedToSource(i),e=this.getRowHeight(n),t=(o=(r=this.getTrForRow(n)).querySelector("th"))?(0,l.innerHeight)(o):(0,l.innerHeight)(r)-1,(!e&&this.wot.wtSettings.settings.defaultRowHeight<t||e<t)&&(t+=1,this.wot.wtViewport.oversizedRows[n]=t)}}},{key:"getTrForRow",value:function(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}},{key:"isColumnHeaderLevelRendered",value:function(e){return e>this.wot.getSetting("columnHeaders").length-1}},{key:"isRowHeaderLevelRendered",value:function(e){return e>this.wot.getSetting("rowHeaders").length-1}},{key:"isRowBeforeRenderedRows",value:function(e){var t=this.getFirstRenderedRow();return e<0&&(e=0),-1===t||e<t}},{key:"isRowAfterViewport",value:function(e){return this.rowFilter&&e>this.getLastVisibleRow()}},{key:"isRowAfterRenderedRows",value:function(e){if(e<0){var t=this.wot.getSetting("columnHeaders").length+e;return this.isColumnHeaderLevelRendered(t)}return e>this.getLastRenderedRow()}},{key:"isColumnBeforeViewport",value:function(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}},{key:"isColumnBeforeRenderedColumns",value:function(e){var t=this.getFirstRenderedColumn();return e<0&&(e=0),-1===t||e<t}},{key:"isColumnAfterViewport",value:function(e){return this.columnFilter&&e>this.getLastVisibleColumn()}},{key:"isColumnAfterRenderedColumns",value:function(e){if(e<0){var t=this.wot.getSetting("rowHeaders").length+e;return this.isRowHeaderLevelRendered(t)}return this.columnFilter&&e>this.getLastRenderedColumn()}},{key:"isLastRowFullyVisible",value:function(){return this.getLastVisibleRow()===this.getLastRenderedRow()}},{key:"isLastColumnFullyVisible",value:function(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}},{key:"allRowsInViewport",value:function(){return this.wot.getSetting("totalRows")===this.getVisibleRowsCount()}},{key:"allColumnsInViewport",value:function(){return this.wot.getSetting("totalColumns")===this.getVisibleColumnsCount()}},{key:"getRowHeight",value:function(e){return this.rowUtils.getHeight(e)}},{key:"getColumnHeaderHeight",value:function(e){return this.columnUtils.getHeaderHeight(e)}},{key:"getColumnWidth",value:function(e){return this.columnUtils.getWidth(e)}},{key:"getStretchedColumnWidth",value:function(e){return this.columnUtils.getStretchedColumnWidth(e)}},{key:"hasDefinedSize",value:function(){return this.hasTableHeight&&this.hasTableWidth}},{key:"isVisible",value:function(){return(0,l.isVisible)(this.TABLE)}},{key:"_modifyRowHeaderWidth",value:function(e){var t=(0,u.isFunction)(e)?e():null;return Array.isArray(t)?(t=(0,o.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}}]),e}();t.default=y},function(e,t,n){"use strict";var r=n(21),o=n(89).map;r({target:"Array",proto:!0,forced:!n(109)("map")},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";n(17),t.__esModule=!0,t.createId=i,t.createDefaultCustomBorder=a,t.createSingleEmptyBorder=s,t.createDefaultHtBorder=l,t.createEmptyBorders=function(e,t){return{id:i(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,r.hasOwnProperty)(t,"border")&&(e.border=t.border);(0,r.hasOwnProperty)(t,"top")&&(t.top?((0,r.isObject)(t.top)||(t.top={width:1,color:"#000"}),e.top=t.top):(t.top={hide:!0},e.top=t.top));(0,r.hasOwnProperty)(t,"right")&&(t.right?((0,r.isObject)(t.right)||(t.right={width:1,color:"#000"}),e.right=t.right):(t.right={hide:!0},e.right=t.right));(0,r.hasOwnProperty)(t,"bottom")&&(t.bottom?((0,r.isObject)(t.bottom)||(t.bottom={width:1,color:"#000"}),e.bottom=t.bottom):(t.bottom={hide:!0},e.bottom=t.bottom));(0,r.hasOwnProperty)(t,"left")&&(t.left?((0,r.isObject)(t.left)||(t.left={width:1,color:"#000"}),e.left=t.left):(t.left={hide:!0},e.left=t.left));return e},t.checkSelectionBorders=function(e,t){var n=!1;return(0,o.arrayEach)(e.getSelectedRange(),(function(o){o.forAll((function(o,i){var a=e.getCellMeta(o,i).borders;if(a){if(!t)return n=!0,!1;if(!(0,r.hasOwnProperty)(a[t],"hide")||!1===a[t].hide)return n=!0,!1}}))})),n},t.markSelected=function(e){return'<span class="selected">'.concat(String.fromCharCode(10003),"</span>").concat(e)};var r=n(4),o=n(3);function i(e,t){return"border_row".concat(e,"col").concat(t)}function a(){return{width:1,color:"#000"}}function s(){return{hide:!0}}function l(){return{width:1,color:"#000",cornerVisible:!1}}},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 r=n(44);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(125),o=n(408);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.3.2",mode:r?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports={}},function(e,t,n){var r=n(197),o=n(149).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){var r=n(37),o=n(103),i=n(68),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){var r=n(47),o=n(413),i=n(149),a=n(100),s=n(200),l=n(146),u=n(126)("IE_PROTO"),c=function(){},h=function(){var e,t=l("iframe"),n=i.length;for(t.style.display="none",s.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),h=e.F;n--;)delete h.prototype[i[n]];return h()};e.exports=Object.create||function(e,t){var n;return null!==e?(c.prototype=r(e),n=new c,c.prototype=null,n[u]=e):n=h(),void 0===t?n:o(n,t)},a[u]=!0},function(e,t){e.exports={}},function(e,t,n){var r=n(156);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(78);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){"use strict";var r=n(28);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 r=n(98),o=n(56),i=n(97);e.exports=function(e,t,n){var a=r(t);a in e?o.f(e,a,i(0,n)):e[a]=n}},function(e,t,n){var r=n(28),o=n(37)("species");e.exports=function(e){return!r((function(){var t=[];return(t.constructor={})[o]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){"use strict";var r=n(0);n(137),t.__esModule=!0,t.default=t.EditorState=void 0;var o=r(n(6)),i=r(n(5)),a=r(n(7)),s=r(n(1)),l=r(n(2)),u=n(26),c=n(24),h=n(4),d=r(n(458)),f={VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"};t.EditorState=f;var v=function(){function e(t){(0,s.default)(this,e),this.hot=t,this.instance=t,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)(e,[{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:"getEditedCellsLayerClass",value:function(){switch(this.checkEditorSection()){case"right":return"ht_clone_right";case"left":return"ht_clone_left";case"bottom":return"ht_clone_bottom";case"bottom-right-corner":return"ht_clone_bottom_right_corner";case"bottom-left-corner":return"ht_clone_bottom_left_corner";case"top":return"ht_clone_top";case"top-right-corner":return"ht_clone_top_right_corner";case"top-left-corner":return"ht_clone_top_left_corner";default:return"ht_clone_master"}}},{key:"getEditedCell",value:function(){return this.hot.getCell(this.row,this.col,!0)}},{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}}]),e}();(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 e(t,n){(0,o.default)(this,e),this.row=null,this.col=null,void 0!==t&&void 0!==n&&(this.row=t,this.col=n)}return(0,i.default)(e,[{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}}}]),e}();t.default=a},function(e,t,n){var r=n(50),o=n(38),i=n(130),a=n(158),s=n(56).f,l=n(101).f,u=n(162),c=n(160),h=n(74),d=n(28),f=n(212),v=n(37)("match"),g=o.RegExp,p=g.prototype,m=/a/g,y=/a/g,w=new g(m)!==m;if(r&&i("RegExp",!w||d((function(){return y[v]=!1,g(m)!=m||g(y)==y||"/a/i"!=g(m,"i")})))){for(var C=function(e,t){var n=this instanceof C,r=u(e),o=void 0===t;return!n&&r&&e.constructor===C&&o?e:a(w?new g(r&&!o?e.source:e,t):g((r=e instanceof C)?e.source:e,r&&o?c.call(e):t),n?this:p,C)},E=function(e){e in C||s(C,e,{configurable:!0,get:function(){return g[e]},set:function(t){g[e]=t}})},S=l(g),b=0;S.length>b;)E(S[b++]);p.constructor=C,C.prototype=p,h(o,"RegExp",C)}f("RegExp")},function(e,t,n){"use strict";var r=n(21),o=n(106),i=[].reverse,a=[1,2];r({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return o(this)&&(this.length=this.length),i.call(this)}})},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(429)),s=function(){function e(t,n){(0,o.default)(this,e),this.nodesPool="string"==typeof t?new a.default(t):null,this.nodeType=t,this.rootNode=n,this.table=null,this.renderedNodes=0}return(0,i.default)(e,[{key:"setTable",value:function(e){this.nodesPool&&this.nodesPool.setRootDocument(e.rootDocument),this.table=e}},{key:"adjust",value:function(){}},{key:"render",value:function(){}}]),e}();t.default=s},function(e,t,n){var r=n(216);function o(t,n,i){return!function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()?e.exports=o=function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&r(i,n.prototype),i}:e.exports=o=Reflect.construct,o.apply(null,arguments)}e.exports=o},function(e,t,n){"use strict";var r=n(10),o=n(0);n(17),n(27),n(15),n(31),t.__esModule=!0,t.default=void 0;var i=o(n(1)),a=o(n(2)),s=o(n(6)),l=o(n(30)),u=o(n(5)),c=o(n(16)),h=o(n(7)),d=n(8),f=n(19),v=o(n(467)),g=n(76),p=r(n(110)),m=o(n(25)),y=n(59),w=n(32),C=function(e){function t(e){var n;return(0,i.default)(this,t),(n=(0,s.default)(this,(0,u.default)(t).call(this,e))).eventManager=new m.default((0,l.default)(n)),n.autoResize=(0,v.default)(),n.TEXTAREA=void 0,n.textareaStyle=void 0,n.TEXTAREA_PARENT=void 0,n.textareaParentStyle=void 0,n.layerClass=void 0,n.createElements(),n.bindEvents(),n.hot.addHookOnce("afterDestroy",(function(){return n.destroy()})),n}return(0,h.default)(t,e),(0,a.default)(t,[{key:"getValue",value:function(){return this.TEXTAREA.value}},{key:"setValue",value:function(e){this.TEXTAREA.value=e}},{key:"open",value:function(){var e=this;this.refreshDimensions(),this.showEditableElement(),this.addHook("beforeKeyDown",(function(t){return e.onBeforeKeyDown(t)}))}},{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,n,r,o,i,a){var s=this,l=this.state;if((0,c.default)((0,u.default)(t.prototype),"prepare",this).call(this,e,n,r,o,i,a),!a.readOnly){this.refreshDimensions(!0);var h=a.allowInvalid,d=a.fragmentSelection;h&&(this.TEXTAREA.value=""),l!==p.EditorState.FINISHED&&this.hideEditableElement(),!d&&!(0,g.isMobileBrowser)()&&this.hot._registerImmediate((function(){return s.focus(!0)}))}}},{key:"beginEditing",value:function(e,n){this.state===p.EditorState.VIRGIN&&(this.TEXTAREA.value="",(0,c.default)((0,u.default)(t.prototype),"beginEditing",this).call(this,e,n))}},{key:"focus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e?(0,d.selectElementIfAllowed)(this.TEXTAREA):(this.TEXTAREA.select(),(0,d.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,d.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,d.addClass)(this.TEXTAREA_PARENT,"handsontableInputHolder"),(0,d.hasClass)(this.TEXTAREA_PARENT,this.layerClass)&&(0,d.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,d.addClass)(this.TEXTAREA_PARENT,"ht_editor_hidden"),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}},{key:"hideEditableElement",value:function(){((0,g.isIE)()||(0,g.isEdge)())&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",(0,d.hasClass)(this.TEXTAREA_PARENT,this.layerClass)&&(0,d.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,d.addClass)(this.TEXTAREA_PARENT,"ht_editor_hidden")}},{key:"showEditableElement",value:function(){this.textareaParentStyle.height="",this.textareaParentStyle.overflow="",this.textareaParentStyle.position="",this.textareaParentStyle.right="auto",this.textareaParentStyle.opacity="1",this.textareaStyle.textIndent="",this.textareaStyle.overflowY="hidden";var e=this.TEXTAREA_PARENT.childNodes,t=!1;(0,f.rangeEach)(e.length-1,(function(n){var r=e[n];if((0,d.hasClass)(r,"handsontableEditor"))return t=!0,!1})),(0,d.hasClass)(this.TEXTAREA_PARENT,"ht_editor_hidden")&&(0,d.removeClass)(this.TEXTAREA_PARENT,"ht_editor_hidden"),t?(this.layerClass="ht_editor_visible",(0,d.addClass)(this.TEXTAREA_PARENT,this.layerClass)):(this.layerClass=this.getEditedCellsLayerClass(),(0,d.addClass)(this.TEXTAREA_PARENT,this.layerClass))}},{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(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state===p.EditorState.EDITING||e)if(this.TD=this.getEditedCell(),this.TD){var t,n=this.hot.view.wt,r=n.wtOverlays,o=n.wtViewport,i=(0,d.offset)(this.TD),a=(0,d.offset)(this.hot.rootElement),s=r.topOverlay.holder,l=r.leftOverlay.holder,u=this.hot.countRows(),c=s!==this.hot.rootWindow?s.scrollTop:0,h=l!==this.hot.rootWindow?l.scrollLeft:0,f=this.checkEditorSection(),v=["","left"].includes(f)?c:0,g=["","top","bottom"].includes(f)?h:0,m=i.top===a.top?0:1,y=this.hot.getSettings(),w=this.hot.hasColHeaders(),C=this.TD.style.backgroundColor,E=i.top-a.top-m-v,S=i.left-a.left-1-g;switch(f){case"top":t=(0,d.getCssTransform)(r.topOverlay.clone.wtTable.holder.parentNode);break;case"left":t=(0,d.getCssTransform)(r.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":t=(0,d.getCssTransform)(r.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":t=(0,d.getCssTransform)(r.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":t=(0,d.getCssTransform)(r.bottomOverlay.clone.wtTable.holder.parentNode)}(w&&0===this.hot.getSelectedLast()[0]||y.fixedRowsBottom&&this.hot.getSelectedLast()[0]===u-y.fixedRowsBottom)&&(E+=1),0===this.hot.getSelectedLast()[1]&&(S+=1),t&&-1!==t?this.textareaParentStyle[t[0]]=t[1]:(0,d.resetCssTransform)(this.TEXTAREA_PARENT),this.textareaParentStyle.top="".concat(E,"px"),this.textareaParentStyle.left="".concat(S,"px"),this.showEditableElement();var b=o.rowsRenderCalculator.startPosition,R=o.columnsRenderCalculator.startPosition,T=r.leftOverlay.getScrollPosition(),M=r.topOverlay.getScrollPosition(),O=(0,d.getScrollbarWidth)(this.hot.rootDocument),k=this.TD.offsetTop+b-M,N=this.TD.offsetLeft+R-T,_=(0,d.innerWidth)(this.TD)-8,A=(0,d.hasVerticalScrollbar)(s)?O:0,I=(0,d.hasHorizontalScrollbar)(l)?O:0,D=this.hot.view.maximumVisibleElementWidth(N)-9-A,L=this.TD.scrollHeight+1,x=Math.max(this.hot.view.maximumVisibleElementHeight(k)-I,23),H=(0,d.getComputedStyle)(this.TD,this.hot.rootWindow);this.TEXTAREA.style.fontSize=H.fontSize,this.TEXTAREA.style.fontFamily=H.fontFamily,this.TEXTAREA.style.backgroundColor=C,this.autoResize.init(this.TEXTAREA,{minHeight:Math.min(L,x),maxHeight:x,minWidth:Math.min(_,D),maxWidth:D},!0)}else e||this.close()}},{key:"bindEvents",value:function(){var e=this;this.eventManager.addEventListener(this.TEXTAREA,"cut",(function(e){return(0,w.stopPropagation)(e)})),this.eventManager.addEventListener(this.TEXTAREA,"paste",(function(e){return(0,w.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,w.isImmediatePropagationStopped)(e)){switch(e.keyCode){case y.KEY_CODES.ARROW_RIGHT:case y.KEY_CODES.ARROW_LEFT:this.isInFullEditMode()&&(this.isWaiting()||this.allowKeyEventPropagation(e.keyCode)||(0,w.stopImmediatePropagation)(e));break;case y.KEY_CODES.ARROW_UP:case y.KEY_CODES.ARROW_DOWN:this.isInFullEditMode()&&(this.isWaiting()||this.allowKeyEventPropagation(e.keyCode)||(0,w.stopImmediatePropagation)(e));break;case y.KEY_CODES.ENTER:var n=this.hot.selection.isMultiple();if(t&&!n||e.altKey){if(this.isOpened()){var r=(0,d.getCaretPosition)(this.TEXTAREA),o=this.getValue(),i="".concat(o.slice(0,r),"\n").concat(o.slice(r));this.setValue(i),(0,d.setCaretPosition)(this.TEXTAREA,r+1)}else this.beginEditing("".concat(this.originalValue,"\n"));(0,w.stopImmediatePropagation)(e)}e.preventDefault();break;case y.KEY_CODES.BACKSPACE:case y.KEY_CODES.DELETE:case y.KEY_CODES.HOME:case y.KEY_CODES.END:(0,w.stopImmediatePropagation)(e)}-1===[y.KEY_CODES.ARROW_UP,y.KEY_CODES.ARROW_RIGHT,y.KEY_CODES.ARROW_DOWN,y.KEY_CODES.ARROW_LEFT].indexOf(e.keyCode)&&this.autoResize.resize(String.fromCharCode(e.keyCode))}}}]),t}(p.default);t.default=C},function(e,t,n){"use strict";var r=n(21),o=n(51),i=n(165),a=n(54),s=n(166),l="".startsWith,u=Math.min;r({target:"String",proto:!0,forced:!s("startsWith")},{startsWith:function(e){var t=String(a(this));i(e);var n=o(u(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return l?l.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";var r=n(21),o=n(38),i=n(125),a=n(50),s=n(199),l=n(28),u=n(55),c=n(106),h=n(44),d=n(47),f=n(62),v=n(67),g=n(98),p=n(97),m=n(103),y=n(131),w=n(101),C=n(198),E=n(150),S=n(93),b=n(56),R=n(145),T=n(68),M=n(74),O=n(99),k=n(126),N=n(100),_=n(127),A=n(37),I=n(375),D=n(376),L=n(132),x=n(88),H=n(89).forEach,P=k("hidden"),F=A("toPrimitive"),B=x.set,V=x.getterFor("Symbol"),W=Object.prototype,U=o.Symbol,Y=o.JSON,j=Y&&Y.stringify,z=S.f,G=b.f,X=C.f,K=R.f,q=O("symbols"),$=O("op-symbols"),Q=O("string-to-symbol-registry"),Z=O("symbol-to-string-registry"),J=O("wks"),ee=o.QObject,te=!ee||!ee.prototype||!ee.prototype.findChild,ne=a&&l((function(){return 7!=m(G({},"a",{get:function(){return G(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=z(W,t);r&&delete W[t],G(e,t,n),r&&e!==W&&G(W,t,r)}:G,re=function(e,t){var n=q[e]=m(U.prototype);return B(n,{type:"Symbol",tag:e,description:t}),a||(n.description=t),n},oe=s&&"symbol"==typeof U.iterator?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof U},ie=function(e,t,n){e===W&&ie($,t,n),d(e);var r=g(t,!0);return d(n),u(q,r)?(n.enumerable?(u(e,P)&&e[P][r]&&(e[P][r]=!1),n=m(n,{enumerable:p(0,!1)})):(u(e,P)||G(e,P,p(1,{})),e[P][r]=!0),ne(e,r,n)):G(e,r,n)},ae=function(e,t){d(e);var n=v(t),r=y(n).concat(ce(n));return H(r,(function(t){a&&!se.call(n,t)||ie(e,t,n[t])})),e},se=function(e){var t=g(e,!0),n=K.call(this,t);return!(this===W&&u(q,t)&&!u($,t))&&(!(n||!u(this,t)||!u(q,t)||u(this,P)&&this[P][t])||n)},le=function(e,t){var n=v(e),r=g(t,!0);if(n!==W||!u(q,r)||u($,r)){var o=z(n,r);return!o||!u(q,r)||u(n,P)&&n[P][r]||(o.enumerable=!0),o}},ue=function(e){var t=X(v(e)),n=[];return H(t,(function(e){u(q,e)||u(N,e)||n.push(e)})),n},ce=function(e){var t=e===W,n=X(t?$:v(e)),r=[];return H(n,(function(e){!u(q,e)||t&&!u(W,e)||r.push(q[e])})),r};s||(M((U=function(){if(this instanceof U)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=_(e),n=function(e){this===W&&n.call($,e),u(this,P)&&u(this[P],t)&&(this[P][t]=!1),ne(this,t,p(1,e))};return a&&te&&ne(W,t,{configurable:!0,set:n}),re(t,e)}).prototype,"toString",(function(){return V(this).tag})),R.f=se,b.f=ie,S.f=le,w.f=C.f=ue,E.f=ce,a&&(G(U.prototype,"description",{configurable:!0,get:function(){return V(this).description}}),i||M(W,"propertyIsEnumerable",se,{unsafe:!0})),I.f=function(e){return re(A(e),e)}),r({global:!0,wrap:!0,forced:!s,sham:!s},{Symbol:U}),H(y(J),(function(e){D(e)})),r({target:"Symbol",stat:!0,forced:!s},{for:function(e){var t=String(e);if(u(Q,t))return Q[t];var n=U(t);return Q[t]=n,Z[n]=t,n},keyFor:function(e){if(!oe(e))throw TypeError(e+" is not a symbol");if(u(Z,e))return Z[e]},useSetter:function(){te=!0},useSimple:function(){te=!1}}),r({target:"Object",stat:!0,forced:!s,sham:!a},{create:function(e,t){return void 0===t?m(e):ae(m(e),t)},defineProperty:ie,defineProperties:ae,getOwnPropertyDescriptor:le}),r({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:ue,getOwnPropertySymbols:ce}),r({target:"Object",stat:!0,forced:l((function(){E.f(1)}))},{getOwnPropertySymbols:function(e){return E.f(f(e))}}),Y&&r({target:"JSON",stat:!0,forced:!s||l((function(){var e=U();return"[null]"!=j([e])||"{}"!=j({a:e})||"{}"!=j(Object(e))}))},{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(h(t)||void 0!==e)&&!oe(e))return c(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!oe(t))return t}),r[1]=t,j.apply(Y,r)}}),U.prototype[F]||T(U.prototype,F,U.prototype.valueOf),L(U,"Symbol"),N[P]=!0},function(e,t,n){"use strict";n(52),n(15),n(11),n(72),n(9),n(69),n(12),n(13),t.__esModule=!0,t.sortComparison=function(e,t){if("number"==typeof e&&"number"==typeof t)return e-t;return i(e,t)},t.toVisualValue=a,t.createArrayAssertion=u,t.toEmptyString=function(e){return null==e?"":e},t.unifyColumnValues=function(e){var t=e;t=l?Array.from(new Set(t)):(0,o.arrayUnique)(t);return t=t.sort((function(e,t){return"number"==typeof e&&"number"==typeof t?e-t:e===t?0:e>t?1:-1}))},t.intersectValues=function(e,t,n,r){var i,s=[],l=e===t;l||(i=u(t));return(0,o.arrayEach)(e,(function(e){var t=!1;(l||i(e))&&(t=!0);var o={checked:t,value:e,visualValue:a(e,n)};r&&r(o),s.push(o)})),s};var r=n(81),o=n(3),i=(0,r.getComparisonFunction)();function a(e,t){var n=e;return""===n&&(n="(".concat(t,")")),n}var s=new Set([1]).has(1),l=s&&"function"==typeof Array.from;function u(e){var t=e;return s&&(t=new Set(t)),function(e){return s?t.has(e):!!~t.indexOf(e)}}},function(e,t,n){"use strict";n(60),t.__esModule=!0,t.getOperationFunc=function(e){if(!r[e])throw Error('Operation with id "'.concat(e,'" does not exist.'));var t=r[e].func;return function(e,n){return t(e,n)}},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(10),o=n(0);n(117),t.__esModule=!0,t.default=void 0;var i=o(n(1)),a=o(n(2)),s=n(4),l=o(n(49)),u=o(n(25)),c=n(8),h=n(3),d=r(n(14)),f=["click","input","keydown","keypress","keyup","focus","blur","change"],v=function(){function e(t,n){(0,i.default)(this,e),this.hot=t,this.eventManager=new u.default(this),this.options=(0,s.extend)(e.DEFAULTS,n),this._element=this.hot.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName),this.buildState=!1}return(0,a.default)(e,null,[{key:"DEFAULTS",get:function(){return(0,s.clone)({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}}]),(0,a.default)(e,[{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(){var e=this,t=function(t,n){e.eventManager.addEventListener(t,n,(function(t){return e.runLocalHooks(n,t,e)}))};if(this.buildState||(this.buildState="building"),this.options.className&&(0,c.addClass)(this._element,this.options.className),this.options.children.length)(0,h.arrayEach)(this.options.children,(function(t){return e._element.appendChild(t.element)}));else if(this.options.wrapIt){var n=this.hot.rootDocument.createElement(this.options.tagName);(0,s.objectEach)(this.options,(function(t,r){void 0!==n[r]&&"className"!==r&&"tagName"!==r&&"children"!==r&&(n[r]=e.translateIfPossible(t))})),this._element.appendChild(n),(0,h.arrayEach)(f,(function(e){return t(n,e)}))}else(0,h.arrayEach)(f,(function(n){return t(e._element,n)}))}},{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"building"===this.buildState?this._element:"built"===this.buildState?(this.update(),this._element):(this.buildState="building",this.build(),this.buildState="built",this._element)}}]),e}();(0,s.mixin)(v,l.default);var g=v;t.default=g},function(e,t,n){var o;"undefined"!=typeof self&&self,o=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}([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,t,n){var r=n(0);t.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},t.isFlat=function(e){if(!e)return!1;for(var t=0;t<e.length;++t)if(Array.isArray(e[t]))return!1;return!0},t.flatten=function(){for(var e=t.argsToArray.apply(null,arguments);!t.isFlat(e);)e=t.flattenShallow(e);return e},t.argsToArray=function(e){var n=[];return t.arrayEach(e,(function(e){n.push(e)})),n},t.numbers=function(){var e=this.flatten.apply(null,arguments);return e.filter((function(e){return"number"==typeof e}))},t.cleanFloat=function(e){return Math.round(1e14*e)/1e14},t.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)||r.value},t.parseNumber=function(e){return void 0===e||""===e?r.value:isNaN(e)?r.value:parseFloat(e)},t.parseNumberArray=function(e){var n,o;if(!e||0===(n=e.length))return r.value;for(;n--;){if((o=t.parseNumber(e[n]))===r.value)return o;e[n]=o}return e},t.parseMatrix=function(e){var n;if(!e||0===e.length)return r.value;for(var o=0;o<e.length;o++)if(n=t.parseNumberArray(e[o]),e[o]=n,n instanceof Error)return n;return e};var o=new Date(Date.UTC(1900,0,1));t.parseDate=function(e){if(!isNaN(e)){if(e instanceof Date)return new Date(e);var t=parseInt(e,10);return t<0?r.num:t<=60?new Date(o.getTime()+864e5*(t-1)):new Date(o.getTime()+864e5*(t-2))}return"string"!=typeof e||(e=new Date(e),isNaN(e))?r.value:e},t.parseDateArray=function(e){for(var t,n=e.length;n--;){if((t=this.parseDate(e[n]))===r.value)return t;e[n]=t}return e},t.anyIsError=function(){for(var e=arguments.length;e--;)if(arguments[e]instanceof Error)return!0;return!1},t.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},t.rest=function(e,t){return t=t||1,e&&"function"==typeof e.slice?e.slice(t):e},t.initial=function(e,t){return t=t||1,e&&"function"==typeof e.slice?e.slice(0,e.length-t):e},t.arrayEach=function(e,t){for(var n=-1,r=e.length;++n<r&&!1!==t(e[n],n,e););return e},t.transpose=function(e){return e?e[0].map((function(t,n){return e.map((function(e){return e[n]}))})):r.value}},function(e,t,n){"use strict";var r;t.__esModule=!0,t.default=function(e){var t=void 0;return e=(e+"").replace(/#|!|\?/g,""),d[e]&&(t=d[e]),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=e.indexOf(".")>-1?parseFloat(e):parseInt(e,10)),t}t.__esModule=!0,t.toNumber=r,t.invertNumber=function(e){return-1*r(e)}},function(e,t,n){var r=n(1),o=n(0),i=n(5),a=n(8),s=n(7);t.ABS=function(e){return(e=r.parseNumber(e))instanceof Error?e:Math.abs(e)},t.ACOS=function(e){if((e=r.parseNumber(e))instanceof Error)return e;var t=Math.acos(e);return isNaN(t)&&(t=o.num),t},t.ACOSH=function(e){if((e=r.parseNumber(e))instanceof Error)return e;var t=Math.log(e+Math.sqrt(e*e-1));return isNaN(t)&&(t=o.num),t},t.ACOT=function(e){return(e=r.parseNumber(e))instanceof Error?e:Math.atan(1/e)},t.ACOTH=function(e){if((e=r.parseNumber(e))instanceof Error)return e;var t=.5*Math.log((e+1)/(e-1));return isNaN(t)&&(t=o.num),t},t.AGGREGATE=function(e,n,a,s){if(e=r.parseNumber(e),n=r.parseNumber(e),r.anyIsError(e,n))return o.value;switch(e){case 1:return i.AVERAGE(a);case 2:return i.COUNT(a);case 3:return i.COUNTA(a);case 4:return i.MAX(a);case 5:return i.MIN(a);case 6:return t.PRODUCT(a);case 7:return i.STDEV.S(a);case 8:return i.STDEV.P(a);case 9:return t.SUM(a);case 10:return i.VAR.S(a);case 11:return i.VAR.P(a);case 12:return i.MEDIAN(a);case 13:return i.MODE.SNGL(a);case 14:return i.LARGE(a,s);case 15:return i.SMALL(a,s);case 16:return i.PERCENTILE.INC(a,s);case 17:return i.QUARTILE.INC(a,s);case 18:return i.PERCENTILE.EXC(a,s);case 19:return i.QUARTILE.EXC(a,s)}},t.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 o.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},t.ASIN=function(e){if((e=r.parseNumber(e))instanceof Error)return e;var t=Math.asin(e);return isNaN(t)&&(t=o.num),t},t.ASINH=function(e){return(e=r.parseNumber(e))instanceof Error?e:Math.log(e+Math.sqrt(e*e+1))},t.ATAN=function(e){return(e=r.parseNumber(e))instanceof Error?e:Math.atan(e)},t.ATAN2=function(e,t){return e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?o.value:Math.atan2(e,t)},t.ATANH=function(e){if((e=r.parseNumber(e))instanceof Error)return e;var t=Math.log((1+e)/(1-e))/2;return isNaN(t)&&(t=o.num),t},t.BASE=function(e,t,n){if(n=n||0,e=r.parseNumber(e),t=r.parseNumber(t),n=r.parseNumber(n),r.anyIsError(e,t,n))return o.value;n=void 0===n?0:n;var i=e.toString(t);return new Array(Math.max(n+1-i.length,0)).join("0")+i},t.CEILING=function(e,n,i){if(n=void 0===n?1:Math.abs(n),i=i||0,e=r.parseNumber(e),n=r.parseNumber(n),i=r.parseNumber(i),r.anyIsError(e,n,i))return o.value;if(0===n)return 0;var a=-Math.floor(Math.log(n)/Math.log(10));return e>=0?t.ROUND(Math.ceil(e/n)*n,a):0===i?-t.ROUND(Math.floor(Math.abs(e)/n)*n,a):-t.ROUND(Math.ceil(Math.abs(e)/n)*n,a)},t.CEILING.MATH=t.CEILING,t.CEILING.PRECISE=t.CEILING,t.COMBIN=function(e,n){return e=r.parseNumber(e),n=r.parseNumber(n),r.anyIsError(e,n)?o.value:t.FACT(e)/(t.FACT(n)*t.FACT(e-n))},t.COMBINA=function(e,n){return e=r.parseNumber(e),n=r.parseNumber(n),r.anyIsError(e,n)?o.value:0===e&&0===n?1:t.COMBIN(e+n-1,e-1)},t.COS=function(e){return(e=r.parseNumber(e))instanceof Error?e:Math.cos(e)},t.COSH=function(e){return(e=r.parseNumber(e))instanceof Error?e:(Math.exp(e)+Math.exp(-e))/2},t.COT=function(e){return(e=r.parseNumber(e))instanceof Error?e:1/Math.tan(e)},t.COTH=function(e){if((e=r.parseNumber(e))instanceof Error)return e;var t=Math.exp(2*e);return(t+1)/(t-1)},t.CSC=function(e){return(e=r.parseNumber(e))instanceof Error?e:1/Math.sin(e)},t.CSCH=function(e){return(e=r.parseNumber(e))instanceof Error?e:2/(Math.exp(e)-Math.exp(-e))},t.DECIMAL=function(e,t){return arguments.length<1?o.value:parseInt(e,t)},t.DEGREES=function(e){return(e=r.parseNumber(e))instanceof Error?e:180*e/Math.PI},t.EVEN=function(e){return(e=r.parseNumber(e))instanceof Error?e:t.CEILING(e,-2,-1)},t.EXP=function(e){return arguments.length<1?o.na:"number"!=typeof e||arguments.length>1?o.error:e=Math.exp(e)};var l=[];t.FACT=function(e){if((e=r.parseNumber(e))instanceof Error)return e;var n=Math.floor(e);return 0===n||1===n?1:l[n]>0?l[n]:(l[n]=t.FACT(n-1)*n,l[n])},t.FACTDOUBLE=function(e){if((e=r.parseNumber(e))instanceof Error)return e;var n=Math.floor(e);return n<=0?1:n*t.FACTDOUBLE(n-2)},t.FLOOR=function(e,n){if(e=r.parseNumber(e),n=r.parseNumber(n),r.anyIsError(e,n))return o.value;if(0===n)return 0;if(!(e>0&&n>0||e<0&&n<0))return o.num;n=Math.abs(n);var i=-Math.floor(Math.log(n)/Math.log(10));return e>=0?t.ROUND(Math.floor(e/n)*n,i):-t.ROUND(Math.ceil(Math.abs(e)/n),i)},t.FLOOR.MATH=function(e,n,i){if(n=void 0===n?1:n,i=void 0===i?0:i,e=r.parseNumber(e),n=r.parseNumber(n),i=r.parseNumber(i),r.anyIsError(e,n,i))return o.value;if(0===n)return 0;n=n?Math.abs(n):1;var a=-Math.floor(Math.log(n)/Math.log(10));return e>=0?t.ROUND(Math.floor(e/n)*n,a):0===i||void 0===i?-t.ROUND(Math.ceil(Math.abs(e)/n)*n,a):-t.ROUND(Math.floor(Math.abs(e)/n)*n,a)},t.FLOOR.PRECISE=t.FLOOR.MATH,t.GCD=function(){var e=r.parseNumberArray(r.flatten(arguments));if(e instanceof Error)return e;for(var t=e.length,n=e[0],o=n<0?-n:n,i=1;i<t;i++){for(var a=e[i],s=a<0?-a:a;o&&s;)o>s?o%=s:s%=o;o+=s}return o},t.INT=function(e){return(e=r.parseNumber(e))instanceof Error?e:Math.floor(e)},t.ISO={CEILING:t.CEILING},t.LCM=function(){var e=r.parseNumberArray(r.flatten(arguments));if(e instanceof Error)return e;for(var t,n,o,i,a=1;void 0!==(o=e.pop());)for(;o>1;){if(o%2){for(t=3,n=Math.floor(Math.sqrt(o));t<=n&&o%t;t+=2);i=t<=n?t:o}else i=2;for(o/=i,a*=i,t=e.length;t;e[--t]%i==0&&1==(e[t]/=i)&&e.splice(t,1));}return a},t.LN=function(e){return(e=r.parseNumber(e))instanceof Error?e:Math.log(e)},t.LN10=function(){return Math.log(10)},t.LN2=function(){return Math.log(2)},t.LOG10E=function(){return Math.LOG10E},t.LOG2E=function(){return Math.LOG2E},t.LOG=function(e,t){return e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?o.value:(t=void 0===t?10:t,Math.log(e)/Math.log(t))},t.LOG10=function(e){return(e=r.parseNumber(e))instanceof Error?e:Math.log(e)/Math.log(10)},t.MOD=function(e,t){if(e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t))return o.value;if(0===t)return o.div0;var n=Math.abs(e%t);return t>0?n:-n},t.MROUND=function(e,t){return e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?o.value:e*t<0?o.num:Math.round(e/t)*t},t.MULTINOMIAL=function(){var e=r.parseNumberArray(r.flatten(arguments));if(e instanceof Error)return e;for(var n=0,o=1,i=0;i<e.length;i++)n+=e[i],o*=t.FACT(e[i]);return t.FACT(n)/o},t.ODD=function(e){if((e=r.parseNumber(e))instanceof Error)return e;var t=Math.ceil(Math.abs(e));return t=1&t?t:t+1,e>0?t:-t},t.PI=function(){return Math.PI},t.E=function(){return Math.E},t.POWER=function(e,t){if(e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t))return o.value;var n=Math.pow(e,t);return isNaN(n)?o.num:n},t.PRODUCT=function(){var e=r.parseNumberArray(r.flatten(arguments));if(e instanceof Error)return e;for(var t=1,n=0;n<e.length;n++)t*=e[n];return t},t.QUOTIENT=function(e,t){return e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?o.value:parseInt(e/t,10)},t.RADIANS=function(e){return(e=r.parseNumber(e))instanceof Error?e:e*Math.PI/180},t.RAND=function(){return Math.random()},t.RANDBETWEEN=function(e,t){return e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?o.value:e+Math.ceil((t-e+1)*Math.random())-1},t.ROMAN=function(e){if((e=r.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"],o="",i=3;i--;)o=(n[+t.pop()+10*i]||"")+o;return new Array(+t.join("")+1).join("M")+o},t.ROUND=function(e,t){return e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?o.value:Math.round(e*Math.pow(10,t))/Math.pow(10,t)},t.ROUNDDOWN=function(e,t){return e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?o.value:(e>0?1:-1)*Math.floor(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)},t.ROUNDUP=function(e,t){return e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?o.value:(e>0?1:-1)*Math.ceil(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)},t.SEC=function(e){return(e=r.parseNumber(e))instanceof Error?e:1/Math.cos(e)},t.SECH=function(e){return(e=r.parseNumber(e))instanceof Error?e:2/(Math.exp(e)+Math.exp(-e))},t.SERIESSUM=function(e,t,n,i){if(e=r.parseNumber(e),t=r.parseNumber(t),n=r.parseNumber(n),i=r.parseNumberArray(i),r.anyIsError(e,t,n,i))return o.value;for(var a=i[0]*Math.pow(e,t),s=1;s<i.length;s++)a+=i[s]*Math.pow(e,t+s*n);return a},t.SIGN=function(e){return(e=r.parseNumber(e))instanceof Error?e:e<0?-1:0===e?0:1},t.SIN=function(e){return(e=r.parseNumber(e))instanceof Error?e:Math.sin(e)},t.SINH=function(e){return(e=r.parseNumber(e))instanceof Error?e:(Math.exp(e)-Math.exp(-e))/2},t.SQRT=function(e){return(e=r.parseNumber(e))instanceof Error?e:e<0?o.num:Math.sqrt(e)},t.SQRTPI=function(e){return(e=r.parseNumber(e))instanceof Error?e:Math.sqrt(e*Math.PI)},t.SQRT1_2=function(){return 1/Math.sqrt(2)},t.SQRT2=function(){return Math.sqrt(2)},t.SUBTOTAL=function(e,n){if((e=r.parseNumber(e))instanceof Error)return e;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 t.PRODUCT(n);case 7:return i.STDEV.S(n);case 8:return i.STDEV.P(n);case 9:return t.SUM(n);case 10:return i.VAR.S(n);case 11:return i.VAR.P(n);case 101:return i.AVERAGE(n);case 102:return i.COUNT(n);case 103:return i.COUNTA(n);case 104:return i.MAX(n);case 105:return i.MIN(n);case 106:return t.PRODUCT(n);case 107:return i.STDEV.S(n);case 108:return i.STDEV.P(n);case 109:return t.SUM(n);case 110:return i.VAR.S(n);case 111:return i.VAR.P(n)}},t.ADD=function(e,t){return 2!==arguments.length?o.na:(e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?o.value:e+t)},t.MINUS=function(e,t){return 2!==arguments.length?o.na:(e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?o.value:e-t)},t.DIVIDE=function(e,t){return 2!==arguments.length?o.na:(e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?o.value:0===t?o.div0:e/t)},t.MULTIPLY=function(e,t){return 2!==arguments.length?o.na:(e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?o.value:e*t)},t.GTE=function(e,t){return 2!==arguments.length?o.na:(e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?o.error:e>=t)},t.LT=function(e,t){return 2!==arguments.length?o.na:(e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?o.error:e<t)},t.LTE=function(e,t){return 2!==arguments.length?o.na:(e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?o.error:e<=t)},t.EQ=function(e,t){return 2!==arguments.length?o.na:e===t},t.NE=function(e,t){return 2!==arguments.length?o.na:e!==t},t.POW=function(e,n){return 2!==arguments.length?o.na:(e=r.parseNumber(e),n=r.parseNumber(n),r.anyIsError(e,n)?o.error:t.POWER(e,n))},t.SUM=function(){var e=0;return r.arrayEach(r.argsToArray(arguments),(function(n){if("number"==typeof n)e+=n;else if("string"==typeof n){var r=parseFloat(n);!isNaN(r)&&(e+=r)}else Array.isArray(n)&&(e+=t.SUM.apply(null,n))})),e},t.SUMIF=function(e,t){if((e=r.parseNumberArray(r.flatten(e)))instanceof Error)return e;for(var n=0,o=void 0===t||"*"===t,i=o?null:s.parse(t+""),a=0;a<e.length;a++){var l=e[a];if(o)n+=l;else{var u=[s.createToken(l,s.TOKEN_TYPE_LITERAL)].concat(i);n+=s.compute(u)?l:0}}return n},t.SUMIFS=function(){var e=r.argsToArray(arguments),t=r.parseNumberArray(r.flatten(e.shift()));if(t instanceof Error)return t;for(var n=e,o=t.length,i=n.length,a=0,l=0;l<o;l++){for(var u=t[l],c=!1,h=0;h<i;h++){var d=n[h],f=void 0===d||"*"===d,v=!1;if(f)v=!0;else{var g=s.parse(d+""),p=[s.createToken(u,s.TOKEN_TYPE_LITERAL)].concat(g);v=s.compute(p)}if(!v){c=!1;break}c=!0}c&&(a+=u)}return a},t.SUMPRODUCT=function(){if(!arguments||0===arguments.length)return o.value;for(var e,t,n,i,a=arguments.length+1,s=0,l=0;l<arguments[0].length;l++)if(arguments[0][l]instanceof Array)for(var u=0;u<arguments[0][l].length;u++){for(e=1,t=1;t<a;t++){if((i=r.parseNumber(arguments[t-1][l][u]))instanceof Error)return i;e*=i}s+=e}else{for(e=1,t=1;t<a;t++){if((n=r.parseNumber(arguments[t-1][l]))instanceof Error)return n;e*=n}s+=e}return s},t.SUMSQ=function(){var e=r.parseNumberArray(r.flatten(arguments));if(e instanceof Error)return e;for(var t=0,n=e.length,o=0;o<n;o++)t+=a.ISNUMBER(e[o])?e[o]*e[o]:0;return t},t.SUMX2MY2=function(e,t){if(e=r.parseNumberArray(r.flatten(e)),t=r.parseNumberArray(r.flatten(t)),r.anyIsError(e,t))return o.value;for(var n=0,i=0;i<e.length;i++)n+=e[i]*e[i]-t[i]*t[i];return n},t.SUMX2PY2=function(e,t){if(e=r.parseNumberArray(r.flatten(e)),t=r.parseNumberArray(r.flatten(t)),r.anyIsError(e,t))return o.value;var n=0;e=r.parseNumberArray(r.flatten(e)),t=r.parseNumberArray(r.flatten(t));for(var i=0;i<e.length;i++)n+=e[i]*e[i]+t[i]*t[i];return n},t.SUMXMY2=function(e,t){if(e=r.parseNumberArray(r.flatten(e)),t=r.parseNumberArray(r.flatten(t)),r.anyIsError(e,t))return o.value;var n=0;e=r.flatten(e),t=r.flatten(t);for(var i=0;i<e.length;i++)n+=Math.pow(e[i]-t[i],2);return n},t.TAN=function(e){return(e=r.parseNumber(e))instanceof Error?e:Math.tan(e)},t.TANH=function(e){if((e=r.parseNumber(e))instanceof Error)return e;var t=Math.exp(2*e);return(t-1)/(t+1)},t.TRUNC=function(e,t){return t=void 0===t?0:t,e=r.parseNumber(e),t=r.parseNumber(t),r.anyIsError(e,t)?o.value:(e>0?1:-1)*Math.floor(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)}},function(e,t,n){var r=n(4),o=n(6),i=n(10),a=n(1),s=n(7),l=n(0),u=n(11);t.AVEDEV=function(){var e=a.parseNumberArray(a.flatten(arguments));return e instanceof Error?e:i.sum(i(e).subtract(i.mean(e)).abs()[0])/e.length},t.AVERAGE=function(){for(var e,t=a.numbers(a.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=l.num),e},t.AVERAGEA=function(){for(var e,t=a.flatten(arguments),n=t.length,r=0,o=0,i=0;i<n;i++){var s=t[i];"number"==typeof s&&(r+=s),!0===s&&r++,null!==s&&o++}return e=r/o,isNaN(e)&&(e=l.num),e},t.AVERAGEIF=function(e,t,n){if(arguments.length<=1)return l.na;if(n=n||e,e=a.flatten(e),(n=a.parseNumberArray(a.flatten(n)))instanceof Error)return n;for(var r=0,o=0,i=void 0===t||"*"===t,u=i?null:s.parse(t+""),c=0;c<e.length;c++){var h=e[c];if(i)o+=n[c],r++;else{var d=[s.createToken(h,s.TOKEN_TYPE_LITERAL)].concat(u);s.compute(d)&&(o+=n[c],r++)}}return o/r},t.AVERAGEIFS=function(){for(var e=a.argsToArray(arguments),t=(e.length-1)/2,n=a.flatten(e[0]),r=0,o=0,i=0;i<n.length;i++){for(var l=!1,u=0;u<t;u++){var c=e[2*u+1][i],h=e[2*u+2],d=void 0===h||"*"===h,f=!1;if(d)f=!0;else{var v=s.parse(h+""),g=[s.createToken(c,s.TOKEN_TYPE_LITERAL)].concat(v);f=s.compute(g)}if(!f){l=!1;break}l=!0}l&&(o+=n[i],r++)}var p=o/r;return isNaN(p)?0:p},t.BETA={},t.BETA.DIST=function(e,t,n,r,o,s){return arguments.length<4?l.value:(o=void 0===o?0:o,s=void 0===s?1:s,e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),o=a.parseNumber(o),s=a.parseNumber(s),a.anyIsError(e,t,n,o,s)?l.value:(e=(e-o)/(s-o),r?i.beta.cdf(e,t,n):i.beta.pdf(e,t,n)))},t.BETA.INV=function(e,t,n,r,o){return r=void 0===r?0:r,o=void 0===o?1:o,e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),r=a.parseNumber(r),o=a.parseNumber(o),a.anyIsError(e,t,n,r,o)?l.value:i.beta.inv(e,t,n)*(o-r)+r},t.BINOM={},t.BINOM.DIST=function(e,t,n,r){return e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),r=a.parseNumber(r),a.anyIsError(e,t,n,r)?l.value:r?i.binomial.cdf(e,t,n):i.binomial.pdf(e,t,n)},t.BINOM.DIST.RANGE=function(e,t,n,o){if(o=void 0===o?n:o,e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),o=a.parseNumber(o),a.anyIsError(e,t,n,o))return l.value;for(var i=0,s=n;s<=o;s++)i+=r.COMBIN(e,s)*Math.pow(t,s)*Math.pow(1-t,e-s);return i},t.BINOM.INV=function(e,t,n){if(e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),a.anyIsError(e,t,n))return l.value;for(var r=0;r<=e;){if(i.binomial.cdf(r,e,t)>=n)return r;r++}},t.CHISQ={},t.CHISQ.DIST=function(e,t,n){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?l.value:n?i.chisquare.cdf(e,t):i.chisquare.pdf(e,t)},t.CHISQ.DIST.RT=function(e,t){return!e|!t?l.na:e<1||t>Math.pow(10,10)?l.num:"number"!=typeof e||"number"!=typeof t?l.value:1-i.chisquare.cdf(e,t)},t.CHISQ.INV=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?l.value:i.chisquare.inv(e,t)},t.CHISQ.INV.RT=function(e,t){return!e|!t?l.na:e<0||e>1||t<1||t>Math.pow(10,10)?l.num:"number"!=typeof e||"number"!=typeof t?l.value:i.chisquare.inv(1-e,t)},t.CHISQ.TEST=function(e,t){if(2!==arguments.length)return l.na;if(!(e instanceof Array&&t instanceof Array))return l.value;if(e.length!==t.length)return l.value;if(e[0]&&t[0]&&e[0].length!==t[0].length)return l.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),u=0,c=Math.PI;for(r=0;r<i;r++)for(o=0;o<a;o++)u+=Math.pow(e[r][o]-t[r][o],2)/t[r][o];function h(e,t){var n=Math.exp(-.5*e);t%2==1&&(n*=Math.sqrt(2*e/c));for(var r=t;r>=2;)n=n*e/r,r-=2;for(var o=n,i=t;o>1e-10*n;)n+=o=o*e/(i+=2);return 1-n}return Math.round(1e6*h(u,s))/1e6},t.COLUMN=function(e,t){return 2!==arguments.length?l.na:t<0?l.num:e instanceof Array&&"number"==typeof t?0!==e.length?i.col(e,t):void 0:l.value},t.COLUMNS=function(e){return 1!==arguments.length?l.na:e instanceof Array?0===e.length?0:i.cols(e):l.value},t.CONFIDENCE={},t.CONFIDENCE.NORM=function(e,t,n){return e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),a.anyIsError(e,t,n)?l.value:i.normalci(1,e,t,n)[1]-1},t.CONFIDENCE.T=function(e,t,n){return e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),a.anyIsError(e,t,n)?l.value:i.tci(1,e,t,n)[1]-1},t.CORREL=function(e,t){return e=a.parseNumberArray(a.flatten(e)),t=a.parseNumberArray(a.flatten(t)),a.anyIsError(e,t)?l.value:i.corrcoeff(e,t)},t.COUNT=function(){return a.numbers(a.flatten(arguments)).length},t.COUNTA=function(){var e=a.flatten(arguments);return e.length-t.COUNTBLANK(e)},t.COUNTIN=function(e,t){var n=0;e=a.flatten(e);for(var r=0;r<e.length;r++)e[r]===t&&n++;return n},t.COUNTBLANK=function(){for(var e,t=a.flatten(arguments),n=0,r=0;r<t.length;r++)null!==(e=t[r])&&""!==e||n++;return n},t.COUNTIF=function(e,t){if(e=a.flatten(e),void 0===t||"*"===t)return e.length;for(var n=0,r=s.parse(t+""),o=0;o<e.length;o++){var i=e[o],l=[s.createToken(i,s.TOKEN_TYPE_LITERAL)].concat(r);s.compute(l)&&n++}return n},t.COUNTIFS=function(){for(var e=a.argsToArray(arguments),t=new Array(a.flatten(e[0]).length),n=0;n<t.length;n++)t[n]=!0;for(n=0;n<e.length;n+=2){var r=a.flatten(e[n]),o=e[n+1],i=void 0===o||"*"===o;if(!i)for(var l=s.parse(o+""),u=0;u<r.length;u++){var c=r[u],h=[s.createToken(c,s.TOKEN_TYPE_LITERAL)].concat(l);t[u]=t[u]&&s.compute(h)}}var d=0;for(n=0;n<t.length;n++)t[n]&&d++;return d},t.COUNTUNIQUE=function(){return u.UNIQUE.apply(null,a.flatten(arguments)).length},t.COVARIANCE={},t.COVARIANCE.P=function(e,t){if(e=a.parseNumberArray(a.flatten(e)),t=a.parseNumberArray(a.flatten(t)),a.anyIsError(e,t))return l.value;for(var n=i.mean(e),r=i.mean(t),o=0,s=e.length,u=0;u<s;u++)o+=(e[u]-n)*(t[u]-r);return o/s},t.COVARIANCE.S=function(e,t){return e=a.parseNumberArray(a.flatten(e)),t=a.parseNumberArray(a.flatten(t)),a.anyIsError(e,t)?l.value:i.covariance(e,t)},t.DEVSQ=function(){var e=a.parseNumberArray(a.flatten(arguments));if(e instanceof Error)return e;for(var t=i.mean(e),n=0,r=0;r<e.length;r++)n+=Math.pow(e[r]-t,2);return n},t.EXPON={},t.EXPON.DIST=function(e,t,n){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?l.value:n?i.exponential.cdf(e,t):i.exponential.pdf(e,t)},t.F={},t.F.DIST=function(e,t,n,r){return e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),a.anyIsError(e,t,n)?l.value:r?i.centralF.cdf(e,t,n):i.centralF.pdf(e,t,n)},t.F.DIST.RT=function(e,t,n){return 3!==arguments.length?l.na:e<0||t<1||n<1?l.num:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?l.value:1-i.centralF.cdf(e,t,n)},t.F.INV=function(e,t,n){return e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),a.anyIsError(e,t,n)?l.value:e<=0||e>1?l.num:i.centralF.inv(e,t,n)},t.F.INV.RT=function(e,t,n){return 3!==arguments.length?l.na:e<0||e>1||t<1||t>Math.pow(10,10)||n<1||n>Math.pow(10,10)?l.num:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?l.value:i.centralF.inv(1-e,t,n)},t.F.TEST=function(e,t){if(!e||!t)return l.na;if(!(e instanceof Array&&t instanceof Array))return l.na;if(e.length<2||t.length<2)return l.div0;var n=function(e,t){for(var n=0,r=0;r<e.length;r++)n+=Math.pow(e[r]-t,2);return n},o=r.SUM(e)/e.length,i=r.SUM(t)/t.length;return n(e,o)/(e.length-1)/(n(t,i)/(t.length-1))},t.FISHER=function(e){return(e=a.parseNumber(e))instanceof Error?e:Math.log((1+e)/(1-e))/2},t.FISHERINV=function(e){if((e=a.parseNumber(e))instanceof Error)return e;var t=Math.exp(2*e);return(t-1)/(t+1)},t.FORECAST=function(e,t,n){if(e=a.parseNumber(e),t=a.parseNumberArray(a.flatten(t)),n=a.parseNumberArray(a.flatten(n)),a.anyIsError(e,t,n))return l.value;for(var r=i.mean(n),o=i.mean(t),s=n.length,u=0,c=0,h=0;h<s;h++)u+=(n[h]-r)*(t[h]-o),c+=Math.pow(n[h]-r,2);var d=u/c;return o-d*r+d*e},t.FREQUENCY=function(e,t){if(e=a.parseNumberArray(a.flatten(e)),t=a.parseNumberArray(a.flatten(t)),a.anyIsError(e,t))return l.value;for(var n=e.length,r=t.length,o=[],i=0;i<=r;i++){o[i]=0;for(var s=0;s<n;s++)0===i?e[s]<=t[0]&&(o[0]+=1):i<r?e[s]>t[i-1]&&e[s]<=t[i]&&(o[i]+=1):i===r&&e[s]>t[r-1]&&(o[r]+=1)}return o},t.GAMMA=function(e){return(e=a.parseNumber(e))instanceof Error?e:0===e?l.num:parseInt(e,10)===e&&e<0?l.num:i.gammafn(e)},t.GAMMA.DIST=function(e,t,n,r){return 4!==arguments.length?l.na:e<0||t<=0||n<=0?l.value:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?l.value:r?i.gamma.cdf(e,t,n,!0):i.gamma.pdf(e,t,n,!1)},t.GAMMA.INV=function(e,t,n){return 3!==arguments.length?l.na:e<0||e>1||t<=0||n<=0?l.num:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?l.value:i.gamma.inv(e,t,n)},t.GAMMALN=function(e){return(e=a.parseNumber(e))instanceof Error?e:i.gammaln(e)},t.GAMMALN.PRECISE=function(e){return 1!==arguments.length?l.na:e<=0?l.num:"number"!=typeof e?l.value:i.gammaln(e)},t.GAUSS=function(e){return(e=a.parseNumber(e))instanceof Error?e:i.normal.cdf(e,0,1)-.5},t.GEOMEAN=function(){var e=a.parseNumberArray(a.flatten(arguments));return e instanceof Error?e:i.geomean(e)},t.GROWTH=function(e,t,n,r){if((e=a.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=a.parseNumberArray(t),n=a.parseNumberArray(n),a.anyIsError(t,n))return l.value;void 0===r&&(r=!0);var i,s,u=e.length,c=0,h=0,d=0,f=0;for(o=0;o<u;o++){var v=t[o],g=Math.log(e[o]);c+=v,h+=g,d+=v*g,f+=v*v}c/=u,h/=u,d/=u,f/=u,r?s=h-(i=(d-c*h)/(f-c*c))*c:(i=d/f,s=0);var p=[];for(o=0;o<n.length;o++)p.push(Math.exp(s+i*n[o]));return p},t.HARMEAN=function(){var e=a.parseNumberArray(a.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},t.HYPGEOM={},t.HYPGEOM.DIST=function(e,t,n,o,i){if(e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),o=a.parseNumber(o),a.anyIsError(e,t,n,o))return l.value;function s(e,t,n,o){return r.COMBIN(n,e)*r.COMBIN(o-n,t-e)/r.COMBIN(o,t)}return i?function(e,t,n,r){for(var o=0,i=0;i<=e;i++)o+=s(i,t,n,r);return o}(e,t,n,o):s(e,t,n,o)},t.INTERCEPT=function(e,n){return e=a.parseNumberArray(e),n=a.parseNumberArray(n),a.anyIsError(e,n)?l.value:e.length!==n.length?l.na:t.FORECAST(0,e,n)},t.KURT=function(){var e=a.parseNumberArray(a.flatten(arguments));if(e instanceof Error)return e;for(var t=i.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(i.stdev(e,!0),4))-3*(n-1)*(n-1)/((n-2)*(n-3))},t.LARGE=function(e,t){return e=a.parseNumberArray(a.flatten(e)),t=a.parseNumber(t),a.anyIsError(e,t)?e:e.sort((function(e,t){return t-e}))[t-1]},t.LINEST=function(e,t){if(e=a.parseNumberArray(a.flatten(e)),t=a.parseNumberArray(a.flatten(t)),a.anyIsError(e,t))return l.value;for(var n=i.mean(e),r=i.mean(t),o=t.length,s=0,u=0,c=0;c<o;c++)s+=(t[c]-r)*(e[c]-n),u+=Math.pow(t[c]-r,2);var h=s/u;return[h,n-h*r]},t.LOGEST=function(e,n){if(e=a.parseNumberArray(a.flatten(e)),n=a.parseNumberArray(a.flatten(n)),a.anyIsError(e,n))return l.value;for(var r=0;r<e.length;r++)e[r]=Math.log(e[r]);var o=t.LINEST(e,n);return o[0]=Math.round(1e6*Math.exp(o[0]))/1e6,o[1]=Math.round(1e6*Math.exp(o[1]))/1e6,o},t.LOGNORM={},t.LOGNORM.DIST=function(e,t,n,r){return e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),a.anyIsError(e,t,n)?l.value:r?i.lognormal.cdf(e,t,n):i.lognormal.pdf(e,t,n)},t.LOGNORM.INV=function(e,t,n){return e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),a.anyIsError(e,t,n)?l.value:i.lognormal.inv(e,t,n)},t.MAX=function(){var e=a.numbers(a.flatten(arguments));return 0===e.length?0:Math.max.apply(Math,e)},t.MAXA=function(){var e=a.arrayValuesToNumbers(a.flatten(arguments));return 0===e.length?0:Math.max.apply(Math,e)},t.MEDIAN=function(){var e=a.arrayValuesToNumbers(a.flatten(arguments)),t=i.median(e);return isNaN(t)&&(t=l.num),t},t.MIN=function(){var e=a.numbers(a.flatten(arguments));return 0===e.length?0:Math.min.apply(Math,e)},t.MINA=function(){var e=a.arrayValuesToNumbers(a.flatten(arguments));return 0===e.length?0:Math.min.apply(Math,e)},t.MODE={},t.MODE.MULT=function(){var e=a.parseNumberArray(a.flatten(arguments));if(e instanceof Error)return e;for(var t,n=e.length,r={},o=[],i=0,s=0;s<n;s++)r[t=e[s]]=r[t]?r[t]+1:1,r[t]>i&&(i=r[t],o=[]),r[t]===i&&(o[o.length]=t);return o},t.MODE.SNGL=function(){var e=a.parseNumberArray(a.flatten(arguments));return e instanceof Error?e:t.MODE.MULT(e).sort((function(e,t){return e-t}))[0]},t.NEGBINOM={},t.NEGBINOM.DIST=function(e,t,n,r){return e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),a.anyIsError(e,t,n)?l.value:r?i.negbin.cdf(e,t,n):i.negbin.pdf(e,t,n)},t.NORM={},t.NORM.DIST=function(e,t,n,r){return e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),a.anyIsError(e,t,n)?l.value:n<=0?l.num:r?i.normal.cdf(e,t,n):i.normal.pdf(e,t,n)},t.NORM.INV=function(e,t,n){return e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),a.anyIsError(e,t,n)?l.value:i.normal.inv(e,t,n)},t.NORM.S={},t.NORM.S.DIST=function(e,t){return(e=a.parseNumber(e))instanceof Error?l.value:t?i.normal.cdf(e,0,1):i.normal.pdf(e,0,1)},t.NORM.S.INV=function(e){return(e=a.parseNumber(e))instanceof Error?l.value:i.normal.inv(e,0,1)},t.PEARSON=function(e,t){if(t=a.parseNumberArray(a.flatten(t)),e=a.parseNumberArray(a.flatten(e)),a.anyIsError(t,e))return l.value;for(var n=i.mean(e),r=i.mean(t),o=e.length,s=0,u=0,c=0,h=0;h<o;h++)s+=(e[h]-n)*(t[h]-r),u+=Math.pow(e[h]-n,2),c+=Math.pow(t[h]-r,2);return s/Math.sqrt(u*c)},t.PERCENTILE={},t.PERCENTILE.EXC=function(e,t){if(e=a.parseNumberArray(a.flatten(e)),t=a.parseNumber(t),a.anyIsError(e,t))return l.value;var n=(e=e.sort((function(e,t){return e-t}))).length;if(t<1/(n+1)||t>1-1/(n+1))return l.num;var r=t*(n+1)-1,o=Math.floor(r);return a.cleanFloat(r===o?e[r]:e[o]+(r-o)*(e[o+1]-e[o]))},t.PERCENTILE.INC=function(e,t){if(e=a.parseNumberArray(a.flatten(e)),t=a.parseNumber(t),a.anyIsError(e,t))return l.value;var n=t*((e=e.sort((function(e,t){return e-t}))).length-1),r=Math.floor(n);return a.cleanFloat(n===r?e[n]:e[r]+(n-r)*(e[r+1]-e[r]))},t.PERCENTRANK={},t.PERCENTRANK.EXC=function(e,t,n){if(n=void 0===n?3:n,e=a.parseNumberArray(a.flatten(e)),t=a.parseNumber(t),n=a.parseNumber(n),a.anyIsError(e,t,n))return l.value;e=e.sort((function(e,t){return e-t}));for(var r=u.UNIQUE.apply(null,e),o=e.length,i=r.length,s=Math.pow(10,n),c=0,h=!1,d=0;!h&&d<i;)t===r[d]?(c=(e.indexOf(r[d])+1)/(o+1),h=!0):t>=r[d]&&(t<r[d+1]||d===i-1)&&(c=(e.indexOf(r[d])+1+(t-r[d])/(r[d+1]-r[d]))/(o+1),h=!0),d++;return Math.floor(c*s)/s},t.PERCENTRANK.INC=function(e,t,n){if(n=void 0===n?3:n,e=a.parseNumberArray(a.flatten(e)),t=a.parseNumber(t),n=a.parseNumber(n),a.anyIsError(e,t,n))return l.value;e=e.sort((function(e,t){return e-t}));for(var r=u.UNIQUE.apply(null,e),o=e.length,i=r.length,s=Math.pow(10,n),c=0,h=!1,d=0;!h&&d<i;)t===r[d]?(c=e.indexOf(r[d])/(o-1),h=!0):t>=r[d]&&(t<r[d+1]||d===i-1)&&(c=(e.indexOf(r[d])+(t-r[d])/(r[d+1]-r[d]))/(o-1),h=!0),d++;return Math.floor(c*s)/s},t.PERMUT=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?l.value:r.FACT(e)/r.FACT(e-t)},t.PERMUTATIONA=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?l.value:Math.pow(e,t)},t.PHI=function(e){return(e=a.parseNumber(e))instanceof Error?l.value:Math.exp(-.5*e*e)/2.5066282746310002},t.POISSON={},t.POISSON.DIST=function(e,t,n){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?l.value:n?i.poisson.cdf(e,t):i.poisson.pdf(e,t)},t.PROB=function(e,t,n,r){if(void 0===n)return 0;if(r=void 0===r?n:r,e=a.parseNumberArray(a.flatten(e)),t=a.parseNumberArray(a.flatten(t)),n=a.parseNumber(n),r=a.parseNumber(r),a.anyIsError(e,t,n,r))return l.value;if(n===r)return e.indexOf(n)>=0?t[e.indexOf(n)]:0;for(var o=e.sort((function(e,t){return e-t})),i=o.length,s=0,u=0;u<i;u++)o[u]>=n&&o[u]<=r&&(s+=t[e.indexOf(o[u])]);return s},t.QUARTILE={},t.QUARTILE.EXC=function(e,n){if(e=a.parseNumberArray(a.flatten(e)),n=a.parseNumber(n),a.anyIsError(e,n))return l.value;switch(n){case 1:return t.PERCENTILE.EXC(e,.25);case 2:return t.PERCENTILE.EXC(e,.5);case 3:return t.PERCENTILE.EXC(e,.75);default:return l.num}},t.QUARTILE.INC=function(e,n){if(e=a.parseNumberArray(a.flatten(e)),n=a.parseNumber(n),a.anyIsError(e,n))return l.value;switch(n){case 1:return t.PERCENTILE.INC(e,.25);case 2:return t.PERCENTILE.INC(e,.5);case 3:return t.PERCENTILE.INC(e,.75);default:return l.num}},t.RANK={},t.RANK.AVG=function(e,t,n){if(e=a.parseNumber(e),t=a.parseNumberArray(a.flatten(t)),a.anyIsError(e,t))return l.value;for(var r=(n=n||!1)?function(e,t){return e-t}:function(e,t){return t-e},o=(t=(t=a.flatten(t)).sort(r)).length,i=0,s=0;s<o;s++)t[s]===e&&i++;return i>1?(2*t.indexOf(e)+i+1)/2:t.indexOf(e)+1},t.RANK.EQ=function(e,t,n){if(e=a.parseNumber(e),t=a.parseNumberArray(a.flatten(t)),a.anyIsError(e,t))return l.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},t.ROW=function(e,t){return 2!==arguments.length?l.na:t<0?l.num:e instanceof Array&&"number"==typeof t?0!==e.length?i.row(e,t):void 0:l.value},t.ROWS=function(e){return 1!==arguments.length?l.na:e instanceof Array?0===e.length?0:i.rows(e):l.value},t.RSQ=function(e,n){return e=a.parseNumberArray(a.flatten(e)),n=a.parseNumberArray(a.flatten(n)),a.anyIsError(e,n)?l.value:Math.pow(t.PEARSON(e,n),2)},t.SKEW=function(){var e=a.parseNumberArray(a.flatten(arguments));if(e instanceof Error)return e;for(var t=i.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(i.stdev(e,!0),3))},t.SKEW.P=function(){var e=a.parseNumberArray(a.flatten(arguments));if(e instanceof Error)return e;for(var t=i.mean(e),n=e.length,r=0,o=0,s=0;s<n;s++)o+=Math.pow(e[s]-t,3),r+=Math.pow(e[s]-t,2);return r/=n,(o/=n)/Math.pow(r,1.5)},t.SLOPE=function(e,t){if(e=a.parseNumberArray(a.flatten(e)),t=a.parseNumberArray(a.flatten(t)),a.anyIsError(e,t))return l.value;for(var n=i.mean(t),r=i.mean(e),o=t.length,s=0,u=0,c=0;c<o;c++)s+=(t[c]-n)*(e[c]-r),u+=Math.pow(t[c]-n,2);return s/u},t.SMALL=function(e,t){return e=a.parseNumberArray(a.flatten(e)),t=a.parseNumber(t),a.anyIsError(e,t)?e:e.sort((function(e,t){return e-t}))[t-1]},t.STANDARDIZE=function(e,t,n){return e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),a.anyIsError(e,t,n)?l.value:(e-t)/n},t.STDEV={},t.STDEV.P=function(){var e=t.VAR.P.apply(this,arguments),n=Math.sqrt(e);return isNaN(n)&&(n=l.num),n},t.STDEV.S=function(){var e=t.VAR.S.apply(this,arguments),n=Math.sqrt(e);return n},t.STDEVA=function(){var e=t.VARA.apply(this,arguments),n=Math.sqrt(e);return n},t.STDEVPA=function(){var e=t.VARPA.apply(this,arguments),n=Math.sqrt(e);return isNaN(n)&&(n=l.num),n},t.STEYX=function(e,t){if(e=a.parseNumberArray(a.flatten(e)),t=a.parseNumberArray(a.flatten(t)),a.anyIsError(e,t))return l.value;for(var n=i.mean(t),r=i.mean(e),o=t.length,s=0,u=0,c=0,h=0;h<o;h++)s+=Math.pow(e[h]-r,2),u+=(t[h]-n)*(e[h]-r),c+=Math.pow(t[h]-n,2);return Math.sqrt((s-u*u/c)/(o-2))},t.TRANSPOSE=function(e){return e?i.transpose(e):l.na},t.T=o.T,t.T.DIST=function(e,t,n){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?l.value:n?i.studentt.cdf(e,t):i.studentt.pdf(e,t)},t.T.DIST["2T"]=function(e,t){return 2!==arguments.length?l.na:e<0||t<1?l.num:"number"!=typeof e||"number"!=typeof t?l.value:2*(1-i.studentt.cdf(e,t))},t.T.DIST.RT=function(e,t){return 2!==arguments.length?l.na:e<0||t<1?l.num:"number"!=typeof e||"number"!=typeof t?l.value:1-i.studentt.cdf(e,t)},t.T.INV=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?l.value:i.studentt.inv(e,t)},t.T.INV["2T"]=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),e<=0||e>1||t<1?l.num:a.anyIsError(e,t)?l.value:Math.abs(i.studentt.inv(e/2,t))},t.T.TEST=function(e,n){if(e=a.parseNumberArray(a.flatten(e)),n=a.parseNumberArray(a.flatten(n)),a.anyIsError(e,n))return l.value;var r,o=i.mean(e),s=i.mean(n),u=0,c=0;for(r=0;r<e.length;r++)u+=Math.pow(e[r]-o,2);for(r=0;r<n.length;r++)c+=Math.pow(n[r]-s,2);u/=e.length-1,c/=n.length-1;var h=Math.abs(o-s)/Math.sqrt(u/e.length+c/n.length);return t.T.DIST["2T"](h,e.length+n.length-2)},t.TREND=function(e,n,r){if(e=a.parseNumberArray(a.flatten(e)),n=a.parseNumberArray(a.flatten(n)),r=a.parseNumberArray(a.flatten(r)),a.anyIsError(e,n,r))return l.value;var o=t.LINEST(e,n),i=o[0],s=o[1],u=[];return r.forEach((function(e){u.push(i*e+s)})),u},t.TRIMMEAN=function(e,t){if(e=a.parseNumberArray(a.flatten(e)),t=a.parseNumber(t),a.anyIsError(e,t))return l.value;var n=r.FLOOR(e.length*t,2)/2;return i.mean(a.initial(a.rest(e.sort((function(e,t){return e-t})),n),n))},t.VAR={},t.VAR.P=function(){for(var e,n=a.numbers(a.flatten(arguments)),r=n.length,o=0,i=t.AVERAGE(n),s=0;s<r;s++)o+=Math.pow(n[s]-i,2);return e=o/r,isNaN(e)&&(e=l.num),e},t.VAR.S=function(){for(var e=a.numbers(a.flatten(arguments)),n=e.length,r=0,o=t.AVERAGE(e),i=0;i<n;i++)r+=Math.pow(e[i]-o,2);return r/(n-1)},t.VARA=function(){for(var e=a.flatten(arguments),n=e.length,r=0,o=0,i=t.AVERAGEA(e),s=0;s<n;s++){var l=e[s];r+="number"==typeof l?Math.pow(l-i,2):!0===l?Math.pow(1-i,2):Math.pow(0-i,2),null!==l&&o++}return r/(o-1)},t.VARPA=function(){for(var e,n=a.flatten(arguments),r=n.length,o=0,i=0,s=t.AVERAGEA(n),u=0;u<r;u++){var c=n[u];o+="number"==typeof c?Math.pow(c-s,2):!0===c?Math.pow(1-s,2):Math.pow(0-s,2),null!==c&&i++}return e=o/i,isNaN(e)&&(e=l.num),e},t.WEIBULL={},t.WEIBULL.DIST=function(e,t,n,r){return e=a.parseNumber(e),t=a.parseNumber(t),n=a.parseNumber(n),a.anyIsError(e,t,n)?l.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)},t.Z={},t.Z.TEST=function(e,n,r){if(e=a.parseNumberArray(a.flatten(e)),n=a.parseNumber(n),a.anyIsError(e,n))return l.value;r=r||t.STDEV.S(e);var o=e.length;return 1-t.NORM.S.DIST((t.AVERAGE(e)-n)/(r/Math.sqrt(o)),!0)}},function(e,t,n){var r=n(1),o=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=r.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=o.na),t},t.CONCATENATE=function(){for(var e=r.flatten(arguments),t=0;(t=e.indexOf(!0))>-1;)e[t]="TRUE";for(var n=0;(n=e.indexOf(!1))>-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?o.na:e===t},t.FIND=function(e,t,n){return arguments.length<2?o.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=r.parseNumber(t))instanceof Error||"string"!=typeof e?o.value:e?e.substring(0,t):null},t.LEN=function(e){return 0===arguments.length?o.error:"string"==typeof e?e?e.length:0:e.length?e.length:o.value},t.LOWER=function(e){return"string"!=typeof e?o.value:e?e.toLowerCase():e},t.MID=function(e,t,n){if(t=r.parseNumber(t),n=r.parseNumber(n),r.anyIsError(t,n)||"string"!=typeof e)return n;var o=t-1,i=o+n;return e.substring(o,i)},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?o.value:(!0===e&&(e="TRUE"),!1===e&&(e="FALSE"),isNaN(e)&&"number"==typeof e?o.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 o.na;var n=e.match(new RegExp(t));return n?n[n.length>1?n.length-1:0]:null},t.REGEXMATCH=function(e,t,n){if(arguments.length<2)return o.na;var r=e.match(new RegExp(t));return n?r:!!r},t.REGEXREPLACE=function(e,t,n){return arguments.length<3?o.na:e.replace(new RegExp(t),n)},t.REPLACE=function(e,t,n,i){return t=r.parseNumber(t),n=r.parseNumber(n),r.anyIsError(t,n)||"string"!=typeof e||"string"!=typeof i?o.value:e.substr(0,t-1)+i+e.substr(t-1+n)},t.REPT=function(e,t){return(t=r.parseNumber(t))instanceof Error?t:new Array(t+1).join(e)},t.RIGHT=function(e,t){return t=void 0===t?1:t,(t=r.parseNumber(t))instanceof Error?t:e?e.substring(e.length-t):o.na},t.SEARCH=function(e,t,n){var r;return"string"!=typeof e||"string"!=typeof t?o.value:(n=void 0===n?0:n,0===(r=t.toLowerCase().indexOf(e.toLowerCase(),n-1)+1)?o.value:r)},t.SPLIT=function(e,t){return e.split(t)},t.SUBSTITUTE=function(e,t,n,r){if(arguments.length<2)return o.na;if(!(e&&t&&n))return e;if(void 0===r)return e.replace(new RegExp(t,"g"),n);for(var i=0,a=0;e.indexOf(t,i)>0;)if(i=e.indexOf(t,i+1),++a===r)return e.substring(0,i)+n+e.substring(i+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?o.value:e.replace(/ +/g," ").trim()},t.UNICHAR=t.CHAR,t.UNICODE=t.CODE,t.UPPER=function(e){return"string"!=typeof e?o.value:e.toUpperCase()},t.VALUE=function(){throw new Error("VALUE is not implemented")}},function(e,t){var n="=",r=[">",">=","<","<=","=","<>"],o="operator",i="literal",a=[o,i];function s(e,t){if(-1===a.indexOf(t))throw new Error("Unsupported token type: "+t);return{value:e,type:t}}function l(e){for(var t,a="",l=[],u=0;u<e.length;u++){var c=e[u];0===u&&r.indexOf(c)>=0?l.push(s(c,o)):a+=c}return a.length>0&&l.push(s("string"!=typeof(t=a)?t:(/^\d+(\.\d+)?$/.test(t)&&(t=-1===t.indexOf(".")?parseInt(t,10):parseFloat(t)),t),i)),l.length>0&&l[0].type!==o&&l.unshift(s(n,o)),l}t.TOKEN_TYPE_OPERATOR=o,t.TOKEN_TYPE_LITERAL=i,t.parse=function(e){return l(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,o.length>0&&(n.push(o),o="");break;default:i.length>0&&(n.push(i),i=""),o+=a}r++}return o.length>0&&n.push(o),i.length>0&&n.push(i),n}(e))},t.createToken=s,t.compute=function(e){for(var t,n=[],r=0;r<e.length;r++){var a=e[r];switch(a.type){case o:t=a.value;break;case i:n.push(a.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[r.value,r.ref,r.div0,r.num,r.name,r.nil].indexOf(e)>=0||"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 r=n(0),o=n(1),i=new Date(Date.UTC(1900,0,1)),a=[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],s=[[],[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]],l=[[],[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 u(e){return 1===new Date(e,1,29).getMonth()}function c(e,t){return Math.ceil((t-e)/1e3/60/60/24)}function h(e){var t=e>-22038912e5?2:1;return Math.ceil((e-i)/864e5)+t}t.DATE=function(e,t,n){return e=o.parseNumber(e),t=o.parseNumber(t),n=o.parseNumber(n),o.anyIsError(e,t,n)?r.value:e<0||t<0||n<0?r.num:new Date(e,t-1,n)},t.DATEVALUE=function(e){var t,n=2;return"string"!=typeof e?r.value:(t=Date.parse(e),isNaN(t)?r.value:(t<=-22038912e5&&(n=1),Math.ceil((t-i)/864e5)+n))},t.DAY=function(e){var t=o.parseDate(e);return t instanceof Error?t:t.getDate()},t.DAYS=function(e,t){return e=o.parseDate(e),t=o.parseDate(t),e instanceof Error?e:t instanceof Error?t:h(e)-h(t)},t.DAYS360=function(e,t,n){if(n=o.parseBool(n),e=o.parseDate(e),t=o.parseDate(t),e instanceof Error)return e;if(t instanceof Error)return t;if(n instanceof Error)return n;var r,i,a=e.getMonth(),s=t.getMonth();if(n)r=31===e.getDate()?30:e.getDate(),i=31===t.getDate()?30:t.getDate();else{var l=new Date(e.getFullYear(),a+1,0).getDate(),u=new Date(t.getFullYear(),s+1,0).getDate();r=e.getDate()===l?30:e.getDate(),t.getDate()===u?r<30?(s++,i=1):i=30:i=t.getDate()}return 360*(t.getFullYear()-e.getFullYear())+30*(s-a)+(i-r)},t.EDATE=function(e,t){return(e=o.parseDate(e))instanceof Error?e:isNaN(t)?r.value:(t=parseInt(t,10),e.setMonth(e.getMonth()+t),h(e))},t.EOMONTH=function(e,t){return(e=o.parseDate(e))instanceof Error?e:isNaN(t)?r.value:(t=parseInt(t,10),h(new Date(e.getFullYear(),e.getMonth()+t+1,0)))},t.HOUR=function(e){return(e=o.parseDate(e))instanceof Error?e:e.getHours()},t.INTERVAL=function(e){if("number"!=typeof e&&"string"!=typeof e)return r.value;e=parseInt(e,10);var t=Math.floor(e/94608e4);e%=94608e4;var n=Math.floor(e/2592e3);e%=2592e3;var o=Math.floor(e/86400);e%=86400;var i=Math.floor(e/3600);e%=3600;var a=Math.floor(e/60),s=e%=60;return"P"+(t=t>0?t+"Y":"")+(n=n>0?n+"M":"")+(o=o>0?o+"D":"")+"T"+(i=i>0?i+"H":"")+(a=a>0?a+"M":"")+(s=s>0?s+"S":"")},t.ISOWEEKNUM=function(e){if((e=o.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=o.parseDate(e))instanceof Error?e:e.getMinutes()},t.MONTH=function(e){return(e=o.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,i){if((e=o.parseDate(e))instanceof Error)return e;if((t=o.parseDate(t))instanceof Error)return t;if(!((n=void 0===n?l[1]:l[n])instanceof Array))return r.value;void 0===i?i=[]:i instanceof Array||(i=[i]);for(var a=0;a<i.length;a++){var s=o.parseDate(i[a]);if(s instanceof Error)return s;i[a]=s}var u=(t-e)/864e5+1,c=u,h=e;for(a=0;a<u;a++){var d=(new Date).getTimezoneOffset()>0?h.getUTCDay():h.getDay(),f=!1;d!==n[0]&&d!==n[1]||(f=!0);for(var v=0;v<i.length;v++){var g=i[v];if(g.getDate()===h.getDate()&&g.getMonth()===h.getMonth()&&g.getFullYear()===h.getFullYear()){f=!0;break}}f&&c--,h.setDate(h.getDate()+1)}return c},t.NOW=function(){return new Date},t.SECOND=function(e){return(e=o.parseDate(e))instanceof Error?e:e.getSeconds()},t.TIME=function(e,t,n){return e=o.parseNumber(e),t=o.parseNumber(t),n=o.parseNumber(n),o.anyIsError(e,t,n)?r.value:e<0||t<0||n<0?r.num:(3600*e+60*t+n)/86400},t.TIMEVALUE=function(e){return(e=o.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=o.parseDate(e))instanceof Error)return e;void 0===t&&(t=1);var n=e.getDay();return s[t][n]},t.WEEKNUM=function(e,t){if((e=o.parseDate(e))instanceof Error)return e;if(void 0===t&&(t=1),21===t)return this.ISOWEEKNUM(e);var n=a[t],r=new Date(e.getFullYear(),0,1),i=r.getDay()<n?1:0;return r-=24*Math.abs(r.getDay()-n)*60*60*1e3,Math.floor((e-r)/864e5/7+1)+i},t.WORKDAY=function(e,t,n){return this.WORKDAY.INTL(e,t,1,n)},t.WORKDAY.INTL=function(e,t,n,i){if((e=o.parseDate(e))instanceof Error)return e;if((t=o.parseNumber(t))instanceof Error)return t;if(t<0)return r.num;if(!((n=void 0===n?l[1]:l[n])instanceof Array))return r.value;void 0===i?i=[]:i instanceof Array||(i=[i]);for(var a=0;a<i.length;a++){var s=o.parseDate(i[a]);if(s instanceof Error)return s;i[a]=s}for(var u=0;u<t;){e.setDate(e.getDate()+1);var c=e.getDay();if(c!==n[0]&&c!==n[1]){for(var h=0;h<i.length;h++){var d=i[h];if(d.getDate()===e.getDate()&&d.getMonth()===e.getMonth()&&d.getFullYear()===e.getFullYear()){u--;break}}u++}}return e},t.YEAR=function(e){return(e=o.parseDate(e))instanceof Error?e:e.getFullYear()},t.YEARFRAC=function(e,t,n){if((e=o.parseDate(e))instanceof Error)return e;if((t=o.parseDate(t))instanceof Error)return t;n=n||0;var r=e.getDate(),i=e.getMonth()+1,a=e.getFullYear(),s=t.getDate(),l=t.getMonth()+1,h=t.getFullYear();switch(n){case 0:return 31===r&&31===s?(r=30,s=30):31===r?r=30:30===r&&31===s&&(s=30),(s+30*l+360*h-(r+30*i+360*a))/360;case 1:var d=365;if(a===h||a+1===h&&(i>l||i===l&&r>=s))return(a===h&&u(a)||function(e,t){var n=e.getFullYear(),r=new Date(n,2,1);if(u(n)&&e<r&&t>=r)return!0;var o=t.getFullYear(),i=new Date(o,2,1);return u(o)&&t>=i&&e<i}(e,t)||1===l&&29===s)&&(d=366),c(e,t)/d;var f=h-a+1,v=(new Date(h+1,0,1)-new Date(a,0,1))/1e3/60/60/24/f;return c(e,t)/v;case 2:return c(e,t)/360;case 3:return c(e,t)/365;case 4:return(s+30*l+360*h-(r+30*i+360*a))/360}}},function(e,t,n){var o;"undefined"!=typeof self&&self,e.exports=(function(e,t){var n=e.utils.isFunction;function r(e,t){return e-t}function o(e,n,r){return t.max(n,t.min(e,r))}e.sum=function(e){for(var t=0,n=e.length;--n>=0;)t+=e[n];return t},e.sumsqrd=function(e){for(var t=0,n=e.length;--n>=0;)t+=e[n]*e[n];return t},e.sumsqerr=function(t){for(var n,r=e.mean(t),o=0,i=t.length;--i>=0;)o+=(n=t[i]-r)*n;return o},e.sumrow=function(e){for(var t=0,n=e.length;--n>=0;)t+=e[n];return t},e.product=function(e){for(var t=1,n=e.length;--n>=0;)t*=e[n];return t},e.min=function(e){for(var t=e[0],n=0;++n<e.length;)e[n]<t&&(t=e[n]);return t},e.max=function(e){for(var t=e[0],n=0;++n<e.length;)e[n]>t&&(t=e[n]);return t},e.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},e.mean=function(t){return e.sum(t)/t.length},e.meansqerr=function(t){return e.sumsqerr(t)/t.length},e.geomean=function(n){return t.pow(e.product(n),1/n.length)},e.median=function(e){var t=e.length,n=e.slice().sort(r);return 1&t?n[t/2|0]:(n[t/2-1]+n[t/2])/2},e.cumsum=function(t){return e.cumreduce(t,(function(e,t){return e+t}))},e.cumprod=function(t){return e.cumreduce(t,(function(e,t){return e*t}))},e.diff=function(e){for(var t=[],n=e.length,r=1;r<n;r++)t.push(e[r]-e[r-1]);return t},e.rank=function(e){for(var t=e.length,n=e.slice().sort(r),o=new Array(t),i=0;i<t;i++){var a=n.indexOf(e[i]),s=n.lastIndexOf(e[i]);if(a===s)var l=a;else l=(a+s)/2;o[i]=l+1}return o},e.mode=function(e){for(var t=e.length,n=e.slice().sort(r),o=1,i=0,a=0,s=[],l=0;l<t;l++)n[l]===n[l+1]?o++:(o>i?(s=[n[l]],i=o,a=0):o===i&&(s.push(n[l]),a++),o=1);return 0===a?s[0]:s},e.range=function(t){return e.max(t)-e.min(t)},e.variance=function(t,n){return e.sumsqerr(t)/(t.length-(n?1:0))},e.pooledvariance=function(t){return t.reduce((function(t,n){return t+e.sumsqerr(n)}),0)/(t.reduce((function(e,t){return e+t.length}),0)-t.length)},e.deviation=function(t){for(var n=e.mean(t),r=t.length,o=new Array(r),i=0;i<r;i++)o[i]=t[i]-n;return o},e.stdev=function(n,r){return t.sqrt(e.variance(n,r))},e.pooledstdev=function(n){return t.sqrt(e.pooledvariance(n))},e.meandev=function(n){for(var r=e.mean(n),o=[],i=n.length-1;i>=0;i--)o.push(t.abs(n[i]-r));return e.mean(o)},e.meddev=function(n){for(var r=e.median(n),o=[],i=n.length-1;i>=0;i--)o.push(t.abs(n[i]-r));return e.median(o)},e.coeffvar=function(t){return e.stdev(t)/e.mean(t)},e.quartiles=function(e){var n=e.length,o=e.slice().sort(r);return[o[t.round(n/4)-1],o[t.round(n/2)-1],o[t.round(3*n/4)-1]]},e.quantiles=function(e,n,i,a){var s,l,u,c,h=e.slice().sort(r),d=[n.length],f=e.length;void 0===i&&(i=3/8),void 0===a&&(a=3/8);for(var v=0;v<n.length;v++)l=f*(s=n[v])+(i+s*(1-i-a)),u=t.floor(o(l,1,f-1)),c=o(l-u,0,1),d[v]=(1-c)*h[u-1]+c*h[u];return d},e.percentile=function(e,t){var n=e.slice().sort(r),o=t*(n.length-1),i=parseInt(o),a=o-i;return i+1<n.length?n[i]*(1-a)+n[i+1]*a:n[i]},e.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},e.histogram=function(n,r){for(var o=e.min(n),i=r||4,a=(e.max(n)-o)/i,s=n.length,l=(r=[],0);l<i;l++)r[l]=0;for(l=0;l<s;l++)r[t.min(t.floor((n[l]-o)/a),i-1)]+=1;return r},e.covariance=function(t,n){for(var r=e.mean(t),o=e.mean(n),i=t.length,a=new Array(i),s=0;s<i;s++)a[s]=(t[s]-r)*(n[s]-o);return e.sum(a)/(i-1)},e.corrcoeff=function(t,n){return e.covariance(t,n)/e.stdev(t,1)/e.stdev(n,1)},e.spearmancoeff=function(t,n){return t=e.rank(t),n=e.rank(n),e.corrcoeff(t,n)},e.stanMoment=function(n,r){for(var o=e.mean(n),i=e.stdev(n),a=n.length,s=0,l=0;l<a;l++)s+=t.pow((n[l]-o)/i,r);return s/n.length},e.skewness=function(t){return e.stanMoment(t,3)},e.kurtosis=function(t){return e.stanMoment(t,4)-3};var i=e.prototype;!function(t){for(var r=0;r<t.length;r++)!function(t){i[t]=function(r,o){var a=[],s=0,l=this;if(n(r)&&(o=r,r=!1),o)return setTimeout((function(){o.call(l,i[t].call(l,r))})),this;if(this.length>1){for(l=!0===r?this:this.transpose();s<l.length;s++)a[s]=e[t](l[s]);return a}return e[t](this[0],r)}}(t[r])}("cumsum cumprod".split(" ")),function(t){for(var r=0;r<t.length;r++)!function(t){i[t]=function(r,o){var a=[],s=0,l=this;if(n(r)&&(o=r,r=!1),o)return setTimeout((function(){o.call(l,i[t].call(l,r))})),this;if(this.length>1){for("sumrow"!==t&&(l=!0===r?this:this.transpose());s<l.length;s++)a[s]=e[t](l[s]);return!0===r?e[t](e.utils.toVector(a)):a}return e[t](this[0],r)}}(t[r])}("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(t){for(var r=0;r<t.length;r++)!function(t){i[t]=function(){var r=[],o=0,a=this,s=Array.prototype.slice.call(arguments);if(n(s[s.length-1])){var l=s[s.length-1],u=s.slice(0,s.length-1);return setTimeout((function(){l.call(a,i[t].apply(a,u))})),this}l=void 0;var c=function(n){return e[t].apply(a,[n].concat(s))};if(this.length>1){for(a=a.transpose();o<a.length;o++)r[o]=c(a[o]);return r}return c(this[0])}}(t[r])}("quantiles percentileOfScore".split(" "))}(o=function(e,t){var n=Array.prototype.concat,r=Array.prototype.slice,o=Object.prototype.toString;function a(t,n){var r=t>n?t:n;return e.pow(10,17-~~(e.log(r>0?r:-r)*e.LOG10E))}var s=Array.isArray||function(e){return"[object Array]"===o.call(e)};function l(e){return"[object Function]"===o.call(e)}function u(e){return"number"==typeof e&&e==e}function c(){return new c._init(arguments)}function h(){return 0}function d(){return 1}function f(e,t){return e===t?1:0}c.fn=c.prototype,c._init=function(e){if(s(e[0]))if(s(e[0][0])){l(e[1])&&(e[0]=c.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]=l(e[1])?c.map(e[0],e[1]):e[0],this.length=1;else if(u(e[0]))this[0]=c.seq.apply(null,e),this.length=1;else{if(e[0]instanceof c)return c(e[0].toArray());this[0]=[],this.length=1}return this},c._init.prototype=c.prototype,c._init.constructor=c,c.utils={calcRdx:a,isArray:s,isFunction:l,isNumber:u,toVector:function(e){return n.apply([],e)}},c.extend=function(e){var t;if(1===arguments.length){for(t in e)c[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},c.rows=function(e){return e.length||1},c.cols=function(e){return e[0].length||1},c.dimensions=function(e){return{rows:c.rows(e),cols:c.cols(e)}},c.row=function(e,t){return s(t)?t.map((function(t){return c.row(e,t)})):e[t]},c.rowa=function(e,t){return c.row(e,t)},c.col=function(e,t){if(s(t)){var n=c.arange(e.length).map((function(e){return new Array(t.length)}));return t.forEach((function(t,r){c.arange(e.length).forEach((function(o){n[o][r]=e[o][t]}))})),n}for(var r=new Array(e.length),o=0;o<e.length;o++)r[o]=[e[o][t]];return r},c.cola=function(e,t){return c.col(e,t).map((function(e){return e[0]}))},c.diag=function(e){for(var t=c.rows(e),n=new Array(t),r=0;r<t;r++)n[r]=[e[r][r]];return n},c.antidiag=function(e){for(var t=c.rows(e)-1,n=new Array(t),r=0;t>=0;t--,r++)n[r]=[e[r][t]];return n},c.transpose=function(e){var t,n,r,o,i=[];s(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},c.map=function(e,t,n){var r,o,i,a,l;for(s(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)),l=0;l<i;l++)a[r][l]=t(e[r][l],r,l);return 1===a.length?a[0]:a},c.cumreduce=function(e,t,n){var r,o,i,a,l;for(s(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)),i>0&&(a[r][0]=e[r][0]),l=1;l<i;l++)a[r][l]=t(a[r][l-1],e[r][l]);return 1===a.length?a[0]:a},c.alter=function(e,t){return c.map(e,t,!0)},c.create=function(e,t,n){var r,o=new Array(e);l(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},c.zeros=function(e,t){return u(t)||(t=e),c.create(e,t,h)},c.ones=function(e,t){return u(t)||(t=e),c.create(e,t,d)},c.rand=function(t,n){return u(n)||(n=t),c.create(t,n,e.random)},c.identity=function(e,t){return u(t)||(t=e),c.create(e,t,f)},c.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},c.clear=function(e){return c.alter(e,h)},c.seq=function(e,t,n,r){l(r)||(r=!1);var o,i=[],s=a(e,t),u=(t*s-e*s)/((n-1)*s),c=e;for(o=0;c<=t&&o<n;c=(e*s+u*s*++o)/s)i.push(r?r(c,o):c);return i},c.arange=function(e,n,r){var o=[];if(r=r||1,n===t&&(n=e,e=0),e===n||0===r)return[];if(e<n&&r<0)return[];if(e>n&&r>0)return[];if(r>0)for(i=e;i<n;i+=r)o.push(i);else for(i=e;i>n;i+=r)o.push(i);return o},c.slice=function(){function e(e,n,r,o){var i,a=[],s=e.length;if(n===t&&r===t&&o===t)return c.copy(e);if(o=o||1,(n=(n=n||0)>=0?n:s+n)===(r=(r=r||e.length)>=0?r:s+r)||0===o)return[];if(n<r&&o<0)return[];if(n>r&&o>0)return[];if(o>0)for(i=n;i<r;i+=o)a.push(e[i]);else for(i=n;i>r;i+=o)a.push(e[i]);return a}return function(t,n){if(u((n=n||{}).row))return u(n.col)?t[n.row][n.col]:e(c.rowa(t,n.row),(o=n.col||{}).start,o.end,o.step);if(u(n.col))return e(c.cola(t,n.col),(r=n.row||{}).start,r.end,r.step);var r=n.row||{},o=n.col||{};return e(t,r.start,r.end,r.step).map((function(t){return e(t,o.start,o.end,o.step)}))}}(),c.sliceAssign=function(n,r,o){if(u(r.row)){if(u(r.col))return n[r.row][r.col]=o;r.col=r.col||{},r.col.start=r.col.start||0,r.col.end=r.col.end||n[0].length,r.col.step=r.col.step||1;var i=c.arange(r.col.start,e.min(n.length,r.col.end),r.col.step),a=r.row;return i.forEach((function(e,t){n[a][e]=o[t]})),n}if(u(r.col)){r.row=r.row||{},r.row.start=r.row.start||0,r.row.end=r.row.end||n.length,r.row.step=r.row.step||1;var s=c.arange(r.row.start,e.min(n[0].length,r.row.end),r.row.step),l=r.col;return s.forEach((function(e,t){n[e][l]=o[t]})),n}return o[0].length===t&&(o=[o]),r.row.start=r.row.start||0,r.row.end=r.row.end||n.length,r.row.step=r.row.step||1,r.col.start=r.col.start||0,r.col.end=r.col.end||n[0].length,r.col.step=r.col.step||1,s=c.arange(r.row.start,e.min(n.length,r.row.end),r.row.step),i=c.arange(r.col.start,e.min(n[0].length,r.col.end),r.col.step),s.forEach((function(e,t){i.forEach((function(r,i){n[e][r]=o[t][i]}))})),n},c.diagonal=function(e){var t=c.zeros(e.length,e.length);return e.forEach((function(e,n){t[n][n]=e})),t},c.copy=function(e){return e.map((function(e){return u(e)?e:e.map((function(e){return e}))}))};var v=c.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 this.length>1?r.call(this):r.call(this)[0]},v.map=function(e,t){return c(c.map(this,e,t))},v.cumreduce=function(e,t){return c(c.cumreduce(this,e,t))},v.alter=function(e){return c.alter(this,e),this},function(e){for(var t=0;t<e.length;t++)!function(e){v[e]=function(t){var n,r=this;return t?(setTimeout((function(){t.call(r,v[e].call(r))})),this):(n=c[e](this),s(n)?c(n):n)}}(e[t])}("transpose clear symmetric rows cols dimensions diag antidiag".split(" ")),function(e){for(var t=0;t<e.length;t++)!function(e){v[e]=function(t,n){var r=this;return n?(setTimeout((function(){n.call(r,v[e].call(r,t))})),this):c(c[e](this,t))}}(e[t])}("row col".split(" ")),function(e){for(var t=0;t<e.length;t++)!function(e){v[e]=function(){return c(c[e].apply(null,arguments))}}(e[t])}("create zeros ones rand identity".split(" ")),c}(Math),Math),function(e,t){e.gammaln=function(e){var n,r,o,i=0,a=[76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18],s=1.000000000190015;for(o=(r=n=e)+5.5,o-=(n+.5)*t.log(o);i<6;i++)s+=a[i]/++r;return t.log(2.5066282746310007*s/n)-o},e.gammafn=function(e){var n,r,o,i=[-1.716185138865495,24.76565080557592,-379.80425647094563,629.3311553128184,866.9662027904133,-31451.272968848367,-36144.413418691176,66456.14382024054],a=[-30.8402300119739,315.35062697960416,-1015.1563674902192,-3107.771671572311,22538.11842098015,4755.846277527881,-134659.9598649693,-115132.2596755535],s=!1,l=0,u=0,c=0,h=e;if(h<=0){if(!(o=h%1+36e-17))return 1/0;s=(1&h?-1:1)*t.PI/t.sin(t.PI*o),h=1-h}r=h,n=h<1?h++:(h-=l=(0|h)-1)-1;for(var d=0;d<8;++d)c=(c+i[d])*n,u=u*n+a[d];if(o=c/u+1,r<h)o/=r;else if(r>h)for(d=0;d<l;++d)o*=h,h++;return s&&(o=s/o),o},e.gammap=function(t,n){return e.lowRegGamma(t,n)*e.gammafn(t)},e.lowRegGamma=function(n,r){var o,i=e.gammaln(n),a=n,s=1/n,l=s,u=r+1-n,c=1/1e-30,h=1/u,d=h,f=1,v=-~(8.5*t.log(n>=1?n:1/n)+.4*n+17);if(r<0||n<=0)return NaN;if(r<n+1){for(;f<=v;f++)s+=l*=r/++a;return s*t.exp(-r+n*t.log(r)-i)}for(;f<=v;f++)d*=(h=1/(h=(o=-f*(f-n))*h+(u+=2)))*(c=u+o/c);return 1-d*t.exp(-r+n*t.log(r)-i)},e.factorialln=function(t){return t<0?NaN:e.gammaln(t+1)},e.factorial=function(t){return t<0?NaN:e.gammafn(t+1)},e.combination=function(n,r){return n>170||r>170?t.exp(e.combinationln(n,r)):e.factorial(n)/e.factorial(r)/e.factorial(n-r)},e.combinationln=function(t,n){return e.factorialln(t)-e.factorialln(n)-e.factorialln(t-n)},e.permutation=function(t,n){return e.factorial(t)/e.factorial(t-n)},e.betafn=function(n,r){if(!(n<=0||r<=0))return n+r>170?t.exp(e.betaln(n,r)):e.gammafn(n)*e.gammafn(r)/e.gammafn(n+r)},e.betaln=function(t,n){return e.gammaln(t)+e.gammaln(n)-e.gammaln(t+n)},e.betacf=function(e,n,r){var o,i,a,s,l=1,u=n+r,c=n+1,h=n-1,d=1,f=1-u*e/c;for(t.abs(f)<1e-30&&(f=1e-30),s=f=1/f;l<=100&&(f=1+(i=l*(r-l)*e/((h+(o=2*l))*(n+o)))*f,t.abs(f)<1e-30&&(f=1e-30),d=1+i/d,t.abs(d)<1e-30&&(d=1e-30),s*=(f=1/f)*d,f=1+(i=-(n+l)*(u+l)*e/((n+o)*(c+o)))*f,t.abs(f)<1e-30&&(f=1e-30),d=1+i/d,t.abs(d)<1e-30&&(d=1e-30),s*=a=(f=1/f)*d,!(t.abs(a-1)<3e-7));l++);return s},e.gammapinv=function(n,r){var o,i,a,s,l,u,c=0,h=r-1,d=e.gammaln(r);if(n>=1)return t.max(100,r+100*t.sqrt(r));if(n<=0)return 0;for(r>1?(l=t.log(h),u=t.exp(h*(l-1)-d),s=n<.5?n:1-n,o=(2.30753+.27061*(i=t.sqrt(-2*t.log(s))))/(1+i*(.99229+.04481*i))-i,n<.5&&(o=-o),o=t.max(.001,r*t.pow(1-1/(9*r)-o/(3*t.sqrt(r)),3))):o=n<(i=1-r*(.253+.12*r))?t.pow(n/i,1/r):1-t.log(1-(n-i)/(1-i));c<12;c++){if(o<=0)return 0;if((o-=i=(a=(e.lowRegGamma(r,o)-n)/(i=r>1?u*t.exp(-(o-h)+h*(t.log(o)-l)):t.exp(-o+h*t.log(o)-d)))/(1-.5*t.min(1,a*((r-1)/o-1))))<=0&&(o=.5*(o+i)),t.abs(i)<1e-8*o)break}return o},e.erf=function(e){var n,r,o,i,a=[-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],s=a.length-1,l=!1,u=0,c=0;for(e<0&&(e=-e,l=!0),r=4*(n=2/(2+e))-2;s>0;s--)o=u,u=r*u-c+a[s],c=o;return i=n*t.exp(-e*e+.5*(a[0]+r*u)-c),l?i-1:1-i},e.erfc=function(t){return 1-e.erf(t)},e.erfcinv=function(n){var r,o,i,a,s=0;if(n>=2)return-100;if(n<=0)return 100;for(a=n<1?n:2-n,r=-.70711*((2.30753+.27061*(i=t.sqrt(-2*t.log(a/2))))/(1+i*(.99229+.04481*i))-i);s<2;s++)r+=(o=e.erfc(r)-a)/(1.1283791670955126*t.exp(-r*r)-r*o);return n<1?r:-r},e.ibetainv=function(n,r,o){var i,a,s,l,u,c,h,d,f,v,g=r-1,p=o-1,m=0;if(n<=0)return 0;if(n>=1)return 1;for(r>=1&&o>=1?(s=n<.5?n:1-n,c=(2.30753+.27061*(l=t.sqrt(-2*t.log(s))))/(1+l*(.99229+.04481*l))-l,n<.5&&(c=-c),h=(c*c-3)/6,d=2/(1/(2*r-1)+1/(2*o-1)),f=c*t.sqrt(h+d)/d-(1/(2*o-1)-1/(2*r-1))*(h+5/6-2/(3*d)),c=r/(r+o*t.exp(2*f))):(i=t.log(r/(r+o)),a=t.log(o/(r+o)),c=n<(l=t.exp(r*i)/r)/(f=l+(u=t.exp(o*a)/o))?t.pow(r*f*n,1/r):1-t.pow(o*f*(1-n),1/o)),v=-e.gammaln(r)-e.gammaln(o)+e.gammaln(r+o);m<10;m++){if(0===c||1===c)return c;if((c-=l=(u=(e.ibeta(c,r,o)-n)/(l=t.exp(g*t.log(c)+p*t.log(1-c)+v)))/(1-.5*t.min(1,u*(g/c-p/(1-c)))))<=0&&(c=.5*(c+l)),c>=1&&(c=.5*(c+l+1)),t.abs(l)<1e-8*c&&m>0)break}return c},e.ibeta=function(n,r,o){var i=0===n||1===n?0:t.exp(e.gammaln(r+o)-e.gammaln(r)-e.gammaln(o)+r*t.log(n)+o*t.log(1-n));return!(n<0||n>1)&&(n<(r+1)/(r+o+2)?i*e.betacf(n,r,o)/r:1-i*e.betacf(1-n,o,r)/o)},e.randn=function(n,r){var o,i,a,s,l;if(r||(r=n),n)return e.create(n,r,(function(){return e.randn()}));do{o=t.random(),i=1.7156*(t.random()-.5),l=(a=o-.449871)*a+(s=t.abs(i)+.386595)*(.196*s-.25472*a)}while(l>.27597&&(l>.27846||i*i>-4*t.log(o)*o*o));return i/o},e.randg=function(n,r,o){var i,a,s,l,u,c,h=n;if(o||(o=r),n||(n=1),r)return(c=e.zeros(r,o)).alter((function(){return e.randg(n)})),c;n<1&&(n+=1),i=n-1/3,a=1/t.sqrt(9*i);do{do{l=1+a*(u=e.randn())}while(l<=0);l*=l*l,s=t.random()}while(s>1-.331*t.pow(u,4)&&t.log(s)>.5*u*u+i*(1-l+t.log(l)));if(n==h)return i*l;do{s=t.random()}while(0===s);return t.pow(s,1/h)*i*l},function(t){for(var n=0;n<t.length;n++)!function(t){e.fn[t]=function(){return e(e.map(this,(function(n){return e[t](n)})))}}(t[n])}("gammaln gammafn factorial factorialln".split(" ")),function(t){for(var n=0;n<t.length;n++)!function(t){e.fn[t]=function(){return e(e[t].apply(null,arguments))}}(t[n])}("randn".split(" "))}(o,Math),function(e,t){function n(n,r,o){var i=[.9815606342467192,.9041172563704749,.7699026741943047,.5873179542866175,.3678314989981802,.1252334085114689],a=[.04717533638651183,.10693932599531843,.16007832854334622,.20316742672306592,.2334925365383548,.24914704581340277],s=.5*n;if(s>=8)return 1;var l,u=2*e.normal.cdf(s,0,1,1,0)-1;u=u>=t.exp(-50/o)?t.pow(u,o):0;for(var c=s,h=(8-s)/(l=n>3?2:3),d=c+h,f=0,v=o-1,g=1;g<=l;g++){for(var p=0,m=.5*(d+c),y=.5*(d-c),w=1;w<=12;w++){var C,E=m+y*(6<w?i[(C=12-w+1)-1]:-i[(C=w)-1]),S=E*E;if(S>60)break;var b=2*e.normal.cdf(E,0,1,1,0)*.5-2*e.normal.cdf(E,n,1,1,0)*.5;b>=t.exp(-30/v)&&(p+=b=a[C-1]*t.exp(-.5*S)*t.pow(b,v))}f+=p*=2*y*o/t.sqrt(2*t.PI),c=d,d+=h}return(u+=f)<=t.exp(-30/r)?0:(u=t.pow(u,r))>=1?1:u}!function(t){for(var n=0;n<t.length;n++)!function(t){e[t]=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)},e.fn[t]=function(n,r,o){var i=e[t](n,r,o);return i.data=this,i},e[t].prototype.sample=function(n){var r=this._a,o=this._b,i=this._c;return n?e.alter(n,(function(){return e[t].sample(r,o,i)})):e[t].sample(r,o,i)},function(n){for(var r=0;r<n.length;r++)!function(n){e[t].prototype[n]=function(r){var o=this._a,i=this._b,a=this._c;return r||0===r||(r=this.data),"number"!=typeof r?e.fn.map.call(r,(function(r){return e[t][n](r,o,i,a)})):e[t][n](r,o,i,a)}}(n[r])}("pdf cdf inv".split(" ")),function(n){for(var r=0;r<n.length;r++)!function(n){e[t].prototype[n]=function(){return e[t][n](this._a,this._b,this._c)}}(n[r])}("mean median mode variance".split(" "))}(t[n])}("beta centralF cauchy chisquare exponential gamma invgamma kumaraswamy laplace lognormal noncentralt normal pareto studentt weibull uniform binomial negbin hypgeom poisson triangular tukey arcsine".split(" ")),e.extend(e.beta,{pdf:function(n,r,o){return n>1||n<0?0:1==r&&1==o?1:r<512&&o<512?t.pow(n,r-1)*t.pow(1-n,o-1)/e.betafn(r,o):t.exp((r-1)*t.log(n)+(o-1)*t.log(1-n)-e.betaln(r,o))},cdf:function(t,n,r){return t>1||t<0?1*(t>1):e.ibeta(t,n,r)},inv:function(t,n,r){return e.ibetainv(t,n,r)},mean:function(e,t){return e/(e+t)},median:function(t,n){return e.ibetainv(.5,t,n)},mode:function(e,t){return(e-1)/(e+t-2)},sample:function(t,n){var r=e.randg(t);return r/(r+e.randg(n))},variance:function(e,n){return e*n/(t.pow(e+n,2)*(e+n+1))}}),e.extend(e.centralF,{pdf:function(n,r,o){var i;return n<0?0:r<=2?0===n&&r<2?1/0:0===n&&2===r?1:1/e.betafn(r/2,o/2)*t.pow(r/o,r/2)*t.pow(n,r/2-1)*t.pow(1+r/o*n,-(r+o)/2):(i=r*n/(o+n*r),r*(o/(o+n*r))/2*e.binomial.pdf((r-2)/2,(r+o-2)/2,i))},cdf:function(t,n,r){return t<0?0:e.ibeta(n*t/(n*t+r),n/2,r/2)},inv:function(t,n,r){return r/(n*(1/e.ibetainv(t,n/2,r/2)-1))},mean:function(e,t){return t>2?t/(t-2):void 0},mode:function(e,t){return e>2?t*(e-2)/(e*(t+2)):void 0},sample:function(t,n){return 2*e.randg(t/2)/t/(2*e.randg(n/2)/n)},variance:function(e,t){if(!(t<=4))return 2*t*t*(e+t-2)/(e*(t-2)*(t-2)*(t-4))}}),e.extend(e.cauchy,{pdf:function(e,n,r){return r<0?0:r/(t.pow(e-n,2)+t.pow(r,2))/t.PI},cdf:function(e,n,r){return t.atan((e-n)/r)/t.PI+.5},inv:function(e,n,r){return n+r*t.tan(t.PI*(e-.5))},median:function(e,t){return e},mode:function(e,t){return e},sample:function(n,r){return e.randn()*t.sqrt(1/(2*e.randg(.5)))*r+n}}),e.extend(e.chisquare,{pdf:function(n,r){return n<0?0:0===n&&2===r?.5:t.exp((r/2-1)*t.log(n)-n/2-r/2*t.log(2)-e.gammaln(r/2))},cdf:function(t,n){return t<0?0:e.lowRegGamma(n/2,t/2)},inv:function(t,n){return 2*e.gammapinv(t,.5*n)},mean:function(e){return e},median:function(e){return e*t.pow(1-2/(9*e),3)},mode:function(e){return e-2>0?e-2:0},sample:function(t){return 2*e.randg(t/2)},variance:function(e){return 2*e}}),e.extend(e.exponential,{pdf:function(e,n){return e<0?0:n*t.exp(-n*e)},cdf:function(e,n){return e<0?0:1-t.exp(-n*e)},inv:function(e,n){return-t.log(1-e)/n},mean:function(e){return 1/e},median:function(e){return 1/e*t.log(2)},mode:function(e){return 0},sample:function(e){return-1/e*t.log(t.random())},variance:function(e){return t.pow(e,-2)}}),e.extend(e.gamma,{pdf:function(n,r,o){return n<0?0:0===n&&1===r?1/o:t.exp((r-1)*t.log(n)-n/o-e.gammaln(r)-r*t.log(o))},cdf:function(t,n,r){return t<0?0:e.lowRegGamma(n,t/r)},inv:function(t,n,r){return e.gammapinv(t,n)*r},mean:function(e,t){return e*t},mode:function(e,t){if(e>1)return(e-1)*t},sample:function(t,n){return e.randg(t)*n},variance:function(e,t){return e*t*t}}),e.extend(e.invgamma,{pdf:function(n,r,o){return n<=0?0:t.exp(-(r+1)*t.log(n)-o/n-e.gammaln(r)+r*t.log(o))},cdf:function(t,n,r){return t<=0?0:1-e.lowRegGamma(n,r/t)},inv:function(t,n,r){return r/e.gammapinv(1-t,n)},mean:function(e,t){return e>1?t/(e-1):void 0},mode:function(e,t){return t/(e+1)},sample:function(t,n){return n/e.randg(t)},variance:function(e,t){if(!(e<=2))return t*t/((e-1)*(e-1)*(e-2))}}),e.extend(e.kumaraswamy,{pdf:function(e,n,r){return 0===e&&1===n?r:1===e&&1===r?n:t.exp(t.log(n)+t.log(r)+(n-1)*t.log(e)+(r-1)*t.log(1-t.pow(e,n)))},cdf:function(e,n,r){return e<0?0:e>1?1:1-t.pow(1-t.pow(e,n),r)},inv:function(e,n,r){return t.pow(1-t.pow(1-e,1/r),1/n)},mean:function(t,n){return n*e.gammafn(1+1/t)*e.gammafn(n)/e.gammafn(1+1/t+n)},median:function(e,n){return t.pow(1-t.pow(2,-1/n),1/e)},mode:function(e,n){if(e>=1&&n>=1&&1!==e&&1!==n)return t.pow((e-1)/(e*n-1),1/e)},variance:function(e,t){throw new Error("variance not yet implemented")}}),e.extend(e.lognormal,{pdf:function(e,n,r){return e<=0?0:t.exp(-t.log(e)-.5*t.log(2*t.PI)-t.log(r)-t.pow(t.log(e)-n,2)/(2*r*r))},cdf:function(n,r,o){return n<0?0:.5+.5*e.erf((t.log(n)-r)/t.sqrt(2*o*o))},inv:function(n,r,o){return t.exp(-1.4142135623730951*o*e.erfcinv(2*n)+r)},mean:function(e,n){return t.exp(e+n*n/2)},median:function(e,n){return t.exp(e)},mode:function(e,n){return t.exp(e-n*n)},sample:function(n,r){return t.exp(e.randn()*r+n)},variance:function(e,n){return(t.exp(n*n)-1)*t.exp(2*e+n*n)}}),e.extend(e.noncentralt,{pdf:function(n,r,o){return t.abs(o)<1e-14?e.studentt.pdf(n,r):t.abs(n)<1e-14?t.exp(e.gammaln((r+1)/2)-o*o/2-.5*t.log(t.PI*r)-e.gammaln(r/2)):r/n*(e.noncentralt.cdf(n*t.sqrt(1+2/r),r+2,o)-e.noncentralt.cdf(n,r,o))},cdf:function(n,r,o){if(t.abs(o)<1e-14)return e.studentt.cdf(n,r);var i=!1;n<0&&(i=!0,o=-o);for(var a=e.normal.cdf(-o,0,1),s=1e-14+1,l=s,u=n*n/(n*n+r),c=0,h=t.exp(-o*o/2),d=t.exp(-o*o/2-.5*t.log(2)-e.gammaln(1.5))*o;c<200||l>1e-14||s>1e-14;)l=s,c>0&&(h*=o*o/(2*c),d*=o*o/(2*(c+.5))),a+=.5*(s=h*e.beta.cdf(u,c+.5,r/2)+d*e.beta.cdf(u,c+1,r/2)),c++;return i?1-a:a}}),e.extend(e.normal,{pdf:function(e,n,r){return t.exp(-.5*t.log(2*t.PI)-t.log(r)-t.pow(e-n,2)/(2*r*r))},cdf:function(n,r,o){return.5*(1+e.erf((n-r)/t.sqrt(2*o*o)))},inv:function(t,n,r){return-1.4142135623730951*r*e.erfcinv(2*t)+n},mean:function(e,t){return e},median:function(e,t){return e},mode:function(e,t){return e},sample:function(t,n){return e.randn()*n+t},variance:function(e,t){return t*t}}),e.extend(e.pareto,{pdf:function(e,n,r){return e<n?0:r*t.pow(n,r)/t.pow(e,r+1)},cdf:function(e,n,r){return e<n?0:1-t.pow(n/e,r)},inv:function(e,n,r){return n/t.pow(1-e,1/r)},mean:function(e,n){if(!(n<=1))return n*t.pow(e,n)/(n-1)},median:function(e,n){return e*(n*t.SQRT2)},mode:function(e,t){return e},variance:function(e,n){if(!(n<=2))return e*e*n/(t.pow(n-1,2)*(n-2))}}),e.extend(e.studentt,{pdf:function(n,r){return r=r>1e100?1e100:r,1/(t.sqrt(r)*e.betafn(.5,r/2))*t.pow(1+n*n/r,-(r+1)/2)},cdf:function(n,r){var o=r/2;return e.ibeta((n+t.sqrt(n*n+r))/(2*t.sqrt(n*n+r)),o,o)},inv:function(n,r){var o=e.ibetainv(2*t.min(n,1-n),.5*r,.5);return o=t.sqrt(r*(1-o)/o),n>.5?o:-o},mean:function(e){return e>1?0:void 0},median:function(e){return 0},mode:function(e){return 0},sample:function(n){return e.randn()*t.sqrt(n/(2*e.randg(n/2)))},variance:function(e){return e>2?e/(e-2):e>1?1/0:void 0}}),e.extend(e.weibull,{pdf:function(e,n,r){return e<0||n<0||r<0?0:r/n*t.pow(e/n,r-1)*t.exp(-t.pow(e/n,r))},cdf:function(e,n,r){return e<0?0:1-t.exp(-t.pow(e/n,r))},inv:function(e,n,r){return n*t.pow(-t.log(1-e),1/r)},mean:function(t,n){return t*e.gammafn(1+1/n)},median:function(e,n){return e*t.pow(t.log(2),1/n)},mode:function(e,n){return n<=1?0:e*t.pow((n-1)/n,1/n)},sample:function(e,n){return e*t.pow(-t.log(t.random()),1/n)},variance:function(n,r){return n*n*e.gammafn(1+2/r)-t.pow(e.weibull.mean(n,r),2)}}),e.extend(e.uniform,{pdf:function(e,t,n){return e<t||e>n?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(t,n){return e.mean(t,n)},mode:function(e,t){throw new Error("mode is not yet implemented")},sample:function(e,n){return e/2+n/2+(n/2-e/2)*(2*t.random()-1)},variance:function(e,n){return t.pow(n-e,2)/12}}),e.extend(e.binomial,{pdf:function(n,r,o){return 0===o||1===o?r*o===n?1:0:e.combination(r,n)*t.pow(o,n)*t.pow(1-o,r-n)},cdf:function(t,n,r){var o=[],i=0;if(t<0)return 0;if(t<n){for(;i<=t;i++)o[i]=e.binomial.pdf(i,n,r);return e.sum(o)}return 1}}),e.extend(e.negbin,{pdf:function(n,r,o){return n===n>>>0&&(n<0?0:e.combination(n+r-1,r-1)*t.pow(1-o,n)*t.pow(o,r))},cdf:function(t,n,r){var o=0,i=0;if(t<0)return 0;for(;i<=t;i++)o+=e.negbin.pdf(i,n,r);return o}}),e.extend(e.hypgeom,{pdf:function(n,r,o,i){if(n!=n|0)return!1;if(n<0||n<o-(r-i))return 0;if(n>i||n>o)return 0;if(2*o>r)return 2*i>r?e.hypgeom.pdf(r-o-i+n,r,r-o,r-i):e.hypgeom.pdf(i-n,r,r-o,i);if(2*i>r)return e.hypgeom.pdf(o-n,r,o,r-i);if(o<i)return e.hypgeom.pdf(n,r,i,o);for(var a=1,s=0,l=0;l<n;l++){for(;a>1&&s<i;)a*=1-o/(r-s),s++;a*=(i-l)*(o-l)/((l+1)*(r-o-i+l+1))}for(;s<i;s++)a*=1-o/(r-s);return t.min(1,t.max(0,a))},cdf:function(n,r,o,i){if(n<0||n<o-(r-i))return 0;if(n>=i||n>=o)return 1;if(2*o>r)return 2*i>r?e.hypgeom.cdf(r-o-i+n,r,r-o,r-i):1-e.hypgeom.cdf(i-n-1,r,r-o,i);if(2*i>r)return 1-e.hypgeom.cdf(o-n-1,r,o,r-i);if(o<i)return e.hypgeom.cdf(n,r,i,o);for(var a=1,s=1,l=0,u=0;u<n;u++){for(;a>1&&l<i;){var c=1-o/(r-l);s*=c,a*=c,l++}a+=s*=(i-u)*(o-u)/((u+1)*(r-o-i+u+1))}for(;l<i;l++)a*=1-o/(r-l);return t.min(1,t.max(0,a))}}),e.extend(e.poisson,{pdf:function(n,r){return r<0||n%1!=0||n<0?0:t.pow(r,n)*t.exp(-r)/e.factorial(n)},cdf:function(t,n){var r=[],o=0;if(t<0)return 0;for(;o<=t;o++)r.push(e.poisson.pdf(o,n));return e.sum(r)},mean:function(e){return e},variance:function(e){return e},sample:function(e){var n=1,r=0,o=t.exp(-e);do{r++,n*=t.random()}while(n>o);return r-1}}),e.extend(e.triangular,{pdf:function(e,t,n,r){return n<=t||r<t||r>n?NaN:e<t||e>n?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,n,r,o){return r<=n||o<n||o>r?NaN:e<=n?0:e>=r?1:e<=o?t.pow(e-n,2)/((r-n)*(o-n)):1-t.pow(r-e,2)/((r-n)*(r-o))},inv:function(e,n,r,o){return r<=n||o<n||o>r?NaN:e<=(o-n)/(r-n)?n+(r-n)*t.sqrt(e*((o-n)/(r-n))):n+(r-n)*(1-t.sqrt((1-e)*(1-(o-n)/(r-n))))},mean:function(e,t,n){return(e+t+n)/3},median:function(e,n,r){return r<=(e+n)/2?n-t.sqrt((n-e)*(n-r))/t.sqrt(2):r>(e+n)/2?e+t.sqrt((n-e)*(r-e))/t.sqrt(2):void 0},mode:function(e,t,n){return n},sample:function(e,n,r){var o=t.random();return o<(r-e)/(n-e)?e+t.sqrt(o*(n-e)*(r-e)):n-t.sqrt((1-o)*(n-e)*(n-r))},variance:function(e,t,n){return(e*e+t*t+n*n-e*t-e*n-t*n)/18}}),e.extend(e.arcsine,{pdf:function(e,n,r){return r<=n?NaN:e<=n||e>=r?0:2/t.PI*t.pow(t.pow(r-n,2)-t.pow(2*e-n-r,2),-.5)},cdf:function(e,n,r){return e<n?0:e<r?2/t.PI*t.asin(t.sqrt((e-n)/(r-n))):1},inv:function(e,n,r){return n+(.5-.5*t.cos(t.PI*e))*(r-n)},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(n,r){return(n+r)/2+(r-n)/2*t.sin(2*t.PI*e.uniform.sample(0,1))},variance:function(e,n){return n<=e?NaN:t.pow(n-e,2)/8}}),e.extend(e.laplace,{pdf:function(e,n,r){return r<=0?0:t.exp(-t.abs(e-n)/r)/(2*r)},cdf:function(e,n,r){return r<=0?0:e<n?.5*t.exp((e-n)/r):1-.5*t.exp(-(e-n)/r)},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,n){var r,o=t.random()-.5;return e-n*((r=o)/t.abs(r))*t.log(1-2*t.abs(o))}}),e.extend(e.tukey,{cdf:function(r,o,i){var a=o,s=[.9894009349916499,.9445750230732326,.8656312023878318,.755404408355003,.6178762444026438,.45801677765722737,.2816035507792589,.09501250983763744],l=[.027152459411754096,.062253523938647894,.09515851168249279,.12462897125553388,.14959598881657674,.16915651939500254,.18260341504492358,.1894506104550685];if(r<=0)return 0;if(i<2||a<2)return NaN;if(!Number.isFinite(r))return 1;if(i>25e3)return n(r,1,a);var u,c=.5*i,h=c*t.log(i)-i*t.log(2)-e.gammaln(c),d=c-1,f=.25*i;u=i<=100?1:i<=800?.5:i<=5e3?.25:.125,h+=t.log(u);for(var v=0,g=1;g<=50;g++){for(var p=0,m=(2*g-1)*u,y=1;y<=16;y++){var w,C;8<y?(w=y-8-1,C=h+d*t.log(m+s[w]*u)-(s[w]*u+m)*f):(w=y-1,C=h+d*t.log(m-s[w]*u)+(s[w]*u-m)*f),C>=-30&&(p+=n(8<y?r*t.sqrt(.5*(s[w]*u+m)):r*t.sqrt(.5*(-s[w]*u+m)),1,a)*l[w]*t.exp(C))}if(g*u>=1&&p<=1e-14)break;v+=p}if(p>1e-14)throw new Error("tukey.cdf failed to converge");return v>1&&(v=1),v},inv:function(n,r,o){if(o<2||r<2)return NaN;if(n<0||n>1)return NaN;if(0===n)return 0;if(1===n)return 1/0;var i,a=function(e,n,r){var o=.5-.5*e,i=t.sqrt(t.log(1/(o*o))),a=i+((((-453642210148e-16*i-.204231210125)*i-.342242088547)*i-1)*i+.322232421088)/((((.0038560700634*i+.10353775285)*i+.531103462366)*i+.588581570495)*i+.099348462606);r<120&&(a+=(a*a*a+a)/r/4);var s=.8832-.2368*a;return r<120&&(s+=-1.214/r+1.208*a/r),a*(s*t.log(n-1)+1.4142)}(n,r,o),s=e.tukey.cdf(a,r,o)-n;i=s>0?t.max(0,a-1):a+1;for(var l,u=e.tukey.cdf(i,r,o)-n,c=1;c<50;c++)if(l=i-u*(i-a)/(u-s),s=u,a=i,l<0&&(l=0,u=-n),u=e.tukey.cdf(l,r,o)-n,i=l,t.abs(i-a)<1e-4)return l;throw new Error("tukey.inv failed to converge")}})}(o,Math),function(e,t){var n,o,a=Array.prototype.push,s=e.utils.isArray;function l(t){return s(t)||t instanceof e}e.extend({add:function(t,n){return l(n)?(l(n[0])||(n=[n]),e.map(t,(function(e,t,r){return e+n[t][r]}))):e.map(t,(function(e){return e+n}))},subtract:function(t,n){return l(n)?(l(n[0])||(n=[n]),e.map(t,(function(e,t,r){return e-n[t][r]||0}))):e.map(t,(function(e){return e-n}))},divide:function(t,n){return l(n)?(l(n[0])||(n=[n]),e.multiply(t,e.inv(n))):e.map(t,(function(e){return e/n}))},multiply:function(t,n){var r,o,i,a,s,u,c,h;if(void 0===t.length&&void 0===n.length)return t*n;if(s=t.length,u=t[0].length,c=e.zeros(s,i=l(n)?n[0].length:u),h=0,l(n)){for(;h<i;h++)for(r=0;r<s;r++){for(a=0,o=0;o<u;o++)a+=t[r][o]*n[o][h];c[r][h]=a}return 1===s&&1===h?c[0][0]:c}return e.map(t,(function(e){return e*n}))},outer:function(t,n){return e.multiply(t.map((function(e){return[e]})),[n])},dot:function(t,n){l(t[0])||(t=[t]),l(n[0])||(n=[n]);for(var r,o,i=1===t[0].length&&1!==t.length?e.transpose(t):t,a=1===n[0].length&&1!==n.length?e.transpose(n):n,s=[],u=0,c=i.length,h=i[0].length;u<c;u++){for(s[u]=[],r=0,o=0;o<h;o++)r+=i[u][o]*a[u][o];s[u]=r}return 1===s.length?s[0]:s},pow:function(n,r){return e.map(n,(function(e){return t.pow(e,r)}))},exp:function(n){return e.map(n,(function(e){return t.exp(e)}))},log:function(n){return e.map(n,(function(e){return t.log(e)}))},abs:function(n){return e.map(n,(function(e){return t.abs(e)}))},norm:function(e,n){var r=0,o=0;for(isNaN(n)&&(n=2),l(e[0])&&(e=e[0]);o<e.length;o++)r+=t.pow(t.abs(e[o]),n);return t.pow(r,1/n)},angle:function(n,r){return t.acos(e.dot(n,r)/(e.norm(n)*e.norm(r)))},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++)a.apply(n[r],t[r]);return n},inv:function(t){for(var n,r=t.length,o=t[0].length,i=e.identity(r,o),a=e.gauss_jordan(t,i),s=[],l=0;l<r;l++)for(s[l]=[],n=o;n<a[0].length;n++)s[l][n-o]=a[l][n];return s},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(n,r){var o,i,a,s,l=0,u=0,c=n.length,h=n[0].length,d=1,f=0,v=[];for(o=(n=e.aug(n,r))[0].length,l=0;l<c;l++){for(i=n[l][l],u=l,s=l+1;s<h;s++)i<t.abs(n[s][l])&&(i=n[s][l],u=s);if(u!=l)for(s=0;s<o;s++)a=n[l][s],n[l][s]=n[u][s],n[u][s]=a;for(u=l+1;u<c;u++)for(d=n[u][l]/n[l][l],s=l;s<o;s++)n[u][s]=n[u][s]-d*n[l][s]}for(l=c-1;l>=0;l--){for(f=0,u=l+1;u<=c-1;u++)f+=v[u]*n[l][u];v[l]=(n[l][o-1]-f)/n[l][l]}return v},gauss_jordan:function(n,r){for(var o=e.aug(n,r),i=o.length,a=o[0].length,s=0,l=0;l<i;l++){for(var u=l,c=l+1;c<i;c++)t.abs(o[c][l])>t.abs(o[u][l])&&(u=c);var h=o[l];for(o[l]=o[u],o[u]=h,c=l+1;c<i;c++){s=o[c][l]/o[l][l];for(var d=l;d<a;d++)o[c][d]-=o[l][d]*s}}for(l=i-1;l>=0;l--){for(s=o[l][l],c=0;c<l;c++)for(d=a-1;d>l-1;d--)o[c][d]-=o[l][d]*o[c][l]/s;for(o[l][l]/=s,d=i;d<a;d++)o[l][d]/=s}return o},triaUpSolve:function(t,n){var r,o=t[0].length,i=e.zeros(1,o)[0],a=!1;return null!=n[0].length&&(n=n.map((function(e){return e[0]})),a=!0),e.arange(o-1,-1,-1).forEach((function(a){r=e.arange(a+1,o).map((function(e){return i[e]*t[a][e]})),i[a]=(n[a]-e.sum(r))/t[a][a]})),a?i.map((function(e){return[e]})):i},triaLowSolve:function(t,n){var r,o=t[0].length,i=e.zeros(1,o)[0],a=!1;return null!=n[0].length&&(n=n.map((function(e){return e[0]})),a=!0),e.arange(o).forEach((function(o){r=e.arange(o).map((function(e){return t[o][e]*i[e]})),i[o]=(n[o]-e.sum(r))/t[o][o]})),a?i.map((function(e){return[e]})):i},lu:function(t){var n,r=t.length,o=e.identity(r),a=e.zeros(t.length,t[0].length);return e.arange(r).forEach((function(e){a[0][e]=t[0][e]})),e.arange(1,r).forEach((function(s){e.arange(s).forEach((function(r){n=e.arange(r).map((function(e){return o[s][e]*a[e][r]})),o[s][r]=(t[s][r]-e.sum(n))/a[r][r]})),e.arange(s,r).forEach((function(r){n=e.arange(s).map((function(e){return o[s][e]*a[e][r]})),a[s][r]=t[i][r]-e.sum(n)}))})),[o,a]},cholesky:function(n){var r,o=n.length,i=e.zeros(n.length,n[0].length);return e.arange(o).forEach((function(a){r=e.arange(a).map((function(e){return t.pow(i[a][e],2)})),i[a][a]=t.sqrt(n[a][a]-e.sum(r)),e.arange(a+1,o).forEach((function(t){r=e.arange(a).map((function(e){return i[a][e]*i[t][e]})),i[t][a]=(n[a][t]-e.sum(r))/i[a][a]}))})),i},gauss_jacobi:function(n,r,o,i){for(var a,s,l,u,c=0,h=0,d=n.length,f=[],v=[],g=[];c<d;c++)for(f[c]=[],v[c]=[],g[c]=[],h=0;h<d;h++)c>h?(f[c][h]=n[c][h],v[c][h]=g[c][h]=0):c<h?(v[c][h]=n[c][h],f[c][h]=g[c][h]=0):(g[c][h]=n[c][h],f[c][h]=v[c][h]=0);for(l=e.multiply(e.multiply(e.inv(g),e.add(f,v)),-1),s=e.multiply(e.inv(g),r),a=o,u=e.add(e.multiply(l,o),s),c=2;t.abs(e.norm(e.subtract(u,a)))>i;)a=u,u=e.add(e.multiply(l,a),s),c++;return u},gauss_seidel:function(n,r,o,i){for(var a,s,l,u,c,h=0,d=n.length,f=[],v=[],g=[];h<d;h++)for(f[h]=[],v[h]=[],g[h]=[],a=0;a<d;a++)h>a?(f[h][a]=n[h][a],v[h][a]=g[h][a]=0):h<a?(v[h][a]=n[h][a],f[h][a]=g[h][a]=0):(g[h][a]=n[h][a],f[h][a]=v[h][a]=0);for(u=e.multiply(e.multiply(e.inv(e.add(g,f)),v),-1),l=e.multiply(e.inv(e.add(g,f)),r),s=o,c=e.add(e.multiply(u,o),l),h=2;t.abs(e.norm(e.subtract(c,s)))>i;)s=c,c=e.add(e.multiply(u,s),l),h+=1;return c},SOR:function(n,r,o,i,a){for(var s,l,u,c,h,d=0,f=n.length,v=[],g=[],p=[];d<f;d++)for(v[d]=[],g[d]=[],p[d]=[],s=0;s<f;s++)d>s?(v[d][s]=n[d][s],g[d][s]=p[d][s]=0):d<s?(g[d][s]=n[d][s],v[d][s]=p[d][s]=0):(p[d][s]=n[d][s],v[d][s]=g[d][s]=0);for(c=e.multiply(e.inv(e.add(p,e.multiply(v,a))),e.subtract(e.multiply(p,1-a),e.multiply(g,a))),u=e.multiply(e.multiply(e.inv(e.add(p,e.multiply(v,a))),r),a),l=o,h=e.add(e.multiply(c,o),u),d=2;t.abs(e.norm(e.subtract(h,l)))>i;)l=h,h=e.add(e.multiply(c,l),u),d++;return h},householder:function(n){for(var r,o,i,a,s=n.length,l=n[0].length,u=0,c=[],h=[];u<s-1;u++){for(r=0,a=u+1;a<l;a++)r+=n[a][u]*n[a][u];for(r=(n[u+1][u]>0?-1:1)*t.sqrt(r),o=t.sqrt((r*r-n[u+1][u]*r)/2),(c=e.zeros(s,1))[u+1][0]=(n[u+1][u]-r)/(2*o),i=u+2;i<s;i++)c[i][0]=n[i][u]/(2*o);h=e.subtract(e.identity(s,l),e.multiply(e.multiply(c,e.transpose(c)),2)),n=e.multiply(h,e.multiply(n,h))}return n},QR:(n=e.sum,o=e.arange,function(i){var a,s,l,u=i.length,c=i[0].length;for(i=e.copy(i),r=e.zeros(c,c),s=0;s<c;s++){for(r[s][s]=t.sqrt(n(o(u).map((function(e){return i[e][s]*i[e][s]})))),a=0;a<u;a++)i[a][s]=i[a][s]/r[s][s];for(l=s+1;l<c;l++)for(r[s][l]=n(o(u).map((function(e){return i[e][s]*i[e][l]}))),a=0;a<u;a++)i[a][l]=i[a][l]-i[a][s]*r[s][l]}return[i,r]}),lstsq:function(t,n){var r=!1;void 0===n[0].length&&(n=n.map((function(e){return[e]})),r=!0);var o=e.QR(t),i=o[0],a=o[1],s=t[0].length,l=e.slice(i,{col:{end:s}}),u=function(t){var n=(t=e.copy(t)).length,r=e.identity(n);return e.arange(n-1,-1,-1).forEach((function(n){e.sliceAssign(r,{row:n},e.divide(e.slice(r,{row:n}),t[n][n])),e.sliceAssign(t,{row:n},e.divide(e.slice(t,{row:n}),t[n][n])),e.arange(n).forEach((function(o){var i=e.multiply(t[o][n],-1),a=e.slice(t,{row:o}),s=e.multiply(e.slice(t,{row:n}),i);e.sliceAssign(t,{row:o},e.add(a,s));var l=e.slice(r,{row:o}),u=e.multiply(e.slice(r,{row:n}),i);e.sliceAssign(r,{row:o},e.add(l,u))}))})),r}(e.slice(a,{row:{end:s}})),c=e.transpose(l);void 0===c[0].length&&(c=[c]);var h=e.multiply(e.multiply(u,c),n);return void 0===h.length&&(h=[[h]]),r?h.map((function(e){return e[0]})):h},jacobi:function(n){for(var r,o,i,a,s,l,u=1,c=n.length,h=e.identity(c,c),d=[];1===u;){a=n[0][1],o=0,i=1;for(var f=0;f<c;f++)for(r=0;r<c;r++)f!=r&&a<t.abs(n[f][r])&&(a=t.abs(n[f][r]),o=f,i=r);for(s=n[o][o]===n[i][i]?n[o][i]>0?t.PI/4:-t.PI/4:t.atan(2*n[o][i]/(n[o][o]-n[i][i]))/2,(l=e.identity(c,c))[o][o]=t.cos(s),l[o][i]=-t.sin(s),l[i][o]=t.sin(s),l[i][i]=t.cos(s),h=e.multiply(h,l),n=e.multiply(e.multiply(e.inv(l),n),l),u=0,f=1;f<c;f++)for(r=1;r<c;r++)f!=r&&t.abs(n[f][r])>.001&&(u=1)}for(f=0;f<c;f++)d.push(n[f][f]);return[h,d]},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,n,r,o){for(var i,a,s,l,u,c=0,h=(r-n)/2,d=[],f=[],v=[];c<o/2;){for(u=e(n),s=n,l=0;s<=r;s+=h,l++)d[l]=s;for(i=d.length,s=1;s<i-1;s++)u+=(s%2!=0?4:2)*e(d[s]);u=h/3*(u+e(r)),v[c]=u,h/=2,c++}for(a=v.length,i=1;1!==a;){for(s=0;s<a-1;s++)f[s]=(t.pow(4,i)*v[s+1]-v[s])/(t.pow(4,i)-1);a=f.length,v=f,f=[],i++}return v},richardson:function(e,n,r,o){function i(e,t){for(var n,r=0,o=e.length;r<o;r++)e[r]===t&&(n=r);return n}e.length;for(var a,s,l,u,c,h=t.abs(r-e[i(e,r)+1]),d=0,f=[],v=[];o>=h;)a=i(e,r+o),s=i(e,r),f[d]=(n[a]-2*n[s]+n[2*s-a])/(o*o),o/=2,d++;for(u=f.length,l=1;1!=u;){for(c=0;c<u-1;c++)v[c]=(t.pow(4,l)*f[c+1]-f[c])/(t.pow(4,l)-1);u=v.length,f=v,v=[],l++}return f},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(u[s]=0,o=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(t,n,r){for(var o,i,a=t.length,s=0,l=[],u=[],c=[],h=[],d=[],f=[];s<a-1;s++)h[s]=t[s+1]-t[s];for(c[0]=0,s=1;s<a-1;s++)c[s]=3/h[s]*(n[s+1]-n[s])-3/h[s-1]*(n[s]-n[s-1]);for(s=1;s<a-1;s++)l[s]=[],u[s]=[],l[s][s-1]=h[s-1],l[s][s]=2*(h[s-1]+h[s]),l[s][s+1]=h[s],u[s][0]=c[s];for(i=e.multiply(e.inv(l),u),o=0;o<a-1;o++)d[o]=(n[o+1]-n[o])/h[o]-h[o]*(i[o+1][0]+2*i[o][0])/3,f[o]=(i[o+1][0]-i[o][0])/(3*h[o]);for(o=0;o<a&&!(t[o]>r);o++);return n[o-=1]+(r-t[o])*d[o]+e.sq(r-t[o])*i[o]+(r-t[o])*e.sq(r-t[o])*f[o]},gauss_quadrature:function(){throw new Error("gauss_quadrature not yet implemented")},PCA:function(t){var n,r,o,i,a,s=t.length,l=t[0].length,u=0,c=[],h=[],d=[],f=[],v=[],g=[],p=[];for(u=0;u<s;u++)c[u]=e.sum(t[u])/l;for(u=0;u<l;u++)for(v[u]=[],n=0;n<s;n++)v[u][n]=t[n][u]-c[n];for(v=e.transpose(v),u=0;u<s;u++)for(g[u]=[],n=0;n<s;n++)g[u][n]=e.dot([v[u]],[v[n]])/(l-1);for(a=(o=e.jacobi(g))[0],h=o[1],p=e.transpose(a),u=0;u<h.length;u++)for(n=u;n<h.length;n++)h[u]<h[n]&&(r=h[u],h[u]=h[n],h[n]=r,d=p[u],p[u]=p[n],p[n]=d);for(i=e.transpose(v),u=0;u<s;u++)for(f[u]=[],n=0;n<i.length;n++)f[u][n]=e.dot([p[u]],[i[n]]);return[t,h,p,f]}}),function(t){for(var n=0;n<t.length;n++)!function(t){e.fn[t]=function(n,r){var o=this;return r?(setTimeout((function(){r.call(o,e.fn[t].call(o,n))}),15),this):"number"==typeof e[t](this,n)?e[t](this,n):e(e[t](this,n))}}(t[n])}("add divide multiply subtract dot pow exp log abs norm angle".split(" "))}(o,Math),function(e,t){var n=[].slice,r=e.utils.isNumber,o=e.utils.isArray;function i(e,n,r,o){if(e>1||r>1||e<=0||r<=0)throw new Error("Proportions should be greater than 0 and less than 1");var i=(e*n+r*o)/(n+o);return(e-r)/t.sqrt(i*(1-i)*(1/n+1/o))}e.extend({zscore:function(){var t=n.call(arguments);return r(t[1])?(t[0]-t[1])/t[2]:(t[0]-e.mean(t[1]))/e.stdev(t[1],t[2])},ztest:function(){var r,i=n.call(arguments);return o(i[1])?(r=e.zscore(i[0],i[1],i[3]),1===i[2]?e.normal.cdf(-t.abs(r),0,1):2*e.normal.cdf(-t.abs(r),0,1)):i.length>2?(r=e.zscore(i[0],i[1],i[2]),1===i[3]?e.normal.cdf(-t.abs(r),0,1):2*e.normal.cdf(-t.abs(r),0,1)):(r=i[0],1===i[1]?e.normal.cdf(-t.abs(r),0,1):2*e.normal.cdf(-t.abs(r),0,1))}}),e.extend(e.fn,{zscore:function(e,t){return(e-this.mean())/this.stdev(t)},ztest:function(n,r,o){var i=t.abs(this.zscore(n,o));return 1===r?e.normal.cdf(-i,0,1):2*e.normal.cdf(-i,0,1)}}),e.extend({tscore:function(){var r=n.call(arguments);return 4===r.length?(r[0]-r[1])/(r[2]/t.sqrt(r[3])):(r[0]-e.mean(r[1]))/(e.stdev(r[1],!0)/t.sqrt(r[1].length))},ttest:function(){var o,i=n.call(arguments);return 5===i.length?(o=t.abs(e.tscore(i[0],i[1],i[2],i[3])),1===i[4]?e.studentt.cdf(-o,i[3]-1):2*e.studentt.cdf(-o,i[3]-1)):r(i[1])?(o=t.abs(i[0]),1==i[2]?e.studentt.cdf(-o,i[1]-1):2*e.studentt.cdf(-o,i[1]-1)):(o=t.abs(e.tscore(i[0],i[1])),1==i[2]?e.studentt.cdf(-o,i[1].length-1):2*e.studentt.cdf(-o,i[1].length-1))}}),e.extend(e.fn,{tscore:function(e){return(e-this.mean())/(this.stdev(!0)/t.sqrt(this.cols()))},ttest:function(n,r){return 1===r?1-e.studentt.cdf(t.abs(this.tscore(n)),this.cols()-1):2*e.studentt.cdf(-t.abs(this.tscore(n)),this.cols()-1)}}),e.extend({anovafscore:function(){var r,o,i,a,s,l,u,c=n.call(arguments);if(1===c.length){s=new Array(c[0].length);for(var h=0;h<c[0].length;h++)s[h]=c[0][h];c=s}if(2===c.length)return e.variance(c[0])/e.variance(c[1]);for(o=new Array,h=0;h<c.length;h++)o=o.concat(c[h]);for(i=e.mean(o),r=0,h=0;h<c.length;h++)r+=c[h].length*t.pow(e.mean(c[h])-i,2);for(r/=c.length-1,l=0,h=0;h<c.length;h++)for(a=e.mean(c[h]),u=0;u<c[h].length;u++)l+=t.pow(c[h][u]-a,2);return r/(l/=o.length-c.length)},anovaftest:function(){var t,o,i,a=n.call(arguments);if(r(a[0]))return 1-e.centralF.cdf(a[0],a[1],a[2]);anovafscore=e.anovafscore(a),t=a.length-1,i=0;for(var s=0;s<a.length;s++)i+=a[s].length;return o=i-t-1,1-e.centralF.cdf(anovafscore,t,o)},ftest:function(t,n,r){return 1-e.centralF.cdf(t,n,r)}}),e.extend(e.fn,{anovafscore:function(){return e.anovafscore(this.toArray())},anovaftes:function(){for(var t=0,n=0;n<this.length;n++)t+=this[n].length;return e.ftest(this.anovafscore(),this.length-1,t-this.length)}}),e.extend({qscore:function(){var o,i,a,s,l,u=n.call(arguments);return r(u[0])?(o=u[0],i=u[1],a=u[2],s=u[3],l=u[4]):(o=e.mean(u[0]),i=e.mean(u[1]),a=u[0].length,s=u[1].length,l=u[2]),t.abs(o-i)/(l*t.sqrt((1/a+1/s)/2))},qtest:function(){var t,r=n.call(arguments);3===r.length?(t=r[0],r=r.slice(1)):7===r.length?(t=e.qscore(r[0],r[1],r[2],r[3],r[4]),r=r.slice(5)):(t=e.qscore(r[0],r[1],r[2]),r=r.slice(3));var o=r[0],i=r[1];return 1-e.tukey.cdf(t,i,o-i)},tukeyhsd:function(t){for(var n=e.pooledstdev(t),r=t.map((function(t){return e.mean(t)})),o=t.reduce((function(e,t){return e+t.length}),0),i=[],a=0;a<t.length;++a)for(var s=a+1;s<t.length;++s){var l=e.qtest(r[a],r[s],t[a].length,t[s].length,n,o,t.length);i.push([[a,s],l])}return i}}),e.extend({normalci:function(){var r,o=n.call(arguments),i=new Array(2);return r=4===o.length?t.abs(e.normal.inv(o[1]/2,0,1)*o[2]/t.sqrt(o[3])):t.abs(e.normal.inv(o[1]/2,0,1)*e.stdev(o[2])/t.sqrt(o[2].length)),i[0]=o[0]-r,i[1]=o[0]+r,i},tci:function(){var r,o=n.call(arguments),i=new Array(2);return r=4===o.length?t.abs(e.studentt.inv(o[1]/2,o[3]-1)*o[2]/t.sqrt(o[3])):t.abs(e.studentt.inv(o[1]/2,o[2].length-1)*e.stdev(o[2],!0)/t.sqrt(o[2].length)),i[0]=o[0]-r,i[1]=o[0]+r,i},significant:function(e,t){return e<t}}),e.extend(e.fn,{normalci:function(t,n){return e.normalci(t,n,this.toArray())},tci:function(t,n){return e.tci(t,n,this.toArray())}}),e.extend(e.fn,{oneSidedDifferenceOfProportions:function(t,n,r,o){var a=i(t,n,r,o);return e.ztest(a,1)},twoSidedDifferenceOfProportions:function(t,n,r,o){var a=i(t,n,r,o);return e.ztest(a,2)}})}(o,Math),o.models=function(){function e(e,t){var n=e.length,r=t[0].length-1,i=n-r-1,a=o.lstsq(t,e),s=o.multiply(t,a.map((function(e){return[e]}))).map((function(e){return e[0]})),l=o.subtract(e,s),u=o.mean(e),c=o.sum(s.map((function(e){return Math.pow(e-u,2)}))),h=o.sum(e.map((function(e,t){return Math.pow(e-s[t],2)}))),d=c+h;return{exog:t,endog:e,nobs:n,df_model:r,df_resid:i,coef:a,predict:s,resid:l,ybar:u,SST:d,SSE:c,SSR:h,R2:c/d}}function t(t){var n,r,i=(n=t.exog,r=n[0].length,o.arange(r).map((function(t){var i=o.arange(r).filter((function(e){return e!==t}));return e(o.col(n,t).map((function(e){return e[0]})),o.col(n,i))}))),a=Math.sqrt(t.SSR/t.df_resid),s=i.map((function(e){var t=e.SST,n=e.R2;return a/Math.sqrt(t*(1-n))})),l=t.coef.map((function(e,t){return(e-0)/s[t]})),u=l.map((function(e){var n=o.studentt.cdf(e,t.df_resid);return 2*(n>.5?1-n:n)})),c=o.studentt.inv(.975,t.df_resid),h=t.coef.map((function(e,t){var n=c*s[t];return[e-n,e+n]}));return{se:s,t:l,p:u,sigmaHat:a,interval95:h}}return{ols:function(n,r){var i=e(n,r),a=t(i),s=function(e){var t,n,r,i=e.R2/e.df_model/((1-e.R2)/e.df_resid);return{F_statistic:i,pvalue:1-(t=i,n=e.df_model,r=e.df_resid,o.beta.cdf(t/(r/n+t),n/2,r/2))}}(i),l=1-(1-i.R2)*((i.nobs-1)/i.df_resid);return i.t=a,i.f=s,i.adjust_R2=l,i}}}(),o)},function(e,t,n){var r=n(1),o=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 o.error;try{for(var n=t.split("."),r=e,i=0;i<n.length;++i){var a=n[i];if("]"===a[a.length-1]){var s=a.indexOf("["),l=a.substring(s+1,a.length-1);r=r[a.substring(0,s)][l]}else r=r[a]}return r}catch(e){}},t.JOIN=function(e,t){return e.join(t)},t.NUMBERS=function(){var e=r.flatten(arguments);return e.filter((function(e){return"number"==typeof e}))}},function(e,t,n){var r=n(0),o=n(10),i=n(6),a=n(1),s=n(26);function l(e){return/^[01]{1,10}$/.test(e)}t.BESSELI=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:s.besseli(e,t)},t.BESSELJ=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:s.besselj(e,t)},t.BESSELK=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:s.besselk(e,t)},t.BESSELY=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:s.bessely(e,t)},t.BIN2DEC=function(e){if(!l(e))return r.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},t.BIN2HEX=function(e,t){if(!l(e))return r.num;var n=e.toString();if(10===n.length&&"1"===n.substring(0,1))return(0xfffffffe00+parseInt(n.substring(1),2)).toString(16);var o=parseInt(e,2).toString(16);return void 0===t?o:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=o.length?i.REPT("0",t-o.length)+o:r.num},t.BIN2OCT=function(e,t){if(!l(e))return r.num;var n=e.toString();if(10===n.length&&"1"===n.substring(0,1))return(1073741312+parseInt(n.substring(1),2)).toString(8);var o=parseInt(e,2).toString(8);return void 0===t?o:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=o.length?i.REPT("0",t-o.length)+o:r.num},t.BITAND=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:e<0||t<0?r.num:Math.floor(e)!==e||Math.floor(t)!==t?r.num:e>0xffffffffffff||t>0xffffffffffff?r.num:e&t},t.BITLSHIFT=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:e<0?r.num:Math.floor(e)!==e?r.num:e>0xffffffffffff?r.num:Math.abs(t)>53?r.num:t>=0?e<<t:e>>-t},t.BITOR=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:e<0||t<0?r.num:Math.floor(e)!==e||Math.floor(t)!==t?r.num:e>0xffffffffffff||t>0xffffffffffff?r.num:e|t},t.BITRSHIFT=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:e<0?r.num:Math.floor(e)!==e?r.num:e>0xffffffffffff?r.num:Math.abs(t)>53?r.num:t>=0?e>>t:e<<-t},t.BITXOR=function(e,t){return e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:e<0||t<0?r.num:Math.floor(e)!==e||Math.floor(t)!==t?r.num:e>0xffffffffffff||t>0xffffffffffff?r.num:e^t},t.COMPLEX=function(e,t,n){if(e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t))return e;if("i"!==(n=void 0===n?"i":n)&&"j"!==n)return r.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 o=t>0?"+":"";return e.toString()+o+(1===t?n:t.toString()+n)},t.CONVERT=function(e,t,n){if((e=a.parseNumber(e))instanceof Error)return e;for(var o,i=[["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]],s={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"]},l={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"]},u=null,c=null,h=t,d=n,f=1,v=1,g=0;g<i.length;g++)o=null===i[g][2]?[]:i[g][2],(i[g][1]===h||o.indexOf(h)>=0)&&(u=i[g]),(i[g][1]===d||o.indexOf(d)>=0)&&(c=i[g]);if(null===u){var p=s[t.substring(0,2)],m=l[t.substring(0,1)];"da"===t.substring(0,2)&&(m=["dekao",10,"da"]),p?(f=p[2],h=t.substring(2)):m&&(f=m[1],h=t.substring(m[2].length));for(var y=0;y<i.length;y++)o=null===i[y][2]?[]:i[y][2],(i[y][1]===h||o.indexOf(h)>=0)&&(u=i[y])}if(null===c){var w=s[n.substring(0,2)],C=l[n.substring(0,1)];"da"===n.substring(0,2)&&(C=["dekao",10,"da"]),w?(v=w[2],d=n.substring(2)):C&&(v=C[1],d=n.substring(C[2].length));for(var E=0;E<i.length;E++)o=null===i[E][2]?[]:i[E][2],(i[E][1]===d||o.indexOf(d)>=0)&&(c=i[E])}return null===u||null===c?r.na:u[3]!==c[3]?r.na:e*u[6]*f/(c[6]*v)},t.DEC2BIN=function(e,t){if((e=a.parseNumber(e))instanceof Error)return e;if(!/^-?[0-9]{1,3}$/.test(e)||e<-512||e>511)return r.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)?r.value:t<0?r.num:(t=Math.floor(t))>=n.length?i.REPT("0",t-n.length)+n:r.num},t.DEC2HEX=function(e,t){if((e=a.parseNumber(e))instanceof Error)return e;if(!/^-?[0-9]{1,12}$/.test(e)||e<-549755813888||e>549755813887)return r.num;if(e<0)return(1099511627776+e).toString(16);var n=parseInt(e,10).toString(16);return void 0===t?n:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=n.length?i.REPT("0",t-n.length)+n:r.num},t.DEC2OCT=function(e,t){if((e=a.parseNumber(e))instanceof Error)return e;if(!/^-?[0-9]{1,9}$/.test(e)||e<-536870912||e>536870911)return r.num;if(e<0)return(1073741824+e).toString(8);var n=parseInt(e,10).toString(8);return void 0===t?n:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=n.length?i.REPT("0",t-n.length)+n:r.num},t.DELTA=function(e,t){return t=void 0===t?0:t,e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:e===t?1:0},t.ERF=function(e,t){return t=void 0===t?0:t,e=a.parseNumber(e),t=a.parseNumber(t),a.anyIsError(e,t)?r.value:o.erf(e)},t.ERF.PRECISE=function(){throw new Error("ERF.PRECISE is not implemented")},t.ERFC=function(e){return isNaN(e)?r.value:o.erfc(e)},t.ERFC.PRECISE=function(){throw new Error("ERFC.PRECISE is not implemented")},t.GESTEP=function(e,t){return t=t||0,e=a.parseNumber(e),a.anyIsError(t,e)?e:e>=t?1:0},t.HEX2BIN=function(e,t){if(!/^[0-9A-Fa-f]{1,10}$/.test(e))return r.num;var n=10===e.length&&"f"===e.substring(0,1).toLowerCase(),o=n?parseInt(e,16)-1099511627776:parseInt(e,16);if(o<-512||o>511)return r.num;if(n)return"1"+i.REPT("0",9-(512+o).toString(2).length)+(512+o).toString(2);var a=o.toString(2);return void 0===t?a:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=a.length?i.REPT("0",t-a.length)+a:r.num},t.HEX2DEC=function(e){if(!/^[0-9A-Fa-f]{1,10}$/.test(e))return r.num;var t=parseInt(e,16);return t>=549755813888?t-1099511627776:t},t.HEX2OCT=function(e,t){if(!/^[0-9A-Fa-f]{1,10}$/.test(e))return r.num;var n=parseInt(e,16);if(n>536870911&&n<0xffe0000000)return r.num;if(n>=0xffe0000000)return(n-0xffc0000000).toString(8);var o=n.toString(8);return void 0===t?o:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=o.length?i.REPT("0",t-o.length)+o:r.num},t.IMABS=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);return a.anyIsError(n,o)?r.value:Math.sqrt(Math.pow(n,2)+Math.pow(o,2))},t.IMAGINARY=function(e){if(void 0===e||!0===e||!1===e)return r.value;if(0===e||"0"===e)return 0;if(["i","j"].indexOf(e)>=0)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 o=e.substring(e.length-1,e.length),i="i"===o||"j"===o;return t>=0||n>=0?i?t>=0?isNaN(e.substring(0,t))||isNaN(e.substring(t+1,e.length-1))?r.num:Number(e.substring(t+1,e.length-1)):isNaN(e.substring(0,n))||isNaN(e.substring(n+1,e.length-1))?r.num:-Number(e.substring(n+1,e.length-1)):r.num:i?isNaN(e.substring(0,e.length-1))?r.num:e.substring(0,e.length-1):isNaN(e)?r.num:0},t.IMARGUMENT=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);return a.anyIsError(n,o)?r.value:0===n&&0===o?r.div0:0===n&&o>0?Math.PI/2:0===n&&o<0?-Math.PI/2:0===o&&n>0?0:0===o&&n<0?-Math.PI:n>0?Math.atan(o/n):n<0&&o>=0?Math.atan(o/n)+Math.PI:Math.atan(o/n)-Math.PI},t.IMCONJUGATE=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,o))return r.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",0!==o?t.COMPLEX(n,-o,i):e},t.IMCOS=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,o))return r.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.cos(n)*(Math.exp(o)+Math.exp(-o))/2,-Math.sin(n)*(Math.exp(o)-Math.exp(-o))/2,i)},t.IMCOSH=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,o))return r.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.cos(o)*(Math.exp(n)+Math.exp(-n))/2,Math.sin(o)*(Math.exp(n)-Math.exp(-n))/2,i)},t.IMCOT=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);return a.anyIsError(n,o)?r.value:t.IMDIV(t.IMCOS(e),t.IMSIN(e))},t.IMDIV=function(e,n){var o=t.IMREAL(e),i=t.IMAGINARY(e),s=t.IMREAL(n),l=t.IMAGINARY(n);if(a.anyIsError(o,i,s,l))return r.value;var u=e.substring(e.length-1),c=n.substring(n.length-1),h="i";if("j"===u?h="j":"j"===c&&(h="j"),0===s&&0===l)return r.num;var d=s*s+l*l;return t.COMPLEX((o*s+i*l)/d,(i*s-o*l)/d,h)},t.IMEXP=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,o))return r.value;var i=e.substring(e.length-1);i="i"===i||"j"===i?i:"i";var s=Math.exp(n);return t.COMPLEX(s*Math.cos(o),s*Math.sin(o),i)},t.IMLN=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,o))return r.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.log(Math.sqrt(n*n+o*o)),Math.atan(o/n),i)},t.IMLOG10=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,o))return r.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.log(Math.sqrt(n*n+o*o))/Math.log(10),Math.atan(o/n)/Math.log(10),i)},t.IMLOG2=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,o))return r.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.log(Math.sqrt(n*n+o*o))/Math.log(2),Math.atan(o/n)/Math.log(2),i)},t.IMPOWER=function(e,n){n=a.parseNumber(n);var o=t.IMREAL(e),i=t.IMAGINARY(e);if(a.anyIsError(n,o,i))return r.value;var s=e.substring(e.length-1);s="i"===s||"j"===s?s:"i";var l=Math.pow(t.IMABS(e),n),u=t.IMARGUMENT(e);return t.COMPLEX(l*Math.cos(n*u),l*Math.sin(n*u),s)},t.IMPRODUCT=function(){var e=arguments[0];if(!arguments.length)return r.value;for(var n=1;n<arguments.length;n++){var o=t.IMREAL(e),i=t.IMAGINARY(e),s=t.IMREAL(arguments[n]),l=t.IMAGINARY(arguments[n]);if(a.anyIsError(o,i,s,l))return r.value;e=t.COMPLEX(o*s-i*l,o*l+i*s)}return e},t.IMREAL=function(e){if(void 0===e||!0===e||!1===e)return r.value;if(0===e||"0"===e)return 0;if(["i","+i","1i","+1i","-i","-1i","j","+j","1j","+1j","-j","-1j"].indexOf(e)>=0)return 0;var t=e.indexOf("+"),n=e.indexOf("-");0===t&&(t=e.indexOf("+",1)),0===n&&(n=e.indexOf("-",1));var o=e.substring(e.length-1,e.length),i="i"===o||"j"===o;return t>=0||n>=0?i?t>=0?isNaN(e.substring(0,t))||isNaN(e.substring(t+1,e.length-1))?r.num:Number(e.substring(0,t)):isNaN(e.substring(0,n))||isNaN(e.substring(n+1,e.length-1))?r.num:Number(e.substring(0,n)):r.num:i?isNaN(e.substring(0,e.length-1))?r.num:0:isNaN(e)?r.num:e},t.IMSEC=function(e){if(!0===e||!1===e)return r.value;var n=t.IMREAL(e),o=t.IMAGINARY(e);return a.anyIsError(n,o)?r.value:t.IMDIV("1",t.IMCOS(e))},t.IMSECH=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);return a.anyIsError(n,o)?r.value:t.IMDIV("1",t.IMCOSH(e))},t.IMSIN=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,o))return r.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.sin(n)*(Math.exp(o)+Math.exp(-o))/2,Math.cos(n)*(Math.exp(o)-Math.exp(-o))/2,i)},t.IMSINH=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,o))return r.value;var i=e.substring(e.length-1);return i="i"===i||"j"===i?i:"i",t.COMPLEX(Math.cos(o)*(Math.exp(n)-Math.exp(-n))/2,Math.sin(o)*(Math.exp(n)+Math.exp(-n))/2,i)},t.IMSQRT=function(e){var n=t.IMREAL(e),o=t.IMAGINARY(e);if(a.anyIsError(n,o))return r.value;var i=e.substring(e.length-1);i="i"===i||"j"===i?i:"i";var s=Math.sqrt(t.IMABS(e)),l=t.IMARGUMENT(e);return t.COMPLEX(s*Math.cos(l/2),s*Math.sin(l/2),i)},t.IMCSC=function(e){if(!0===e||!1===e)return r.value;var n=t.IMREAL(e),o=t.IMAGINARY(e);return a.anyIsError(n,o)?r.num:t.IMDIV("1",t.IMSIN(e))},t.IMCSCH=function(e){if(!0===e||!1===e)return r.value;var n=t.IMREAL(e),o=t.IMAGINARY(e);return a.anyIsError(n,o)?r.num:t.IMDIV("1",t.IMSINH(e))},t.IMSUB=function(e,t){var n=this.IMREAL(e),o=this.IMAGINARY(e),i=this.IMREAL(t),s=this.IMAGINARY(t);if(a.anyIsError(n,o,i,s))return r.value;var l=e.substring(e.length-1),u=t.substring(t.length-1),c="i";return"j"===l?c="j":"j"===u&&(c="j"),this.COMPLEX(n-i,o-s,c)},t.IMSUM=function(){if(!arguments.length)return r.value;for(var e=a.flatten(arguments),t=e[0],n=1;n<e.length;n++){var o=this.IMREAL(t),i=this.IMAGINARY(t),s=this.IMREAL(e[n]),l=this.IMAGINARY(e[n]);if(a.anyIsError(o,i,s,l))return r.value;t=this.COMPLEX(o+s,i+l)}return t},t.IMTAN=function(e){if(!0===e||!1===e)return r.value;var n=t.IMREAL(e),o=t.IMAGINARY(e);return a.anyIsError(n,o)?r.value:this.IMDIV(this.IMSIN(e),this.IMCOS(e))},t.OCT2BIN=function(e,t){if(!/^[0-7]{1,10}$/.test(e))return r.num;var n=10===e.length&&"7"===e.substring(0,1),o=n?parseInt(e,8)-1073741824:parseInt(e,8);if(o<-512||o>511)return r.num;if(n)return"1"+i.REPT("0",9-(512+o).toString(2).length)+(512+o).toString(2);var a=o.toString(2);return void 0===t?a:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=a.length?i.REPT("0",t-a.length)+a:r.num},t.OCT2DEC=function(e){if(!/^[0-7]{1,10}$/.test(e))return r.num;var t=parseInt(e,8);return t>=536870912?t-1073741824:t},t.OCT2HEX=function(e,t){if(!/^[0-7]{1,10}$/.test(e))return r.num;var n=parseInt(e,8);if(n>=536870912)return"ff"+(n+3221225472).toString(16);var o=n.toString(16);return void 0===t?o:isNaN(t)?r.value:t<0?r.num:(t=Math.floor(t))>=o.length?i.REPT("0",t-o.length)+o:r.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 r(e){var t=parseInt(e,10);return t=isNaN(t)?-1:Math.max(t-1,-1)}function o(e){var t="";return e>=0&&(t=""+(e+1)),t}t.__esModule=!0,t.rowLabelToIndex=r,t.rowIndexToLabel=o,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],o=t[2],i=t[3],a=t[4];return[{index:r(a),label:a,isAbsolute:"$"===i},{index:s(o),label:o,isAbsolute:"$"===n}]},t.toLabel=function(e,t){var n=(e.isAbsolute?"$":"")+o(e.index);return(t.isAbsolute?"$":"")+l(t.index)+n};var i="ABCDEFGHIJKLMNOPQRSTUVWXYZ",a=i.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(a,r)*(i.indexOf(e[n])+1);return--t}function l(e){for(var t="";e>=0;)t=String.fromCharCode(e%a+97)+t,e=Math.floor(e/a)-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=h(n(17)),o=h(n(18)),i=n(39),a=n(40),s=n(3),l=n(2),u=h(l),c=n(14);function h(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);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,e.call(this));return n.parser=new i.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:o.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}return 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)}(t,e),t.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}},t.prototype.setVariable=function(e,t){return this.variables[e]=t,this},t.prototype.getVariable=function(e){return this.variables[e]},t.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},t.prototype.setFunction=function(e,t){return this.functions[e]=t,this},t.prototype.getFunction=function(e){return this.functions[e]},t.prototype._callFunction=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=this.getFunction(e),r=void 0;return n&&(r=n(t)),this.emit("callFunction",e,t,(function(e){void 0!==e&&(r=e)})),void 0===r?(0,o.default)(e,t):r},t.prototype._callCellValue=function(e){e=e.toUpperCase();var t=(0,c.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},t.prototype._callRangeValue=function(e,t){e=e.toUpperCase(),t=t.toUpperCase();var n=(0,c.extractLabel)(e),r=n[0],o=n[1],i=(0,c.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,c.toLabel)(l.row,l.column),u.label=(0,c.toLabel)(u.row,u.column);var h=[];return this.emit("callRangeValue",l,u,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];h=e})),h},t.prototype._throwError=function(e){if((0,l.isValidStrict)(e))throw Error(e);throw Error(l.ERROR)},t}(r.default);t.default=d},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=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e=e.toUpperCase(),!y[e])throw Error(p.ERROR_NAME);return y[e].apply(y,t)},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=a;var r=n(3),o=n(2),i=t.SYMBOL="+";function a(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var a=n.reduce((function(e,t){return e+(0,r.toNumber)(t)}),(0,r.toNumber)(e));if(isNaN(a))throw Error(o.ERROR_VALUE);return a}a.SYMBOL=i},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=a;var r=n(3),o=n(2),i=t.SYMBOL="/";function a(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var a=n.reduce((function(e,t){return e/(0,r.toNumber)(t)}),(0,r.toNumber)(e));if(a===1/0)throw Error(o.ERROR_DIV_ZERO);if(isNaN(a))throw Error(o.ERROR_VALUE);return a}a.SYMBOL=i},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,o=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)),i=n(13),a=(r=i)&&r.__esModule?r:{default:r},s=n(2),l=t.SYMBOL=a.default;function u(e){return function(){var t=(e=e.toUpperCase()).split("."),n=!1,r=void 0;if(1===t.length)o[t[0]]&&(n=!0,r=o[t[0]].apply(o,arguments));else{for(var i=t.length,a=0,l=o;a<i;)if(l=l[t[a]],a++,!l){l=null;break}l&&(n=!0,r=l.apply(void 0,arguments))}if(!n)throw Error(s.ERROR_NAME);return r}}u.isFactory=!0,u.SYMBOL=l},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 r=Math;function o(e,t){return e.reduce((function(e,n){return t*e+n}),0)}function i(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 a(e,t,n,r,o){return function(a,s){if(0===s)return e(a);if(1===s)return t(a);if(s<0)throw n+": Order ("+s+") must be nonnegative";if(1==r&&0===a)throw n+": Undefined when x == 0";if(2==r&&a<=0)throw n+": Undefined when x <= 0";return i(a,s,e(a),t(a),o)}}var s,l,u,c,h,d,f,v,g,p,m,y,w,C=function(){var e=[57568490574,-13362590354,651619640.7,-11214424.18,77392.33017,-184.9052456].reverse(),t=[57568490411,1029532985,9494680.718,59272.64853,267.8532712,1].reverse(),n=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),a=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34935152e-8].reverse(),s=.636619772;function l(i){var l,u,c,h=i*i,d=r.abs(i)-.785398164;return r.abs(i)<8?l=(u=o(e,h))/(c=o(t,h)):(u=o(n,h=64/h),c=o(a,h),l=r.sqrt(s/r.abs(i))*(r.cos(d)*u-r.sin(d)*c*8/r.abs(i))),l}var u=[72362614232,-7895059235,242396853.1,-2972611.439,15704.4826,-30.16036606].reverse(),c=[144725228442,2300535178,18583304.74,99447.43394,376.9991397,1].reverse(),h=[1,.00183105,-3516396496e-14,2457520174e-15,-2.40337019e-7].reverse(),d=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse();function f(e){var t,n,i,a=e*e,l=r.abs(e)-2.356194491;return Math.abs(e)<8?t=(n=e*o(u,a))/(i=o(c,a)):(n=o(h,a=64/a),i=o(d,a),t=r.sqrt(s/r.abs(e))*(r.cos(l)*n-r.sin(l)*i*8/r.abs(e)),e<0&&(t=-t)),t}return function(e,t){if(0===(t=Math.round(t)))return l(r.abs(e));if(1===t)return f(r.abs(e));if(t<0)throw"BESSELJ: Order ("+t+") must be nonnegative";if(0===r.abs(e))return 0;var n,o,a,s,u,c,h,d=2/r.abs(e);if(r.abs(e)>t)n=i(e,t,l(r.abs(e)),f(r.abs(e)),-1);else{for(a=0,u=n=s=0,c=1,o=2*r.floor((t+r.floor(r.sqrt(40*t)))/2);o>0;o--)h=o*d*c-u,u=c,c=h,r.abs(c)>1e10&&(c*=1e-10,u*=1e-10,n*=1e-10,s*=1e-10),a&&(s+=c),a=!a,o==t&&(n=u);n/=s=2*s-c}return e<0&&t%2?-n:n}}(),E=(s=[-2957821389,7062834065,-512359803.6,10879881.29,-86327.92757,228.4622733].reverse(),l=[40076544269,745249964.8,7189466.438,47447.2647,226.1030244,1].reverse(),u=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),c=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34945152e-8].reverse(),h=.636619772,d=[-4900604943e3,127527439e4,-51534381390,734926455.1,-4237922.726,8511.937935].reverse(),f=[249958057e5,424441966400,3733650367,22459040.02,102042.605,354.9632885,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(),a((function(e){var t,n,i,a=e*e,d=e-.785398164;return e<8?t=(n=o(s,a))/(i=o(l,a))+h*C(e,0)*r.log(e):(n=o(u,a=64/a),i=o(c,a),t=r.sqrt(h/e)*(r.sin(d)*n+r.cos(d)*i*8/e)),t}),(function(e){var t,n,i,a=e*e,s=e-2.356194491;return e<8?t=(n=e*o(d,a))/(i=o(f,a))+h*(C(e,1)*r.log(e)-1/e):(n=o(v,a=64/a),i=o(g,a),t=r.sqrt(h/e)*(r.sin(s)*n+r.cos(s)*i*8/e)),t}),"BESSELY",1,-1)),S=(p=[1,3.5156229,3.0899424,1.2067492,.2659732,.0360768,.0045813].reverse(),m=[.39894228,.01328592,.00225319,-.00157565,.00916281,-.02057706,.02635537,-.01647633,.00392377].reverse(),y=[.5,.87890594,.51498869,.15084934,.02658733,.00301532,32411e-8].reverse(),w=[.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?o(p,e*e/14.0625):r.exp(r.abs(e))/r.sqrt(r.abs(e))*o(m,3.75/r.abs(e))}(t);if(1==n)return function(e){return e<3.75?e*o(y,e*e/14.0625):(e<0?-1:1)*r.exp(r.abs(e))/r.sqrt(r.abs(e))*o(w,3.75/r.abs(e))}(t);if(n<0)throw"BESSELI Order ("+n+") must be nonnegative";if(0===r.abs(t))return 0;var i,a,s,l,u,c=2/r.abs(t);for(s=i=0,l=1,a=2*r.round((n+r.round(r.sqrt(40*n)))/2);a>0;a--)u=a*c*l+s,s=l,l=u,r.abs(l)>1e10&&(l*=1e-10,s*=1e-10,i*=1e-10),a==n&&(i=s);return i*=e(t,0)/l,t<0&&n%2?-i:i}),b=function(){var e=[-.57721566,.4227842,.23069756,.0348859,.00262698,1075e-7,74e-7].reverse(),t=[1.25331414,-.07832358,.02189568,-.01062446,.00587872,-.0025154,53208e-8].reverse(),n=[1,.15443144,-.67278579,-.18156897,-.01919402,-.00110404,-4686e-8].reverse(),i=[1.25331414,.23498619,-.0365562,.01504268,-.00780353,.00325614,-68245e-8].reverse();return a((function(n){return n<=2?-r.log(n/2)*S(n,0)+o(e,n*n/4):r.exp(-n)/r.sqrt(n)*o(t,2/n)}),(function(e){return e<=2?r.log(e/2)*S(e,1)+1/e*o(n,e*e/4):r.exp(-e)/r.sqrt(e)*o(i,2/e)}),"BESSELK",2,1)}();t.besselj=C,t.bessely=E,t.besseli=S,t.besselk=b},function(e,t,n){var r=n(0),o=n(5),i=n(4),a=n(1),s=n(7);function l(e){var t=[];return a.arrayEach(e,(function(e){e&&t.push(e)})),t}function u(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 l=!1,u=!1,c=0;c<t.length;++c){var h=t[c];if(!(h.length<o)){var d=h[0];if(e[i][0]===d){u=!0;for(var f=1;f<h.length;++f)if(!l)if(void 0===h[f]||"*"===h[f])l=!0;else{var v=s.parse(h[f]+""),g=[s.createToken(e[i][a],s.TOKEN_TYPE_LITERAL)].concat(v);l=s.compute(g)}}}}u&&(n[a]=n[a]&&l)}for(var p=[],m=0;m<e[0].length;++m)n[m]&&p.push(m-1);return p}t.FINDFIELD=function(e,t){var n=null;return a.arrayEach(e,(function(e,r){if(e[0]===t)return n=r,!1})),null==n?r.value:n},t.DAVERAGE=function(e,n,o){if(isNaN(n)&&"string"!=typeof n)return r.value;var i=u(e,o),s=[];if("string"==typeof n){var l=t.FINDFIELD(e,n);s=a.rest(e[l])}else s=a.rest(e[n]);var c=0;return a.arrayEach(i,(function(e){c+=s[e]})),0===i.length?r.div0:c/i.length},t.DCOUNT=function(e,n,i){if(isNaN(n)&&"string"!=typeof n)return r.value;var s=u(e,i),l=[];if("string"==typeof n){var c=t.FINDFIELD(e,n);l=a.rest(e[c])}else l=a.rest(e[n]);var h=[];return a.arrayEach(s,(function(e){h.push(l[e])})),o.COUNT(h)},t.DCOUNTA=function(e,n,i){if(isNaN(n)&&"string"!=typeof n)return r.value;var s=u(e,i),l=[];if("string"==typeof n){var c=t.FINDFIELD(e,n);l=a.rest(e[c])}else l=a.rest(e[n]);var h=[];return a.arrayEach(s,(function(e){h.push(l[e])})),o.COUNTA(h)},t.DGET=function(e,n,o){if(isNaN(n)&&"string"!=typeof n)return r.value;var i=u(e,o),s=[];if("string"==typeof n){var l=t.FINDFIELD(e,n);s=a.rest(e[l])}else s=a.rest(e[n]);return 0===i.length?r.value:i.length>1?r.num:s[i[0]]},t.DMAX=function(e,n,o){if(isNaN(n)&&"string"!=typeof n)return r.value;var i=u(e,o),s=[];if("string"==typeof n){var l=t.FINDFIELD(e,n);s=a.rest(e[l])}else s=a.rest(e[n]);var c=s[i[0]];return a.arrayEach(i,(function(e){c<s[e]&&(c=s[e])})),c},t.DMIN=function(e,n,o){if(isNaN(n)&&"string"!=typeof n)return r.value;var i=u(e,o),s=[];if("string"==typeof n){var l=t.FINDFIELD(e,n);s=a.rest(e[l])}else s=a.rest(e[n]);var c=s[i[0]];return a.arrayEach(i,(function(e){c>s[e]&&(c=s[e])})),c},t.DPRODUCT=function(e,n,o){if(isNaN(n)&&"string"!=typeof n)return r.value;var i=u(e,o),s=[];if("string"==typeof n){var c=t.FINDFIELD(e,n);s=a.rest(e[c])}else s=a.rest(e[n]);var h=[];a.arrayEach(i,(function(e){h.push(s[e])})),h=l(h);var d=1;return a.arrayEach(h,(function(e){d*=e})),d},t.DSTDEV=function(e,n,i){if(isNaN(n)&&"string"!=typeof n)return r.value;var s=u(e,i),c=[];if("string"==typeof n){var h=t.FINDFIELD(e,n);c=a.rest(e[h])}else c=a.rest(e[n]);var d=[];return a.arrayEach(s,(function(e){d.push(c[e])})),d=l(d),o.STDEV.S(d)},t.DSTDEVP=function(e,n,i){if(isNaN(n)&&"string"!=typeof n)return r.value;var s=u(e,i),c=[];if("string"==typeof n){var h=t.FINDFIELD(e,n);c=a.rest(e[h])}else c=a.rest(e[n]);var d=[];return a.arrayEach(s,(function(e){d.push(c[e])})),d=l(d),o.STDEV.P(d)},t.DSUM=function(e,n,o){if(isNaN(n)&&"string"!=typeof n)return r.value;var s=u(e,o),l=[];if("string"==typeof n){var c=t.FINDFIELD(e,n);l=a.rest(e[c])}else l=a.rest(e[n]);var h=[];return a.arrayEach(s,(function(e){h.push(l[e])})),i.SUM(h)},t.DVAR=function(e,n,i){if(isNaN(n)&&"string"!=typeof n)return r.value;var s=u(e,i),l=[];if("string"==typeof n){var c=t.FINDFIELD(e,n);l=a.rest(e[c])}else l=a.rest(e[n]);var h=[];return a.arrayEach(s,(function(e){h.push(l[e])})),o.VAR.S(h)},t.DVARP=function(e,n,i){if(isNaN(n)&&"string"!=typeof n)return r.value;var s=u(e,i),l=[];if("string"==typeof n){var c=t.FINDFIELD(e,n);l=a.rest(e[c])}else l=a.rest(e[n]);var h=[];return a.arrayEach(s,(function(e){h.push(l[e])})),o.VAR.P(h)}},function(e,t,n){var r=n(0),o=n(1),i=n(8);t.AND=function(){for(var e=o.flatten(arguments),t=!0,n=0;n<e.length;n++)e[n]||(t=!1);return t},t.CHOOSE=function(){if(arguments.length<2)return r.na;var e=arguments[0];return e<1||e>254?r.value:arguments.length<e+1?r.value:arguments[e]},t.FALSE=function(){return!1},t.IF=function(e,t,n){return e?t:n},t.IFERROR=function(e,t){return i.ISERROR(e)?t:e},t.IFNA=function(e,t){return e===r.na?t:e},t.NOT=function(e){return!e},t.OR=function(){for(var e=o.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=o.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(arguments.length>0){var t=arguments[0],n=arguments.length-1,o=Math.floor(n/2),i=!1,a=n%2!=0,s=n%2==0?null:arguments[arguments.length-1];if(o)for(var l=0;l<o;l++)if(t===arguments[2*l+1]){e=arguments[2*l+2],i=!0;break}i||(e=a?s:r.na)}else e=r.value;return e}},function(e,t,n){var r=n(0),o=n(9),i=n(1);function a(e){return e&&e.getTime&&!isNaN(e.getTime())}function s(e){return e instanceof Date?e:new Date(e)}t.ACCRINT=function(e,t,n,i,l,u,c){return e=s(e),t=s(t),n=s(n),a(e)&&a(t)&&a(n)?i<=0||l<=0?r.num:-1===[1,2,4].indexOf(u)?r.num:-1===[0,1,2,3,4].indexOf(c)?r.num:n<=e?r.num:(c=c||0,(l=l||0)*i*o.YEARFRAC(e,n,c)):r.value},t.ACCRINTM=function(){throw new Error("ACCRINTM is not implemented")},t.AMORDEGRC=function(){throw new Error("AMORDEGRC is not implemented")},t.AMORLINC=function(){throw new Error("AMORLINC is not implemented")},t.COUPDAYBS=function(){throw new Error("COUPDAYBS is not implemented")},t.COUPDAYS=function(){throw new Error("COUPDAYS is not implemented")},t.COUPDAYSNC=function(){throw new Error("COUPDAYSNC is not implemented")},t.COUPNCD=function(){throw new Error("COUPNCD is not implemented")},t.COUPNUM=function(){throw new Error("COUPNUM is not implemented")},t.COUPPCD=function(){throw new Error("COUPPCD is not implemented")},t.CUMIPMT=function(e,n,o,a,s,l){if(e=i.parseNumber(e),n=i.parseNumber(n),o=i.parseNumber(o),i.anyIsError(e,n,o))return r.value;if(e<=0||n<=0||o<=0)return r.num;if(a<1||s<1||a>s)return r.num;if(0!==l&&1!==l)return r.num;var u=t.PMT(e,n,o,0,l),c=0;1===a&&0===l&&(c=-o,a++);for(var h=a;h<=s;h++)c+=1===l?t.FV(e,h-2,u,o,1)-u:t.FV(e,h-1,u,o,0);return c*=e},t.CUMPRINC=function(e,n,o,a,s,l){if(e=i.parseNumber(e),n=i.parseNumber(n),o=i.parseNumber(o),i.anyIsError(e,n,o))return r.value;if(e<=0||n<=0||o<=0)return r.num;if(a<1||s<1||a>s)return r.num;if(0!==l&&1!==l)return r.num;var u=t.PMT(e,n,o,0,l),c=0;1===a&&(c=0===l?u+o*e:u,a++);for(var h=a;h<=s;h++)c+=l>0?u-(t.FV(e,h-2,u,o,1)-u)*e:u-t.FV(e,h-1,u,o,0)*e;return c},t.DB=function(e,t,n,o,a){if(a=void 0===a?12:a,e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),o=i.parseNumber(o),a=i.parseNumber(a),i.anyIsError(e,t,n,o,a))return r.value;if(e<0||t<0||n<0||o<0)return r.num;if(-1===[1,2,3,4,5,6,7,8,9,10,11,12].indexOf(a))return r.num;if(o>n)return r.num;if(t>=e)return 0;for(var s=(1-Math.pow(t/e,1/n)).toFixed(3),l=e*s*a/12,u=l,c=0,h=o===n?n-1:o,d=2;d<=h;d++)u+=c=(e-u)*s;return 1===o?l:o===n?(e-u)*s:c},t.DDB=function(e,t,n,o,a){if(a=void 0===a?2:a,e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),o=i.parseNumber(o),a=i.parseNumber(a),i.anyIsError(e,t,n,o,a))return r.value;if(e<0||t<0||n<0||o<0||a<=0)return r.num;if(o>n)return r.num;if(t>=e)return 0;for(var s=0,l=0,u=1;u<=o;u++)s+=l=Math.min(a/n*(e-s),e-t-s);return l},t.DISC=function(){throw new Error("DISC is not implemented")},t.DOLLARDE=function(e,t){if(e=i.parseNumber(e),t=i.parseNumber(t),i.anyIsError(e,t))return r.value;if(t<0)return r.num;if(t>=0&&t<1)return r.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 o=Math.pow(10,Math.ceil(Math.log(t)/Math.LN2)+1);return n=Math.round(n*o)/o},t.DOLLARFR=function(e,t){if(e=i.parseNumber(e),t=i.parseNumber(t),i.anyIsError(e,t))return r.value;if(t<0)return r.num;if(t>=0&&t<1)return r.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},t.DURATION=function(){throw new Error("DURATION is not implemented")},t.EFFECT=function(e,t){return e=i.parseNumber(e),t=i.parseNumber(t),i.anyIsError(e,t)?r.value:e<=0||t<1?r.num:(t=parseInt(t,10),Math.pow(1+e/t,t)-1)},t.FV=function(e,t,n,o,a){if(o=o||0,a=a||0,e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),o=i.parseNumber(o),a=i.parseNumber(a),i.anyIsError(e,t,n,o,a))return r.value;var s;if(0===e)s=o+n*t;else{var l=Math.pow(1+e,t);s=1===a?o*l+n*(1+e)*(l-1)/e:o*l+n*(l-1)/e}return-s},t.FVSCHEDULE=function(e,t){if(e=i.parseNumber(e),t=i.parseNumberArray(i.flatten(t)),i.anyIsError(e,t))return r.value;for(var n=t.length,o=e,a=0;a<n;a++)o*=1+t[a];return o},t.INTRATE=function(){throw new Error("INTRATE is not implemented")},t.IPMT=function(e,n,o,a,s,l){if(s=s||0,l=l||0,e=i.parseNumber(e),n=i.parseNumber(n),o=i.parseNumber(o),a=i.parseNumber(a),s=i.parseNumber(s),l=i.parseNumber(l),i.anyIsError(e,n,o,a,s,l))return r.value;var u=t.PMT(e,o,a,s,l);return(1===n?1===l?0:-a:1===l?t.FV(e,n-2,u,a,1)-u:t.FV(e,n-1,u,a,0))*e},t.IRR=function(e,t){if(t=t||0,e=i.parseNumberArray(i.flatten(e)),t=i.parseNumber(t),i.anyIsError(e,t))return r.value;for(var n=function(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},o=function(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,a+1)}return o},a=[],s=!1,l=!1,u=0;u<e.length;u++)a[u]=0===u?0:a[u-1]+365,e[u]>0&&(s=!0),e[u]<0&&(l=!0);if(!s||!l)return r.num;var c,h,d,f=t=void 0===t?.1:t,v=!0;do{c=f-(d=n(e,a,f))/o(e,a,f),h=Math.abs(c-f),f=c,v=h>1e-10&&Math.abs(d)>1e-10}while(v);return f},t.ISPMT=function(e,t,n,o){return e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),o=i.parseNumber(o),i.anyIsError(e,t,n,o)?r.value:o*e*(t/n-1)},t.MDURATION=function(){throw new Error("MDURATION is not implemented")},t.MIRR=function(e,n,o){if(e=i.parseNumberArray(i.flatten(e)),n=i.parseNumber(n),o=i.parseNumber(o),i.anyIsError(e,n,o))return r.value;for(var a=e.length,s=[],l=[],u=0;u<a;u++)e[u]<0?s.push(e[u]):l.push(e[u]);var c=-t.NPV(o,l)*Math.pow(1+o,a-1),h=t.NPV(n,s)*(1+n);return Math.pow(c/h,1/(a-1))-1},t.NOMINAL=function(e,t){return e=i.parseNumber(e),t=i.parseNumber(t),i.anyIsError(e,t)?r.value:e<=0||t<1?r.num:(t=parseInt(t,10),(Math.pow(e+1,1/t)-1)*t)},t.NPER=function(e,t,n,o,a){if(a=void 0===a?0:a,o=void 0===o?0:o,e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),o=i.parseNumber(o),a=i.parseNumber(a),i.anyIsError(e,t,n,o,a))return r.value;var s=t*(1+e*a)-o*e,l=n*e+t*(1+e*a);return Math.log(s/l)/Math.log(1+e)},t.NPV=function(){var e=i.parseNumberArray(i.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},t.ODDFPRICE=function(){throw new Error("ODDFPRICE is not implemented")},t.ODDFYIELD=function(){throw new Error("ODDFYIELD is not implemented")},t.ODDLPRICE=function(){throw new Error("ODDLPRICE is not implemented")},t.ODDLYIELD=function(){throw new Error("ODDLYIELD is not implemented")},t.PDURATION=function(e,t,n){return e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),i.anyIsError(e,t,n)?r.value:e<=0?r.num:(Math.log(n)-Math.log(t))/Math.log(1+e)},t.PMT=function(e,t,n,o,a){if(o=o||0,a=a||0,e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),o=i.parseNumber(o),a=i.parseNumber(a),i.anyIsError(e,t,n,o,a))return r.value;var s;if(0===e)s=(n+o)/t;else{var l=Math.pow(1+e,t);s=1===a?(o*e/(l-1)+n*e/(1-1/l))/(1+e):o*e/(l-1)+n*e/(1-1/l)}return-s},t.PPMT=function(e,n,o,a,s,l){return s=s||0,l=l||0,e=i.parseNumber(e),o=i.parseNumber(o),a=i.parseNumber(a),s=i.parseNumber(s),l=i.parseNumber(l),i.anyIsError(e,o,a,s,l)?r.value:t.PMT(e,o,a,s,l)-t.IPMT(e,n,o,a,s,l)},t.PRICE=function(){throw new Error("PRICE is not implemented")},t.PRICEDISC=function(){throw new Error("PRICEDISC is not implemented")},t.PRICEMAT=function(){throw new Error("PRICEMAT is not implemented")},t.PV=function(e,t,n,o,a){return o=o||0,a=a||0,e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),o=i.parseNumber(o),a=i.parseNumber(a),i.anyIsError(e,t,n,o,a)?r.value:0===e?-n*t-o:((1-Math.pow(1+e,t))/e*n*(1+e*a)-o)/Math.pow(1+e,t)},t.RATE=function(e,t,n,o,a,s){if(s=void 0===s?.01:s,o=void 0===o?0:o,a=void 0===a?0:a,e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),o=i.parseNumber(o),a=i.parseNumber(a),s=i.parseNumber(s),i.anyIsError(e,t,n,o,a,s))return r.value;var l,u,c,h=0,d=0,f=0,v=s;for(Math.abs(v)<1e-10||(d=Math.exp(e*Math.log(1+v))),l=n+t*e+o,u=n*d+t*(1/v+a)*(d-1)+o,f=c=0,h=v;Math.abs(l-u)>1e-10&&f<50;)v=(u*c-l*h)/(u-l),c=h,h=v,l=u,u=Math.abs(v)<1e-10?n*(1+e*v)+t*(1+v*a)*e+o:n*(d=Math.exp(e*Math.log(1+v)))+t*(1/v+a)*(d-1)+o,++f;return v},t.RECEIVED=function(){throw new Error("RECEIVED is not implemented")},t.RRI=function(e,t,n){return e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),i.anyIsError(e,t,n)?r.value:0===e||0===t?r.num:Math.pow(n/t,1/e)-1},t.SLN=function(e,t,n){return e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),i.anyIsError(e,t,n)?r.value:0===n?r.num:(e-t)/n},t.SYD=function(e,t,n,o){return e=i.parseNumber(e),t=i.parseNumber(t),n=i.parseNumber(n),o=i.parseNumber(o),i.anyIsError(e,t,n,o)?r.value:0===n?r.num:o<1||o>n?r.num:(e-t)*(n-(o=parseInt(o,10))+1)*2/(n*(n+1))},t.TBILLEQ=function(e,t,n){return e=i.parseDate(e),t=i.parseDate(t),n=i.parseNumber(n),i.anyIsError(e,t,n)?r.value:n<=0?r.num:e>t?r.num:t-e>31536e6?r.num:365*n/(360-n*o.DAYS360(e,t,!1))},t.TBILLPRICE=function(e,t,n){return e=i.parseDate(e),t=i.parseDate(t),n=i.parseNumber(n),i.anyIsError(e,t,n)?r.value:n<=0?r.num:e>t?r.num:t-e>31536e6?r.num:100*(1-n*o.DAYS360(e,t,!1)/360)},t.TBILLYIELD=function(e,t,n){return e=i.parseDate(e),t=i.parseDate(t),n=i.parseNumber(n),i.anyIsError(e,t,n)?r.value:n<=0?r.num:e>t?r.num:t-e>31536e6?r.num:360*(100-n)/(n*o.DAYS360(e,t,!1))},t.VDB=function(){throw new Error("VDB is not implemented")},t.XNPV=function(e,t,n){if(e=i.parseNumber(e),t=i.parseNumberArray(i.flatten(t)),n=i.parseDateArray(i.flatten(n)),i.anyIsError(e,t,n))return r.value;for(var a=0,s=0;s<t.length;s++)a+=t[s]/Math.pow(1+e,o.DAYS(n[s],n[0])/365);return a},t.YIELD=function(){throw new Error("YIELD is not implemented")},t.YIELDDISC=function(){throw new Error("YIELDDISC is not implemented")},t.YIELDMAT=function(){throw new Error("YIELDMAT is not implemented")}},function(e,t,n){var r=n(0),o=n(1);t.MATCH=function(e,t,n){if(!e&&!t)return r.na;if(2===arguments.length&&(n=1),!(t instanceof Array))return r.na;if(-1!==n&&0!==n&&1!==n)return r.na;for(var o,i,a=0;a<t.length;a++)if(1===n){if(t[a]===e)return a+1;t[a]<e&&(i?t[a]>i&&(o=a+1,i=t[a]):(o=a+1,i=t[a]))}else if(0===n){if("string"==typeof e){if(e=e.replace(/\?/g,"."),t[a].toLowerCase().match(e.toLowerCase()))return a+1}else if(t[a]===e)return a+1}else if(-1===n){if(t[a]===e)return a+1;t[a]>e&&(i?t[a]<i&&(o=a+1,i=t[a]):(o=a+1,i=t[a]))}return o||r.na},t.VLOOKUP=function(e,t,n,o){if(!e||!t||!n)return r.na;o=o||!1;for(var i=0;i<t.length;i++){var a=t[i];if(!o&&a[0]===e||a[0]===e||o&&"string"==typeof a[0]&&-1!==a[0].toLowerCase().indexOf(e.toLowerCase()))return n<a.length+1?a[n-1]:r.ref}return r.na},t.HLOOKUP=function(e,t,n,i){if(!e||!t||!n)return r.na;i=i||!1;for(var a=o.transpose(t),s=0;s<a.length;s++){var l=a[s];if(!i&&l[0]===e||l[0]===e||i&&"string"==typeof l[0]&&-1!==l[0].toLowerCase().indexOf(e.toLowerCase()))return n<l.length+1?l[n-1]:r.ref}return r.na}},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.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=a;var r=n(3),o=n(2),i=t.SYMBOL="-";function a(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var a=n.reduce((function(e,t){return e-(0,r.toNumber)(t)}),(0,r.toNumber)(e));if(isNaN(a))throw Error(o.ERROR_VALUE);return a}a.SYMBOL=i},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){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var a=n.reduce((function(e,t){return e*(0,r.toNumber)(t)}),(0,r.toNumber)(e));if(isNaN(a))throw Error(o.ERROR_VALUE);return a}a.SYMBOL=i},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=function(){var e=function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},t=[1,5],n=[1,8],r=[1,6],o=[1,7],i=[1,9],a=[1,14],s=[1,15],l=[1,16],u=[1,12],c=[1,13],h=[1,17],d=[1,19],f=[1,20],v=[1,21],g=[1,22],p=[1,23],m=[1,24],y=[1,25],w=[1,26],C=[1,27],E=[1,28],S=[5,9,10,11,13,14,15,16,17,18,19,20,29,30],b=[5,9,10,11,13,14,15,16,17,18,19,20,29,30,32],R=[5,9,10,11,13,14,15,16,17,18,19,20,29,30,34],T=[5,10,11,13,14,15,16,17,29,30],M=[5,10,13,14,15,16,29,30],O=[5,10,11,13,14,15,16,17,18,19,29,30],k=[13,29,30],N={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:t,11:n,12:r,17:o,21:i,23:10,24:a,25:s,26:l,31:u,33:c,35:h},{1:[3]},{5:[1,18],9:d,10:f,11:v,14:g,15:p,16:m,17:y,18:w,19:C,20:E},e(S,[2,2],{32:[1,29]}),e(S,[2,3],{34:[1,30]}),e(S,[2,4]),{2:11,4:31,6:3,7:4,8:t,11:n,12:r,17:o,21:i,23:10,24:a,25:s,26:l,31:u,33:c,35:h},{2:11,4:32,6:3,7:4,8:t,11:n,12:r,17:o,21:i,23:10,24:a,25:s,26:l,31:u,33:c,35:h},{2:11,4:33,6:3,7:4,8:t,11:n,12:r,17:o,21:i,23:10,24:a,25:s,26:l,31:u,33:c,35:h},{12:[1,34]},e(S,[2,23]),e(S,[2,24],{2:35,35:h}),e(b,[2,42]),e(R,[2,44],{32:[1,36]}),e(S,[2,26],{27:[1,37]}),e(S,[2,27],{27:[1,38]}),e(S,[2,28],{27:[1,39]}),e([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:t,11:n,12:r,17:o,21:i,23:10,24:a,25:s,26:l,31:u,33:c,35:h},{2:11,4:41,6:3,7:4,8:t,11:n,12:r,17:o,21:i,23:10,24:a,25:s,26:l,31:u,33:c,35:h},{2:11,4:42,6:3,7:4,8:t,11:n,12:r,17:o,21:i,23:10,24:a,25:s,26:l,31:u,33:c,35:h},{2:11,4:45,6:3,7:4,8:t,10:[1,43],11:n,12:r,15:[1,44],17:o,21:i,23:10,24:a,25:s,26:l,31:u,33:c,35:h},{2:11,4:47,6:3,7:4,8:t,10:[1,46],11:n,12:r,17:o,21:i,23:10,24:a,25:s,26:l,31:u,33:c,35:h},{2:11,4:48,6:3,7:4,8:t,11:n,12:r,17:o,21:i,23:10,24:a,25:s,26:l,31:u,33:c,35:h},{2:11,4:49,6:3,7:4,8:t,11:n,12:r,17:o,21:i,23:10,24:a,25:s,26:l,31:u,33:c,35:h},{2:11,4:50,6:3,7:4,8:t,11:n,12:r,17:o,21:i,23:10,24:a,25:s,26:l,31:u,33:c,35:h},{2:11,4:51,6:3,7:4,8:t,11:n,12:r,17:o,21:i,23:10,24:a,25:s,26:l,31:u,33:c,35:h},{2:11,4:52,6:3,7:4,8:t,11:n,12:r,17:o,21:i,23:10,24:a,25:s,26:l,31:u,33:c,35:h},{31:[1,53]},e(R,[2,46]),{9:d,10:f,11:v,13:[1,54],14:g,15:p,16:m,17:y,18:w,19:C,20:E},e(T,[2,19],{9:d,18:w,19:C,20:E}),e(T,[2,20],{9:d,18:w,19:C,20:E}),{2:11,4:57,6:3,7:4,8:t,11:n,12:r,13:[1,55],17:o,21:i,22:56,23:10,24:a,25:s,26:l,28:[1,58],31:u,33:c,35:h},e(S,[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]},e(S,[2,5]),e([5,10,13,29,30],[2,6],{9:d,11:v,14:g,15:p,16:m,17:y,18:w,19:C,20:E}),e(T,[2,7],{9:d,18:w,19:C,20:E}),{2:11,4:69,6:3,7:4,8:t,11:n,12:r,17:o,21:i,23:10,24:a,25:s,26:l,31:u,33:c,35:h},{2:11,4:70,6:3,7:4,8:t,11:n,12:r,17:o,21:i,23:10,24:a,25:s,26:l,31:u,33:c,35:h},e(M,[2,14],{9:d,11:v,17:y,18:w,19:C,20:E}),{2:11,4:71,6:3,7:4,8:t,11:n,12:r,17:o,21:i,23:10,24:a,25:s,26:l,31:u,33:c,35:h},e(M,[2,13],{9:d,11:v,17:y,18:w,19:C,20:E}),e([5,10,13,16,29,30],[2,12],{9:d,11:v,14:g,15:p,17:y,18:w,19:C,20:E}),e(T,[2,15],{9:d,18:w,19:C,20:E}),e(O,[2,16],{9:d,20:E}),e(O,[2,17],{9:d,20:E}),e([5,10,11,13,14,15,16,17,18,19,20,29,30],[2,18],{9:d}),e(b,[2,43]),e(S,[2,8]),e(S,[2,21]),{13:[1,72],29:[1,73],30:[1,74]},e(k,[2,38],{9:d,10:f,11:v,14:g,15:p,16:m,17:y,18:w,19:C,20:E}),e(k,[2,39]),e(R,[2,45]),e(S,[2,29]),e(S,[2,30]),e(S,[2,31]),e(S,[2,32]),e(S,[2,33]),e(S,[2,34]),e(S,[2,35]),e(S,[2,36]),e(S,[2,37]),e(M,[2,9],{9:d,11:v,17:y,18:w,19:C,20:E}),e(M,[2,11],{9:d,11:v,17:y,18:w,19:C,20:E}),e(M,[2,10],{9:d,11:v,17:y,18:w,19:C,20:E}),e(S,[2,22]),{2:11,4:75,6:3,7:4,8:t,11:n,12:r,17:o,21:i,23:10,24:a,25:s,26:l,31:u,33:c,35:h},{2:11,4:76,6:3,7:4,8:t,11:n,12:r,17:o,21:i,23:10,24:a,25:s,26:l,31:u,33:c,35:h},e(k,[2,40],{9:d,10:f,11:v,14:g,15:p,16:m,17:y,18:w,19:C,20:E}),e(k,[2,41],{9:d,10:f,11:v,14:g,15:p,16:m,17:y,18:w,19:C,20:E})],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,n=[0],r=[null],o=[],i=this.table,a="",s=0,l=0,u=0,c=2,h=1,d=o.slice.call(arguments,1),f=Object.create(this.lexer),v={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(v.yy[g]=this.yy[g]);f.setInput(e,v.yy),v.yy.lexer=f,v.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var p=f.yylloc;o.push(p);var m=f.options&&f.options.ranges;function y(e){n.length=n.length-2*e,r.length=r.length-e,o.length=o.length-e}"function"==typeof v.yy.parseError?this.parseError=v.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var w,C,E,S,b,R,T,M,O,k=function(){var e;return"number"!=typeof(e=f.lex()||h)&&(e=t.symbols_[e]||e),e},N={};;){if(E=n[n.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==w&&(w=k()),S=i[E]&&i[E][w]),void 0===S||!S.length||!S[0]){var _,A="";function I(e){for(var t=n.length-1,r=0;;){if(c.toString()in i[e])return r;if(0===e||t<2)return!1;e=n[t-=2],++r}}if(u)C!==h&&(_=I(E));else{for(R in _=I(E),O=[],i[E])this.terminals_[R]&&R>c&&O.push("'"+this.terminals_[R]+"'");A=f.showPosition?"Parse error on line "+(s+1)+":\n"+f.showPosition()+"\nExpecting "+O.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(s+1)+": Unexpected "+(w==h?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(A,{text:f.match,token:this.terminals_[w]||w,line:f.yylineno,loc:p,expected:O,recoverable:!1!==_})}if(3==u){if(w===h||C===h)throw new Error(A||"Parsing halted while starting to recover from another error.");l=f.yyleng,a=f.yytext,s=f.yylineno,p=f.yylloc,w=k()}if(!1===_)throw new Error(A||"Parsing halted. No suitable error recovery rule available.");y(_),C=w==c?null:w,w=c,E=n[n.length-1],S=i[E]&&i[E][c],u=3}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+w);switch(S[0]){case 1:n.push(w),r.push(f.yytext),o.push(f.yylloc),n.push(S[1]),w=null,C?(w=C,C=null):(l=f.yyleng,a=f.yytext,s=f.yylineno,p=f.yylloc,u>0&&u--);break;case 2:if(T=this.productions_[S[1]][1],N.$=r[r.length-T],N._$={first_line:o[o.length-(T||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(T||1)].first_column,last_column:o[o.length-1].last_column},m&&(N._$.range=[o[o.length-(T||1)].range[0],o[o.length-1].range[1]]),void 0!==(b=this.performAction.apply(N,[a,l,s,v.yy,S[1],r,o].concat(d))))return b;T&&(n=n.slice(0,-1*T*2),r=r.slice(0,-1*T),o=o.slice(0,-1*T)),n.push(this.productions_[S[1]][0]),r.push(N.$),o.push(N._$),M=i[n[n.length-2]][n[n.length-1]],n.push(M);break;case 3:return!0}}return!0}},_={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(e.length>20?"...":"")+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)+(e.length>20?"...":"")).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 this.conditionStack.length-1>0?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(e=this.conditionStack.length-1-Math.abs(e||0))>=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}}};function A(){this.yy={}}return N.lexer=_,A.prototype=N,N.Parser=A,new A}();t.parser=r,t.Parser=r.Parser,t.parse=function(){return r.parse.apply(r,arguments)}},function(e,t,n){"use strict";t.__esModule=!0,t.trimEdges=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e=e.substring(t,e.length-t)}}])},e.exports=o()},function(e,t,n){"use strict";var r=n(0);n(15),n(90),n(42),n(53),n(117),t.__esModule=!0,t.default=void 0;var o=r(n(18)),i=r(n(1)),a=r(n(2)),s=n(122),l=n(3),u=n(4),c=r(n(49)),h=n(86),d=/^\$?[A-Z]+\$?\d+$/,f=/\$?[A-Z]+\$?\d+/,v=/(?:[^0-9A-Z$: ]|^)\s*(\$?[A-Z]+\$?\d+)\s*(?![0-9A-Z_: ])/g,g=/\$?[A-Z]+\$?\d+\s*:\s*\$?[A-Z]+\$?\d+/g,p=/((?:[^0-9A-Z$: ]|^)\s*(\$?[A-Z]+\$?\d+)\s*(?![0-9A-Z_: ]))|(\$?[A-Z]+\$?\d+\s*:\s*\$?[A-Z]+\$?\d+)/g,m=function(){function e(t){(0,i.default)(this,e),this.expression="",this.cells=[],this.customModifier=null,"string"==typeof t&&this.setExpression(t)}return(0,a.default)(e,[{key:"setExpression",value:function(e){return this.cells.length=0,this.expression=(0,h.toUpperCaseFormula)(e),this._extractCells(),this._extractCellsRange(),this}},{key:"useCustomModifier",value:function(e){this.customModifier=e}},{key:"translate",value:function(e){var t=this,n=e.row,r=e.column,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,l.arrayEach)(this.cells,(function(e){null!=n&&t._translateCell(e,"row",n,o.row),null!=r&&t._translateCell(e,"column",r,o.column)})),this}},{key:"toString",value:function(){var e=this,t=this.expression.replace(p,(function(t,n,r){var o=-1===t.indexOf(":"),i=t,a=t,l=null;o&&(a=d.test(n)?n:r);var u=e._searchCell(a);return u&&(l=u.refError?(0,s.error)(s.ERROR_REF):u.toLabel(),i=o?t.replace(a,l):l),i}));return t.startsWith("=")||(t="=".concat(t)),t}},{key:"_translateCell",value:function(e,t,n,r){var i=e.start,a=e.end,s=i[t].index,l=a[t].index,u=n,c=n,h=!1;if(this.customModifier){var d=this.customModifier(e,t,n,r),f=(0,o.default)(d,3);u=f[0],c=f[1],h=f[2]}else i[t].isAbsolute&&(u=0),a[t].isAbsolute&&(c=0);u&&!h&&(s+u<0&&(h=!0),i[t].index=Math.max(s+u,0)),c&&!h&&(l+c<0&&(h=!0),a[t].index=Math.max(l+c,0)),h&&(e.refError=!0)}},{key:"_extractCells",value:function(){var e=this,t=this.expression.match(v);t&&(0,l.arrayEach)(t,(function(t){var n=t.match(f);if(n){var r=(0,s.extractLabel)(n[0]),i=(0,o.default)(r,2),a=i[0],l=i[1];e.cells.push(e._createCell({row:a,column:l},{row:a,column:l},n[0]))}}))}},{key:"_extractCellsRange",value:function(){var e=this,t=this.expression.match(g);t&&(0,l.arrayEach)(t,(function(t){var n=t.split(":"),r=(0,o.default)(n,2),i=r[0],a=r[1],l=(0,s.extractLabel)(i),u=(0,o.default)(l,2),c=u[0],h=u[1],d=(0,s.extractLabel)(a),f=(0,o.default)(d,2),v={row:c,column:h},g={row:f[0],column:f[1]};e.cells.push(e._createCell(v,g,t))}))}},{key:"_searchCell",value:function(e){var t=(0,l.arrayFilter)(this.cells,(function(t){return t.origLabel===e}));return(0,o.default)(t,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,s.toLabel)(this.start.row,this.start.column);return"range"===this.type&&(e+=":".concat((0,s.toLabel)(this.end.row,this.end.column))),e}}}}]),e}();(0,u.mixin)(m,c.default);var y=m;t.default=y},function(e,t,n){var r=n(28),o=n(78),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(99),o=n(127),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("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t,n){var r=n(196),o=n(38),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},function(e,t,n){var r=n(79),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,n){var r=n(28),o=/#|\.prototype\./,i=function(e,t){var n=s[a(e)];return n==u||n!=l&&("function"==typeof t?r(t):!!t)},a=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},s=i.data={},l=i.NATIVE="N",u=i.POLYFILL="P";e.exports=i},function(e,t,n){var r=n(197),o=n(149);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(56).f,o=n(55),i=n(37)("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){var r=n(100),o=n(44),i=n(55),a=n(56).f,s=n(127),l=n(417),u=s("meta"),c=0,h=Object.isExtensible||function(){return!0},d=function(e){a(e,u,{value:{objectID:"O"+ ++c,weakData:{}}})},f=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,u)){if(!h(e))return"F";if(!t)return"E";d(e)}return e[u].objectID},getWeakData:function(e,t){if(!i(e,u)){if(!h(e))return!0;if(!t)return!1;d(e)}return e[u].weakData},onFreeze:function(e){return l&&f.REQUIRED&&h(e)&&!i(e,u)&&d(e),e}};r[u]=!0},function(e,t,n){"use strict";var r=n(21),o=n(38),i=n(130),a=n(74),s=n(133),l=n(155),u=n(157),c=n(44),h=n(28),d=n(208),f=n(132),v=n(158);e.exports=function(e,t,n,g,p){var m=o[e],y=m&&m.prototype,w=m,C=g?"set":"add",E={},S=function(e){var t=y[e];a(y,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(p&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return p&&!c(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(p&&!c(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(i(e,"function"!=typeof m||!(p||y.forEach&&!h((function(){(new m).entries().next()})))))w=n.getConstructor(t,e,g,C),s.REQUIRED=!0;else if(i(e,!0)){var b=new w,R=b[C](p?{}:-0,1)!=b,T=h((function(){b.has(1)})),M=d((function(e){new m(e)})),O=!p&&h((function(){for(var e=new m,t=5;t--;)e[C](t,t);return!e.has(-0)}));M||((w=t((function(t,n){u(t,w,e);var r=v(new m,t,w);return null!=n&&l(n,r[C],r,g),r}))).prototype=y,y.constructor=w),(T||O)&&(S("delete"),S("has"),g&&S("get")),(O||R)&&S(C),p&&y.clear&&delete y.clear}return E[e]=w,r({global:!0,forced:w!=m},E),f(w,e),p||n.setStrong(w,e,g),w}},function(e,t,n){"use strict";var r=n(68),o=n(74),i=n(28),a=n(37),s=n(161),l=a("species"),u=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),c=!i((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(e,t,n,h){var d=a(e),f=!i((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),v=f&&!i((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[l]=function(){return n}),n[d](""),!t}));if(!f||!v||"replace"===e&&!u||"split"===e&&!c){var g=/./[d],p=n(d,""[e],(function(e,t,n,r,o){return t.exec===s?f&&!o?{done:!0,value:g.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),m=p[0],y=p[1];o(String.prototype,e,m),o(RegExp.prototype,d,2==t?function(e,t){return y.call(e,this,t)}:function(e){return y.call(e,this)}),h&&r(RegExp.prototype[d],"sham",!0)}}},function(e,t,n){var r=n(78),o=n(161);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},function(e,t,n){"use strict";var r=n(21),o=n(214).trim;r({target:"String",proto:!0,forced:n(422)("trim")},{trim:function(){return o(this)}})},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0;var o=r(n(226));t.OrderView=o.default;var i=r(n(428));t.SharedOrderView=i.default},function(e,t,n){"use strict";var r=n(21),o=n(89).find,i=n(102),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i("find")},function(e,t,n){"use strict";n(167),t.__esModule=!0,t.spreadsheetColumnLabel=s,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(a,r)*(i.indexOf(e[n])+1);return t-=1},t.createSpreadsheetData=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,o=[];for(e=0;e<n;e++){var i=[];for(t=0;t<r;t++)i.push(s(t)+(e+1));o.push(i)}return o},t.createSpreadsheetObjectData=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,r=arguments.length>1&&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)]=s(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(e,t){var n=void 0===t||t;return function(t,i){return function t(i){if(i){if((0,o.hasOwnProperty)(i,e)&&void 0!==i[e])return i[e];if((0,o.hasOwnProperty)(i,"type")&&i.type){if("string"!=typeof i.type)throw new Error("Cell type must be a string ");var a=(0,r.getCellType)(i.type);if((0,o.hasOwnProperty)(a,e))return a[e];if(n)return}return t(Object.getPrototypeOf(i))}}("number"==typeof t?this.getCellMeta(t,i):t)}};var r=n(174),o=n(4),i="ABCDEFGHIJKLMNOPQRSTUVWXYZ",a=i.length;function s(e){for(var t,n=e+1,r="";n>0;)t=(n-1)%a,r=String.fromCharCode(65+t)+r,n=parseInt((n-t)/a,10);return r}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.registerLanguageDictionary=v,t.getLanguageDictionary=function(e){if(!g(e))return null;return(0,o.deepClone)(h(e))},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(379),a=r(n(80)),s=r(n(503)),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(52),n(11),n(9),n(69),n(12),n(13),t.__esModule=!0,t._getRefCount=function(){return l},t._resetState=u,t.isPressed=function(e){return Array.from(s.values()).some((function(t){return(0,i.isKey)(t,e)}))},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(){l>0&&(l-=1);0===l&&u()};var o=r(n(25)),i=n(59),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(118),n(180),n(52),n(27),n(11),n(72),n(9),n(69),n(35),n(12),n(13),t.__esModule=!0,t.detectSelectionType=m,t.normalizeSelectionFactory=y,t.transformSelectionToColumnDistance=function(e){var t=m(e);if(t===u||t===c)return[];var n=y(t),r=new Set;(0,s.arrayEach)(e,(function(e){var t=n(e),i=(0,o.default)(t,4),a=i[1],l=i[3]-a+1;(0,s.arrayEach)(Array.from(new Array(l),(function(e,t){return a+t})),(function(e){r.has(e)||r.add(e)}))}));var i=Array.from(r).sort((function(e,t){return e-t}));return(0,s.arrayReduce)(i,(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=m(e);if(t===u||t===c)return[];var n=y(t),r=new Set;(0,s.arrayEach)(e,(function(e){var t=n(e),i=(0,o.default)(t,3),a=i[0],l=i[2]-a+1;(0,s.arrayEach)(Array.from(new Array(l),(function(e,t){return a+t})),(function(e){r.has(e)||r.add(e)}))}));var i=Array.from(r).sort((function(e,t){return e-t}));return(0,s.arrayReduce)(i,(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=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;return"number"==typeof e&&e>=0&&e<t},t.SELECTION_TYPES=t.SELECTION_TYPE_OBJECT=t.SELECTION_TYPE_ARRAY=t.SELECTION_TYPE_EMPTY=t.SELECTION_TYPE_UNRECOGNIZED=void 0;var o=r(n(18)),i=r(n(46)),a=n(26),s=n(3),l=n(24),u=0;t.SELECTION_TYPE_UNRECOGNIZED=u;var c=1;t.SELECTION_TYPE_EMPTY=c;var h=2;t.SELECTION_TYPE_ARRAY=h;var d=3;t.SELECTION_TYPE_OBJECT=d;var f=[d,h];t.SELECTION_TYPES=f;var v=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],g=Symbol("root"),p=Symbol("child");function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g;if(t!==g&&t!==p)throw new Error("The second argument is used internally only and cannot be overwritten.");var n=Array.isArray(e),r=t===g,o=u;if(n){var s=e[0];if(0===e.length)o=c;else if(r&&s instanceof a.CellRange)o=d;else if(r&&Array.isArray(s))o=m(s,p);else if(e.length>=2&&e.length<=4){!e.some((function(e,t){return!v[t].includes((0,i.default)(e))}))&&(o=h)}}return o}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.keepDirection,r=void 0!==n&&n,o=t.propToCol;if(!f.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(t){var n=e===d,i=n?t.from.row:t[0],a=n?t.from.col:t[1],s=n?t.to.row:t[2],u=n?t.to.col:t[3];if("function"==typeof o&&("string"==typeof a&&(a=o(a)),"string"==typeof u&&(u=o(u))),(0,l.isUndefined)(s)&&(s=i),(0,l.isUndefined)(u)&&(u=a),!r){var c=i,h=a,f=s,v=u;i=Math.min(c,f),a=Math.min(h,v),s=Math.max(c,f),u=Math.max(h,v)}return[i,a,s,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(3),s=n(4),l=r(n(49)),u=r(n(622)),c=function(){function e(t){(0,o.default)(this,e),this.hot=t,this.elements=[],this.hidden=!1}return(0,i.default)(e,[{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}}]),e}();(0,s.mixin)(c,l.default),(0,s.mixin)(c,u.default);var h=c;t.default=h},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,n){var r=n(38),o=n(44),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(38),o=n(68);e.exports=function(e,t){try{o(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(67),o=n(51),i=n(129),a=function(e){return function(t,n,a){var s,l=r(t),u=o(l.length),c=i(a,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var r=n(21),o=n(414),i=n(152),a=n(203),s=n(132),l=n(68),u=n(74),c=n(37),h=n(125),d=n(104),f=n(201),v=f.IteratorPrototype,g=f.BUGGY_SAFARI_ITERATORS,p=c("iterator"),m=function(){return this};e.exports=function(e,t,n,c,f,y,w){o(n,t,c);var C,E,S,b=function(e){if(e===f&&k)return k;if(!g&&e in M)return M[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},R=t+" Iterator",T=!1,M=e.prototype,O=M[p]||M["@@iterator"]||f&&M[f],k=!g&&O||b(f),N="Array"==t&&M.entries||O;if(N&&(C=i(N.call(new e)),v!==Object.prototype&&C.next&&(h||i(C)===v||(a?a(C,v):"function"!=typeof C[p]&&l(C,p,m)),s(C,R,!0,!0),h&&(d[R]=m))),"values"==f&&O&&"values"!==O.name&&(T=!0,k=function(){return O.call(this)}),h&&!w||M[p]===k||l(M,p,k),d[t]=k,f)if(E={values:b("values"),keys:y?k:b("keys"),entries:b("entries")},w)for(S in E)!g&&!T&&S in M||u(M,S,E[S]);else r({target:t,proto:!0,forced:g||T},E);return E}},function(e,t,n){var r=n(55),o=n(62),i=n(126),a=n(202),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 r=n(79),o=n(54),i=function(e){return function(t,n){var i,a,s=String(o(t)),l=r(n),u=s.length;return l<0||l>=u?e?"":void 0:(i=s.charCodeAt(l))<55296||i>56319||l+1===u||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):i:e?s.slice(l,l+2):a-56320+(i-55296<<10)+65536}};e.exports={codeAt:i(!1),charAt:i(!0)}},function(e,t,n){var r=n(74);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},function(e,t,n){var r=n(47),o=n(205),i=n(51),a=n(105),s=n(206),l=n(207),u=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,c,h){var d,f,v,g,p,m,y,w=a(t,n,c?2:1);if(h)d=e;else{if("function"!=typeof(f=s(e)))throw TypeError("Target is not iterable");if(o(f)){for(v=0,g=i(e.length);g>v;v++)if((p=c?w(r(y=e[v])[0],y[1]):w(e[v]))&&p instanceof u)return p;return new u(!1)}d=f.call(e)}for(m=d.next;!(y=m.call(d)).done;)if("object"==typeof(p=l(d,w,y.value,c))&&p&&p instanceof u)return p;return new u(!1)}).stop=function(e){return new u(!0,e)}},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 r=n(44),o=n(203);e.exports=function(e,t,n){var i,a;return o&&"function"==typeof(i=t.constructor)&&i!==n&&r(a=i.prototype)&&a!==n.prototype&&o(e,a),e}},function(e,t,n){var r=n(44),o=n(106),i=n(37)("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(47);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var r,o,i=n(160),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,l=this;return c&&(n=new RegExp("^"+l.source+"$(?!\\s)",i.call(l))),u&&(t=l.lastIndex),r=a.call(l,e),u&&r&&(l.lastIndex=l.global?r.index+r[0].length:t),c&&r&&r.length>1&&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(44),o=n(78),i=n(37)("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(153).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){"use strict";t.__esModule=!0,t.PARTIALLY_VISIBLE_TYPE=t.FULLY_VISIBLE_TYPE=t.RENDER_TYPE=void 0;t.RENDER_TYPE=1;t.FULLY_VISIBLE_TYPE=2;t.PARTIALLY_VISIBLE_TYPE=3},function(e,t,n){var r=n(162);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){var r=n(37)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t,n){var r=n(21),o=n(28),i=n(62),a=n(152),s=n(202);r({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!s},{getPrototypeOf:function(e){return a(i(e))}})},function(e,t,n){var r=n(128);e.exports=r("navigator","userAgent")||""},function(e,t,n){"use strict";var r=n(0);n(11),n(40),n(9),n(12),n(90),n(13),t.__esModule=!0,t.setCurrentWindowContext=function(e){(o=e.document.createElement("span")).style.display="none"},t.convertCssColorToRGBA=s,t.compareLuminance=function(e,t){if(e>t)return 1;if(e<t)return-1;return 0},t.getMemoizedLuminanceForColor=function(e){var t=l.get(e);if(void 0!==t)return t;var n=u(s(e));return l.set(e,n),n},t.getLuminance=u;var o,i=r(n(18)),a=/[-]{0,1}[\d]*[.]{0,1}[\d]+/g;function s(e){o.ownerDocument.body.appendChild(o),o.style.color=e;var t=o.ownerDocument.defaultView.getComputedStyle(o).color.match(a);return o.ownerDocument.body.removeChild(o),null===t||t.length<2?[0,0,0,1]:[parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10),t.length>3?parseFloat(t[3]):1]}var l=new Map;function u(e){var t=(0,i.default)(e,3);return.2126*t[0]+.7152*t[1]+.0722*t[2]}},function(e,t,n){"use strict";var r=n(0);n(17),n(11),n(48),n(40),n(9),n(12),n(53),n(57),n(13),t.__esModule=!0,t.default=function(e){o||(o=f(e.ownerDocument)?h:d);e.setAttribute("fill","none");var t=new Map;return function(n,r){t.forEach(s);for(var o=0;o<n.length;o++){c(t,n[o],e).command=r[o]}t.forEach(l)}},t.compareStrokePriority=u,t.adjustLinesToViewBox=function(e,t){for(var n=new Array(t.length),r=e%2!=0,o=0;o<t.length;o++){var a=(0,i.default)(t[o],4),s=a[0],l=a[1],u=a[2],c=a[3];if(r)l===c?(l+=.5,c+=.5):(s+=.5,u+=.5);n[o]=[s,l,u,c]}return n},t.hasImplicitLineProblem=f,t.convertLinesToCommand=function(e,t){for(var n="",r=-1,i=-1,a=-1,s=-1,l=0;l<e.length;l++){var u=e[l];0===l&&(r=u[0],i=u[1]);var c=u.length;a=u[c-2],s=u[c-1],l>0&&(n+=" "),n+=o(u)}var h=e[0],d=e[e.length-1];if(r!==a||i!==s){if(1===t){var f=d.length;n="M ".concat(h[2]," ").concat(h[3]," ").concat(n.substring(2)," ").concat(d[f-4]," ").concat(d[f-3])}}else n+=" Z";return n};var o,i=r(n(18)),a=n(169);function s(e){e.command=""}function l(e){e.renderedCommand!==e.command&&(e.elem.setAttribute("d",e.command),e.renderedCommand=e.command)}function u(e,t){var n=e.split(" "),r=t.split(" "),o=parseInt(n[0],10),i=parseInt(r[0],10);n.shift(),n.shift(),r.shift(),r.shift();var s=n.join(" "),l=r.join(" ");return o>i?1:o<i?-1:(0,a.compareLuminance)((0,a.getMemoizedLuminanceForColor)(l),(0,a.getMemoizedLuminanceForColor)(s))}function c(e,t,n){var r=e.get(t);if(!r){var o=n.ownerDocument.createElementNS("http://www.w3.org/2000/svg","path"),i=t.split(" "),a=parseInt(i[0],10);i.shift(),i.shift();var l=i.join(" ");o.setAttribute("stroke",l),o.setAttribute("stroke-width",a),o.setAttribute("shape-rendering","geometricPrecision"),o.setAttribute("data-stroke-style",t),s(r={elem:o,command:"",renderedCommand:""});for(var c=null,h=n.firstElementChild;h;){if(-1===u(t,h.getAttribute("data-stroke-style"))){c=h;break}h=h.nextSibling}c?n.insertBefore(o,c):n.appendChild(o),e.set(t,r)}return r}function h(e){for(var t="M ",n=0;n<e.length;n++)t+=n>1&&n%2==0?" L ".concat(e[n]):" ".concat(e[n]);return t}function d(e){return"M ".concat(e.join(" "))}function f(e){var t=e.createElementNS("http://www.w3.org/2000/svg","path");return t.setAttribute("d","M 0 0 10 0"),"M 0 0 10 0"!==t.getAttribute("d")}},function(e,t,n){"use strict";n(17),t.__esModule=!0,t.default=function(e){var t,n;return function(r,o){r===t&&o===n||(e.setAttribute("viewBox","0 0 ".concat(r," ").concat(o)),r!==t&&(e.style.width="".concat(r,"px"),e.setAttribute("width",r),t=r),o!==n&&(e.style.height="".concat(o,"px"),e.setAttribute("height",o),n=o))}}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r={getFirstRenderedColumn:function(){var e=this.wot.wtViewport.columnsRenderCalculator.startColumn;return null===e?-1:e},getFirstVisibleColumn:function(){var e=this.wot.wtViewport.columnsVisibleCalculator.startColumn;return null===e?-1:e},getLastRenderedColumn:function(){var e=this.wot.wtViewport.columnsRenderCalculator.endColumn;return null===e?-1:e},getLastVisibleColumn:function(){var e=this.wot.wtViewport.columnsVisibleCalculator.endColumn;return null===e?-1:e},getRenderedColumnsCount:function(){return this.wot.wtViewport.columnsRenderCalculator.count},getVisibleColumnsCount:function(){return this.wot.wtViewport.columnsVisibleCalculator.count}};(0,n(4).defineGetter)(r,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});var o=r;t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r={getFirstRenderedColumn:function(){return 0===this.wot.getSetting("totalColumns")?-1:0},getFirstVisibleColumn:function(){return this.getFirstRenderedColumn()},getLastRenderedColumn:function(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn:function(){return this.getLastRenderedColumn()},getRenderedColumnsCount:function(){var e=this.wot.getSetting("totalColumns");return Math.min(this.wot.getSetting("fixedColumnsLeft"),e)},getVisibleColumnsCount:function(){return this.getRenderedColumnsCount()}};(0,n(4).defineGetter)(r,"MIXIN_NAME","stickyColumnsLeft",{writable:!1,enumerable:!1});var o=r;t.default=o},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.registerCellType=b,t.getCellType=function(e){if(!C(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'));return w(e)},t.getRegisteredCellTypes=t.getRegisteredCellTypeNames=t.hasCellType=void 0;var o=r(n(80)),i=n(61),a=n(43),s=n(82),l=r(n(481)),u=r(n(482)),c=r(n(483)),h=r(n(484)),d=r(n(485)),f=r(n(486)),v=r(n(487)),g=r(n(488)),p=r(n(489)),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";t.__esModule=!0,t.columnFactory=function(e,t){function n(){}(0,r.inherit)(n,e);for(var o=0,i=t.length;o<i;o++)n.prototype[t[o]]=void 0;return n};var r=n(4)},function(e,t,n){var r=n(21),o=n(494),i=n(102);r({target:"Array",proto:!0},{fill:o}),i("fill")},function(e,t,n){"use strict";var r=n(0);n(17),n(41),n(496),n(52),n(27),n(48),n(497),n(95),n(34),n(65),n(9),n(112),n(39),n(35),n(12),n(90),n(42),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,s=i>0?o[0].length:0,l=["<table>","</table>"],u=t?["<thead>","</thead>"]:[],c=["<tbody>","</tbody>"],h=n?1:0,d=t?1:0,f=0;f<i;f+=1){for(var v=t&&0===f,g=[],p=0;p<s;p+=1){var m=!v&&n&&0===p,y="";if(v)y="<th>".concat(e.getColHeader(p-h),"</th>");else if(m)y="<th>".concat(e.getRowHeader(f-d),"</th>");else{var w=o[f][p],C=e.getCellMeta(f-h,p-d),E=C.hidden,S=C.rowspan,b=C.colspan;if(!E){var R=[];if(S&&R.push('rowspan="'.concat(S,'"')),b&&R.push('colspan="'.concat(b,'"')),(0,a.isEmpty)(w))y="<td ".concat(R.join(" "),"></td>");else{var T=w.toString().replace("<","<").replace(">",">").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi," ").replace(/\t/gi,"	");y="<td ".concat(R.join(" "),">").concat(T,"</td>")}}}g.push(y)}var M=["<tr>"].concat(g,["</tr>"]).join("");v?u.splice(1,0,M):c.splice(-1,0,M)}return l.splice(1,0,u.join(""),c.join("")),l.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,s=[];0===r&&n.push("<tbody>");for(var l=0;l<i;l+=1){var u=o[l],c=(0,a.isEmpty)(u)?"":u.toString().replace(/</g,"<").replace(/>/g,">").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi," ").replace(/\t/gi,"	");s.push("<td>".concat(c,"</td>"))}n.push.apply(n,["<tr>"].concat(s,["</tr>"])),r+1===t&&n.push("</tbody>")}return n.push("</table>"),n.join("")},t.htmlToGridSettings=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n={},r=t.createDocumentFragment(),a=t.createElement("div");r.appendChild(a);var u=e;if("string"==typeof u){var c=u.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g,(function(e){var t=e.match(/<td\b[^>]*?>/g)[0],n=e.substring(t.length,e.lastIndexOf("<")).replace(/(<(?!br)([^>]+)>)/gi,"");return"".concat(t).concat(n).concat("</td>")}));a.insertAdjacentHTML("afterbegin","".concat(c)),u=a.querySelector("table")}if(!u||!function(e){return"TABLE"===(e&&e.nodeName||"")}(u))return;var h=a.querySelector("style"),d=null,f=[];h&&(t.body.appendChild(h),h.disabled=!0,d=h.sheet,f=d?Array.from(d.cssRules):[],t.body.removeChild(h));var v,g=a.querySelector('meta[name$="enerator"]'),p=null!==u.querySelector("tbody th"),m=Array.from(u.querySelector("tr").cells).reduce((function(e,t){return e+t.colSpan}),0)-(p?1:0),y=u.tFoot&&Array.from(u.tFoot.rows)||[],w=[],C=!1,E=0;if(u.tHead){var S=Array.from(u.tHead.rows).filter((function(e){var t=null!==e.querySelector("td");return t&&w.push(e),!t}));E=S.length,C=E>0,E>1?n.nestedHeaders=Array.from(S).reduce((function(e,t){var n=Array.from(t.cells).reduce((function(e,t,n){if(p&&0===n)return e;var r=t.colSpan,o=t.innerHTML,i=r>1?{label:o,colspan:r}:o;return e.push(i),e}),[]);return e.push(n),e}),[]):C&&(n.colHeaders=Array.from(S[0].children).reduce((function(e,t,n){return p&&0===n?e:(e.push(t.innerHTML),e)}),[]))}w.length&&(n.fixedRowsTop=w.length);y.length&&(n.fixedRowsBottom=y.length);var b=[].concat(w,(0,o.default)(Array.from(u.tBodies).reduce((function(e,t){return e.push.apply(e,(0,o.default)(Array.from(t.rows))),e}),[])),(0,o.default)(y));v=b.length;for(var R=new Array(v),T=0;T<v;T++)R[T]=new Array(m);for(var M=[],O=[],k=0;k<v;k++)for(var N=b[k],_=Array.from(N.cells),A=_.length,I=function(e){var t=_[e],n=t.nodeName,r=t.innerHTML,o=t.rowSpan,a=t.colSpan,u=R[k].findIndex((function(e){return void 0===e}));if("TD"===n){if(o>1||a>1){for(var c=k;c<k+o;c++)if(c<v)for(var h=u;h<u+a;h++)R[c][h]=null;var d=t.getAttribute("style");d&&d.includes("mso-ignore:colspan")||M.push({col:u,row:k,rowspan:o,colspan:a})}var p="";p="nowrap"===f.reduce((function(e,n){if((0,i.matchesCSSRules)(t,n)){var r=n.style.whiteSpace;r&&(e.whiteSpace=r)}return e}),{}).whiteSpace?r.replace(/[\r\n][\x20]{0,2}/gim," ").replace(/<br(\s*|\/)>/gim,"\r\n"):g&&/excel/gi.test(g.content)?r.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,"\r\n"):r.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n"),R[k][u]=p.replace(l,(function(e){return s[e]}))}else O.push(r)},D=0;D<A;D++)I(D);M.length&&(n.mergeCells=M);O.length&&(n.rowHeaders=O);R.length&&(n.data=R);return n};var o=r(n(33)),i=n(8),a=n(24),s={" ":" ","&":"&","<":"<",">":">"},l=new RegExp(Object.keys(s).map((function(e){return"(".concat(e,")")})).join("|"),"gi")},function(e,t,n){"use strict";var r=n(0);n(17),n(27),n(31),n(35),t.__esModule=!0,t.getListWithInsertedItems=function(e,t,n){return[].concat((0,o.default)(e.slice(0,t)),(0,o.default)(n),(0,o.default)(e.slice(t)))},t.getListWithRemovedItems=function(e,t){return(0,i.arrayFilter)(e,(function(e){return!1===t.includes(e)}))};var o=r(n(33)),i=n(3)},function(e,t,n){"use strict";var r=n(0);n(31),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(19),s=n(4),l=n(63),u=r(n(49)),c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,o.default)(this,e),this.indexedValues=[],this.initValueOrFn=t}return(0,i.default)(e,[{key:"getValues",value:function(){return this.indexedValues}},{key:"getValueAtIndex",value:function(e){var t=this.getValues();if(e<t.length)return t[e]}},{key:"setValues",value:function(e){this.indexedValues=e.slice(),this.runLocalHooks("change")}},{key:"setValueAtIndex",value:function(e,t){return e<this.getLength()&&(this.indexedValues[e]=t,this.runLocalHooks("change"),!0)}},{key:"clear",value:function(){this.setDefaultValues()}},{key:"getLength",value:function(){return this.getValues().length}},{key:"setDefaultValues",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.indexedValues.length=0,(0,l.isFunction)(this.initValueOrFn)?(0,a.rangeEach)(t-1,(function(t){return e.indexedValues.push(e.initValueOrFn(t))})):(0,a.rangeEach)(t-1,(function(){return e.indexedValues.push(e.initValueOrFn)})),this.runLocalHooks("change")}},{key:"init",value:function(e){return this.setDefaultValues(e),this.runLocalHooks("init"),this}},{key:"insert",value:function(){this.runLocalHooks("change")}},{key:"remove",value:function(){this.runLocalHooks("change")}}]),e}();(0,s.mixin)(c,u.default);var h=c;t.default=h},function(e,t,n){"use strict";var r=n(21),o=n(50),i=n(38),a=n(55),s=n(44),l=n(56).f,u=n(194),c=i.Symbol;if(o&&"function"==typeof c&&(!("description"in c.prototype)||void 0!==c().description)){var h={},d=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof d?new c(e):void 0===e?c():c(e);return""===e&&(h[t]=!0),t};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);n(137),n(57),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(8),s=n(3),l=function(){function e(t){(0,o.default)(this,e),this.hot=t,this.container=null,this.injected=!1,this.rows=[],this.columns=[],this.samples=null,this.settings={useHeaders:!0}}return(0,i.default)(e,[{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(e){this.injected||this.injectTable(),(0,s.arrayEach)(this.rows,(function(t){e(t.row,(0,a.outerHeight)(t.table)-1)}))}},{key:"getWidths",value:function(e){this.injected||this.injectTable(),(0,s.arrayEach)(this.columns,(function(t){e(t.col,(0,a.outerWidth)(t.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 e=this,t=this.hot.rootDocument.createDocumentFragment();return this.hot.hasRowHeaders()&&t.appendChild(this.createColElement(-1)),this.samples.forEach((function(n){(0,s.arrayEach)(n.strings,(function(n){t.appendChild(e.createColElement(n.col))}))})),t}},{key:"createRow",value:function(e){var t=this,n=this.hot.rootDocument,r=n.createDocumentFragment(),o=n.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,o),r.appendChild(o)),this.samples.forEach((function(o){(0,s.arrayEach)(o.strings,(function(o){var i=o.col,a=t.hot.getCellMeta(e,i);a.col=i,a.row=e;var s=t.hot.getCellRenderer(a),l=n.createElement("td");l.setAttribute("ghost-table",1),s(t.hot,l,e,i,t.hot.colToProp(i),o.value,a),r.appendChild(l)}))})),r}},{key:"createColumnHeadersRow",value:function(){var e=this,t=this.hot.rootDocument,n=t.createDocumentFragment();if(this.hot.hasRowHeaders()){var r=t.createElement("th");this.hot.view.appendColHeader(-1,r),n.appendChild(r)}return this.samples.forEach((function(r){(0,s.arrayEach)(r.strings,(function(r){var o=r.col,i=t.createElement("th");e.hot.view.appendColHeader(o,i),n.appendChild(i)}))})),n}},{key:"createCol",value:function(e){var t=this,n=this.hot.rootDocument,r=n.createDocumentFragment();return this.samples.forEach((function(o){(0,s.arrayEach)(o.strings,(function(o){var i=o.row,a=t.hot.getCellMeta(i,e);a.col=e,a.row=i;var s=t.hot.getCellRenderer(a),l=n.createElement("td"),u=n.createElement("tr");l.setAttribute("ghost-table",1),s(t.hot,l,i,e,t.hot.colToProp(e),o.value,a),u.appendChild(l),r.appendChild(u)}))})),r}},{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(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.injected||((e||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(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.hot.rootDocument,n=t.createDocumentFragment(),r=t.createElement("table"),o=t.createElement("thead"),i=t.createElement("tbody"),s=t.createElement("colgroup"),l=t.createElement("tr"),u=t.createElement("th");return this.isVertical()&&r.appendChild(s),this.isHorizontal()&&(l.appendChild(u),o.appendChild(l),r.style.tableLayout="auto",r.style.width="auto"),r.appendChild(o),this.isVertical()&&i.appendChild(l),r.appendChild(i),(0,a.addClass)(r,e),n.appendChild(r),{fragment:n,table:r,tHead:o,tBody:i,colGroup:s,tr:l,th:u}}},{key:"createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.hot.rootDocument,n=t.createDocumentFragment(),r=t.createElement("div"),o="htGhostTable htAutoSize ".concat(e.trim());return(0,a.addClass)(r,o),n.appendChild(r),{fragment:n,container:r}}},{key:"isVertical",value:function(){return!(!this.rows.length||this.columns.length)}},{key:"isHorizontal",value:function(){return!(!this.columns.length||this.rows.length)}}]),e}();t.default=l},function(e,t,n){"use strict";n(52),n(27),n(15),n(11),n(95),n(83),n(84),n(9),n(69),n(12),n(13),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;if(Array.from(n).indexOf(t.parentNode)-n.length!=-1)return!1;return!0},t.wasHeaderClickedProperly=function(e,t,n){return-1===e&&t>=0&&!1===(0,i.isRightClick)(n)},t.HEADER_SPAN_CLASS=t.DESC_SORT_STATE=t.ASC_SORT_STATE=void 0;var r=n(24),o=n(4),i=n(32),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(17),n(60),n(65),n(9),n(112),n(39),n(42),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(365)),s=n(8),l=n(3),u=r(n(555)),c=r(n(25)),h=n(4),d=n(24),f=n(63),v=n(66),g=n(59),p=r(n(49)),m=n(85),y=n(32),w=215,C=function(){function e(t,n){(0,o.default)(this,e),this.hot=t,this.options=n||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:w,container:this.hot.rootDocument.documentElement},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,i.default)(e,[{key:"registerEvents",value:function(){for(var e=this,t=this.hot.rootWindow;t;)this.eventManager.addEventListener(t.document,"mousedown",(function(t){return e.onDocumentMouseDown(t)})),t=(0,s.getParentWindow)(t)}},{key:"setMenuItems",value:function(e){this.menuItems=e}},{key:"getSelectedItem",value:function(){return this.hasSelectedItem()?this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]):null}},{key:"hasSelectedItem",value:function(){return Array.isArray(this.hotMenu.getSelectedLast())}},{key:"setOffset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.offset[e]=t}},{key:"isSubMenu",value:function(){return null!==this.parentMenu}},{key:"open",value:function(){var e=this;this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";var t=(0,f.debounce)((function(t){return e.openSubMenu(t)}),300),n=this.options.minWidth||w,r=!1,o=(0,l.arrayFilter)(this.menuItems,(function(t){return t.key===m.NO_ITEMS&&(r=!0),(0,v.isItemHidden)(t,e.hot)}));if(o.length<1&&!r)o.push((0,m.predefinedItems)()[m.NO_ITEMS]);else if(0===o.length)return;o=(0,v.filterSeparators)(o,m.SEPARATOR);var i=!1,s={data:o,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth:function(e){return(0,d.isDefined)(e)&&e<n?n:e},autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,fillHandle:!1,columns:[{data:"name",renderer:function(t,n,r,o,i,a){return e.menuItemRenderer(t,n,r,o,i,a)}}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",beforeKeyDown:function(t){return e.onBeforeKeyDown(t)},afterOnCellMouseOver:function(n,r){e.isAllSubMenusClosed()?t(r.row):e.openSubMenu(r.row)},rowHeights:function(e){return o[e].name===m.SEPARATOR?1:23},afterOnCellContextMenu:function(t){t.preventDefault(),e.hasSelectedItem()&&(e.executeCommand(t),e.isCommandPassive(e.getSelectedItem())||e.close(!0))},beforeOnCellMouseUp:function(t){e.hasSelectedItem()&&(i=!e.isCommandPassive(e.getSelectedItem()),e.executeCommand(t))},afterOnCellMouseUp:function(){i&&e.hasSelectedItem()&&e.close(!0)},afterUnlisten:function(){!e.hasSelectedItem()&&e.isOpened()&&e.hotMenu.listen(!1)}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new a.default(this.container,s),this.hotMenu.selection.highlight.cell.settings.border.width=0,this.hotMenu.addHook("afterInit",(function(){return e.onAfterInit()})),this.hotMenu.addHook("afterSelection",(function(){return e.onAfterSelection.apply(e,arguments)})),this.hotMenu.init(),this.hotMenu.listen(),this.blockMainTableCallbacks(),this.runLocalHooks("afterOpen")}},{key:"close",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isOpened()&&(e&&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(t){if(!this.hotMenu)return!1;var n=this.hotMenu.getCell(t,0);if(this.closeAllSubMenus(),!n||!(0,v.hasSubMenu)(n))return!1;var r=this.hotMenu.getSourceDataAtRow(t),o=new e(this.hot,{parent:this,name:r.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return o.setMenuItems(r.submenu.items),o.open(),o.setPosition(n.getBoundingClientRect()),this.hotSubMenus[r.key]=o,o}},{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 e=this;(0,l.arrayEach)(this.hotMenu.getData(),(function(t,n){return e.closeSubMenu(n)}))}},{key:"isAllSubMenusClosed",value:function(){return 0===Object.keys(this.hotSubMenus).length}},{key:"destroy",value:function(){var e=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),e&&e.removeChild(this.container)}},{key:"isOpened",value:function(){return null!==this.hotMenu}},{key:"executeCommand",value:function(e){if(this.isOpened()&&this.hasSelectedItem()){var t=this.getSelectedItem();if(this.runLocalHooks("select",t,e),!this.isCommandPassive(t)){var n=this.hot.getSelectedRange(),r=n?(0,v.normalizeSelection)(n):[];this.runLocalHooks("executeCommand",t.key,r,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,r,e)}}}},{key:"isCommandPassive",value:function(e){var t=e.isCommand,n=e.name,r=e.disabled,o=e.submenu,i=!0===r||"function"==typeof r&&!0===r.call(this.hot);return!1===t||n===m.SEPARATOR||!0===i||o}},{key:"setPosition",value:function(e){var t=new u.default(e,this.container.ownerDocument.defaultView);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,s.getScrollbarWidth)(this.hot.rootDocument)+4;this.container.style.left="".concat(t,"px")}},{key:"selectFirstCell",value:function(){var e=this.hotMenu.getCell(0,0);(0,v.isSeparator)(e)||(0,v.isDisabled)(e)||(0,v.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,v.isSeparator)(t)||(0,v.isDisabled)(t)||(0,v.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,v.isSeparator)(r)||(0,v.isDisabled)(r)||(0,v.isSelectionDisabled)(r)?this.selectNextCell(n,t):this.hotMenu.selectCell(n,t))}},{key:"selectPrevCell",value:function(e,t){var n=e-1,r=n>=0?this.hotMenu.getCell(n,t):null;r&&((0,v.isSeparator)(r)||(0,v.isDisabled)(r)||(0,v.isSelectionDisabled)(r)?this.selectPrevCell(n,t):this.hotMenu.selectCell(n,t))}},{key:"menuItemRenderer",value:function(e,t,n,r,o,i){var a,l=this,u=e.getSourceDataAtRow(n),c=this.hot.rootDocument.createElement("div"),d=function(e){return e.disableSelection},f=i;"function"==typeof f&&(f=f.call(this.hot)),(0,s.empty)(t),(0,s.addClass)(c,"htItemWrapper"),t.appendChild(c),a=u,new RegExp(m.SEPARATOR,"i").test(a.name)?(0,s.addClass)(t,"htSeparator"):"function"==typeof u.renderer?((0,s.addClass)(t,"htCustomMenuRenderer"),t.appendChild(u.renderer(e,c,n,r,o,f))):(0,s.fastInnerHTML)(c,f),!function(e){return!0===e.disabled||"function"==typeof e.disabled&&!0===e.disabled.call(l.hot)}(u)?d(u)?((0,s.addClass)(t,"htSelectionDisabled"),this.eventManager.addEventListener(t,"mouseenter",(function(){return e.deselectCell()}))):!function(e){return(0,h.hasOwnProperty)(e,"submenu")}(u)?((0,s.removeClass)(t,["htSubmenu","htDisabled"]),d(u)?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)}))):((0,s.addClass)(t,"htSubmenu"),d(u)?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)}))):((0,s.addClass)(t,"htDisabled"),this.eventManager.addEventListener(t,"mouseenter",(function(){return e.deselectCell()})))}},{key:"createContainer",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.options.container.ownerDocument,r=t;return r&&((0,f.isFunction)(r)&&(r=null===(r=r.call(this.hot))||(0,d.isUndefined)(r)?"":r.toString()),r=r.replace(/[^A-z0-9]/g,"_"),r="".concat(this.options.className,"Sub_").concat(r),e=n.querySelector(".".concat(this.options.className,".").concat(r))),e||(e=n.createElement("div"),(0,s.addClass)(e,"htMenu ".concat(this.options.className)),r&&(0,s.addClass)(e,r),this.options.container.appendChild(e)),e}},{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){if((0,s.isInput)(e.target)&&this.container.contains(e.target))(0,y.stopImmediatePropagation)(e);else{var t=this.hotMenu.getSelectedLast(),n=!1;switch(this.keyEvent=!0,e.keyCode){case g.KEY_CODES.ESCAPE:this.close(),n=!0;break;case g.KEY_CODES.ENTER:t&&(this.hotMenu.getSourceDataAtRow(t[0]).submenu?n=!0:(this.executeCommand(e),this.close(!0)));break;case g.KEY_CODES.ARROW_DOWN:t?this.selectNextCell(t[0],t[1]):this.selectFirstCell(),n=!0;break;case g.KEY_CODES.ARROW_UP:t?this.selectPrevCell(t[0],t[1]):this.selectLastCell(),n=!0;break;case g.KEY_CODES.ARROW_RIGHT:if(t){var r=this.openSubMenu(t[0]);r&&r.selectFirstCell()}n=!0;break;case g.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+3,"px"),r.height="".concat(i+3,"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.options.standalone&&this.hotMenu&&!(0,s.isChildOf)(e.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||(0,s.isChildOf)(e.target,".htMenu")||!(0,s.isChildOf)(e.target,this.container.ownerDocument)&&!(0,s.isChildOf)(e.target,this.hot.rootDocument)||this.close(!0))}}]),e}();(0,h.mixin)(C,p.default);var E=C;t.default=E},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(70)),i=r(n(1)),a=r(n(2)),s=n(26),l=n(71);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 e(t,n,r,o){(0,i.default)(this,e),this.row=t,this.col=n,this.rowspan=r,this.colspan=o,this.removed=!1}return(0,a.default)(e,[{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(l>=t&&(this[i]+=n),n>0)t<=u&&t>l&&(this[o]+=n);else if(n<0){if(a<=l&&s>=u)return this.removed=!0,!1;if(l>=a&&l<=s){var c=s-l+1,h=Math.abs(n)-c;this[i]-=h+n,this[o]-=c}else if(l<=a&&u>=s)this[o]+=n;else if(l<=a&&u>=a&&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}}]),e}();t.default=f},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=function(e){var t=[],n=e;P[n]||(n=H);return(0,a.arrayEach)(P[n],(function(e){var n;n=e===s.SEPARATOR?{name:s.SEPARATOR}:(0,i.clone)((0,l.getConditionDescriptor)(e)),t.push(n)})),t},t.TYPES=t.TYPE_DATE=t.TYPE_TEXT=t.TYPE_NUMERIC=void 0;var o=r(n(75)),i=n(4),a=n(3),s=n(85),l=n(29),u=n(623);t.CONDITION_NONE=u.CONDITION_NAME;var c=n(394);t.CONDITION_EMPTY=c.CONDITION_NAME;var h=n(624);t.CONDITION_NOT_EMPTY=h.CONDITION_NAME;var d=n(395);t.CONDITION_EQUAL=d.CONDITION_NAME;var f=n(625);t.CONDITION_NOT_EQUAL=f.CONDITION_NAME;var v=n(626);t.CONDITION_GREATER_THAN=v.CONDITION_NAME;var g=n(627);t.CONDITION_GREATER_THAN_OR_EQUAL=g.CONDITION_NAME;var p=n(628);t.CONDITION_LESS_THAN=p.CONDITION_NAME;var m=n(629);t.CONDITION_LESS_THAN_OR_EQUAL=m.CONDITION_NAME;var y=n(396);t.CONDITION_BETWEEN=y.CONDITION_NAME;var w=n(630);t.CONDITION_NOT_BETWEEN=w.CONDITION_NAME;var C=n(631);t.CONDITION_BEGINS_WITH=C.CONDITION_NAME;var E=n(632);t.CONDITION_ENDS_WITH=E.CONDITION_NAME;var S=n(399);t.CONDITION_CONTAINS=S.CONDITION_NAME;var b=n(634);t.CONDITION_NOT_CONTAINS=b.CONDITION_NAME;var R=n(398);t.CONDITION_DATE_BEFORE=R.CONDITION_NAME;var T=n(397);t.CONDITION_DATE_AFTER=T.CONDITION_NAME;var M=n(635);t.CONDITION_TOMORROW=M.CONDITION_NAME;var O=n(636);t.CONDITION_TODAY=O.CONDITION_NAME;var k=n(637);t.CONDITION_YESTERDAY=k.CONDITION_NAME;var N=n(638);t.CONDITION_BY_VALUE=N.CONDITION_NAME;var _=n(639);t.CONDITION_TRUE=_.CONDITION_NAME;var A=n(640);t.CONDITION_FALSE=A.CONDITION_NAME;var I=n(187);t.OPERATION_AND=I.OPERATION_ID;var D=n(400);t.OPERATION_OR=D.OPERATION_ID;var L,x=n(401);t.OPERATION_OR_THEN_VARIABLE=x.OPERATION_ID;t.TYPE_NUMERIC="numeric";var H="text";t.TYPE_TEXT=H;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,H,[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,M.CONDITION_NAME,O.CONDITION_NAME,k.CONDITION_NAME]),L);t.TYPES=P},function(e,t,n){"use strict";var r=n(10);t.__esModule=!0,t.operationResult=s,t.SHORT_NAME_FOR_COMPONENT=t.OPERATION_ID=void 0;var o=r(n(14)),i=n(120);t.OPERATION_ID="conjunction";var a=o.FILTERS_LABELS_CONJUNCTION;function s(e,t){return e.every((function(e){return e.func(t)}))}t.SHORT_NAME_FOR_COMPONENT=a,(0,i.registerOperation)("conjunction",a,s)},function(e,t,n){"use strict";var r=n(0);n(11),n(9),n(12),n(23),n(13),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(6)),a=r(n(30)),s=r(n(5)),l=r(n(16)),u=r(n(2)),c=r(n(7)),h=n(8),d=n(4),f=r(n(121)),v=new WeakMap,g=function(e){function t(e,n){var r;return(0,o.default)(this,t),r=(0,i.default)(this,(0,s.default)(t).call(this,e,(0,d.extend)(t.DEFAULTS,n))),v.set((0,a.default)(r),{}),r.registerHooks(),r}return(0,c.default)(t,e),(0,u.default)(t,null,[{key:"DEFAULTS",get:function(){return(0,d.clone)({placeholder:"",type:"text",tagName:"input"})}}]),(0,u.default)(t,[{key:"registerHooks",value:function(){var e=this;this.addLocalHook("click",(function(){return e.onClick()})),this.addLocalHook("keyup",(function(t){return e.onKeyup(t)}))}},{key:"build",value:function(){(0,l.default)((0,s.default)(t.prototype),"build",this).call(this);var e=v.get(this),n=this.hot.rootDocument.createElement("div");e.input=this._element.firstChild,(0,h.addClass)(this._element,"htUIInput"),(0,h.addClass)(n,"htUIInputIcon"),this._element.appendChild(n),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}}]),t}(f.default);t.default=g},function(e,t,n){"use strict";n(17),n(60),n(9),n(39),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=o(t[e].name),i=e>0?o(t[e-1].name):null,a=o(t[0].name),s=o(t[t.length-1].name);n=e>0?"".concat(i,"/").concat(r):e===t.length-1?"".concat(r,"/").concat(a):"".concat(s,"/").concat(r);return n},t.getShorthand=o,t.getStartDate=function(e){return i(Array.isArray(e)?e[1]:e.startDate)},t.getEndDate=function(e){return i(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=i,t.getDateYear=function(e){var t=i(e);return t?t.getFullYear():null},t.WEEK_LENGTH=t.DEC_LENGTH=void 0;t.DEC_LENGTH=31;var r=7;function o(e){return e.substring(0,3)}function i(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;var o=r(n(1)),i=function e(t,n){(0,o.default)(this,e),this.hot=n,this.plugin=t};t.default=i},function(e,t,n){var r=n(50),o=n(28),i=n(146);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(99);e.exports=r("native-function-to-string",Function.toString)},function(e,t,n){var r=n(38),o=n(192),i=r.WeakMap;e.exports="function"==typeof i&&/native code/.test(o.call(i))},function(e,t,n){var r=n(55),o=n(195),i=n(93),a=n(56);e.exports=function(e,t){for(var n=o(t),s=a.f,l=i.f,u=0;u<n.length;u++){var c=n[u];r(e,c)||s(e,c,l(t,c))}}},function(e,t,n){var r=n(128),o=n(101),i=n(150),a=n(47);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){e.exports=n(38)},function(e,t,n){var r=n(55),o=n(67),i=n(148).indexOf,a=n(100);e.exports=function(e,t){var n,s=o(e),l=0,u=[];for(n in s)!r(a,n)&&r(s,n)&&u.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~i(u,n)||u.push(n));return u}},function(e,t,n){var r=n(67),o=n(101).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(28);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(e,t,n){var r=n(128);e.exports=r("document","documentElement")},function(e,t,n){"use strict";var r,o,i,a=n(152),s=n(68),l=n(55),u=n(37),c=n(125),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(28);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){var r=n(47),o=n(415);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,i){return r(n),o(i),t?e.call(n,i):n.__proto__=i,n}}():void 0)},function(e,t,n){var r=n(78),o=n(37)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(37),o=n(104),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(204),o=n(104),i=n(37)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){var r=n(47);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&r(i.call(e)),t}}},function(e,t,n){var r=n(37)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(154),o=n(133).getWeakData,i=n(47),a=n(44),s=n(157),l=n(155),u=n(89),c=n(55),h=n(88),d=h.set,f=h.getterFor,v=u.find,g=u.findIndex,p=0,m=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},w=function(e,t){return v(e.entries,(function(e){return e[0]===t}))};y.prototype={get:function(e){var t=w(this,e);if(t)return t[1]},has:function(e){return!!w(this,e)},set:function(e,t){var n=w(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=g(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,u){var h=e((function(e,r){s(e,h,t),d(e,{type:t,id:p++,frozen:void 0}),null!=r&&l(r,e[u],e,n)})),v=f(t),g=function(e,t,n){var r=v(e),a=o(i(t),!0);return!0===a?m(r).set(t,n):a[r.id]=n,e};return r(h.prototype,{delete:function(e){var t=v(this);if(!a(e))return!1;var n=o(e);return!0===n?m(t).delete(e):n&&c(n,t.id)&&delete n[t.id]},has:function(e){var t=v(this);if(!a(e))return!1;var n=o(e);return!0===n?m(t).has(e):n&&c(n,t.id)}}),r(h.prototype,n?{get:function(e){var t=v(this);if(a(e)){var n=o(e);return!0===n?m(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return g(this,e,t)}}:{add:function(e){return g(this,e,!0)}}),h}}},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 r=n(56).f,o=n(103),i=n(154),a=n(105),s=n(157),l=n(155),u=n(151),c=n(212),h=n(50),d=n(133).fastKey,f=n(88),v=f.set,g=f.getterFor;e.exports={getConstructor:function(e,t,n,u){var c=e((function(e,r){s(e,c,t),v(e,{type:t,index:o(null),first:void 0,last:void 0,size:0}),h||(e.size=0),null!=r&&l(r,e[u],e,n)})),f=g(t),p=function(e,t,n){var r,o,i=f(e),a=m(e,t);return a?a.value=n:(i.last=a={index:o=d(t,!0),key:t,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=a),r&&(r.next=a),h?i.size++:e.size++,"F"!==o&&(i.index[o]=a)),e},m=function(e,t){var n,r=f(e),o=d(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==t)return n};return i(c.prototype,{clear:function(){for(var e=f(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,h?e.size=0:this.size=0},delete:function(e){var t=f(this),n=m(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),h?t.size--:this.size--}return!!n},forEach:function(e){for(var t,n=f(this),r=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!m(this,e)}}),i(c.prototype,n?{get:function(e){var t=m(this,e);return t&&t.value},set:function(e,t){return p(this,0===e?0:e,t)}}:{add:function(e){return p(this,e=0===e?0:e,e)}}),h&&r(c.prototype,"size",{get:function(){return f(this).size}}),c},setStrong:function(e,t,n){var r=t+" Iterator",o=g(t),i=g(r);u(e,t,(function(e,t){v(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}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),c(t)}}},function(e,t,n){"use strict";var r=n(128),o=n(56),i=n(37),a=n(50),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){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(54),o="["+n(215)+"]",i=RegExp("^"+o+o+"*"),a=RegExp(o+o+"*$"),s=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(i,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:s(1),end:s(2),trim:s(3)}},function(e,t){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";var r=n(0);n(11),n(9),n(12),n(23),n(13),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(164),s=new WeakMap,l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.viewportSize,r=t.scrollOffset,i=t.totalItems,a=t.itemSizeFn,l=t.overrideFn,u=t.calculationType,c=t.stretchMode,h=t.stretchingItemWidthFn,d=void 0===h?function(e){return e}:h;(0,o.default)(this,e),s.set(this,{viewportWidth:n,scrollOffset:r,totalColumns:i,columnWidthFn:a,overrideFn:l,calculationType:u,stretchingColumnWidthFn:d}),this.count=0,this.startColumn=null,this.endColumn=null,this.startPosition=null,this.stretchAllRatio=0,this.stretchLastWidth=0,this.stretch=c,this.totalTargetWidth=0,this.needVerifyLastColumnWidth=!0,this.stretchAllColumnsWidth=[],this.calculate()}return(0,i.default)(e,null,[{key:"DEFAULT_WIDTH",get:function(){return 50}}]),(0,i.default)(e,[{key:"calculate",value:function(){for(var e,t=0,n=!0,r=[],o=s.get(this),i=o.calculationType,l=o.overrideFn,u=o.scrollOffset,c=o.totalColumns,h=o.viewportWidth,d=0;d<c;d++){e=this._getColumnWidth(d),t<=u&&i!==a.FULLY_VISIBLE_TYPE&&(this.startColumn=d);var f=u>0?h+1:h;if(t>=u&&t+(i===a.FULLY_VISIBLE_TYPE?e:0)<=u+f&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=d),this.endColumn=d),r.push(t),t+=e,i!==a.FULLY_VISIBLE_TYPE&&(this.endColumn=d),t>=u+h){n=!1;break}}if(this.endColumn===c-1&&n)for(this.startColumn=this.endColumn;this.startColumn>0;){var v=r[this.endColumn]+e-r[this.startColumn-1];if((v<=h||i!==a.FULLY_VISIBLE_TYPE)&&(this.startColumn-=1),v>h)break}i===a.RENDER_TYPE&&null!==this.startColumn&&l&&l(this),this.startPosition=r[this.startColumn],void 0===this.startPosition&&(this.startPosition=null),c<this.endColumn&&(this.endColumn=c-1),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=s.get(this),r=n.totalColumns,o=0,i=0;i<r;i++){var a=this._getColumnWidth(i),l=n.stretchingColumnWidthFn(void 0,i);"number"==typeof l?t-=l:o+=a}var u=t-o;if("all"===this.stretch&&u>0)this.stretchAllRatio=t/o,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===this.stretch&&t!==1/0){var c=this._getColumnWidth(r-1),h=u+c;this.stretchLastWidth=h>=0?h:c}}}},{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=s.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 l=0;l<this.stretchAllColumnsWidth.length;l++)n+=this.stretchAllColumnsWidth[l];n!==this.totalTargetWidth&&(this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length-1]+=this.totalTargetWidth-n)}return this.stretchAllColumnsWidth[e]}},{key:"_getStretchedLastColumnWidth",value:function(e){return e===s.get(this).totalColumns-1?this.stretchLastWidth:null}},{key:"_getColumnWidth",value:function(t){var n=s.get(this).columnWidthFn(t);return isNaN(n)&&(n=e.DEFAULT_WIDTH),n}}]),e}();t.default=l},function(e,t,n){"use strict";var r=n(0);n(11),n(9),n(12),n(23),n(13),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(164),s=new WeakMap,l=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.viewportSize,r=t.scrollOffset,i=t.totalItems,a=t.itemSizeFn,l=t.overrideFn,u=t.calculationType,c=t.scrollbarHeight;(0,o.default)(this,e),s.set(this,{viewportHeight:n,scrollOffset:r,totalRows:i,rowHeightFn:a,overrideFn:l,calculationType:u,horizontalScrollbarHeight:c}),this.count=0,this.startRow=null,this.endRow=null,this.startPosition=null,this.calculate()}return(0,i.default)(e,null,[{key:"DEFAULT_HEIGHT",get:function(){return 23}}]),(0,i.default)(e,[{key:"calculate",value:function(){for(var t,n=0,r=!0,o=[],i=s.get(this),l=i.calculationType,u=i.overrideFn,c=i.rowHeightFn,h=i.scrollOffset,d=i.totalRows,f=i.viewportHeight,v=i.horizontalScrollbarHeight||0,g=0;g<d;g++)if(t=c(g),isNaN(t)&&(t=e.DEFAULT_HEIGHT),n<=h&&l!==a.FULLY_VISIBLE_TYPE&&(this.startRow=g),n>=h&&n+(l===a.FULLY_VISIBLE_TYPE?t:0)<=h+f-v&&(null===this.startRow&&(this.startRow=g),this.endRow=g),o.push(n),n+=t,l!==a.FULLY_VISIBLE_TYPE&&(this.endRow=g),n>=h+f-v){r=!1;break}if(this.endRow===d-1&&r)for(this.startRow=this.endRow;this.startRow>0;){var p=o[this.endRow]+t-o[this.startRow-1];if((p<=f-v||l!==a.FULLY_VISIBLE_TYPE)&&(this.startRow-=1),p>=f-v)break}l===a.RENDER_TYPE&&null!==this.startRow&&u&&u(this),this.startPosition=o[this.startRow],void 0===this.startPosition&&(this.startPosition=null),d<this.endRow&&(this.endRow=d-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}]),e}();t.default=l},function(e,t,n){"use strict";var r=n(0);n(27),n(15),n(35),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(111)),s=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;(0,o.default)(this,e),this.highlight=t,this.from=n,this.to=r}return(0,i.default)(e,[{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 a.default(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=new a.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(),s=Math.min(t.row,o.row),l=Math.min(t.col,o.col),u=Math.max(n.row,i.row),c=Math.max(n.col,i.col),h=new a.default(s,l),d=new a.default(u,c);return this.from=h,this.to=d,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["NE-SW","NW-SE"].indexOf(this.getDirection())>-1?"N-S":"S-N"}},{key:"getHorizontalDirection",value:function(){return["NW-SE","SW-NE"].indexOf(this.getDirection())>-1?"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:"getCorners",value:function(){return[Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col),Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)]}},{key:"getTopLeftCorner",value:function(){return new a.default(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}},{key:"getBottomRightCorner",value:function(){return new a.default(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}},{key:"getTopRightCorner",value:function(){return new a.default(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}},{key:"getBottomLeftCorner",value:function(){return new a.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 a.default(t.from.row,t.from.col))||this.getTopRightCorner().isEqual(new a.default(t.from.row,t.to.col))||this.getBottomLeftCorner().isEqual(new a.default(t.to.row,t.from.col))||this.getBottomRightCorner().isEqual(new a.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 a.default))return!1;if(t&&t.includes(e)){if(this.getTopLeftCorner().isEqual(new a.default(t.from.row,t.from.col)))return this.getBottomRightCorner();if(this.getTopRightCorner().isEqual(new a.default(t.from.row,t.to.col)))return this.getBottomLeftCorner();if(this.getBottomLeftCorner().isEqual(new a.default(t.to.row,t.from.col)))return this.getTopRightCorner();if(this.getBottomRightCorner().isEqual(new a.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 a.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 a.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()}}}]),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)),a=function(){function e(t,n,r){(0,o.default)(this,e),this.offset=t,this.total=n,this.countTH=r}return(0,i.default)(e,[{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))}}]),e}();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 e(t,n,r){(0,o.default)(this,e),this.offset=t,this.total=n,this.countTH=r}return(0,i.default)(e,[{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))}}]),e}();t.default=a},function(e,t,n){"use strict";var r=n(0);n(27),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(6)),s=r(n(5)),l=r(n(7)),u=n(8),c=r(n(94)),h=r(n(356)),d=r(n(172)),f=n(4),v=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:"alignOverlaysWithTrimmingContainer",value:function(){var e=(0,u.getTrimmingContainer)(this.wtRootElement),t=this.wot.rootWindow;if(e===t){this.wot.getSetting("preventOverflow")||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible")}else{var n=e.parentElement,r=(0,u.getStyle)(e,"height",t),o=(0,u.getStyle)(e,"overflow",t),i=this.holder.style,a=e.scrollWidth,s=e.scrollHeight,l=e.getBoundingClientRect(),c=l.width,h=l.height;if(n&&["auto","hidden","scroll"].includes(o)){var d=e.cloneNode(!1);d.style.overflow="auto",e.nextElementSibling?n.insertBefore(d,e.nextElementSibling):n.appendChild(d);var f=parseInt((0,u.getComputedStyle)(d,t).height,10);n.removeChild(d),0===f&&(h=0)}h=Math.min(h,s),i.height="auto"===r?"auto":"".concat(h,"px"),c=Math.min(c,a),i.width="".concat(c,"px"),i.overflow="",this.hasTableHeight="auto"===i.height||h>0,this.hasTableWidth=c>0}this.isTableVisible=(0,u.isVisible)(this.TABLE)}},{key:"markOversizedColumnHeaders",value:function(){var e=this.wot,t=e.getOverlayName(),n=e.getSetting("columnHeaders").length;if(n&&!e.wtViewport.hasOversizedColumnHeadersMarked[t]){for(var r=e.getSetting("rowHeaders").length,o=this.getRenderedColumnsCount(),i=0;i<n;i++)for(var a=-1*r;a<o;a++)this.markIfOversizedColumnHeader(a);e.wtViewport.hasOversizedColumnHeadersMarked[t]=!0}}}]),t}(c.default);(0,f.mixin)(v,h.default),(0,f.mixin)(v,d.default);var g=v;t.default=g},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.Renderer=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(425));t.RowHeadersRenderer=a.default;var s=r(n(430));t.ColumnHeadersRenderer=s.default;var l=r(n(431));t.ColGroupRenderer=l.default;var u=r(n(432));t.RowsRenderer=u.default;var c=r(n(438));t.CellsRenderer=c.default;var h=r(n(439));t.TableRenderer=h.default;var d=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.TABLE,r=t.THEAD,i=t.COLGROUP,d=t.TBODY,f=t.rowUtils,v=t.columnUtils,g=t.cellRenderer;(0,o.default)(this,e),this.renderer=new h.default(n,{cellRenderer:g}),this.renderer.setRenderers({rowHeaders:new a.default,columnHeaders:new s.default(r),colGroup:new l.default(i),rows:new u.default(d),cells:new c.default}),this.renderer.setAxisUtils(f,v)}return(0,i.default)(e,[{key:"setFilters",value:function(e,t){return this.renderer.setFilters(e,t),this}},{key:"setViewportSize",value:function(e,t){return this.renderer.setViewportSize(e,t),this}},{key:"setHeaderContentRenderers",value:function(e,t){return this.renderer.setHeaderContentRenderers(e,t),this}},{key:"adjust",value:function(){this.renderer.adjust()}},{key:"render",value:function(){this.renderer.render()}}]),e}();t.Renderer=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=n(227),s=r(n(426)),l=function(){function e(t,n,r){(0,o.default)(this,e),this.rootNode=t,this.nodesPool=n,this.sizeSet=new s.default,this.childNodeType=r.toUpperCase(),this.visualIndex=0,this.collectedNodes=[]}return(0,i.default)(e,[{key:"setSize",value:function(e){return this.sizeSet.setSize(e),this}},{key:"setOffset",value:function(e){return this.sizeSet.setOffset(e),this}},{key:"isSharedViewSet",value:function(){return this.sizeSet.isShared()}},{key:"getNode",value:function(e){return e<this.collectedNodes.length?this.collectedNodes[e]:null}},{key:"getCurrentNode",value:function(){var e=this.collectedNodes.length;return e>0?this.collectedNodes[e-1]:null}},{key:"getRenderedChildCount",value:function(){var e=this.rootNode,t=this.sizeSet,n=0;if(this.isSharedViewSet())for(var r=e.firstElementChild;r;){if(r.tagName===this.childNodeType)n+=1;else if(t.isPlaceOn(a.WORKING_SPACE_TOP))break;r=r.nextElementSibling}else n=e.childElementCount;return n}},{key:"start",value:function(){this.collectedNodes.length=0,this.visualIndex=0;for(var e=this.rootNode,t=this.sizeSet,n=this.isSharedViewSet(),r=t.getViewSize().nextSize,o=this.getRenderedChildCount();o<r;){var i=this.nodesPool();!n||n&&t.isPlaceOn(a.WORKING_SPACE_BOTTOM)?e.appendChild(i):e.insertBefore(i,e.firstChild),o+=1}for(var s=n&&t.isPlaceOn(a.WORKING_SPACE_TOP);o>r;)e.removeChild(s?e.firstChild:e.lastChild),o-=1}},{key:"render",value:function(){var e=this.rootNode,t=this.sizeSet,n=this.visualIndex;this.isSharedViewSet()&&t.isPlaceOn(a.WORKING_SPACE_BOTTOM)&&(n+=t.sharedSize.nextSize);var r=e.childNodes[n];if(r.tagName!==this.childNodeType){var o=this.nodesPool();e.replaceChild(o,r),r=o}this.collectedNodes.push(r),this.visualIndex+=1}},{key:"end",value:function(){}}]),e}();t.default=l},function(e,t,n){"use strict";t.__esModule=!0,t.WORKING_SPACE_BOTTOM=t.WORKING_SPACE_TOP=t.WORKING_SPACE_ALL=void 0;t.WORKING_SPACE_ALL=0;t.WORKING_SPACE_TOP=1;t.WORKING_SPACE_BOTTOM=2},function(e,t,n){"use strict";var r=n(21),o=n(434).start;r({target:"String",proto:!0,forced:n(435)},{padStart:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(79),o=n(54);e.exports="".repeat||function(e){var t=String(o(this)),n="",i=r(e);if(i<0||i==1/0)throw RangeError("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(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);t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(8),s=n(4),l=n(77),u=r(n(350)),c=r(n(351)),h=r(n(352)),d=r(n(353)),f=r(n(222)),v=r(n(354)),g=n(169),p=function(){function e(t){(0,o.default)(this,e);var n=[];if(this.guid="wt_".concat((0,l.randomString)()),this.rootDocument=t.table.ownerDocument,this.rootWindow=this.rootDocument.defaultView,(0,g.setCurrentWindowContext)(this.rootWindow),t.cloneSource?(this.cloneSource=t.cloneSource,this.cloneOverlay=t.cloneOverlay,this.wtSettings=t.cloneSource.wtSettings,this.wtTable=this.cloneOverlay.createTable(this,t.table),this.wtScroll=new h.default(this),this.wtViewport=t.cloneSource.wtViewport,this.wtEvent=new u.default(this),this.selections=this.cloneSource.selections):(this.wtSettings=new d.default(this,t),this.wtTable=new f.default(this,t.table),this.wtScroll=new h.default(this),this.wtViewport=new v.default(this),this.wtEvent=new u.default(this),this.selections=this.getSetting("selections"),this.wtOverlays=new c.default(this),this.exportSettingsAsClassNames()),this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(var r=0,i=this.wtTable.THEAD.childNodes[0].childNodes.length;r<i;r++)n.push(this.wtTable.THEAD.childNodes[0].childNodes[r].innerHTML);this.getSetting("columnHeaders").length||this.update("columnHeaders",[function(e,t){(0,a.fastInnerText)(t,n[e])}])}this.drawn=!1,this.drawInterrupted=!1}return(0,i.default)(e,[{key:"draw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.drawInterrupted=!1,e||this.wtTable.isVisible()?this.wtTable.draw(e):this.drawInterrupted=!0,this}},{key:"getCell",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!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!(e.col<0||e.row<0)&&this.wtScroll.scrollViewport(e,t,n,r,o)}},{key:"scrollViewportHorizontally",value:function(e,t,n){return!(e<0)&&this.wtScroll.scrollViewportHorizontally(e,t,n)}},{key:"scrollViewportVertically",value:function(e,t,n){return!(e<0)&&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:"exportSettingsAsClassNames",value:function(){var e=this,t=[],n=[];(0,s.objectEach)({rowHeaders:"htRowHeaders",columnHeaders:"htColumnHeaders"},(function(r,o){e.getSetting(o).length&&n.push(r),t.push(r)})),(0,a.removeClass)(this.wtTable.wtRootElement.parentNode,t),(0,a.addClass)(this.wtTable.wtRootElement.parentNode,n)}},{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()}}]),e}();t.default=p},function(e,t,n){"use strict";var r=n(0);n(27),n(11),n(9),n(12),n(23),n(13),n(36),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(8),s=n(63),l=n(81),u=n(76),c=r(n(25)),h=new WeakMap,d=function(){function e(t){(0,o.default)(this,e),this.instance=t,this.eventManager=new c.default(t),h.set(this,{selectedCellBeforeTouchEnd:void 0,dblClickTimeout:[null,null],dblClickOrigin:[null,null]}),this.registerEvents()}return(0,i.default)(e,[{key:"registerEvents",value:function(){var e=this;this.eventManager.addEventListener(this.instance.wtTable.holder,"contextmenu",(function(t){return e.onContextMenu(t)})),this.eventManager.addEventListener(this.instance.wtTable.TABLE,"mouseover",(function(t){return e.onMouseOver(t)})),this.eventManager.addEventListener(this.instance.wtTable.TABLE,"mouseout",(function(t){return e.onMouseOut(t)}));var t=function(){e.eventManager.addEventListener(e.instance.wtTable.holder,"touchstart",(function(t){return e.onTouchStart(t)})),e.eventManager.addEventListener(e.instance.wtTable.holder,"touchend",(function(t){return e.onTouchEnd(t)})),e.instance.momentumScrolling||(e.instance.momentumScrolling={}),e.eventManager.addEventListener(e.instance.wtTable.holder,"scroll",(function(){clearTimeout(e.instance.momentumScrolling._timeout),e.instance.momentumScrolling.ongoing||e.instance.getSetting("onBeforeTouchScroll"),e.instance.momentumScrolling.ongoing=!0,e.instance.momentumScrolling._timeout=setTimeout((function(){e.instance.touchApplied||(e.instance.momentumScrolling.ongoing=!1,e.instance.getSetting("onAfterMomentumScroll"))}),200)}))};(0,u.isMobileBrowser)()?t():((0,l.isTouchSupported)()&&t(),e.eventManager.addEventListener(e.instance.wtTable.holder,"mouseup",(function(t){return e.onMouseUp(t)})),e.eventManager.addEventListener(e.instance.wtTable.holder,"mousedown",(function(t){return e.onMouseDown(t)})))}},{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,!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()}}]),e}();t.default=d},function(e,t,n){"use strict";var r=n(0);n(57),n(36),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(8),s=n(3),l=n(59),u=n(76),c=r(n(25)),h=r(n(91)),d=function(){function e(t){(0,o.default)(this,e),this.wot=t;var n=this.wot,r=n.rootDocument,i=n.rootWindow,s=n.wtTable,l=parseInt(i.getComputedStyle(r.body).lineHeight,10),u=1.2*parseInt(i.getComputedStyle(r.body).fontSize,10);this.instance=this.wot,this.eventManager=new c.default(this.wot),this.scrollbarSize=(0,a.getScrollbarWidth)(r),this.wot.update("scrollbarWidth",this.scrollbarSize),this.wot.update("scrollbarHeight",this.scrollbarSize);var h="hidden"===i.getComputedStyle(s.wtRootElement.parentNode).getPropertyValue("overflow");this.scrollableElement=h?s.holder:(0,a.getScrollableElement)(s.TABLE),this.topOverlay=void 0,this.bottomOverlay=void 0,this.leftOverlay=void 0,this.topLeftCornerOverlay=void 0,this.bottomLeftCornerOverlay=void 0,this.prepareOverlays(),this.hasScrollbarBottom=!1,this.hasScrollbarRight=!1,this.destroyed=!1,this.keyPressed=!1,this.spreaderLastSize={width:null,height:null},this.verticalScrolling=!1,this.horizontalScrolling=!1,this.browserLineHeight=l||u,this.registerListeners(),this.lastScrollX=i.scrollX,this.lastScrollY=i.scrollY}return(0,i.default)(e,[{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 e=this,t=this.wot,n=t.rootDocument,r=t.rootWindow,o=this.topOverlay.mainTableScrollableElement,i=this.leftOverlay.mainTableScrollableElement;this.eventManager.addEventListener(n.documentElement,"keydown",(function(t){return e.onKeyDown(t)})),this.eventManager.addEventListener(n.documentElement,"keyup",(function(){return e.onKeyUp()})),this.eventManager.addEventListener(n,"visibilitychange",(function(){return e.onKeyUp()})),this.eventManager.addEventListener(o,"scroll",(function(t){return e.onTableScroll(t)}),{passive:!0}),o!==i&&this.eventManager.addEventListener(i,"scroll",(function(t){return e.onTableScroll(t)}),{passive:!0});var a,s=r.devicePixelRatio&&r.devicePixelRatio>1,l=this.scrollableElement===r,c=this.wot.wtSettings.getSetting("preventWheel"),h={passive:l};(c||s||!(0,u.isChrome)())&&this.eventManager.addEventListener(this.wot.wtTable.wtRootElement,"wheel",(function(t){return e.onCloneWheel(t,c)}),h),[this.topOverlay,this.bottomOverlay,this.leftOverlay,this.topLeftCornerOverlay,this.bottomLeftCornerOverlay].forEach((function(t){if(t&&t.needFullRender){var n=t.clone.wtTable.holder;e.eventManager.addEventListener(n,"wheel",(function(t){return e.onCloneWheel(t,c)}),h)}})),this.eventManager.addEventListener(r,"resize",(function(){clearTimeout(a),a=setTimeout((function(){e.wot.getSetting("onWindowResize")}),200)}))}},{key:"deregisterListeners",value:function(){this.eventManager.clearEvents(!0)}},{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,t){var n=this.wot.rootWindow,r=this.leftOverlay.mainTableScrollableElement,o=this.topOverlay.mainTableScrollableElement,i=e.target,a=o!==n&&i!==n&&!i.contains(o),s=r!==n&&i!==n&&!i.contains(r);if(!this.keyPressed||!a&&!s){var l=this.translateMouseWheelToScroll(e);(t||this.scrollableElement!==n&&l)&&e.preventDefault()}}},{key:"onKeyDown",value:function(e){this.keyPressed=(0,l.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);var o=this.scrollVertically(n),i=this.scrollHorizontally(r);return o||i}},{key:"scrollVertically",value:function(e){var t=this.scrollableElement.scrollTop;return this.scrollableElement.scrollTop+=e,t!==this.scrollableElement.scrollTop}},{key:"scrollHorizontally",value:function(e){var t=this.scrollableElement.scrollLeft;return this.scrollableElement.scrollLeft+=e,t!==this.scrollableElement.scrollLeft}},{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,a.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(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.topOverlay.areElementSizesAdjusted&&this.leftOverlay.areElementSizesAdjusted){var t=this.wot.wtTable.wtRootElement.parentNode||this.wot.wtTable.wtRootElement,n=t.clientWidth,r=t.clientHeight;n===this.spreaderLastSize.width&&r===this.spreaderLastSize.height||(this.spreaderLastSize.width=n,this.spreaderLastSize.height=r,this.adjustElementsSize())}this.bottomOverlay.clone&&this.bottomOverlay.refresh(e),this.leftOverlay.refresh(e),this.topOverlay.refresh(e),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.refresh(e),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.clone&&this.bottomLeftCornerOverlay.refresh(e),this.debug&&this.debug.refresh(e)}},{key:"adjustElementsSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.wot,n=t.wtViewport,r=t.wtTable,o=this.wot.getSetting("totalColumns"),i=this.wot.getSetting("totalRows"),a=n.getRowHeaderWidth(),s=n.getColumnHeaderHeight(),l=r.hider.style;if(l.width="".concat(a+this.leftOverlay.sumCellSizes(0,o),"px"),l.height="".concat(s+this.topOverlay.sumCellSizes(0,i)+1,"px"),this.scrollbarSize>0){var u=r.wtRootElement,c=u.scrollHeight,h=u.scrollWidth,d=r.holder,f=d.scrollHeight,v=d.scrollWidth;this.hasScrollbarRight=c<f,this.hasScrollbarBottom=h<v,this.hasScrollbarRight&&r.hider.scrollWidth+this.scrollbarSize>h?this.hasScrollbarBottom=!0:this.hasScrollbarBottom&&r.hider.scrollHeight+this.scrollbarSize>c&&(this.hasScrollbarRight=!0)}this.topOverlay.adjustElementsSize(e),this.leftOverlay.adjustElementsSize(e),this.bottomOverlay.adjustElementsSize(e)}},{key:"applyToDOM",value:function(){this.wot.wtTable.isVisible()&&(this.topOverlay.areElementSizesAdjusted&&this.leftOverlay.areElementSizesAdjusted||this.adjustElementsSize(),this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.leftOverlay.applyToDOM())}},{key:"getParentOverlay",value:function(e){if(!e)return null;var t=[this.topOverlay,this.leftOverlay,this.bottomOverlay,this.topLeftCornerOverlay,this.bottomLeftCornerOverlay],n=null;return(0,s.arrayEach)(t,(function(t){t&&t.clone&&t.clone.wtTable.TABLE.contains(e)&&(n=t.clone)})),n}}]),e}();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=n(8),s=function(){function e(t){(0,o.default)(this,e),this.wot=t}return(0,i.default)(e,[{key:"scrollViewport",value:function(e,t,n,r,o){if(e.col<0||e.row<0)return!1;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;if(e>=0&&e<=Math.max(a-1,0)){var l=this.getFirstVisibleColumn(),u=this.getLastVisibleColumn();e>=o&&l>-1&&(e<l||n)?s=i.scrollTo(e):(-1===u||u>-1&&(e>u||t))&&(s=i.scrollTo(e,!0))}return 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;if(e>=0&&e<=Math.max(s-1,0)){var u=this.getFirstVisibleRow(),c=this.getLastVisibleRow();e>=i&&u>-1&&(e<u||t)?l=a.scrollTo(e):(-1===c||c>-1&&(e>c&&e<s-o||n))&&(l=a.scrollTo(e,!0))}return l}},{key:"getFirstVisibleRow",value:function(){var e=this._getVariables(),t=e.topOverlay,n=e.wtTable,r=e.wtViewport,o=e.totalRows,i=e.fixedRowsTop,s=this.wot.rootWindow,l=n.getFirstVisibleRow();if(t.mainTableScrollableElement===s){var u=(0,a.offset)(n.wtRootElement),c=(0,a.innerHeight)(n.hider),h=(0,a.innerHeight)(s),d=(0,a.getScrollTop)(s,s);if(u.top+c-h<=d){var f=r.getColumnHeaderHeight();f+=t.sumCellSizes(0,i);for(var v=o;v>0;v--)if(f+=t.sumCellSizes(v-1,v),u.top+c-f<=d){l=v;break}}}return l}},{key:"getLastVisibleRow",value:function(){var e=this._getVariables(),t=e.topOverlay,n=e.wtTable,r=e.wtViewport,o=e.totalRows,i=this.wot.rootWindow,s=n.getLastVisibleRow();if(t.mainTableScrollableElement===i){var l=(0,a.offset)(n.wtRootElement),u=(0,a.getScrollTop)(i,i);if(l.top>u)for(var c=(0,a.innerHeight)(i),h=r.getColumnHeaderHeight(),d=1;d<=o;d++)if(h+=t.sumCellSizes(d-1,d),l.top+h-u>=c){s=d-2;break}}return s}},{key:"getFirstVisibleColumn",value:function(){var e=this._getVariables(),t=e.leftOverlay,n=e.wtTable,r=e.wtViewport,o=e.totalColumns,i=this.wot.rootWindow,s=n.getFirstVisibleColumn();if(t.mainTableScrollableElement===i){var l=(0,a.offset)(n.wtRootElement),u=(0,a.innerWidth)(n.hider),c=(0,a.innerWidth)(i),h=(0,a.getScrollLeft)(i,i);if(l.left+u-c<=h)for(var d=r.getRowHeaderWidth(),f=o;f>0;f--)if(d+=t.sumCellSizes(f-1,f),l.left+u-d<=h){s=f;break}}return s}},{key:"getLastVisibleColumn",value:function(){var e=this._getVariables(),t=e.leftOverlay,n=e.wtTable,r=e.wtViewport,o=e.totalColumns,i=this.wot.rootWindow,s=n.getLastVisibleColumn();if(t.mainTableScrollableElement===i){var l=(0,a.offset)(n.wtRootElement),u=(0,a.getScrollLeft)(i,i);if(l.left>u)for(var c=(0,a.innerWidth)(i),h=r.getRowHeaderWidth(),d=1;d<=o;d++)if(h+=t.sumCellSizes(d-1,d),l.left+h-u>=c){s=d-2;break}}return s}},{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")}}}]),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)),a=n(8),s=n(4),l=function(){function e(t,n){var r=this;(0,o.default)(this,e),this.wot=t,this.instance=t,this.defaults={table:void 0,debug:!1,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,preventOverflow:function(){return!1},preventWheel:!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 o=r.getSetting("data",e,t);(0,a.fastInnerText)(n,null==o?"":o)},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])r.settings[t]=n[t];else{if(void 0===e)throw new Error('A required setting "'.concat(t,'" was not provided'));r.settings[t]=e}}))}return(0,i.default)(e,[{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]}}]),e}();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=n(8),s=n(4),l=r(n(25)),u=n(440),c=function(){function e(t){var n=this;(0,o.default)(this,e),this.wot=t,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 l.default(this.wot),this.eventManager.addEventListener(this.wot.rootWindow,"resize",(function(){n.clientHeight=n.getWorkspaceHeight()}))}return(0,i.default)(e,[{key:"getWorkspaceHeight",value:function(){var e=this.wot.rootDocument,t=this.instance.wtOverlays.topOverlay.trimmingContainer,n=0;t===this.wot.rootWindow?n=e.documentElement.clientHeight:n=(0,a.outerHeight)(t)>0&&t.clientHeight>0?t.clientHeight:1/0;return n}},{key:"getWorkspaceWidth",value:function(){var e,t,n=this.wot,r=n.rootDocument,o=n.rootWindow,i=this.instance.wtOverlays.leftOverlay.trimmingContainer,s=r.documentElement.offsetWidth,l=n.getSetting("totalColumns");if(n.getSetting("preventOverflow"))return(0,a.outerWidth)(this.instance.wtTable.wtRootElement);if(e=n.getSetting("freezeOverlays")?Math.min(s-this.getWorkspaceOffset().left,s):Math.min(this.getContainerFillWidth(),s-this.getWorkspaceOffset().left,s),i===o&&l>0&&this.sumColumnWidths(0,l-1)>e)return r.documentElement.clientWidth;if(i!==o&&("scroll"===(t=(0,a.getStyle)(this.instance.wtOverlays.leftOverlay.trimmingContainer,"overflow",o))||"hidden"===t||"auto"===t))return Math.max(e,i.clientWidth);var u=n.getSetting("stretchH");return"none"!==u&&u?e:Math.max(e,(0,a.outerWidth)(this.instance.wtTable.TABLE))}},{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,a.offset)(this.wot.wtTable.TABLE)}},{key:"getWorkspaceActualHeight",value:function(){return(0,a.outerHeight)(this.wot.wtTable.TABLE)}},{key:"getWorkspaceActualWidth",value:function(){var e=this.wot.wtTable;return(0,a.outerWidth)(e.TABLE)||(0,a.outerWidth)(e.TBODY)||(0,a.outerWidth)(e.THEAD)}},{key:"getColumnHeaderHeight",value:function(){return this.instance.getSetting("columnHeaders").length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=(0,a.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 t>0&&(e-=t),e}},{key:"getRowHeaderWidth",value:function(){var e=this.instance.getSetting("rowHeaderWidth"),t=this.instance.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(var n=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){var o=this.instance.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(var i=0,s=t.length;i<s;i++)o?(this.rowHeaderWidth+=(0,a.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 t>0?e-t:e}},{key:"createRowsCalculator",value:function(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.RENDER_TYPE,o=this.wot,i=o.wtSettings,s=o.wtOverlays,l=o.wtTable,c=o.rootDocument;this.rowHeaderWidth=NaN,e=i.settings.renderAllRows&&r===u.RENDER_TYPE?1/0:this.getViewportHeight();var h=s.topOverlay.getScrollPosition()-s.topOverlay.getTableParentOffset();h<0&&(h=0);var d=o.getSetting("fixedRowsTop"),f=o.getSetting("fixedRowsBottom"),v=o.getSetting("totalRows");return d&&(h+=n=s.topOverlay.sumCellSizes(0,d),e-=n),f&&s.bottomOverlay.clone&&(e-=n=s.bottomOverlay.sumCellSizes(v-f,v)),t=l.holder.clientHeight===l.holder.offsetHeight?0:(0,a.getScrollbarWidth)(c),new u.ViewportRowsCalculator({viewportSize:e,scrollOffset:h,totalItems:o.getSetting("totalRows"),itemSizeFn:function(e){return l.getRowHeight(e)},overrideFn:i.settings.viewportRowCalculatorOverride,calculationType:r,scrollbarHeight:t})}},{key:"createColumnsCalculator",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.RENDER_TYPE,t=this.wot,n=t.wtSettings,r=t.wtOverlays,o=t.wtTable,i=t.rootDocument,s=this.getViewportWidth(),l=r.leftOverlay.getScrollPosition()-r.leftOverlay.getTableParentOffset();this.columnHeaderHeight=NaN,l<0&&(l=0);var c=t.getSetting("fixedColumnsLeft");if(c){var h=r.leftOverlay.sumCellSizes(0,c);l+=h,s-=h}return o.holder.clientWidth!==o.holder.offsetWidth&&(s-=(0,a.getScrollbarWidth)(i)),new u.ViewportColumnsCalculator({viewportSize:s,scrollOffset:l,totalItems:t.getSetting("totalColumns"),itemSizeFn:function(e){return t.wtTable.getColumnWidth(e)},overrideFn:n.settings.viewportColumnCalculatorOverride,calculationType:e,stretchMode:t.getSetting("stretchH"),stretchingItemWidthFn:function(e,n){return t.getSetting("onBeforeStretchingColumnWidth",e,n)}})}},{key:"createRenderCalculators",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=e;if(t){var n=this.createRowsCalculator(u.FULLY_VISIBLE_TYPE),r=this.createColumnsCalculator(u.FULLY_VISIBLE_TYPE);this.areAllProposedVisibleRowsAlreadyRendered(n)&&this.areAllProposedVisibleColumnsAlreadyRendered(r)||(t=!1)}return t||(this.rowsRenderCalculator=this.createRowsCalculator(u.RENDER_TYPE),this.columnsRenderCalculator=this.createColumnsCalculator(u.RENDER_TYPE)),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,t}},{key:"createVisibleCalculators",value:function(){this.rowsVisibleCalculator=this.createRowsCalculator(u.FULLY_VISIBLE_TYPE),this.columnsVisibleCalculator=this.createColumnsCalculator(u.FULLY_VISIBLE_TYPE)}},{key:"areAllProposedVisibleRowsAlreadyRendered",value:function(e){if(!this.rowsVisibleCalculator)return!1;var t=e.startRow,n=e.endRow,r=this.rowsRenderCalculator,o=r.startRow,i=r.endRow;return!(t<o||t===o&&t>0)&&!(n>i||n===i&&n<this.wot.getSetting("totalRows")-1)}},{key:"areAllProposedVisibleColumnsAlreadyRendered",value:function(e){if(!this.columnsVisibleCalculator)return!1;var t=e.startColumn,n=e.endColumn,r=this.columnsRenderCalculator,o=r.startColumn,i=r.endColumn;return!(t<o||t===o&&t>0)&&!(n>i||n===i&&n<this.wot.getSetting("totalColumns")-1)}},{key:"resetHasOversizedColumnHeadersMarked",value:function(){(0,s.objectEach)(this.hasOversizedColumnHeadersMarked,(function(e,t,n){n[t]=void 0}))}}]),e}();t.default=c},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=function(e){var t=(0,o.default)(e);return(0,i.default)(t)};var o=r(n(445)),i=r(n(446))},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r={getFirstRenderedRow:function(){var e=this.wot.wtViewport.rowsRenderCalculator.startRow;return null===e?-1:e},getFirstVisibleRow:function(){var e=this.wot.wtViewport.rowsVisibleCalculator.startRow;return null===e?-1:e},getLastRenderedRow:function(){var e=this.wot.wtViewport.rowsRenderCalculator.endRow;return null===e?-1:e},getLastVisibleRow:function(){var e=this.wot.wtViewport.rowsVisibleCalculator.endRow;return null===e?-1:e},getRenderedRowsCount:function(){return this.wot.wtViewport.rowsRenderCalculator.count},getVisibleRowsCount:function(){return this.wot.wtViewport.rowsVisibleCalculator.count}};(0,n(4).defineGetter)(r,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});var o=r;t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r={getFirstRenderedRow:function(){return 0===this.wot.getSetting("totalRows")?-1:0},getFirstVisibleRow:function(){return this.getFirstRenderedRow()},getLastRenderedRow:function(){return this.getRenderedRowsCount()-1},getLastVisibleRow:function(){return this.getLastRenderedRow()},getRenderedRowsCount:function(){var e=this.wot.getSetting("totalRows");return Math.min(this.wot.getSetting("fixedRowsTop"),e)},getVisibleRowsCount:function(){return this.getRenderedRowsCount()}};(0,n(4).defineGetter)(r,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});var o=r;t.default=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r={getFirstRenderedRow:function(){var e=this.wot.getSetting("totalRows")-this.wot.getSetting("fixedRowsBottom");return e<0?-1:e},getFirstVisibleRow:function(){return this.getFirstRenderedRow()},getLastRenderedRow:function(){return this.wot.getSetting("totalRows")-1},getLastVisibleRow:function(){return this.getLastRenderedRow()},getRenderedRowsCount:function(){var e=this.wot.getSetting("totalRows");return Math.min(this.wot.getSetting("fixedRowsBottom"),e)},getVisibleRowsCount:function(){return this.getRenderedRowsCount()}};(0,n(4).defineGetter)(r,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});var o=r;t.default=o},function(e,t,n){"use strict";var r=n(0);n(27),n(48),n(35),t.__esModule=!0,t.default=void 0;var o=r(n(18)),i=r(n(1)),a=r(n(2)),s=n(8),l=n(32),u=n(4),c=n(76),h=r(n(25)),d=r(n(111)),f=function(){function e(t,n){(0,i.default)(this,e),n&&(this.eventManager=new h.default(t),this.instance=t,this.wot=t,this.settings=n,this.mouseDown=!1,this.main=null,this.cornerDefaultStyle={width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"},this.corner=null,this.cornerStyle=null,this.createElements(n),this.registerListeners())}return(0,a.default)(e,[{key:"registerListeners",value:function(){var e=this,t=this.wot.rootDocument.body;this.eventManager.addEventListener(t,"mousedown",(function(){return e.onMouseDown()})),this.eventManager.addEventListener(t,"mouseup",(function(){return e.onMouseUp()}));for(var n=function(t,n){e.eventManager.addEventListener(e.main.childNodes[t],"mouseenter",(function(n){return e.onMouseEnter(n,e.main.childNodes[t])}))},r=0,o=this.main.childNodes.length;r<o;r++)n(r)}},{key:"onMouseDown",value:function(){this.mouseDown=!0}},{key:"onMouseUp",value:function(){this.mouseDown=!1}},{key:"onMouseEnter",value:function(e,t){if(this.mouseDown&&this.wot.getSetting("hideBorderOnMouseDownOver")){e.preventDefault(),(0,l.stopImmediatePropagation)(e);var n=this,r=this.wot.rootDocument.body,o=t.getBoundingClientRect();t.style.display="none",this.eventManager.addEventListener(r,"mousemove",(function e(i){var a;((a=i).clientY<Math.floor(o.top)||a.clientY>Math.ceil(o.top+o.height)||a.clientX<Math.floor(o.left)||a.clientX>Math.ceil(o.left+o.width))&&(n.eventManager.removeEventListener(r,"mousemove",e),t.style.display="block")}))}}},{key:"createElements",value:function(e){var t=this.wot.rootDocument;this.main=t.createElement("div");var n=this.main.style;n.position="absolute",n.top=0,n.left=0;var r=t.createElement("div");r.className="wtBorder ".concat(this.settings.className||""),(n=r.style).height=this.settings.corner&&this.settings.corner.width?"".concat(this.settings.corner.width,"px"):"".concat(e.border.width,"px"),n.width=this.settings.corner&&this.settings.corner.width?"".concat(this.settings.corner.width,"px"):"".concat(e.border.width,"px"),this.main.appendChild(r),this.corner=r,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,c.isMobileBrowser)()&&this.createMultipleSelectorHandles(),this.disappear();var o=this.wot.wtTable,i=o.selectionHandlesHolder;i||((i=t.createElement("div")).className="htBorders",o.selectionHandlesHolder=i,o.spreader.appendChild(i)),i.appendChild(this.main)}},{key:"createMultipleSelectorHandles",value:function(){var e=this,t=this.wot.rootDocument;this.selectionHandles={topLeft:t.createElement("DIV"),topLeftHitArea:t.createElement("DIV"),bottomRight:t.createElement("DIV"),bottomRightHitArea:t.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 n={position:"absolute",height:"".concat(40,"px"),width:"".concat(40,"px"),"border-radius":"".concat(parseInt(40/1.5,10),"px")};(0,u.objectEach)(n,(function(t,n){e.selectionHandles.styles.bottomRightHitArea[n]=t,e.selectionHandles.styles.topLeftHitArea[n]=t}));var r={position:"absolute",height:"".concat(10,"px"),width:"".concat(10,"px"),"border-radius":"".concat(parseInt(10/1.5,10),"px"),background:"#FFFFFF","border-width":"1px","border-style":"solid"};(0,u.objectEach)(r,(function(t,n){e.selectionHandles.styles.bottomRight[n]=t,e.selectionHandles.styles.topLeft[n]=t})),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),l=this.settings.corner&&this.settings.corner.color?this.settings.corner.color:this.settings.border.color;this.selectionHandles.styles.topLeft.borderColor=l,this.selectionHandles.styles.bottomRight.borderColor=l,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,i,a=this.wot,l=a.wtTable,u=a.rootDocument,h=a.rootWindow,f=l.getRenderedRowsCount(),v=0;v<f;v+=1){var g=l.rowFilter.renderedToSource(v);if(g>=e[0]&&g<=e[2]){t=g;break}}for(var p=f-1;p>=0;p-=1){var m=l.rowFilter.renderedToSource(p);if(m>=e[0]&&m<=e[2]){n=m;break}}for(var y=l.getRenderedColumnsCount(),w=0;w<y;w+=1){var C=l.columnFilter.renderedToSource(w);if(C>=e[1]&&C<=e[3]){r=C;break}}for(var E=y-1;E>=0;E-=1){var S=l.columnFilter.renderedToSource(E);if(S>=e[1]&&S<=e[3]){i=S;break}}if(void 0!==t&&void 0!==r){var b=l.getCell(new d.default(t,r)),R=t!==n||r!==i,T=R?l.getCell(new d.default(n,i)):b,M=(0,s.offset)(b),O=R?(0,s.offset)(T):M,k=(0,s.offset)(l.TABLE),N=M.top,_=M.left,A=_-k.left-1,I=O.left+(0,s.outerWidth)(T)-_;if(this.isEntireColumnSelected(t,n)){var D=this.getDimensionsFromHeader("columns",r,i,k),L=null;if(D){var x=(0,o.default)(D,3);L=x[0],A=x[1],I=x[2]}L&&(b=L)}var H=N-k.top-1,P=O.top+(0,s.outerHeight)(T)-N;if(this.isEntireRowSelected(r,i)){var F=this.getDimensionsFromHeader("rows",t,n,k),B=null;if(F){var V=(0,o.default)(F,3);B=V[0],H=V[1],P=V[2]}B&&(b=B)}var W=(0,s.getComputedStyle)(b,h);parseInt(W.borderTopWidth,10)>0&&(H+=1,P=P>0?P-1:0),parseInt(W.borderLeftWidth,10)>0&&(A+=1,I=I>0?I-1:0);var U=this.settings.border.cornerVisible;U="function"==typeof U?U(this.settings.layerLevel):U;var Y=this.wot.getSetting("onModifyGetCellCoords",n,i),j=n,z=i;if(Y&&Array.isArray(Y)){var G=(0,o.default)(Y,4);j=G[2],z=G[3]}if((0,c.isMobileBrowser)()||!U||this.isPartRange(j,z))this.cornerStyle.display="none";else{this.cornerStyle.top="".concat(H+P-4,"px"),this.cornerStyle.left="".concat(A+I-4,"px"),this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.backgroundColor=this.settings.corner&&this.settings.corner.color?this.settings.corner.color:this.settings.border.color,this.cornerStyle.display="none";var X=(0,s.getTrimmingContainer)(l.TABLE),K=X===h;if(K&&(X=u.documentElement),i===this.wot.getSetting("totalColumns")-1)(K?T.getBoundingClientRect().left:T.offsetLeft)+(0,s.outerWidth)(T)+parseInt(this.cornerDefaultStyle.width,10)/2>=(0,s.innerWidth)(X)&&(this.cornerStyle.left="".concat(Math.floor(A+I-3-parseInt(this.cornerDefaultStyle.width,10)/2),"px"),this.cornerStyle.borderRightWidth=0);if(n===this.wot.getSetting("totalRows")-1)(K?T.getBoundingClientRect().top:T.offsetTop)+(0,s.outerHeight)(T)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,s.innerHeight)(X)&&(this.cornerStyle.top="".concat(Math.floor(H+P-3-parseInt(this.cornerDefaultStyle.height,10)/2),"px"),this.cornerStyle.borderBottomWidth=0);this.cornerStyle.display="block"}(0,c.isMobileBrowser)()&&this.updateMultipleSelectionHandlesPosition(n,i,H,A,I,P)}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,l=null,u=null,c=null,h=null,d=null,f=null,v=null;switch(e){case"rows":a=function(){return o.getRowHeader.apply(o,arguments)},l=function(){return s.outerHeight.apply(void 0,arguments)},u="ht__selection--rows",d="top";break;case"columns":a=function(){return o.getColumnHeader.apply(o,arguments)},l=function(){return s.outerWidth.apply(void 0,arguments)},u="ht__selection--columns",d="left"}if(i.className.includes(u)){var g=this.wot.getSetting("columnHeaders").length;if(f=a(t,g-1),v=a(n,g-1),!f||!v)return!1;var p=(0,s.offset)(f),m=(0,s.offset)(v);return f&&v&&(c=p[d]-r[d]-1,h=m[d]+l(v)-p[d]),[f,c,h]}return!1}},{key:"disappear",value:function(){this.cornerStyle.display="none",(0,c.isMobileBrowser)()&&(this.selectionHandles.styles.topLeft.display="none",this.selectionHandles.styles.bottomRight.display="none")}},{key:"destroy",value:function(){this.eventManager.destroyWithOwnEventsOnly(),this.main.parentNode.removeChild(this.main)}}]),e}();t.default=f},function(e,t,n){"use strict";var r=n(0);n(41),n(139),n(15),n(11),n(72),n(9),n(12),n(42),n(23),n(13),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(6)),s=r(n(30)),l=r(n(5)),u=r(n(16)),c=r(n(7)),h=n(59),d=n(24),f=n(77),v=n(3),g=n(43),p=n(8),m=r(n(362)),y=new WeakMap,w=function(e){function t(e){var n;return(0,o.default)(this,t),(n=(0,a.default)(this,(0,l.default)(t).call(this,e))).query=null,n.strippedChoices=[],n.rawChoices=[],y.set((0,s.default)(n),{skipOne:!1,isMacOS:n.hot.rootWindow.navigator.platform.indexOf("Mac")>-1}),n}return(0,c.default)(t,e),(0,i.default)(t,[{key:"getValue",value:function(){var e=this,t=this.rawChoices.find((function(t){return e.stripValueIfNeeded(t)===e.TEXTAREA.value}));return(0,d.isDefined)(t)?t:this.TEXTAREA.value}},{key:"createElements",value:function(){(0,u.default)((0,l.default)(t.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 e=this,n=y.get(this);this.TEXTAREA_PARENT.style.overflow="auto",(0,u.default)((0,l.default)(t.prototype),"open",this).call(this),this.TEXTAREA_PARENT.style.overflow="";var r=this.htEditor.getInstance(),o=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown;this.showEditableElement(),this.focus();var i=(0,p.getScrollbarWidth)();0===i&&n.isMacOS&&(i+=15),r.updateSettings({colWidths:o?[(0,p.outerWidth)(this.TEXTAREA)-2]:void 0,width:o?(0,p.outerWidth)(this.TEXTAREA)+i:void 0,renderer:function(t,n,r,o,i,a,s){(0,g.getRenderer)("text")(t,n,r,o,i,a,s);var l,u,c=e.cellProperties,h=c.filteringCaseSensitive,f=c.allowHtml,v=e.query,p=(0,d.stringify)(a);p&&!f&&-1!==(l=!0===h?p.indexOf(v):p.toLowerCase().indexOf(v.toLowerCase()))&&(u=p.substr(l,v.length),p=p.replace(u,"<strong>".concat(u,"</strong>"))),n.innerHTML=p},autoColumnSize:!0}),n.skipOne&&(n.skipOne=!1),this.hot._registerTimeout((function(){e.queryChoices(e.TEXTAREA.value)}))}},{key:"close",value:function(){this.removeHooksByKey("beforeKeyDown"),(0,u.default)((0,l.default)(t.prototype),"close",this).call(this)}},{key:"discardEditor",value:function(e){(0,u.default)((0,l.default)(t.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 n=(0,p.getCaretPosition)(this.TEXTAREA),r=(0,p.getSelectionEndPosition)(this.TEXTAREA),o=this.cellProperties.sortByRelevance,i=this.cellProperties.filter,a=null,s=null,l=e;o&&(a=t.sortByRelevance(this.stripValueIfNeeded(this.getValue()),l,this.cellProperties.filteringCaseSensitive));var u=Array.isArray(a)?a.length:0;if(!1===i)u&&(s=a[0]);else{for(var c=[],h=0,d=l.length;h<d&&!(o&&u<=h);h++)u?c.push(l[a[h]]):c.push(l[h]);s=0,l=c}this.strippedChoices=l,this.htEditor.loadData((0,v.pivot)([l])),this.updateDropdownHeight(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(s),this.hot.listen(!1),(0,p.setCaretPosition)(this.TEXTAREA,n,n===r?void 0:r)}},{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=n>l&&s>l;return u?this.flipDropdown(n):this.unflipDropdown(),this.limitDropdownIfNeeded(u?s:l,n),u}},{key:"limitDropdownIfNeeded",value:function(e,t){if(t>e){var n,r=0,o=0,i=0;do{r+=i=this.htEditor.getRowHeight(o)||this.htEditor.view.wt.wtSettings.settings.defaultRowHeight,o+=1}while(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,v.arrayMap)(e,(function(e){return(0,d.stringify)(e)}));return(0,v.arrayMap)(n,(function(e){return t?e:(0,f.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&&n>0&&n<this.htEditor.countRows()-1&&(r=!0),e===h.KEY_CODES.ARROW_UP&&n>-1&&(r=!0),r}},{key:"onBeforeKeyDown",value:function(e){var n=this,r=y.get(this);if(r.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 o=0;if(e.keyCode===h.KEY_CODES.C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(o+=10),this.htEditor&&this.hot._registerTimeout((function(){n.queryChoices(n.TEXTAREA.value),r.skipOne=!0}),o)}(0,u.default)((0,l.default)(t.prototype),"onBeforeKeyDown",this).call(this,e)}}]),t}(m.default);w.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,f.stripTags)((0,d.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 C=w;t.default=C},function(e,t,n){var r;e.exports=function e(t,n,o){function i(s,l){if(!n[s]){if(!t[s]){if(!l&&"function"==typeof r&&r)return r(s,!0);if(a)return a(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[s]={exports:{}};t[s][0].call(c.exports,(function(e){return i(t[s][1][e]||e)}),c,c.exports,e,t,n,o)}return n[s].exports}for(var a="function"==typeof r&&r,s=0;s<o.length;s++)i(o[s]);return i}({1:[function(e,t,n){!function(e){"use strict";function n(e){var t=0|e;return e>0||e===t?t:t-1}function r(e){for(var t,n,r=1,o=e.length,i=e[0]+"";r<o;){for(t=e[r++]+"",n=C-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 l>u^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:l>u^n?1:-1}function i(e,t,n){return(e=c(e))>=t&&e<=n}function a(e){return"[object Array]"==Object.prototype.toString.call(e)}function s(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 l(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function u(e,t){var n,r;if(t<0){for(r="0.";++t;r+="0");e=r+e}else if(++t>(n=e.length)){for(r="0",t-=n;--t;r+="0");e+=r}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}function c(e){return(e=parseFloat(e))<0?f(e):v(e)}var h,d=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,f=Math.ceil,v=Math.floor,g=" not a boolean or binary digit",p="rounding mode",m="number type has more than 15 significant digits",y="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",w=1e14,C=14,E=9007199254740991,S=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],b=1e7,R=1e9;(h=function e(t){function h(e,t){var n,r,o,i,a,s,l=this;if(!(l instanceof h))return Y&&_(26,"constructor call without new",e),new h(e,t);if(null!=t&&j(t,2,64,L,"base")){if(s=e+"",10==(t|=0))return A(l=new h(e instanceof h?e:s),P+l.e+1,F);if((i="number"==typeof e)&&0*e!=0||!new RegExp("^-?"+(n="["+y.slice(0,t)+"]+")+"(?:\\."+n+")?$",t<37?"i":"").test(s))return D(l,s,i,t);i?(l.s=1/e<0?(s=s.slice(1),-1):1,Y&&s.replace(/^0\.0*|\./,"").length>15&&_(L,m,e),i=!1):l.s=45===s.charCodeAt(0)?(s=s.slice(1),-1):1,s=T(s,10,t,l.s)}else{if(e instanceof h)return l.s=e.s,l.e=e.e,l.c=(e=e.c)?e.slice():e,void(L=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;o>=10;o/=10,r++);return l.e=r,l.c=[e],void(L=0)}s=e+""}else{if(!d.test(s=e+""))return D(l,s,i);l.s=45===s.charCodeAt(0)?(s=s.slice(1),-1):1}}for((r=s.indexOf("."))>-1&&(s=s.replace(".","")),(o=s.search(/e/i))>0?(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&&Y&&a>15&&(e>E||e!==v(e))&&_(L,m,l.s*e),(r=r-o-1)>U)l.c=l.e=null;else if(r<W)l.c=[l.e=0];else{if(l.e=r,l.c=[],o=(r+1)%C,r<0&&(o+=C),o<a){for(o&&l.c.push(+s.slice(0,o)),a-=C;o<a;)l.c.push(+s.slice(o,o+=C));s=s.slice(o),o=C-s.length}else o-=a;for(;o--;s+="0");l.c.push(+s)}else l.c=[l.e=0];L=0}function T(e,t,n,o){var i,a,l,c,d,f,v,g=e.indexOf("."),p=P,m=F;for(n<37&&(e=e.toLowerCase()),g>=0&&(l=X,X=0,e=e.replace(".",""),d=(v=new h(n)).pow(e.length-g),X=l,v.c=s(u(r(d.c),d.e),10,t),v.e=v.c.length),a=l=(f=s(e,n,t)).length;0==f[--l];f.pop());if(!f[0])return"0";if(g<0?--a:(d.c=f,d.e=a,d.s=o,f=(d=I(d,v,p,m,t)).c,c=d.r,a=d.e),g=f[i=a+p+1],l=t/2,c=c||i<0||null!=f[i+1],c=m<4?(null!=g||c)&&(0==m||m==(d.s<0?3:2)):g>l||g==l&&(4==m||c||6==m&&1&f[i-1]||m==(d.s<0?8:7)),i<1||!f[0])e=c?u("1",-p):"0";else{if(f.length=i,c)for(--t;++f[--i]>t;)f[i]=0,i||(++a,f=[1].concat(f));for(l=f.length;!f[--l];);for(g=0,e="";g<=l;e+=y.charAt(f[g++]));e=u(e,a)}return e}function M(e,t,n,o){var i,a,s,c,d;if(n=null!=n&&j(n,0,8,o,p)?0|n:F,!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)d=r(e.c),d=19==o||24==o&&s<=B?l(d,s):u(d,s);else if(a=(e=A(new h(e),t,n)).e,c=(d=r(e.c)).length,19==o||24==o&&(t<=a||a<=B)){for(;c<t;d+="0",c++);d=l(d,a)}else if(t-=s,d=u(d,a),a+1>c){if(--t>0)for(d+=".";t--;d+="0");}else if((t+=a-c)>0)for(a+1==c&&(d+=".");t--;d+="0");return e.s<0&&i?"-"+d:d}function O(e,t){var n,r,o=0;for(a(e[0])&&(e=e[0]),n=new h(e[0]);++o<e.length;){if(!(r=new h(e[o])).s){n=r;break}t.call(n,r)&&(n=r)}return n}function k(e,t,n,r,o){return(e<t||e>n||e!=c(e))&&_(r,(o||"decimal places")+(e<t||e>n?" out of range":" not an integer"),e),!0}function N(e,t,n){for(var r=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,r++);return(n=r+n*C-1)>U?e.c=e.e=null:n<W?e.c=[e.e=0]:(e.e=n,e.c=t),e}function _(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",L=0,r}function A(e,t,n,r){var o,i,a,s,l,u,c,h=e.c,d=S;if(h){e:{for(o=1,s=h[0];s>=10;s/=10,o++);if((i=t-o)<0)i+=C,a=t,c=(l=h[u=0])/d[o-a-1]%10|0;else if((u=f((i+1)/C))>=h.length){if(!r)break e;for(;h.length<=u;h.push(0));l=c=0,o=1,a=(i%=C)-C+1}else{for(l=s=h[u],o=1;s>=10;s/=10,o++);c=(a=(i%=C)-C+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)):c>5||5==c&&(4==n||r||6==n&&(i>0?a>0?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[(C-t%C)%C],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[C-i],h[u]=a>0?v(l/d[o-a]%d[a])*s:0),r)for(;;){if(0==u){for(i=1,a=h[0];a>=10;a/=10,i++);for(a=h[0]+=s,s=1;a>=10;a/=10,s++);i!=s&&(e.e++,h[0]==w&&(h[0]=1));break}if(h[u]+=s,h[u]!=w)break;h[u--]=0,s=1}for(i=h.length;0===h[--i];h.pop());}e.e>U?e.c=e.e=null:e.e<W&&(e.c=[e.e=0])}return e}var I,D,L=0,x=h.prototype,H=new h(1),P=20,F=4,B=-7,V=21,W=-1e7,U=1e7,Y=!0,j=k,z=!1,G=1,X=0,K={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0};return h.another=e,h.ROUND_UP=0,h.ROUND_DOWN=1,h.ROUND_CEIL=2,h.ROUND_FLOOR=3,h.ROUND_HALF_UP=4,h.ROUND_HALF_DOWN=5,h.ROUND_HALF_EVEN=6,h.ROUND_HALF_CEIL=7,h.ROUND_HALF_FLOOR=8,h.EUCLID=9,h.config=h.set=function(){var e,t,n=0,r={},o=arguments,s=o[0],l=s&&"object"==typeof s?function(){if(s.hasOwnProperty(t))return null!=(e=s[t])}:function(){if(o.length>n)return null!=(e=o[n++])};return l(t="DECIMAL_PLACES")&&j(e,0,R,2,t)&&(P=0|e),r[t]=P,l(t="ROUNDING_MODE")&&j(e,0,8,2,t)&&(F=0|e),r[t]=F,l(t="EXPONENTIAL_AT")&&(a(e)?j(e[0],-R,0,2,t)&&j(e[1],0,R,2,t)&&(B=0|e[0],V=0|e[1]):j(e,-R,R,2,t)&&(B=-(V=0|(e<0?-e:e)))),r[t]=[B,V],l(t="RANGE")&&(a(e)?j(e[0],-R,-1,2,t)&&j(e[1],1,R,2,t)&&(W=0|e[0],U=0|e[1]):j(e,-R,R,2,t)&&(0|e?W=-(U=0|(e<0?-e:e)):Y&&_(2,t+" cannot be zero",e))),r[t]=[W,U],l(t="ERRORS")&&(e===!!e||1===e||0===e?(L=0,j=(Y=!!e)?k:i):Y&&_(2,t+g,e)),r[t]=Y,l(t="CRYPTO")&&(!0===e||!1===e||1===e||0===e?e?!(e="undefined"==typeof crypto)&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?z=!0:Y?_(2,"crypto unavailable",e?void 0:crypto):z=!1:z=!1:Y&&_(2,t+g,e)),r[t]=z,l(t="MODULO_MODE")&&j(e,0,9,2,t)&&(G=0|e),r[t]=G,l(t="POW_PRECISION")&&j(e,0,R,2,t)&&(X=0|e),r[t]=X,l(t="FORMAT")&&("object"==typeof e?K=e:Y&&_(2,t+" not an object",e)),r[t]=K,r},h.max=function(){return O(arguments,x.lt)},h.min=function(){return O(arguments,x.gt)},h.random=function(){var e=9007199254740992*Math.random()&2097151?function(){return v(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var n,r,o,i,a,s=0,l=[],u=new h(H);if(t=null!=t&&j(t,0,R,14)?0|t:P,i=f(t/C),z)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(i*=2));s<i;)(a=131072*n[s]+(n[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[s]=r[0],n[s+1]=r[1]):(l.push(a%1e14),s+=2);s=i/2}else if(crypto.randomBytes){for(n=crypto.randomBytes(i*=7);s<i;)(a=281474976710656*(31&n[s])+1099511627776*n[s+1]+4294967296*n[s+2]+16777216*n[s+3]+(n[s+4]<<16)+(n[s+5]<<8)+n[s+6])>=9e15?crypto.randomBytes(7).copy(n,s):(l.push(a%1e14),s+=7);s=i/7}else z=!1,Y&&_(14,"crypto unavailable",crypto);if(!z)for(;s<i;)(a=e())<9e15&&(l[s++]=a%1e14);for(i=l[--s],t%=C,i&&t&&(a=S[C-t],l[s]=v(i/a)*a);0===l[s];l.pop(),s--);if(s<0)l=[o=0];else{for(o=-1;0===l[0];l.splice(0,1),o-=C);for(s=1,a=l[0];a>=10;a/=10,s++);s<C&&(o-=C-s)}return u.e=o,u.c=l,u}}(),I=function(){function e(e,t,n){var r,o,i,a,s=0,l=e.length,u=t%b,c=t/b|0;for(e=e.slice();l--;)s=((o=u*(i=e[l]%b)+(r=c*i+(a=e[l]/b|0)*u)%b*b+s)/n|0)+(r/b|0)+c*a,e[l]=o%n;return s&&(e=[s].concat(e)),e}function t(e,t,n,r){var o,i;if(n!=r)i=n>r?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 r(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]&&e.length>1;e.splice(0,1));}return function(o,i,a,s,l){var u,c,d,f,g,p,m,y,E,S,b,R,T,M,O,k,N,_=o.s==i.s?1:-1,I=o.c,D=i.c;if(!(I&&I[0]&&D&&D[0]))return new h(o.s&&i.s&&(I?!D||I[0]!=D[0]:D)?I&&0==I[0]||!D?0*_:_/0:NaN);for(E=(y=new h(_)).c=[],_=a+(c=o.e-i.e)+1,l||(l=w,c=n(o.e/C)-n(i.e/C),_=_/C|0),d=0;D[d]==(I[d]||0);d++);if(D[d]>(I[d]||0)&&c--,_<0)E.push(1),f=!0;else{for(M=I.length,k=D.length,d=0,_+=2,(g=v(l/(D[0]+1)))>1&&(D=e(D,g,l),I=e(I,g,l),k=D.length,M=I.length),T=k,b=(S=I.slice(0,k)).length;b<k;S[b++]=0);N=D.slice(),N=[0].concat(N),O=D[0],D[1]>=l/2&&O++;do{if(g=0,(u=t(D,S,k,b))<0){if(R=S[0],k!=b&&(R=R*l+(S[1]||0)),(g=v(R/O))>1)for(g>=l&&(g=l-1),m=(p=e(D,g,l)).length,b=S.length;1==t(p,S,m,b);)g--,r(p,k<m?N:D,m,l),m=p.length,u=1;else 0==g&&(u=g=1),m=(p=D.slice()).length;if(m<b&&(p=[0].concat(p)),r(S,p,b,l),b=S.length,-1==u)for(;t(D,S,k,b)<1;)g++,r(S,k<b?N:D,b,l),b=S.length}else 0===u&&(g++,S=[0]);E[d++]=g,S[0]?S[b++]=I[T]||0:(S=[I[T]],b=1)}while((T++<M||null!=S[0])&&_--);f=null!=S[0],E[0]||E.splice(0,1)}if(l==w){for(d=1,_=E[0];_>=10;_/=10,d++);A(y,a+(y.e=d+c*C-1)+1,s,f)}else y.e=c,y.r=+f;return y}}(),D=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,t=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,o=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(i,a,s,l){var u,c=s?a:a.replace(o,"");if(r.test(c))i.s=isNaN(c)?null:c<0?-1:1;else{if(!s&&(c=c.replace(e,(function(e,t,n){return u="x"==(n=n.toLowerCase())?16:"b"==n?2:8,l&&l!=u?e:t})),l&&(u=l,c=c.replace(t,"$1").replace(n,"0.$1")),a!=c))return new h(c,u);Y&&_(L,"not a"+(l?" base "+l:"")+" number",a),i.s=null}i.c=i.e=null,L=0}}(),x.absoluteValue=x.abs=function(){var e=new h(this);return e.s<0&&(e.s=1),e},x.ceil=function(){return A(new h(this),this.e+1,2)},x.comparedTo=x.cmp=function(e,t){return L=1,o(this,new h(e,t))},x.decimalPlaces=x.dp=function(){var e,t,r=this.c;if(!r)return null;if(e=((t=r.length-1)-n(this.e/C))*C,t=r[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},x.dividedBy=x.div=function(e,t){return L=3,I(this,new h(e,t),P,F)},x.dividedToIntegerBy=x.divToInt=function(e,t){return L=4,I(this,new h(e,t),0,1)},x.equals=x.eq=function(e,t){return L=5,0===o(this,new h(e,t))},x.floor=function(){return A(new h(this),this.e+1,3)},x.greaterThan=x.gt=function(e,t){return L=6,o(this,new h(e,t))>0},x.greaterThanOrEqualTo=x.gte=function(e,t){return L=7,1===(t=o(this,new h(e,t)))||0===t},x.isFinite=function(){return!!this.c},x.isInteger=x.isInt=function(){return!!this.c&&n(this.e/C)>this.c.length-2},x.isNaN=function(){return!this.s},x.isNegative=x.isNeg=function(){return this.s<0},x.isZero=function(){return!!this.c&&0==this.c[0]},x.lessThan=x.lt=function(e,t){return L=8,o(this,new h(e,t))<0},x.lessThanOrEqualTo=x.lte=function(e,t){return L=9,-1===(t=o(this,new h(e,t)))||0===t},x.minus=x.sub=function(e,t){var r,o,i,a,s=this,l=s.s;if(L=10,t=(e=new h(e,t)).s,!l||!t)return new h(NaN);if(l!=t)return e.s=-t,s.plus(e);var u=s.e/C,c=e.e/C,d=s.c,f=e.c;if(!u||!c){if(!d||!f)return d?(e.s=-t,e):new h(f?s:NaN);if(!d[0]||!f[0])return f[0]?(e.s=-t,e):new h(d[0]?s:3==F?-0:0)}if(u=n(u),c=n(c),d=d.slice(),l=u-c){for((a=l<0)?(l=-l,i=d):(c=u,i=f),i.reverse(),t=l;t--;i.push(0));i.reverse()}else for(o=(a=(l=d.length)<(t=f.length))?l:t,l=t=0;t<o;t++)if(d[t]!=f[t]){a=d[t]<f[t];break}if(a&&(i=d,d=f,f=i,e.s=-e.s),(t=(o=f.length)-(r=d.length))>0)for(;t--;d[r++]=0);for(t=w-1;o>l;){if(d[--o]<f[o]){for(r=o;r&&!d[--r];d[r]=t);--d[r],d[o]+=w}d[o]-=f[o]}for(;0==d[0];d.splice(0,1),--c);return d[0]?N(e,d,c):(e.s=3==F?-1:1,e.c=[e.e=0],e)},x.modulo=x.mod=function(e,t){var n,r,o=this;return L=11,e=new h(e,t),!o.c||!e.s||e.c&&!e.c[0]?new h(NaN):!e.c||o.c&&!o.c[0]?new h(o):(9==G?(r=e.s,e.s=1,n=I(o,e,0,3),e.s=r,n.s*=r):n=I(o,e,0,G),o.minus(n.times(e)))},x.negated=x.neg=function(){var e=new h(this);return e.s=-e.s||null,e},x.plus=x.add=function(e,t){var r,o=this,i=o.s;if(L=12,t=(e=new h(e,t)).s,!i||!t)return new h(NaN);if(i!=t)return e.s=-t,o.minus(e);var a=o.e/C,s=e.e/C,l=o.c,u=e.c;if(!a||!s){if(!l||!u)return new h(i/0);if(!l[0]||!u[0])return u[0]?e:new h(l[0]?o:0*i)}if(a=n(a),s=n(s),l=l.slice(),i=a-s){for(i>0?(s=a,r=u):(i=-i,r=l),r.reverse();i--;r.push(0));r.reverse()}for((i=l.length)-(t=u.length)<0&&(r=u,u=l,l=r,t=i),i=0;t;)i=(l[--t]=l[t]+u[t]+i)/w|0,l[t]=w===l[t]?0:l[t]%w;return i&&(l=[i].concat(l),++s),N(e,l,s)},x.precision=x.sd=function(e){var t,n,r=this,o=r.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(Y&&_(13,"argument"+g,e),e!=!!e&&(e=null)),!o)return null;if(t=(n=o.length-1)*C+1,n=o[n]){for(;n%10==0;n/=10,t--);for(n=o[0];n>=10;n/=10,t++);}return e&&r.e+1>t&&(t=r.e+1),t},x.round=function(e,t){var n=new h(this);return(null==e||j(e,0,R,15))&&A(n,~~e+this.e+1,null!=t&&j(t,0,8,15,p)?0|t:F),n},x.shift=function(e){var t=this;return j(e,-E,E,16,"argument")?t.times("1e"+c(e)):new h(t.c&&t.c[0]&&(e<-E||e>E)?t.s*(e<0?0:1/0):t)},x.squareRoot=x.sqrt=function(){var e,t,o,i,a,s=this,l=s.c,u=s.s,c=s.e,d=P+4,f=new h("0.5");if(1!==u||!l||!l[0])return new h(!u||u<0&&(!l||l[0])?NaN:l?s:1/0);if(0==(u=Math.sqrt(+s))||u==1/0?(((t=r(l)).length+c)%2==0&&(t+="0"),u=Math.sqrt(t),c=n((c+1)/2)-(c<0||c%2),o=new h(t=u==1/0?"1e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):o=new h(u+""),o.c[0])for((u=(c=o.e)+d)<3&&(u=0);;)if(a=o,o=f.times(a.plus(I(s,a,d,1))),r(a.c).slice(0,u)===(t=r(o.c)).slice(0,u)){if(o.e<c&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(A(o,o.e+P+2,1),e=!o.times(o).eq(s));break}if(!i&&(A(a,a.e+P+2,0),a.times(a).eq(s))){o=a;break}d+=4,u+=4,i=1}return A(o,o.e+P+1,F,e)},x.times=x.mul=function(e,t){var r,o,i,a,s,l,u,c,d,f,v,g,p,m,y,E=this,S=E.c,R=(L=17,e=new h(e,t)).c;if(!(S&&R&&S[0]&&R[0]))return!E.s||!e.s||S&&!S[0]&&!R||R&&!R[0]&&!S?e.c=e.e=e.s=null:(e.s*=E.s,S&&R?(e.c=[0],e.e=0):e.c=e.e=null),e;for(o=n(E.e/C)+n(e.e/C),e.s*=E.s,(u=S.length)<(f=R.length)&&(p=S,S=R,R=p,i=u,u=f,f=i),i=u+f,p=[];i--;p.push(0));for(m=w,y=b,i=f;--i>=0;){for(r=0,v=R[i]%y,g=R[i]/y|0,a=i+(s=u);a>i;)r=((c=v*(c=S[--s]%y)+(l=g*c+(d=S[s]/y|0)*v)%y*y+p[a]+r)/m|0)+(l/y|0)+g*d,p[a--]=c%m;p[a]=r}return r?++o:p.splice(0,1),N(e,p,o)},x.toDigits=function(e,t){var n=new h(this);return e=null!=e&&j(e,1,R,18,"precision")?0|e:null,t=null!=t&&j(t,0,8,18,p)?0|t:F,e?A(n,e,t):n},x.toExponential=function(e,t){return M(this,null!=e&&j(e,0,R,19)?1+~~e:null,t,19)},x.toFixed=function(e,t){return M(this,null!=e&&j(e,0,R,20)?~~e+this.e+1:null,t,20)},x.toFormat=function(e,t){var n=M(this,null!=e&&j(e,0,R,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,a=r,d-=r),i>0&&d>0){for(r=d%i||i,l=h.substr(0,r);r<d;r+=i)l+=s+h.substr(r,i);a>0&&(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},x.toFraction=function(e){var t,n,o,i,a,s,l,u,c,d=Y,f=this,v=f.c,g=new h(H),p=n=new h(H),m=l=new h(H);if(null!=e&&(Y=!1,s=new h(e),Y=d,(d=s.isInt())&&!s.lt(H)||(Y&&_(22,"max denominator "+(d?"out of range":"not an integer"),e),e=!d&&s.c&&A(s,s.e+1,1).gte(H)?s:null)),!v)return f.toString();for(c=r(v),i=g.e=c.length-f.e-1,g.c[0]=S[(a=i%C)<0?C+a:a],e=!e||s.cmp(g)>0?i>0?g:p:s,a=U,U=1/0,s=new h(c),l.c[0]=0;u=I(s,g,0,1),1!=(o=n.plus(u.times(m))).cmp(e);)n=m,m=o,p=l.plus(u.times(o=p)),l=o,g=s.minus(u.times(o=g)),s=o;return o=I(e.minus(n),m,0,1),l=l.plus(o.times(p)),n=n.plus(o.times(m)),l.s=p.s=f.s,t=I(p,m,i*=2,F).minus(f).abs().cmp(I(l,n,i,F).minus(f).abs())<1?[p.toString(),m.toString()]:[l.toString(),n.toString()],U=a,t},x.toNumber=function(){return+this},x.toPower=x.pow=function(e,t){var n,r,o,i=v(e<0?-e:+e),a=this;if(null!=t&&(L=23,t=new h(t)),!j(e,-E,E,23,"exponent")&&(!isFinite(e)||i>E&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return n=Math.pow(+a,e),new h(t?n%t:n);for(t?e>1&&a.gt(H)&&a.isInt()&&t.gt(H)&&t.isInt()?a=a.mod(t):(o=t,t=null):X&&(n=f(X/C+2)),r=new h(H);;){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=v(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=H.div(r)),o?r.mod(o):n?A(r,X,F):r)},x.toPrecision=function(e,t){return M(this,null!=e&&j(e,1,R,24,"precision")?0|e:null,t,24)},x.toString=function(e){var t,n=this,o=n.s,i=n.e;return null===i?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(t=r(n.c),t=null!=e&&j(e,2,64,25,"base")?T(u(t,i),0|e,10,o):i<=B||i>=V?l(t,i):u(t,i),o<0&&n.c[0]&&(t="-"+t)),t},x.truncated=x.trunc=function(){return A(new h(this),this.e+1,1)},x.valueOf=x.toJSON=function(){var e,t=this,n=t.e;return null===n?t.toString():(e=r(t.c),e=n<=B||n>=V?l(e,n):u(e,n),t.s<0?"-"+e:e)},x.isBigNumber=!0,null!=t&&h.config(t),h}()).default=h.BigNumber=h,void 0!==t&&t.exports?t.exports=h:(e||(e="undefined"!=typeof self?self:Function("return this")()),e.BigNumber=h)}(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 r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];if("string"==typeof t&&(t=w.parseFormat(t)),!y.validateFormat(t))return"ERROR: invalid format";var r=t.prefix||"",o=t.postfix||"",i=function(e,t,n){switch(t.output){case"currency":return t=g(t,m.currentCurrencyDefaultFormat()),function(e,t,n){var r=n.currentCurrency(),o=Object.assign({},S,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=v({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,t,m);case"percent":return t=g(t,m.currentPercentageDefaultFormat()),function(e,t,n,r){var o=t.prefixSymbol,i=v({instance:r(100*e._value),providedFormat:t,state:n}),a=Object.assign({},S,t);return o?"%"+(a.spaceSeparated?" ":"")+i:i+(a.spaceSeparated?" ":"")+"%"}(e,t,m,n);case"byte":return t=g(t,m.currentByteDefaultFormat()),function(e,t,n,r){var o=t.base||"binary",i=E[o],a=s(e._value,i.suffixes,i.scale),l=a.value,u=a.suffix;return v({instance:r(l),providedFormat:t,state:n,defaults:n.currentByteDefaultFormat()})+(n.currentAbbreviations().spaced?" ":"")+u}(e,t,m,n);case"time":return t=g(t,m.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 t=g(t,m.currentOrdinalDefaultFormat()),function(e,t,n){var r=n.currentOrdinal(),o=Object.assign({},S,t),i=v({instance:e,providedFormat:t,state:n}),a=r(e._value);return i+(o.spaceSeparated?" ":"")+a}(e,t,m);case"number":default:return v({instance:e,providedFormat:t,numbro:n})}}(e,t,n);return function(e,t){return e+t}(i=function(e,t){return t+e}(i,r),o)}function o(e){var t=E.decimal;return s(e._value,t.suffixes,t.scale).suffix}function i(e){var t=E.binary;return s(e._value,t.suffixes,t.scale).suffix}function a(e){var t=E.general;return s(e._value,t.suffixes,t.scale).suffix}function s(e,t,n){var r=t[0],o=Math.abs(e);if(o>=n){for(var i=1;i<t.length;++i){var a=Math.pow(n,i),s=Math.pow(n,i+1);if(o>=a&&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 l(e){var t=e.value,n=e.characteristicPrecision,r=void 0===n?0:n,o=t.toExponential().split("e"),i=p(o,2),a=i[0],s=i[1],l=+a;return r?(1<r&&(l*=Math.pow(10,r-1),s=(s=+s-(r-1))>=0?"+"+s:s),{value:l,abbreviation:"e"+s}):{value:l,abbreviation:"e"+s}}function u(e){for(var t="",n=0;n<e;n++)t+="0";return t}function c(e,t){return-1!==e.toString().indexOf("e")?function(e,t){var n=e.toString(),r=n.split("e"),o=p(r,2),i=o[0],a=o[1],s=i.split("."),l=p(s,2),c=l[0],h=l[1],d=void 0===h?"":h;if(+a>0)n=c+d+u(a-d.length);else{var f=".";f=+c<0?"-0"+f:"0"+f;var v=(u(-a-1)+Math.abs(c)+d).substr(0,t);v.length<t&&(v+=u(t-v.length)),n=f+v}return+a>0&&t>0&&(n+="."+u(t)),n}(e,t):(Math.round(+(e+"e+"+t))/Math.pow(10,t)).toFixed(t)}function h(e,t,n,r,o){if(-1===r)return e;var i=c(t,r),a=i.toString().split("."),s=p(a,2),l=s[0],u=s[1],h=void 0===u?"":u;if(h.match(/^0+$/)&&(n||o))return l;var d=h.match(/0+$/);return o&&d?l+"."+h.toString().slice(0,d.index):i.toString()}function d(e,t,n,r){var o=e,i=o.toString().split("."),a=p(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()}function f(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)),function(e,t){for(var n=[],r=0,o=e;o>0;o--)r===t&&(n.unshift(o),r=0),r++;return n}(u.length,s).forEach((function(e,t){u=u.slice(0,e+t)+a+u.slice(e+t)})),t<0&&(u="-"+u)),c?u+o+c:u}function v(e){var t=e.instance,n=e.providedFormat,r=e.state,o=void 0===r?m:r,i=e.decimalSeparator,a=e.defaults,s=void 0===a?o.currentDefaults():a,u=t._value;if(0===u&&o.hasZeroFormat())return o.getZeroFormat();if(!isFinite(u))return u.toString();var c=Object.assign({},S,s,n),v=c.totalLength,g=v?0:c.characteristic,p=c.optionalCharacteristic,y=c.forceAverage,w=!!v||!!y||c.average,C=v?-1:w&&void 0===n.mantissa?0:c.mantissa,E=!v&&(void 0===n.optionalMantissa?-1===C:c.optionalMantissa),b=c.trimMantissa,R=c.thousandSeparated,T=c.spaceSeparated,M=c.negative,O=c.forceSign,k=c.exponential,N="";if(w){var _=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;if(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)),l&&(l=(i?" ":"")+l),s){var h=t.toString().split(".")[0];c=Math.max(s-h.length,0)}return{value:t,abbreviation:l,mantissaPrecision:c}}({value:u,forceAverage:y,abbreviations:o.currentAbbreviations(),spaceSeparated:T,totalLength:v});u=_.value,N+=_.abbreviation,v&&(C=_.mantissaPrecision)}if(k){var A=l({value:u,characteristicPrecision:g});u=A.value,N=A.abbreviation+N}var I=h(u.toString(),u,E,C,b);return I=f(I=d(I,0,p,g),u,R,o,i),(w||k)&&(I=function(e,t){return e+t}(I,N)),(O||u<0)&&(I=function(e,t,n){return 0===t?e:0==+e?e.replace("-",""):t>0?"+"+e:"sign"===n?e:"("+e.replace("-","")+")"}(I,u,M)),I}function g(e,t){if(!e)return t;var n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}var p=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")},m=e("./globalState"),y=e("./validating"),w=e("./parsing"),C=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],E={general:{scale:1024,suffixes:C,marker:"bd"},binary:{scale:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],marker:"b"},decimal:{scale:1e3,suffixes:C,marker:"d"}},S={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1};t.exports=function(e){return{format:function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];return r.apply(void 0,n.concat([e]))},getByteUnit:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return a.apply(void 0,n.concat([e]))},getBinaryByteUnit:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return i.apply(void 0,n.concat([e]))},getDecimalByteUnit:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return o.apply(void 0,n.concat([e]))},formatOrDefault:g}}},{"./globalState":4,"./parsing":8,"./validating":10}],4:[function(e,t,n){"use strict";function r(e){u=e}function o(){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 o().currency},l.currentAbbreviations=function(){return o().abbreviations},l.currentDelimiters=function(){return o().delimiters},l.currentOrdinal=function(){return o().ordinal},l.currentDefaults=function(){return Object.assign({},o().defaults,d)},l.currentOrdinalDefaultFormat=function(){return Object.assign({},l.currentDefaults(),o().ordinalFormat)},l.currentByteDefaultFormat=function(){return Object.assign({},l.currentDefaults(),o().byteFormat)},l.currentPercentageDefaultFormat=function(){return Object.assign({},l.currentDefaults(),o().percentageFormat)},l.currentCurrencyDefaultFormat=function(){return Object.assign({},l.currentDefaults(),o().currencyFormat)},l.currentTimeDefaultFormat=function(){return Object.assign({},l.currentDefaults(),o().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 o()},l.registerLanguage=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!a.validateLanguage(e))throw new Error("Invalid language data");c[e.languageTag]=e,t&&r(e.languageTag)},l.setLanguage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.languageTag;if(!c[e]){var n=e.split("-")[0],o=Object.keys(c).find((function(e){return e.split("-")[0]===n}));return c[o]?void r(o):void r(t)}r(e)},l.registerLanguage(i),u=i.languageTag,t.exports=l},{"./en-US":2,"./parsing":8,"./validating":10}],5:[function(e,t,n){"use strict";function r(t,n){t.forEach((function(t){var r=void 0;try{r=e("../languages/"+t)}catch(e){console.error('Unable to load "'+t+'". No matching language file found.')}r&&n.registerLanguage(r)}))}t.exports=function(e){return{loadLanguagesInNode:function(t){return r(t,e)}}}},{}],6:[function(e,t,n){"use strict";function r(e,t,n){var r=new o(e._value),i=t;return n.isNumbro(t)&&(i=t._value),i=new o(i),e._value=r.minus(i).toNumber(),e}var o=e("bignumber.js");t.exports=function(e){return{add:function(t,n){return function(e,t,n){var r=new o(e._value),i=t;return n.isNumbro(t)&&(i=t._value),i=new o(i),e._value=r.add(i).toNumber(),e}(t,n,e)},subtract:function(t,n){return r(t,n,e)},multiply:function(t,n){return function(e,t,n){var r=new o(e._value),i=t;return n.isNumbro(t)&&(i=t._value),i=new o(i),e._value=r.times(i).toNumber(),e}(t,n,e)},divide:function(t,n){return function(e,t,n){var r=new o(e._value),i=t;return n.isNumbro(t)&&(i=t._value),i=new o(i),e._value=r.dividedBy(i).toNumber(),e}(t,n,e)},set:function(t,n){return function(e,t,n){var r=t;return n.isNumbro(t)&&(r=t._value),e._value=r,e}(t,n,e)},difference:function(t,n){return function(e,t,n){var o=n(e._value);return r(o,t,n),Math.abs(o._value)}(t,n,e)}}}},{"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 e(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(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),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 e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this._value=t}return i(e,[{key:"clone",value:function(){return o(this._value)}},{key:"format",value:function(){var e=arguments.length>0&&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=arguments.length>0&&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}}]),e}();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";function r(e,t){var n=e.match(/^{([^}]*)}/);return n?(t.prefix=n[1],e.slice(n[0].length)):e}function o(e,t){var n=e.match(/{([^}]*)}$/);return n?(t.postfix=n[1],e.slice(0,-n[0].length)):e}function i(e,t){if(-1===e.indexOf("$")){if(-1===e.indexOf("%"))return-1!==e.indexOf("bd")?(t.output="byte",void(t.base="general")):-1!==e.indexOf("b")?(t.output="byte",void(t.base="binary")):-1!==e.indexOf("d")?(t.output="byte",void(t.base="decimal")):void(-1===e.indexOf(":")?-1!==e.indexOf("o")&&(t.output="ordinal"):t.output="time");t.output="percent"}else t.output="currency"}function a(e,t){-1!==e.indexOf(",")&&(t.thousandSeparated=!0)}function s(e,t){-1!==e.indexOf(" ")&&(t.spaceSeparated=!0)}function l(e,t){var n=e.match(/[1-9]+[0-9]*/);n&&(t.totalLength=+n[0])}function u(e,t){var n=e.split(".")[0].match(/0+/);n&&(t.characteristic=n[0].length)}function c(e,t){var n=e.split(".")[1];if(n){var r=n.match(/0+/);r&&(t.mantissa=r[0].length)}}function h(e,t){-1!==e.indexOf("a")&&(t.average=!0)}function d(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")}function f(e,t){e.match(/\[\.]/)?t.optionalMantissa=!0:e.match(/\./)&&(t.optionalMantissa=!1)}function v(e,t){if(-1!==e.indexOf(".")){var n=e.split(".")[0];t.optionalCharacteristic=-1===n.indexOf("0")}}function g(e,t){e.match(/^\+?\([^)]*\)$/)&&(t.negative="parenthesis"),e.match(/^\+?-/)&&(t.negative="sign")}function p(e,t){e.match(/^\+/)&&(t.forceSign=!0)}t.exports={parseFormat:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"!=typeof e?e:(i(e=o(e=r(e,t),t),t),l(e,t),u(e,t),v(e,t),h(e,t),d(e,t),c(e,t),f(e,t),a(e,t),s(e,t),g(e,t),p(e,t),t)}}},{}],9:[function(e,t,n){"use strict";function r(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments[3],a=arguments[4],l=arguments[5],u=arguments[6];if(!isNaN(+e))return+e;var c="",h=e.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(h!==e)return-1*o(h,t,n,i,a,l,u);for(var d=0;d<s.length;d++){var f=s[d];if((c=e.replace(f.key,""))!==e)return o(c,t,n,i,a,l,u)*f.factor}if((c=e.replace("%",""))!==e)return o(c,t,n,i,a,l,u)/100;var v=parseFloat(e);if(!isNaN(v)){var g=i(v);if(g&&"."!==g&&(c=e.replace(new RegExp(r(g)+"$"),""))!==e)return o(c,t,n,i,a,l,u);var p={};Object.keys(l).forEach((function(e){p[l[e]]=e}));for(var m=Object.keys(p).sort().reverse(),y=m.length,w=0;w<y;w++){var C=m[w],E=p[C];if((c=e.replace(C,""))!==e){var S=void 0;switch(E){case"thousand":S=Math.pow(10,3);break;case"million":S=Math.pow(10,6);break;case"billion":S=Math.pow(10,9);break;case"trillion":S=Math.pow(10,12)}return o(c,t,n,i,a,l,u)*S}}}}function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=e.replace(n,"");return(o=o.replace(new RegExp("([0-9])"+r(t.thousands)+"([0-9])","g"),"$1$2")).replace(t.decimal,".")}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments[3],a=arguments[4],s=arguments[5],l=arguments[6];if(""!==e)return isNaN(+e)?e===a?0:o(i(e,t,n),t,n,r,a,s,l):+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}];t.exports={unformat:function(t,n){var r=e("./globalState"),o=r.currentDelimiters(),i=r.currentCurrency().symbol,s=r.currentOrdinal(),l=r.getZeroFormat(),u=r.currentAbbreviations(),c=void 0;if("string"==typeof t)c=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)}(t,o)?function(e){var t=e.split(":"),n=+t[0],r=+t[1];return+t[2]+60*r+3600*n}(t):a(t,o,i,s,l,u,n);else{if("number"!=typeof t)return;c=t}if(void 0!==c)return c}}},{"./globalState":4}],10:[function(e,t,n){"use strict";function r(e){return!!s.unformat(e)}function o(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=Object.keys(e).map((function(r){if(!t[r])return console.error(n+" Invalid key: "+r),!1;var i=e[r],s=t[r];if("string"==typeof s&&(s={type:s}),"format"===s.type){if(!o(i,u,"[Validate "+r+"]",!0))return!1}else if((void 0===i?"undefined":a(i))!==s.type)return console.error(n+" "+r+' type mismatched: "'+s.type+'" expected, "'+(void 0===i?"undefined":a(i))+'" provided'),!1;if(s.restrictions&&s.restrictions.length)for(var l=s.restrictions.length,c=0;c<l;c++){var h=s.restrictions[c],d=h.restriction,f=h.message;if(!d(i,e))return console.error(n+" "+r+" invalid value: "+f),!1}return s.restriction&&!s.restriction(i,e)?(console.error(n+" "+r+" invalid value: "+s.message),!1):s.validValues&&-1===s.validValues.indexOf(i)?(console.error(n+" "+r+" invalid value: must be among "+JSON.stringify(s.validValues)+', "'+i+'" provided'),!1):!(s.children&&!o(i,s.children,"[Validate "+r+"]"))}));return r||i.push.apply(i,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(t).map((function(r){var o=t[r];if("string"==typeof o&&(o={type:o}),o.mandatory){var i=o.mandatory;if("function"==typeof i&&(i=i(e)),i&&void 0===e[r])return console.error(n+' Missing mandatory key "'+r+'"'),!1}return!0})))),i.reduce((function(e,t){return e&&t}),!0)}function i(e){return o(e,u,"[Validate format]")}var a="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},s=e("./unformatting"),l=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,u={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 e>=0},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 e>=0},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 e>=0},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`"}},c={languageTag:{type:"string",mandatory:!0,restriction:function(e){return e.match(l)},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=r(e),o=i(t);return n&&o},validateFormat:i,validateInput:r,validateLanguage:function(e){return o(e,c,"[Validate language]")}}},{"./unformatting":9}]},{},[7])(7),window.numbro=n(361)},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(6)),s=r(n(5)),l=r(n(16)),u=r(n(7)),c=n(59),h=n(4),d=n(8),f=n(32),v=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:"open",value:function(){(0,l.default)((0,s.default)(t.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.htEditor.selection.highlight.cell.settings.border.width=0,this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),(0,d.setCaretPosition)(this.TEXTAREA,0,this.TEXTAREA.value.length)}},{key:"close",value:function(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),(0,l.default)((0,s.default)(t.prototype),"close",this).call(this)}},{key:"prepare",value:function(e,n,r,o,i,a){(0,l.default)((0,s.default)(t.prototype),"prepare",this).call(this,e,n,r,o,i,a);var u=this,c={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&&u.setValue(n),u.instance.destroyEditor()},preventWheel:!0};this.cellProperties.handsontable&&(0,h.extend)(c,a.handsontable),this.htOptions=c}},{key:"beginEditing",value:function(e,n){var r=this.hot.getSettings().onBeginEditing;r&&!1===r()||(0,l.default)((0,s.default)(t.prototype),"beginEditing",this).call(this,e,n)}},{key:"focus",value:function(e){(0,l.default)((0,s.default)(t.prototype),"focus",this).call(this,e)}},{key:"createElements",value:function(){(0,l.default)((0,s.default)(t.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,n,r){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedLast()){var o=this.htEditor.getInstance().getValue();void 0!==o&&this.setValue(o)}return(0,l.default)((0,s.default)(t.prototype),"finishEditing",this).call(this,e,n,r)}},{key:"assignHooks",value:function(){var e=this;this.hot.addHook("afterDestroy",(function(){e.htEditor&&e.htEditor.destroy()}))}},{key:"onBeforeKeyDown",value:function(e){if(!(0,f.isImmediatePropagationStopped)(e)){var n,r,o=this.htEditor.getInstance();if(e.keyCode===c.KEY_CODES.ARROW_DOWN)if(o.getSelectedLast()||o.flipped){if(o.getSelectedLast())if(o.flipped)n=o.getSelectedLast()[0]+1;else if(!o.flipped){var i=o.countRows()-1;r=o.getSelectedLast()[0],n=Math.min(i,r+1)}}else n=0;else e.keyCode===c.KEY_CODES.ARROW_UP&&(!o.getSelectedLast()&&o.flipped?n=o.countRows()-1:o.getSelectedLast()&&(o.flipped?(r=o.getSelectedLast()[0],n=Math.max(0,r-1)):n=(r=o.getSelectedLast()[0])-1));void 0!==n&&(n<0||o.flipped&&n>o.countRows()-1?o.deselectCell():o.selectCell(n,0),o.getData().length&&(e.preventDefault(),(0,f.stopImmediatePropagation)(e),this.hot.listen(),this.TEXTAREA.focus())),(0,l.default)((0,s.default)(t.prototype),"onBeforeKeyDown",this).call(this,e)}}}]),t}(r(n(116)).default);t.default=v},function(e,t,n){"use strict";var r=n(135),o=n(47),i=n(54),a=n(478),s=n(136);r("search",1,(function(e,t,n){return[function(t){var n=i(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var i=o(e),l=String(this),u=i.lastIndex;a(u,0)||(i.lastIndex=0);var c=s(i,l);return a(i.lastIndex,u)||(i.lastIndex=u),null===c?-1:c.index}]}))},function(e,t,n){"use strict";t.__esModule=!0,t.getNormalizedDate=function(e){var t=new Date(e);if(!isNaN(new Date("".concat(e,"T00:00")).getDate()))return new Date(t.getTime()+6e4*t.getTimezoneOffset());return t}},function(e,t,n){"use strict";var r=n(0);n(17),n(52),n(15),n(72),n(34),n(83),n(84),n(12),n(42),n(491),n(36),t.__esModule=!0,t.default=function(e,t){var n,r,B,V,W,U=this,Y=arguments.length>2&&void 0!==arguments[2]&&arguments[2],j=!1,z=this,G=function(){},X=new g.default(z);(0,p.extend)(G.prototype,A.default.prototype),(0,p.extend)(G.prototype,t),(0,p.extend)(G.prototype,ee(t)),(0,x.applyLanguageSetting)(G.prototype,t.language),(0,k.hasValidParameter)(Y)&&(0,k.registerAsRootInstance)(this);this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,(0,H.startObserving)(this.rootDocument),this.isDestroyed=!1,this.isHotTableEnv=(0,s.isChildOfWebComponentTable)(this.rootElement),g.default.isHotTableEnv=this.isHotTableEnv,this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),(0,k.isRootInstance)(this)&&(0,h._injectProductInfo)(t.licenseKey,e);this.guid="ht_".concat((0,S.randomString)()),this.columnIndexMapper=new O.IndexMapper,this.rowIndexMapper=new O.IndexMapper,B=new T.default(z),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);n={cellSettings:[],columnSettings:[],columnsSettingConflicts:["data","width","language"],settings:new G,selRange:null,isPopulated:null,scrollable:null,firstRun:!0};var K=new P.Selection(n.settings,{countCols:function(){return z.countCols()},countRows:function(){return z.countRows()},propToCol:function(e){return r.propToCol(e)},isEditorOpened:function(){return!!z.getActiveEditor()&&z.getActiveEditor().isOpened()}});function q(e){var t=(0,x.normalizeLanguageCode)(e);(0,L.hasLanguageDictionary)(t)?(z.runHooks("beforeLanguageChange",t),G.prototype.language=t,z.runHooks("afterLanguageChange",t)):(0,x.warnUserAboutLanguageRegistration)(e)}function $(){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 Q(e,t,n){if(e.length){var o=z.getActiveEditor(),a=z.runHooks("beforeChange",e,t||"edit"),l=!0;if((0,u.isFunction)(a))(0,c.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===a)return void(o&&o.cancelChanges());var h,d,f,v=new $;v.onQueueEmpty=function(e){o&&l&&o.cancelChanges(),n(e)};for(var g=e.length-1;g>=0;g--)if(null===e[g])e.splice(g,1);else{var p=(0,i.default)(e[g],4),m=p[0],y=p[1],w=p[3],C=r.propToCol(y),E=z.getCellMeta(m,C);"numeric"===E.type&&"string"==typeof w&&((f=w).length>0&&/^\s*[+-.]?\s*(?:(?:\d+(?:(\.|,)\d+)?(?:e[+-]?\d+)?)|(?:0x[a-f\d]+))\s*$/.test(f))&&(e[g][3]=(d=void 0,d=(h=w).replace(",","."),!1===isNaN(parseFloat(d))?parseFloat(d):h)),z.getCellValidator(E)&&(v.addValidatorToQueue(),z.validateCell(e[g][3],E,function(t,n){return function(r){if("boolean"!=typeof r)throw new Error("Validation error: result is not boolean");if(!1===r&&!1===n.allowInvalid){l=!1,e.splice(t,1),n.valid=!0;var o=z.getCell(n.visualRow,n.visualCol);null!==o&&(0,s.removeClass)(o,z.getSettings().invalidCellClassName)}v.removeValidatorFormQueue()}}(g,E),t))}v.checkIfQueueIsEmpty()}}function Z(e,t){var o=e.length-1;if(!(o<0)){for(;o>=0;o--){var i=!1;if(null!==e[o]){if(null!==e[o][2]&&void 0!==e[o][2]||null!==e[o][3]&&void 0!==e[o][3]){if(n.settings.allowInsertRow)for(;e[o][0]>z.countRows()-1;){if(0===r.createRow(void 0,void 0,t)){i=!0;break}}if("array"===z.dataType&&(!n.settings.columns||0===n.settings.columns.length)&&n.settings.allowInsertColumn)for(;r.propToCol(e[o][1])>z.countCols()-1;){if(0===r.createCol(void 0,void 0,t)){i=!0;break}}i||r.set(e[o][0],e[o][1],e[o][3])}}else e.splice(o,1)}z.forceFullRender=!0,V.adjustRowsAndCols(),z.runHooks("beforeChangeRender",e,t),W.lockEditor(),z._refreshBorders(null),W.unlockEditor(),z.view.wt.wtOverlays.adjustElementsSize(),z.runHooks("afterChange",e,t||"edit");var a=z.getActiveEditor();a&&(0,h.isDefined)(a.refreshValue)&&a.refreshValue()}}function J(e,t,n){return"object"===(0,o.default)(e)?e:[[e,t,n]]}function ee(e){if((0,p.hasOwnProperty)(e,"type")){var t,n={};for(var r in"object"===(0,o.default)(e.type)?t=e.type:"string"==typeof e.type&&(t=(0,I.getCellType)(e.type)),t)(0,p.hasOwnProperty)(t,r)&&!(0,p.hasOwnProperty)(e,r)&&(n[r]=t[r]);return n}}this.selection=K,this.selection.addLocalHook("beforeSetRangeStart",(function(e){U.runHooks("beforeSetRangeStart",e)})),this.selection.addLocalHook("beforeSetRangeStartOnly",(function(e){U.runHooks("beforeSetRangeStartOnly",e)})),this.selection.addLocalHook("beforeSetRangeEnd",(function(e){U.runHooks("beforeSetRangeEnd",e),e.row<0&&(e.row=U.view.wt.wtTable.getFirstVisibleRow()),e.col<0&&(e.col=U.view.wt.wtTable.getFirstVisibleColumn())})),this.selection.addLocalHook("afterSetRangeEnd",(function(e){var t=(0,p.createObjectPropListener)(!1),n=U.selection.getSelectedRange(),r=n.current(),o=r.from,i=r.to,a=n.size()-1;U.runHooks("afterSelection",o.row,o.col,i.row,i.col,t,a),U.runHooks("afterSelectionByProp",o.row,z.colToProp(o.col),i.row,z.colToProp(i.col),t,a);var l=U.selection.isSelectedByAnyHeader(),u=U.selection.selectedRange.current(),c=!0;j&&(c=!1),t.isTouched()&&(c=!t.value);var h=U.selection.isSelectedByRowHeader(),d=U.selection.isSelectedByColumnHeader();!1!==c&&(l?h?U.view.scrollViewportVertically(e.row):d&&U.view.scrollViewportHorizontally(e.col):u&&!U.selection.isMultiple()?U.view.scrollViewport(u.from):U.view.scrollViewport(e)),h&&d?(0,s.addClass)(U.rootElement,["ht__selection--rows","ht__selection--columns"]):h?((0,s.removeClass)(U.rootElement,"ht__selection--columns"),(0,s.addClass)(U.rootElement,"ht__selection--rows")):d?((0,s.removeClass)(U.rootElement,"ht__selection--rows"),(0,s.addClass)(U.rootElement,"ht__selection--columns")):(0,s.removeClass)(U.rootElement,["ht__selection--rows","ht__selection--columns"]),U._refreshBorders(null)})),this.selection.addLocalHook("afterSelectionFinished",(function(e){var t=e.length-1,n=e[t],r=n.from,o=n.to;U.runHooks("afterSelectionEnd",r.row,r.col,o.row,o.col,t),U.runHooks("afterSelectionEndByProp",r.row,z.colToProp(r.col),o.row,z.colToProp(o.col),t)})),this.selection.addLocalHook("afterIsMultipleSelection",(function(e){var t=U.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)})),this.selection.addLocalHook("beforeModifyTransformStart",(function(e){U.runHooks("modifyTransformStart",e)})),this.selection.addLocalHook("afterModifyTransformStart",(function(e,t,n){U.runHooks("afterModifyTransformStart",e,t,n)})),this.selection.addLocalHook("beforeModifyTransformEnd",(function(e){U.runHooks("modifyTransformEnd",e)})),this.selection.addLocalHook("afterModifyTransformEnd",(function(e,t,n){U.runHooks("afterModifyTransformEnd",e,t,n)})),this.selection.addLocalHook("afterDeselect",(function(){W.destroyEditor(),U._refreshBorders(),(0,s.removeClass)(U.rootElement,["ht__selection--rows","ht__selection--columns"]),U.runHooks("afterDeselect")})),this.selection.addLocalHook("insertRowRequire",(function(e){U.alter("insert_row",e,1,"auto")})),this.selection.addLocalHook("insertColRequire",(function(e){U.alter("insert_col",e,1,"auto")})),V={alter:function(e,t){var o,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,l=arguments.length>3?arguments[3]:void 0,u=arguments.length>4?arguments[4]:void 0;function c(e,t,n,r){var o=(0,m.arrayMap)(new Array(n),(function(){return"array"===r?e=[]:"object"===r&&(e={}),e;var e}));o.unshift(t,0),e.splice.apply(e,(0,a.default)(o))}var d=function(e){if(0===e.length)return[];var t=(0,a.default)(e);return t.sort((function(e,t){var n=(0,i.default)(e,1)[0],r=(0,i.default)(t,1)[0];return n===r?0:n>r?1:-1})),(0,m.arrayReduce)(t,(function(e,t){var n=(0,i.default)(t,2),r=n[0],o=n[1],a=e[e.length-1],s=(0,i.default)(a,2),l=s[0]+s[1];if(r<=l){var u=Math.max(o-(l-r),0);a[1]+=u}else e.push([r,o]);return e}),[t[0]])};switch(e){case"insert_row":var f=z.countSourceRows();if(z.getSettings().maxRows===f)return;t=(0,h.isDefined)(t)?t:f,o=r.createRow(t,s,l),c(n.cellSettings,t,s,"array"),o&&(K.isSelected()&&K.selectedRange.current().from.row>=t?(K.selectedRange.current().from.row+=o,K.transformEnd(o,0)):z._refreshBorders());break;case"insert_col":o=r.createCol(t,s,l);for(var v=0,g=z.countSourceRows();v<g;v++)n.cellSettings[v]&&c(n.cellSettings[v],t,s);if(o){if(Array.isArray(z.getSettings().colHeaders)){var p=[t,0];p.length+=o,Array.prototype.splice.apply(z.getSettings().colHeaders,p)}K.isSelected()&&K.selectedRange.current().from.col>=t?(K.selectedRange.current().from.col+=o,K.transformEnd(0,o)):z._refreshBorders()}break;case"remove_row":var y=function(e){var t=0;(0,m.arrayEach)(e,(function(e){var o=(0,i.default)(e,2),a=o[0],u=o[1],c=(0,h.isEmpty)(a)?z.countRows()-1:Math.max(a-t,0);Number.isInteger(a)&&(a=Math.max(a-t,0)),r.removeRow(a,u,l),n.cellSettings.splice(c,s);var d=z.countRows(),f=z.getSettings().fixedRowsTop;f>=c+1&&(z.getSettings().fixedRowsTop-=Math.min(u,f-c));var v=z.getSettings().fixedRowsBottom;v&&c>=d-v&&(z.getSettings().fixedRowsBottom-=Math.min(u,v)),t+=u}))};Array.isArray(t)?y(d(t)):y([[t,s]]),V.adjustRowsAndCols(),z._refreshBorders();break;case"remove_col":var w=function(e){var t=0;(0,m.arrayEach)(e,(function(e){var o=(0,i.default)(e,2),a=o[0],s=o[1],u=(0,h.isEmpty)(a)?z.countCols()-1:Math.max(a-t,0),c=z.toPhysicalColumn(u);Number.isInteger(a)&&(a=Math.max(a-t,0)),r.removeCol(a,s,l);for(var d=0,f=z.countSourceRows();d<f;d++)n.cellSettings[d]&&n.cellSettings[d].splice(c,s);var v=z.getSettings().fixedColumnsLeft;v>=u+1&&(z.getSettings().fixedColumnsLeft-=Math.min(s,v-u)),Array.isArray(z.getSettings().colHeaders)&&(void 0===c&&(c=-1),z.getSettings().colHeaders.splice(c,s)),t+=s}))};Array.isArray(t)?w(d(t)):w([[t,s]]),V.adjustRowsAndCols(),z._refreshBorders();break;default:throw new Error('There is no such action "'.concat(e,'"'))}u||V.adjustRowsAndCols()},adjustRowsAndCols:function(){if(n.settings.minRows){var e=z.countRows();if(e<n.settings.minRows)for(var t=0,o=n.settings.minRows;t<o-e;t++)r.createRow(z.countRows(),1,"auto")}if(n.settings.minSpareRows){var i=z.countEmptyRows(!0);if(i<n.settings.minSpareRows)for(;i<n.settings.minSpareRows&&z.countSourceRows()<n.settings.maxRows;i++)r.createRow(z.countRows(),1,"auto")}var a;if((n.settings.minCols||n.settings.minSpareCols)&&(a=z.countEmptyCols(!0)),n.settings.minCols&&!n.settings.columns&&z.countCols()<n.settings.minCols)for(;z.countCols()<n.settings.minCols;a++)r.createCol(z.countCols(),1,"auto");if(n.settings.minSpareCols&&!n.settings.columns&&"array"===z.dataType&&a<n.settings.minSpareCols)for(;a<n.settings.minSpareCols&&z.countCols()<n.settings.maxCols;a++)r.createCol(z.countCols(),1,"auto");var s=z.countRows(),l=z.countCols();0!==s&&0!==l||K.deselect(),K.isSelected()&&(0,m.arrayEach)(K.selectedRange,(function(e){var t=!1,n=e.from.row,r=e.from.col,o=e.to.row,i=e.to.col;n>s-1?(t=!0,o>(n=s-1)&&(o=n)):o>s-1&&(t=!0,n>(o=s-1)&&(n=o)),r>l-1?(t=!0,i>(r=l-1)&&(i=r)):i>l-1&&(t=!0,r>(i=l-1)&&(r=i)),t&&z.selectCell(n,r,o,i)})),z.view&&z.view.wt.wtOverlays.adjustElementsSize()},populateFromArray:function(e,t,r,i,s,l,u){var c,d,f,v,g,m,y,w,C=[],E={};if(0===(d=t.length))return!1;switch(s){case"shift_down":for(g=r?r.col-e.col+1:0,m=r?r.row-e.row+1:0,f=0,v=(t=(0,M.translateRowsToColumns)(t)).length,y=Math.max(v,g);f<y;f++)if(f<v){var S;for(c=0,d=t[f].length;c<m-d;c++)t[f].push(t[f][c%d]);t[f].unshift(e.col+f,e.row,0),(S=z).spliceCol.apply(S,(0,a.default)(t[f]))}else{var b;t[f%v][0]=e.col+f,(b=z).spliceCol.apply(b,(0,a.default)(t[f%v]))}break;case"shift_right":for(g=r?r.col-e.col+1:0,m=r?r.row-e.row+1:0,c=0,d=t.length,w=Math.max(d,m);c<w;c++)if(c<d){var R;for(f=0,v=t[c].length;f<g-v;f++)t[c].push(t[c][f%v]);t[c].unshift(e.row+c,e.col,0),(R=z).spliceRow.apply(R,(0,a.default)(t[c]))}else{var T;t[c%d][0]=e.row+c,(T=z).spliceRow.apply(T,(0,a.default)(t[c%d]))}break;case"overwrite":default:E.row=e.row,E.col=e.col;var O,k={row:r&&e?r.row-e.row+1:1,col:r&&e?r.col-e.col+1:1},N=0,_=0,A=!0,I=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=t[e%t.length];return null!==n?r[n%r.length]:r},D=t.length,L=r?r.row-e.row+1:0;for(d=r?L:Math.max(D,L),c=0;c<d&&!(r&&E.row>r.row&&L>D||!n.settings.allowInsertRow&&E.row>z.countRows()-1||E.row>=n.settings.maxRows);c++){var x=c-N,H=I(x).length,P=r?r.col-e.col+1:0;if(v=r?P:Math.max(H,P),E.col=e.col,O=z.getCellMeta(E.row,E.col),"CopyPaste.paste"!==i&&"Autofill.fill"!==i||!O.skipRowOnPaste){for(_=0,f=0;f<v&&!(r&&E.col>r.col&&P>H||!n.settings.allowInsertColumn&&E.col>z.countCols()-1||E.col>=n.settings.maxCols);f++)if(O=z.getCellMeta(E.row,E.col),"CopyPaste.paste"!==i&&"Autofill.fill"!==i||!O.skipColumnOnPaste)if(O.readOnly)E.col+=1;else{var F=f-_,B=I(x,F),V=z.getDataAtCell(E.row,E.col),W={row:x,col:F};if("Autofill.fill"===i){var U=z.runHooks("beforeAutofillInsidePopulate",W,l,t,u,{},k);U&&(B=(0,h.isUndefined)(U.value)?B:U.value)}if(null!==B&&"object"===(0,o.default)(B))if(Array.isArray(B)&&null===V&&(V=[]),null===V||"object"!==(0,o.default)(V))A=!1;else{var Y=(0,p.duckSchema)(Array.isArray(V)?V:V[0]||V),j=(0,p.duckSchema)(Array.isArray(B)?B:B[0]||B);(0,p.isObjectEqual)(Y,j)?B=(0,p.deepClone)(B):A=!1}else null!==V&&"object"===(0,o.default)(V)&&(A=!1);A&&C.push([E.row,E.col,B]),A=!0,E.col+=1}else _+=1,E.col+=1,v+=1;E.row+=1}else N+=1,E.row+=1,d+=1}z.setDataAtCell(C,null,null,i||"populateFromArray")}}},this.executeBatchOperations=function(e){var t=this;this.columnIndexMapper.executeBatchOperations((function(){t.rowIndexMapper.executeBatchOperations((function(){e()}))}))},this.init=function(){B.setData(n.settings.data),z.runHooks("beforeInit"),(0,d.isMobileBrowser)()&&(0,s.addClass)(z.rootElement,"mobile"),this.updateSettings(n.settings,!0),this.view=new R.default(this),W=v.default.getInstance(z,n,K,r),this.forceFullRender=!0,z.runHooks("init"),this.view.render(),"object"===(0,o.default)(n.firstRun)&&(z.runHooks("afterChange",n.firstRun[0],n.firstRun[1]),n.firstRun=!1),z.runHooks("afterInit")},this.validateCell=function(e,t,n,r){var o,i=z.getCellValidator(t);function a(e){if((!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&!0!==t.hidden){var r=t.visualCol,o=t.visualRow,i=z.getCell(o,r,!0);i&&"TH"!==i.nodeName&&z.view.wt.wtSettings.settings.cellRenderer(o,r,i),n(e)}else n(e)}(0,h.isRegExp)(i)&&(o=i,i=function(e,t){t(o.test(e))}),(0,u.isFunction)(i)?(e=z.runHooks("beforeValidate",e,t.visualRow,t.prop,r),z._registerImmediate((function(){i.call(t,e,(function(n){z&&(n=z.runHooks("afterValidate",n,e,t.visualRow,t.prop,r),t.valid=n,a(n),z.runHooks("postAfterValidate",n,e,t.visualRow,t.prop,r))}))}))):z._registerImmediate((function(){t.valid=!0,a(t.valid,!1)}))},this.setDataAtCell=function(e,t,n,i){var a,s,l,u=J(e,t,n),c=[],h=i;for(a=0,s=u.length;a<s;a++){if("object"!==(0,o.default)(u[a]))throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof u[a][1])throw new Error("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");l=u[a][1]>=this.countCols()?u[a][1]:r.colToProp(u[a][1]),c.push([u[a][0],l,B.getAtCell(this.toPhysicalRow(u[a][0]),u[a][1]),u[a][2]])}h||"object"!==(0,o.default)(e)||(h=t),z.runHooks("afterSetDataAtCell",c,h),Q(c,h,(function(){Z(c,h)}))},this.setDataAtRowProp=function(e,t,n,r){var i,a,s=J(e,t,n),l=[],u=r;for(i=0,a=s.length;i<a;i++)l.push([s[i][0],s[i][1],B.getAtCell(this.toPhysicalRow(s[i][0]),s[i][1]),s[i][2]]);u||"object"!==(0,o.default)(e)||(u=t),z.runHooks("afterSetDataAtRowProp",l,u),Q(l,u,(function(){Z(l,u)}))},this.listen=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=z,n=t.rootDocument;if(e){var r=!n.activeElement||n.activeElement&&void 0===n.activeElement.nodeName;n.activeElement&&n.activeElement!==n.body&&!r?n.activeElement.blur():r&&n.body.focus()}z&&!z.isListening()&&(F=z.guid,z.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(F=null,z.runHooks("afterUnlisten"))},this.isListening=function(){return F===z.guid},this.destroyEditor=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];z._refreshBorders(e,t)},this.populateFromArray=function(e,t,n,r,i,a,s,l,u){if("object"!==(0,o.default)(n)||"object"!==(0,o.default)(n[0]))throw new Error("populateFromArray parameter `input` must be an array of arrays");var c="number"==typeof r?new N.CellCoords(r,i):null;return V.populateFromArray(new N.CellCoords(e,t),n,c,a,s,l,u)},this.spliceCol=function(e,t,n){for(var o,i=arguments.length,a=new Array(i>3?i-3:0),s=3;s<i;s++)a[s-3]=arguments[s];return(o=r).spliceCol.apply(o,[e,t,n].concat(a))},this.spliceRow=function(e,t,n){for(var o,i=arguments.length,a=new Array(i>3?i-3:0),s=3;s<i;s++)a[s-3]=arguments[s];return(o=r).spliceRow.apply(o,[e,t,n].concat(a))},this.getSelected=function(){if(K.isSelected())return(0,m.arrayMap)(K.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&&t.length>0&&(e=t[t.length-1]),e},this.getSelectedRange=function(){if(K.isSelected())return Array.from(K.getSelectedRange())},this.getSelectedRangeLast=function(){var e,t=this.getSelectedRange();return t&&t.length>0&&(e=t[t.length-1]),e},this.emptySelectedCells=function(e){var t=this;if(K.isSelected()){var n=[];(0,m.arrayEach)(K.getSelectedRange(),(function(e){var r=e.getTopLeftCorner(),o=e.getBottomRightCorner();(0,b.rangeEach)(r.row,o.row,(function(e){(0,b.rangeEach)(r.col,o.col,(function(r){t.getCellMeta(e,r).readOnly||n.push([e,r,null])}))}))})),n.length>0&&this.setDataAtCell(n,e)}},this.render=function(){z.view&&(z.renderCall=!0,z.forceFullRender=!0,W.lockEditor(),z._refreshBorders(null),W.unlockEditor())},this.refreshDimensions=function(){if(z.view){var e=z.view.getLastSize(),t=e.width,n=e.height,r=z.rootElement.getBoundingClientRect(),o=r.width,i=r.height,a=o!==t||i!==n;!1===z.runHooks("beforeRefreshDimensions",{width:t,height:n},{width:o,height:i},a)||((a||z.view.wt.wtOverlays.scrollableElement===z.rootWindow)&&(z.view.setLastSize(o,i),z.render()),z.runHooks("afterRefreshDimensions",{width:t,height:n},{width:o,height:i},a))}},this.loadData=function(e){if(Array.isArray(n.settings.dataSchema)?z.dataType="array":(0,u.isFunction)(n.settings.dataSchema)?z.dataType="function":z.dataType="object",r&&r.destroy(),r=new f.default(z,e,n,G),"object"===(0,o.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,o.default)(e)," given)"));var t,i=r.getSchema();e=[];var a,s=0;for(s=0,a=n.settings.startRows;s<a;s++)if("object"!==z.dataType&&"function"!==z.dataType||!n.settings.dataSchema)if("array"===z.dataType)t=(0,p.deepClone)(i[0]),e.push(t);else{t=[];for(var l=0,c=n.settings.startCols;l<c;l++)t.push(null);e.push(t)}else t=(0,p.deepClone)(i),e.push(t)}n.isPopulated=!1,G.prototype.data=e,Array.isArray(e[0])&&(z.dataType="array"),z.runHooks("beforeLoadData",e,n.firstRun),r.dataSource=e,B.data=e,B.dataType=z.dataType,B.colToProp=r.colToProp.bind(r),B.propToCol=r.propToCol.bind(r),n.cellSettings.length=0;var h=n.settings.columns,d=0;Array.isArray(h)&&(d=h.length),this.columnIndexMapper.initToLength(Math.max(this.countSourceCols(),d,(0,p.deepObjectSize)(r.getSchema()))),this.rowIndexMapper.initToLength(this.countSourceRows()),V.adjustRowsAndCols(),z.runHooks("afterLoadData",e,n.firstRun),n.firstRun?n.firstRun=[null,"loadData"]:(z.runHooks("afterChange",null,"loadData"),z.render()),n.isPopulated=!0},this.getData=function(e,t,n,o){return(0,h.isUndefined)(e)?r.getAll():r.getRange(new N.CellCoords(e,t),new N.CellCoords(n,o),r.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,n,o){return r.getCopyableText(new N.CellCoords(e,t),new N.CellCoords(n,o))},this.getCopyableData=function(e,t){return r.getCopyable(e,r.colToProp(t))},this.getSchema=function(){return r.getSchema()},this.updateSettings=function(e){var t,o,i,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=!1;if((0,h.isDefined)(e.rows))throw new Error('"rows" setting is no longer supported. do you mean startRows, minRows or maxRows?');if((0,h.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?_.default.getSingleton().getRegistered().indexOf(t)>-1?((0,u.isFunction)(e[t])||Array.isArray(e[t]))&&(e[t].initialHook=!0,z.addHook(t,e[t])):!a&&(0,p.hasOwnProperty)(e,t)&&(G.prototype[t]=e[t]):q(e.language));void 0===e.data&&void 0===n.settings.data?z.loadData(null):void 0!==e.data?z.loadData(e.data):void 0!==e.columns&&r.createMap(),i=z.countCols();var d,f,v=e.columns||G.prototype.columns;if(v&&(0,u.isFunction)(v)&&(i=z.countSourceCols(),c=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||(n.cellSettings.length=0),i>0)for(t=0,o=0;t<i;t++)c&&!v(t)||(n.columnSettings[o]=(0,l.columnFactory)(G,n.columnsSettingConflicts),d=n.columnSettings[o].prototype,v&&(f=c?v(t):v[o])&&((0,p.extend)(d,f),(0,p.extend)(d,ee(f))),o+=1);(0,h.isDefined)(e.cell)&&(0,p.objectEach)(e.cell,(function(e){z.setCellMetaObject(e.row,e.col,e)})),z.runHooks("afterCellMetaReset"),(0,h.isDefined)(e.className)&&(G.prototype.className&&(0,s.removeClass)(z.rootElement,G.prototype.className),e.className&&(0,s.addClass)(z.rootElement,e.className));var g=z.rootElement.style.height;""!==g&&(g=parseInt(z.rootElement.style.height,10));var m=e.height;if((0,u.isFunction)(m)&&(m=m()),a){var y=z.rootElement.getAttribute("style");y&&z.rootElement.setAttribute("data-initialstyle",z.rootElement.getAttribute("style"))}if(null===m){var w=z.rootElement.getAttribute("data-initialstyle");w&&(w.indexOf("height")>-1||w.indexOf("overflow")>-1)?z.rootElement.setAttribute("style",w):(z.rootElement.style.height="",z.rootElement.style.overflow="")}else void 0!==m&&(z.rootElement.style.height=isNaN(m)?"".concat(m):"".concat(m,"px"),z.rootElement.style.overflow="hidden");if(void 0!==e.width){var C=e.width;(0,u.isFunction)(C)&&(C=C()),z.rootElement.style.width=isNaN(C)?"".concat(C):"".concat(C,"px")}a||(z.view&&z.view.wt.wtViewport.resetHasOversizedColumnHeadersMarked(),z.runHooks("afterUpdateSettings",e)),V.adjustRowsAndCols(),z.view&&!n.firstRun&&(z.forceFullRender=!0,W.lockEditor(),z._refreshBorders(null),W.unlockEditor()),a||!z.view||""!==g&&""!==m&&void 0!==m||g===m||z.view.wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){var e=z.getSelectedLast();if(G.prototype.getValue){if((0,u.isFunction)(G.prototype.getValue))return G.prototype.getValue.call(z);if(e)return z.getData()[e[0][0]][G.prototype.getValue]}else if(e)return z.getDataAtCell(e[0],e[1])},this.getSettings=function(){return n.settings},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,n,r,o){V.alter(e,t,n,r,o)},this.getCell=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return z.view.getCellAtCoords(new N.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 r.colToProp(e)},this.propToCol=function(e){return r.propToCol(e)},this.toVisualRow=function(e){return U.rowIndexMapper.getVisualIndex(e)},this.toVisualColumn=function(e){return U.columnIndexMapper.getVisualIndex(e)},this.toPhysicalRow=function(e){return U.rowIndexMapper.getPhysicalIndex(e)},this.toPhysicalColumn=function(e){return U.columnIndexMapper.getPhysicalIndex(e)},this.getDataAtCell=function(e,t){return r.get(e,r.colToProp(t))},this.getDataAtRowProp=function(e,t){return r.get(e,t)},this.getDataAtCol=function(e){var t;return(t=[]).concat.apply(t,(0,a.default)(r.getRange(new N.CellCoords(0,e),new N.CellCoords(n.settings.data.length-1,e),r.DESTINATION_RENDERER)))},this.getDataAtProp=function(e){var t,o=r.getRange(new N.CellCoords(0,r.propToCol(e)),new N.CellCoords(n.settings.data.length-1,r.propToCol(e)),r.DESTINATION_RENDERER);return(t=[]).concat.apply(t,(0,a.default)(o))},this.getSourceData=function(e,t,n,r){return void 0===e?B.getData():B.getByRange(new N.CellCoords(e,t),new N.CellCoords(n,r))},this.getSourceDataArray=function(e,t,n,r){return void 0===e?B.getData(!0):B.getByRange(new N.CellCoords(e,t),new N.CellCoords(n,r),!0)},this.getSourceDataAtCol=function(e){return B.getAtColumn(e)},this.getSourceDataAtRow=function(e){return B.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return B.getAtCell(e,t)},this.getDataAtRow=function(e){return r.getRange(new N.CellCoords(e,0),new N.CellCoords(e,this.countCols()-1),r.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,b.rangeEach)(Math.min(a,l),Math.max(a,l),(function(e){var t=!0;return(0,b.rangeEach)(Math.min(s,u),Math.max(s,u),(function(n){var r=o.getCellMeta(e,n);return h=r.type,c?t=c===h:c=h,t})),d=t?h:"mixed",t})),d},this.removeCellMeta=function(e,t,r){var o=[this.toPhysicalRow(e),this.toPhysicalColumn(t)],i=o[0],a=o[1],s=n.cellSettings[i][a][r];!1!==z.runHooks("beforeRemoveCellMeta",e,t,r,s)&&(delete n.cellSettings[i][a][r],z.runHooks("afterRemoveCellMeta",e,t,r,s)),s=null},this.spliceCellsMeta=function(e,t){for(var r,o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];(r=n.cellSettings).splice.apply(r,[e,t].concat(i))},this.setCellMetaObject=function(e,t,n){var r=this;"object"===(0,o.default)(n)&&(0,p.objectEach)(n,(function(n,o){r.setCellMeta(e,t,o,n)}))},this.setCellMeta=function(e,t,r,o){var i=e,a=t;e<this.countRows()&&(i=this.toPhysicalRow(e)),t<this.countCols()&&(a=this.toPhysicalColumn(t)),n.columnSettings[a]||(n.columnSettings[a]=(0,l.columnFactory)(G,n.columnsSettingConflicts)),n.cellSettings[i]||(n.cellSettings[i]=[]),n.cellSettings[i][a]||(n.cellSettings[i][a]=new n.columnSettings[a]),n.cellSettings[i][a][r]=o,z.runHooks("afterSetCellMeta",e,t,r,o)},this.getCellsMeta=function(){return(0,m.arrayFlatten)(n.cellSettings)},this.getCellMeta=function(e,t){var o=this.toPhysicalRow(e),i=this.toPhysicalColumn(t);null===o&&(o=e),null===i&&(i=t);var a=r.colToProp(t);n.columnSettings[i]||(n.columnSettings[i]=(0,l.columnFactory)(G,n.columnsSettingConflicts)),n.cellSettings[o]||(n.cellSettings[o]=[]),n.cellSettings[o][i]||(n.cellSettings[o][i]=new n.columnSettings[i]);var s=n.cellSettings[o][i];if(s.row=o,s.col=i,s.visualRow=e,s.visualCol=t,s.prop=a,s.instance=z,z.runHooks("beforeGetCellMeta",e,t,s),(0,p.extend)(s,ee(s)),s.cells){var u=s.cells.call(s,o,i,a);u&&((0,p.extend)(s,u),(0,p.extend)(s,ee(u)))}return z.runHooks("afterGetCellMeta",e,t,s),s},this.getCellMetaAtRow=function(e){return n.cellSettings[e]},this.isColumnModificationAllowed=function(){return!("object"===z.dataType||z.getSettings().columns)};var te=(0,M.cellMethodLookupFactory)("renderer");this.getCellRenderer=function(e,t){return(0,C.getRenderer)(te.call(this,e,t))},this.getCellEditor=(0,M.cellMethodLookupFactory)("editor");var ne=(0,M.cellMethodLookupFactory)("validator");this.getCellValidator=function(e,t){var n=ne.call(this,e,t);return"string"==typeof n&&(n=(0,E.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&&(r.onQueueEmpty=e);for(var o=z.countRows()-1;o>=0;)if(void 0===t||-1!==t.indexOf(o)){for(var i=z.countCols()-1;i>=0;)void 0===n||-1!==n.indexOf(i)?(r.addValidatorToQueue(),z.validateCell(z.getDataAtCell(o,i),z.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):i-=1;o-=1}else o-=1;r.checkIfQueueIsEmpty()},this.getRowHeader=function(e){var t=n.settings.rowHeaders,r=e;return void 0!==r&&(r=z.runHooks("modifyRowHeader",r)),void 0===r?(t=[],(0,b.rangeEach)(z.countRows()-1,(function(e){t.push(z.getRowHeader(e))}))):Array.isArray(t)&&void 0!==t[r]?t=t[r]:(0,u.isFunction)(t)?t=t(r):t&&"string"!=typeof t&&"number"!=typeof t&&(t=r+1),t},this.hasRowHeaders=function(){return!!n.settings.rowHeaders},this.hasColHeaders=function(){if(void 0!==n.settings.colHeaders&&null!==n.settings.colHeaders)return!!n.settings.colHeaders;for(var e=0,t=z.countCols();e<t;e++)if(z.getColHeader(e))return!0;return!1},this.getColHeader=function(e){var t=n.settings.columns&&(0,u.isFunction)(n.settings.columns),r=z.runHooks("modifyColHeader",e),o=n.settings.colHeaders;if(void 0===r){for(var i=[],a=t?z.countSourceCols():z.countCols(),s=0;s<a;s++)i.push(z.getColHeader(s));o=i}else{var l=z.toPhysicalColumn(r),c=function(e){for(var t=[],n=z.countSourceCols(),r=0;r<n;r++)(0,u.isFunction)(z.getSettings().columns)&&z.getSettings().columns(r)&&t.push(r);return t[e]}(l);!1===n.settings.colHeaders?o=null:n.settings.columns&&(0,u.isFunction)(n.settings.columns)&&n.settings.columns(c)&&n.settings.columns(c).title?o=n.settings.columns(c).title:n.settings.columns&&n.settings.columns[l]&&n.settings.columns[l].title?o=n.settings.columns[l].title:Array.isArray(n.settings.colHeaders)&&void 0!==n.settings.colHeaders[l]?o=n.settings.colHeaders[l]:(0,u.isFunction)(n.settings.colHeaders)?o=n.settings.colHeaders(l):n.settings.colHeaders&&"string"!=typeof n.settings.colHeaders&&"number"!=typeof n.settings.colHeaders&&(o=(0,M.spreadsheetColumnLabel)(r))}return o},this._getColWidthFromSettings=function(e){var t=z.getCellMeta(0,e),r=t.width;if(void 0!==r&&r!==n.settings.width||(r=t.colWidths),null!=r){switch((0,o.default)(r)){case"object":r=r[e];break;case"function":r=r(e)}"string"==typeof r&&(r=parseInt(r,10))}return r},this.getColWidth=function(e){var t=z._getColWidthFromSettings(e);return void 0===(t=z.runHooks("modifyColWidth",t,e))&&(t=N.ViewportColumnsCalculator.DEFAULT_WIDTH),t},this._getRowHeightFromSettings=function(e){var t=n.settings.rowHeights;if(null!=t){switch((0,o.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=z._getRowHeightFromSettings(e);return t=z.runHooks("modifyRowHeight",t,e)},this.countSourceRows=function(){return z.runHooks("modifySourceLength")||(z.getSourceData()?z.getSourceData().length:0)},this.countSourceCols=function(){var e=z.getSourceData()&&z.getSourceData()[0]?z.getSourceData()[0]:[];return(0,p.isObject)(e)?(0,p.deepObjectSize)(e):e.length||0},this.countRows=function(){return r.getLength()},this.countCols=function(){var e=this.getSettings().maxCols,t=this.columnIndexMapper.getNotSkippedIndexesLength();if(n.settings.columns)if((0,u.isFunction)(n.settings.columns))if("array"===z.dataType){for(var o=0,i=0;i<t;i++)n.settings.columns(i)&&(o+=1);t=o}else"object"!==z.dataType&&"function"!==z.dataType||(t=r.colToPropCache.length);else t=n.settings.columns.length;else"object"!==z.dataType&&"function"!==z.dataType||(t=r.colToPropCache.length);return Math.min(e,t)},this.rowOffset=function(){return z.view.wt.wtTable.getFirstRenderedRow()},this.colOffset=function(){return z.view.wt.wtTable.getFirstRenderedColumn()},this.countRenderedRows=function(){return z.view.wt.drawn?z.view.wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return z.view.wt.drawn?z.view.wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return z.view.wt.drawn?z.view.wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return z.view.wt.drawn?z.view.wt.wtTable.getVisibleColumnsCount():-1},this.countEmptyRows=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,b.rangeEachReverse)(z.countRows()-1,(function(n){if(z.isEmptyRow(n))t+=1;else if(!0===e)return!1})),t},this.countEmptyCols=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(z.countRows()<1)return 0;var t=0;return(0,b.rangeEachReverse)(z.countCols()-1,(function(n){if(z.isEmptyCol(n))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return n.settings.isEmptyRow.call(z,e)},this.isEmptyCol=function(e){return n.settings.isEmptyCol.call(z,e)},this.selectCell=function(e,t,n,r){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!(0,h.isUndefined)(e)&&!(0,h.isUndefined)(t)&&this.selectCells([[e,t,n,r]],o,i)},this.selectCells=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===t&&(j=!0);var r=K.selectCells(e);return r&&n&&z.listen(),j=!1,r},this.selectColumns=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return K.selectColumns(e,t)},this.selectRows=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return K.selectRows(e,t)},this.deselectCell=function(){K.deselect()},this.selectAll=function(){j=!0,K.selectAll(),j=!1},this.scrollViewportTo=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=!n,i=!r,a=!1;return void 0!==e&&void 0!==t&&(a=z.view.scrollViewport(new N.CellCoords(e,t),o,r,n,i)),"number"==typeof e&&"number"!=typeof t&&(a=z.view.scrollViewportVertically(e,o,n)),"number"==typeof t&&"number"!=typeof e&&(a=z.view.scrollViewportHorizontally(t,r,i)),a},this.destroy=function(){if(z._clearTimeouts(),z._clearImmediates(),z.view&&z.view.destroy(),B&&B.destroy(),B=null,(0,H.stopObserving)(),(0,k.isRootInstance)(z)){var e=this.rootDocument.querySelector("#hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,s.empty)(z.rootElement),X.destroy(),W&&W.destroy(),z.executeBatchOperations((function(){z.runHooks("afterDestroy")})),_.default.getSingleton().destroy(z),(0,p.objectEach)(z,(function(e,t,n){var r;(0,u.isFunction)(e)?n[t]=(r=t,function(){throw new Error('The "'.concat(r,'" method cannot be called because this Handsontable instance has been destroyed'))}):"guid"!==t&&(n[t]=null)})),z.isDestroyed=!0,r&&r.destroy(),z.rowIndexMapper=null,z.columnIndexMapper=null,r=null,n=null,V=null,K=null,W=null,z=null,G=null},this.getActiveEditor=function(){return W.getActiveEditor()},this.getPlugin=function(e){return(0,w.getPlugin)(this,e)},this.getInstance=function(){return z},this.addHook=function(e,t){_.default.getSingleton().add(e,t,z)},this.hasHook=function(e){return _.default.getSingleton().has(e,z)},this.addHookOnce=function(e,t){_.default.getSingleton().once(e,t,z)},this.removeHook=function(e,t){_.default.getSingleton().remove(e,t,z)},this.runHooks=function(e,t,n,r,o,i,a){return _.default.getSingleton().run(z,e,t,n,r,o,i,a)},this.getTranslatedPhrase=function(e,t){return(0,D.getTranslatedPhrase)(n.settings.language,e,t)},this.toHTML=function(){return(0,y.instanceToHTML)(U)},this.toTableElement=function(){var e=U.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,y.instanceToHTML)(U)),e.firstElementChild},this.timeouts=[],this._registerTimeout=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e;"function"==typeof n&&(n=setTimeout(n,t)),this.timeouts.push(n)},this._clearTimeouts=function(){(0,m.arrayEach)(this.timeouts,(function(e){clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,m.arrayEach)(this.immediates,(function(e){clearImmediate(e)}))},this._refreshBorders=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];W.destroyEditor(e),z.view.render(),t&&K.isSelected()&&W.prepareEditor()},_.default.getSingleton().run(z,"construct")};var o=r(n(46)),i=r(n(18)),a=r(n(33)),s=n(8),l=n(175),u=n(63),c=n(58),h=n(24),d=n(76),f=r(n(493)),v=r(n(495)),g=r(n(25)),p=n(4),m=n(3),y=n(177),w=n(20),C=n(43),E=n(82),S=n(77),b=n(19),R=r(n(499)),T=r(n(500)),M=n(140),O=n(73),k=n(374),N=n(26),_=r(n(45)),A=r(n(377)),I=n(174),D=n(378),L=n(141),x=n(379),H=n(142),P=n(380),F=null},function(e,t,n){"use strict";var r,o,i,a,s;n(176),n(15),n(48),n(31),n(90),n(42),n(117),window,r=/^(\r\n|\n\r|\r|\n)/,o=/^[^\t\r\n]+/,i=/^\t/,a=function(e){var t=[[""]];if(0===e.length)return t;for(var n,a=0,s=0;e.length>0&&n!==e.length;)if(n=e.length,e.match(i))e=e.replace(i,""),a+=1,t[s][a]="";else if(e.match(r))e=e.replace(r,""),a=0,t[s+=1]=[""];else{var l="";if(e.startsWith('"')){for(var u=0,c=!0;c;){var h=e.slice(0,1);'"'===h&&(u+=1),l+=h,(0===(e=e.slice(1)).length||e.match(/^[\t\r\n]/)&&u%2==0)&&(c=!1)}l=l.replace(/^"/,"").replace(/"$/,"").replace(/["]*/g,(function(e){return new Array(Math.floor(e.length/2)).fill('"').join("")}))}else{var d=e.match(o);l=d?d[0]:"",e=e.slice(l.length)}t[s][a]=l}return t},s=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)r>0&&(a+="\t"),"string"==typeof(i=e[t][r])?i.indexOf("\n")>-1?a+='"'.concat(i.replace(/"/g,'""'),'"'):a+=i:a+=null==i?"":i;t!==n-1&&(a+="\n")}return a},t.parse=a,t.stringify=s},function(e,t,n){"use strict";n(11),n(40),n(9),n(12),n(13),t.__esModule=!0,t.mouseDown=i,t.mouseOver=a,t.handleMouseEvent=function(e,t){var n=t.coords,o=t.selection,i=t.controller;s.get(e.type)({coords:n,selection:o,controller:i,isShiftKey:e.shiftKey,isLeftClick:(0,r.isLeftClick)(e)||"touchstart"===e.type,isRightClick:(0,r.isRightClick)(e)})};var r=n(32),o=n(26);function i(e){var t=e.isShiftKey,n=e.isLeftClick,r=e.isRightClick,i=e.coords,a=e.selection,s=e.controller,l=a.isSelected()?a.getSelectedRange().current():null,u=a.isSelectedByCorner(),c=a.isSelectedByRowHeader();if(t&&l)i.row>=0&&i.col>=0&&!s.cells?a.setRangeEnd(i):(u||c)&&i.row>=0&&i.col>=0&&!s.cells?a.setRangeEnd(new o.CellCoords(i.row,i.col)):u&&i.row<0&&!s.column?a.setRangeEnd(new o.CellCoords(l.to.row,i.col)):c&&i.col<0&&!s.row?a.setRangeEnd(new o.CellCoords(i.row,l.to.col)):(!u&&!c&&i.col<0||u&&i.col<0)&&!s.row?a.selectRows(l.from.row,i.row):(!u&&!c&&i.row<0||c&&i.row<0)&&!s.column&&a.selectColumns(l.from.col,i.col);else{var h=new o.CellCoords(i.row,i.col);h.row<0&&(h.row=0),h.col<0&&(h.col=0);var d=!a.inInSelection(h),f=n||r&&d;i.row<0&&i.col>=0&&!s.column?f&&a.selectColumns(i.col):i.col<0&&i.row>=0&&!s.row?f&&a.selectRows(i.row):i.col>=0&&i.row>=0&&!s.cells?f&&a.setRangeStart(i):i.col<0&&i.row<0&&a.setRangeStart(i)}}function a(e){var t=e.isLeftClick,n=e.coords,r=e.selection,i=e.controller;if(t){var a=r.isSelectedByRowHeader(),s=r.isSelectedByColumnHeader(),l=r.tableProps.countCols(),u=r.tableProps.countRows();s&&!i.column?r.setRangeEnd(new o.CellCoords(u-1,n.col)):a&&!i.row?r.setRangeEnd(new o.CellCoords(n.row,l-1)):i.cell||r.setRangeEnd(n)}}var s=new Map([["mousedown",i],["mouseover",a],["touchstart",i]])},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(6)),s=r(n(5)),l=r(n(16)),u=r(n(7)),c=r(n(179)),h=n(178),d=n(369),f=function(e){function t(){return(0,o.default)(this,t),(0,a.default)(this,(0,s.default)(t).call(this,(function(e){return e})))}return(0,u.default)(t,e),(0,i.default)(t,[{key:"insert",value:function(e,n){var r=(0,d.getIncreasedIndexes)(this.indexedValues,e,n);this.indexedValues=(0,h.getListWithInsertedItems)(r,e,n),(0,l.default)((0,s.default)(t.prototype),"insert",this).call(this,e,n)}},{key:"remove",value:function(e){var n=(0,h.getListWithRemovedItems)(this.indexedValues,e);this.indexedValues=(0,d.getDecreasedIndexes)(n,e),(0,l.default)((0,s.default)(t.prototype),"remove",this).call(this,e)}}]),t}(c.default);t.default=f},function(e,t,n){"use strict";n(41),t.__esModule=!0,t.getDecreasedIndexes=function(e,t){return(0,r.arrayMap)(e,(function(e){return e-t.filter((function(t){return t<e})).length}))},t.getIncreasedIndexes=function(e,t,n){var o=n[0],i=n.length;return(0,r.arrayMap)(e,(function(e){return e>=o?e+i:e}))};var r=n(3)},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(6)),a=r(n(5)),s=r(n(7)),l=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(0,o.default)(this,t),(0,i.default)(this,(0,a.default)(t).call(this,e))}return(0,s.default)(t,e),t}(r(n(371)).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(6)),s=r(n(5)),l=r(n(16)),u=r(n(7)),c=r(n(179)),h=n(372),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:"insert",value:function(e,n){this.indexedValues=(0,h.getListWithInsertedItems)(this.indexedValues,e,n,this.initValueOrFn),(0,l.default)((0,s.default)(t.prototype),"insert",this).call(this,e,n)}},{key:"remove",value:function(e){this.indexedValues=(0,h.getListWithRemovedItems)(this.indexedValues,e),(0,l.default)((0,s.default)(t.prototype),"remove",this).call(this,e)}}]),t}(c.default);t.default=d},function(e,t,n){"use strict";var r=n(0);n(17),n(27),n(95),n(31),n(35),t.__esModule=!0,t.getListWithInsertedItems=function(e,t,n,r){var a=n[0];return[].concat((0,o.default)(e.slice(0,a)),(0,o.default)(n.map((function(e,t){return(0,i.isFunction)(r)?r(e,t):r}))),(0,o.default)(e.slice(a)))},t.getListWithRemovedItems=function(e,t){return(0,a.arrayFilter)(e,(function(e,n){return!1===t.includes(n)}))};var o=r(n(33)),i=n(63),a=n(3)},function(e,t,n){"use strict";var r=n(0);n(52),n(11),n(40),n(9),n(12),n(57),n(13),t.__esModule=!0,t.getRegisteredMapsCounter=function(){return u},t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(24),s=n(4),l=r(n(49)),u=0,c=function(){function e(){(0,o.default)(this,e),this.collection=new Map}return(0,i.default)(e,[{key:"register",value:function(e,t){var n=this;!1===this.collection.has(e)&&(this.collection.set(e,t),t.addLocalHook("change",(function(){return n.runLocalHooks("change",t)})),u+=1)}},{key:"unregister",value:function(e){var t=this.collection.get(e);(0,a.isDefined)(t)&&(t.clearLocalHooks(),this.collection.delete(e),this.runLocalHooks("change",t),u-=1)}},{key:"get",value:function(e){return(0,a.isUndefined)(e)?Array.from(this.collection.values()):this.collection.get(e)}},{key:"getLength",value:function(){return this.collection.size}},{key:"removeFromEvery",value:function(e){this.collection.forEach((function(t){t.remove(e)}))}},{key:"insertToEvery",value:function(e,t){this.collection.forEach((function(n){n.insert(e,t)}))}},{key:"initEvery",value:function(e){this.collection.forEach((function(t){t.init(e)}))}}]),e}();(0,s.mixin)(c,l.default);var h=c;t.default=h},function(e,t,n){"use strict";n(118),n(180),n(11),n(9),n(12),n(23),n(13),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(37)},function(e,t,n){var r=n(196),o=n(55),i=n(375),a=n(56).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 o=r(n(46)),i=n(24),a=n(4);function s(){}s.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,s;for(t=0,n=this.countCols();t<n;t++)if(""!==(r=this.getDataAtCell(e,t))&&null!==r&&(0,i.isDefined)(r))return"object"===(0,o.default)(r)&&(s=this.getCellMeta(e,t),(0,a.isObjectEqual)(this.getSchema()[s.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,i.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,preventWheel:!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=s;t.default=l},function(e,t,n){"use strict";t.__esModule=!0,t.getTranslatedPhrase=function(e,t,n){var s=(0,o.getLanguageDictionary)(e);if(null===s)return null;var l=s[t];if((0,a.isUndefined)(l))return null;var u=function(e,t){var n=e;return(0,r.arrayEach)((0,i.getPhraseFormatters)(),(function(r){n=r(e,t)})),n}(l,n);if(Array.isArray(u))return u[0];return u};var r=n(3),o=n(141),i=n(504),a=n(24)},function(e,t,n){"use strict";var r=n(0);n(17),t.__esModule=!0,t.extendNotExistingKeys=function(e,t){return(0,a.objectEach)(t,(function(t,n){(0,i.isUndefined)(e[n])&&(e[n]=t)})),e},t.createCellHeadersRange=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,o=n,i=r;if(e>t){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(70)),i=n(24),a=n(4),s=n(58),l=n(71),u=n(141);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://handsontable.com/docs/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(381));t.Highlight=o.default;var i=r(n(513));t.Selection=i.default;var a=n(367);t.handleMouseEvent=a.handleMouseEvent;var s=n(143);t.detectSelectionType=s.detectSelectionType,t.normalizeSelectionFactory=s.normalizeSelectionFactory},function(e,t,n){"use strict";var r=n(0);n(118),n(17),n(176),n(41),n(27),n(11),n(40),n(382),n(383),n(65),n(9),n(35),n(12),n(57),n(13),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(33)),i=r(n(75)),a=r(n(1)),s=r(n(2)),l=n(506),u=n(3);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(n,!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.ACTIVE_HEADER_TYPE="active-header";t.AREA_TYPE="area";var d="cell";t.CELL_TYPE=d;var f="fill";t.FILL_TYPE=f;t.HEADER_TYPE="header";t.CUSTOM_SELECTION="custom-selection";var v=function(){function e(t){(0,a.default)(this,e),this.options=t,this.layerLevel=0,this.cell=(0,l.createHighlight)(d,t),this.fill=(0,l.createHighlight)(f,t),this.areas=new Map,this.headers=new Map,this.activeHeaders=new Map,this.customSelections=new Map}return(0,s.default)(e,[{key:"isEnabledFor",value:function(e){var t="current"===e?d:e,n=this.options.disableHighlight;return"string"==typeof n&&(n=[n]),!1===n||Array.isArray(n)&&!n.includes(t)}},{key:"useLayerLevel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.layerLevel=e,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",h({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",h({},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)("active-header",h({},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,t){this.customSelections.set(e,(0,l.createHighlight)("custom-selection",h({},t)))}},{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:"getAll",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.values()))}}]),e}();t.default=v},function(e,t,n){var r=n(21),o=n(28),i=n(67),a=n(93).f,s=n(50),l=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||l,sham:!s},{getOwnPropertyDescriptor:function(e,t){return a(i(e),t)}})},function(e,t,n){var r=n(21),o=n(50),i=n(195),a=n(67),s=n(93),l=n(108);r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),o=s.f,u=i(r),c={},h=0;u.length>h;)void 0!==(n=o(r,t=u[h++]))&&l(c,t,n);return c}})},function(e,t,n){"use strict";var r=n(0);n(15),n(11),n(40),n(65),n(9),n(12),n(13),t.__esModule=!0,t.default=void 0;var o=r(n(75)),i=r(n(1)),a=r(n(2)),s=n(4),l=n(19),u=n(24),c=function(){function e(t){(0,i.default)(this,e),this.samples=null,this.dataFactory=t,this.customSampleCount=null,this.allowDuplicates=!1}return(0,a.default)(e,null,[{key:"SAMPLE_COUNT",get:function(){return 3}}]),(0,a.default)(e,[{key:"getSampleCount",value:function(){return this.customSampleCount?this.customSampleCount:e.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(e,t,n){var r=this,o=new Map,i="number"==typeof n?{from:n,to:n}:n,a=i.from,s=i.to;return(0,l.rangeEach)(a,s,(function(n){var i=r.generateSample(e,t,n);o.set(n,i)})),o}},{key:"generateSample",value:function(e,t,n){var r=this;if("row"!==e&&"col"!==e)throw new Error("Unsupported sample type");var i=new Map,a="row"===e?"col":"row",c=[];return(0,l.rangeEach)(t.from,t.to,(function(t){var l,h="row"===e?r.dataFactory(n,t):r.dataFactory(t,n),d=h.value,f=h.bundleCountSeed,v=f>0;l=(0,s.isObject)(d)?Object.keys(d).length:Array.isArray(d)?d.length:(0,u.stringify)(d).length,v&&(l+=f),i.has(l)||i.set(l,{needed:r.getSampleCount(),strings:[]});var g=i.get(l);g.needed&&((!(c.indexOf(d)>-1)||r.allowDuplicates||v)&&(g.strings.push((0,o.default)({value:d},a,t)),c.push(d),g.needed-=1))})),i}}]),e}();t.default=c},function(e,t,n){"use strict";var r=n(0);n(118),n(17),n(41),n(11),n(95),n(31),n(72),n(40),n(83),n(84),n(386),n(382),n(383),n(167),n(65),n(9),n(12),n(57),n(13),t.__esModule=!0,t.default=void 0;var o=r(n(33)),i=r(n(75)),a=r(n(527)),s=r(n(1)),l=r(n(2)),u=r(n(6)),c=r(n(5)),h=r(n(16)),d=r(n(7)),f=n(8),v=n(24),g=n(4),p=n(63),m=n(3),y=r(n(22)),w=n(20),C=n(73),E=r(n(45)),S=n(142),b=n(529),R=n(182),T=n(530),M=n(531),O=n(92);function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(n,!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _="columnSorting";(0,O.registerRootComparator)(_,M.rootComparator),E.default.getSingleton().register("beforeColumnSort"),E.default.getSingleton().register("afterColumnSort");var A=function(e){function t(e){var n;return(0,s.default)(this,t),(n=(0,u.default)(this,(0,c.default)(t).call(this,e))).columnStatesManager=new b.ColumnStatesManager,n.columnMetaCache=null,n.pluginKey=_,n.indexesSequenceCache=null,n}return(0,d.default)(t,e),(0,l.default)(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings()[this.pluginKey]}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.columnMetaCache=this.hot.columnIndexMapper.registerMap("".concat(this.pluginKey,".columnMeta"),new C.PhysicalIndexToValueMap((function(t){var n=e.hot.toVisualColumn(t);return null===n&&(n=t),e.getMergedPluginSettings(n)}))),this.addHook("afterGetColHeader",(function(t,n){return e.onAfterGetColHeader(t,n)})),this.addHook("beforeOnCellMouseDown",(function(t,n,r,o){return e.onBeforeOnCellMouseDown(t,n,r,o)})),this.addHook("afterOnCellMouseDown",(function(t,n){return e.onAfterOnCellMouseDown(t,n)})),this.addHook("afterInit",(function(){return e.loadOrSortBySettings()})),this.addHook("afterLoadData",(function(t,n){return e.onAfterLoadData(n)})),this.hot.view&&this.loadOrSortBySettings(),(0,h.default)((0,c.default)(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){var e=this,n=function(t,n){var r=(0,R.getHeaderSpanElement)(n);!1!==(0,R.isFirstLevelColumnHeader)(t,n)&&null!==r&&e.updateHeaderClasses(r)};this.hot.addHook("afterGetColHeader",n),this.hot.addHookOnce("afterRender",(function(){e.hot.removeHook("afterGetColHeader",n)})),this.hot.executeBatchOperations((function(){null!==e.indexesSequenceCache&&(e.hot.rowIndexMapper.setIndexesSequence(e.indexesSequenceCache.getValues()),e.hot.rowIndexMapper.unregisterMap(e.pluginKey)),e.hot.columnIndexMapper.unregisterMap("".concat(e.pluginKey,".columnMeta"))})),(0,h.default)((0,c.default)(t.prototype),"disablePlugin",this).call(this)}},{key:"sort",value:function(e){var t=this,n=this.getSortConfig(),r=this.getNormalizedSortConfigs(e),o=this.areValidSortConfigs(r);if(!1!==this.hot.runHooks("beforeColumnSort",n,r,o)){if(0===n.length&&null===this.indexesSequenceCache&&(this.indexesSequenceCache=this.hot.rowIndexMapper.registerMap(this.pluginKey,new C.VisualIndexToPhysicalIndexMap),this.indexesSequenceCache.setValues(this.hot.rowIndexMapper.getIndexesSequence())),o){var i=(0,m.arrayMap)(r,(function(e){return r=(n=e).column,o=(0,a.default)(n,["column"]),N({column:t.hot.toPhysicalColumn(r)},o);var n,r,o}));this.columnStatesManager.setSortStates(i),this.sortByPresetSortStates(),this.saveAllSortSettings()}this.hot.runHooks("afterColumnSort",n,this.getSortConfig(),o),o&&(this.hot.render(),this.hot.view.wt.draw(!0))}}},{key:"clearSort",value:function(){this.sort([])}},{key:"isSorted",value:function(){return this.enabled&&!this.columnStatesManager.isListOfSortedColumnsEmpty()}},{key:"getSortConfig",value:function(e){var t=this,n=function(e){var n=e.column,r=(0,a.default)(e,["column"]);return N({column:t.hot.toVisualColumn(n)},r)};if((0,v.isDefined)(e)){var r=this.hot.toPhysicalColumn(e),o=this.columnStatesManager.getColumnSortState(r);return(0,v.isDefined)(o)?n(o):void 0}var i=this.columnStatesManager.getSortStates();return(0,m.arrayMap)(i,(function(e){return n(e)}))}},{key:"setSortConfig",value:function(e){var t=this,n=this.getNormalizedSortConfigs(e);if(this.areValidSortConfigs(n)){var r=(0,m.arrayMap)(n,(function(e){return r=(n=e).column,o=(0,a.default)(n,["column"]),N({column:t.hot.toPhysicalColumn(r)},o);var n,r,o}));this.columnStatesManager.setSortStates(r)}}},{key:"getNormalizedSortConfigs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e.slice(0,1):[e].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&&e>=0}));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 e=this,t={};this.hot.runHooks("persistentStateLoad","columnSorting",t);var n=t.value;return(0,v.isDefined)(n)&&Array.isArray(n.initialConfig)&&(n.initialConfig=(0,m.arrayMap)(n.initialConfig,(function(t){var n=t.column,r=(0,a.default)(t,["column"]);return N({column:e.hot.toVisualColumn(n)},r)}))),n}},{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,v.isDefined)(r)?(n.sortOrder=r,n):void 0}var o=this.hot.countCols();if(Number.isInteger(e)&&e>=0&&e<o)return{column:e,sortOrder:(0,R.getNextSortOrder)()}}},{key:"getNextSortConfig",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"append",n=this.hot.toPhysicalColumn(e),r=this.columnStatesManager.getIndexOfColumnInSortQueue(n),i=this.columnStatesManager.isColumnSorted(n),a=this.getSortConfig(),s=this.getColumnNextConfig(e);if(i){if((0,v.isUndefined)(s))return[].concat((0,o.default)(a.slice(0,r)),(0,o.default)(a.slice(r+1)));if("append"===t)return[].concat((0,o.default)(a.slice(0,r)),(0,o.default)(a.slice(r+1)),[s]);if("replace"===t)return[].concat((0,o.default)(a.slice(0,r)),[s],(0,o.default)(a.slice(r+1)))}return(0,v.isDefined)(s)?a.concat(s):a}},{key:"getPluginColumnConfig",value:function(e){if((0,g.isObject)(e)){var t=e[this.pluginKey];if((0,g.isObject)(t))return t}return{}}},{key:"getMergedPluginSettings",value:function(e){var t=this.hot.getSettings()[this.pluginKey],n=this.columnStatesManager.getAllColumnsProperties(),r=this.hot.getCellMeta(0,e),o=Object.getPrototypeOf(r);return Array.isArray(o.columns)?Object.assign(n,t,this.getPluginColumnConfig(o.columns[e])):(0,p.isFunction)(o.columns)?Object.assign(n,t,this.getPluginColumnConfig(o.columns(e))):Object.assign(n,t)}},{key:"getFirstCellSettings",value:function(e){var t=this.hot.getCellMeta(0,e),n=Object.create(t);return n[this.pluginKey]=this.columnMetaCache.getValueAtIndex(this.hot.toPhysicalColumn(e)),n}},{key:"getNumberOfRowsToSort",value:function(e){var t=this.hot.getSettings();return t.maxRows<=e?t.maxRows:e-t.minSpareRows}},{key:"sortByPresetSortStates",value:function(){var e=this;if(this.columnStatesManager.isListOfSortedColumnsEmpty())this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues());else{for(var t=[],n=this.columnStatesManager.getSortedColumns(),r=this.hot.countRows(),o=function(t){return(0,m.arrayMap)(n,(function(n){return e.hot.getDataAtCell(t,e.hot.toVisualColumn(n))}))},i=0;i<this.getNumberOfRowsToSort(r);i+=1)t.push([this.hot.toPhysicalRow(i)].concat(o(i)));var a=(0,m.arrayMap)(t,(function(e){return e[0]}));(0,O.sort)(t,this.pluginKey,(0,m.arrayMap)(n,(function(t){return e.columnStatesManager.getSortOrderOfColumn(t)})),(0,m.arrayMap)(n,(function(t){return e.getFirstCellSettings(e.hot.toVisualColumn(t))})));for(var s=t.length;s<r;s+=1)t.push([s].concat(o(s)));var l=(0,m.arrayMap)(t,(function(e){return e[0]})),u=new Map((0,m.arrayMap)(a,(function(e,t){return[e,l[t]]})));this.hot.rowIndexMapper.setIndexesSequence((0,m.arrayMap)(this.hot.rowIndexMapper.getIndexesSequence(),(function(e){return u.has(e)?u.get(e):e})))}}},{key:"loadOrSortBySettings",value:function(){var e=this.getAllSavedSortSettings();if((0,g.isObject)(e))this.sortBySettings(e);else{var t=this.hot.getSettings()[this.pluginKey];this.sortBySettings(t)}}},{key:"sortBySettings",value:function(e){if((0,g.isObject)(e)){this.columnStatesManager.updateAllColumnsProperties(e);var t=e.initialConfig;(Array.isArray(t)||(0,g.isObject)(t))&&this.sort(t)}else this.hot.render()}},{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,f.removeClass)(e,(0,T.getClassedToRemove)(e)),!1!==this.enabled){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(0,f.addClass)(e,T.getClassesToAdd.apply(void 0,n))}}},{key:"onUpdateSettings",value:function(e){(0,h.default)((0,c.default)(t.prototype),"onUpdateSettings",this).call(this),null!==this.columnMetaCache&&this.columnMetaCache.init(this.hot.countSourceCols()),(0,v.isDefined)(e[this.pluginKey])&&this.sortBySettings(e[this.pluginKey])}},{key:"onAfterLoadData",value:function(e){!0===e&&this.hot.view&&this.loadOrSortBySettings()}},{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.columnStatesManager.destroy(),this.hot.rowIndexMapper.unregisterMap(this.pluginKey),this.hot.columnIndexMapper.unregisterMap("".concat(this.pluginKey,".columnMeta")),(0,h.default)((0,c.default)(t.prototype),"destroy",this).call(this)}}]),t}(y.default);(0,w.registerPlugin)(_,A);var I=A;t.default=I},function(e,t,n){var r=n(21),o=n(526);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(e,t,n){var r=n(223),o=n(213),i=n(224);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(532),i=n(533),a=n(534),s=r(n(80)),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(48),n(53),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(3),s=n(4);function l(e,t){var n;return(0,a.arrayEach)(t,(function(t){var r=t.key?t.key.split(":"):null;if(Array.isArray(r)&&r[1]===e)return n=t,!1})),n}var u=function(){function e(t){(0,o.default)(this,e),this.hot=t,this.commands={},this.commonCallback=null}return(0,i.default)(e,[{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(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=e.split(":"),u=i[0],c=2===i.length?i[1]:null,h=this.commands[u];if(!h)throw new Error("Menu command '".concat(u,"' not exists."));if(c&&h.submenu&&(h=l(c,h.submenu.items)),!0!==h.disabled&&("function"!=typeof h.disabled||!0!==h.disabled.call(this.hot))&&!(0,s.hasOwnProperty)(h,"submenu")){var d=[];"function"==typeof h.callback&&d.push(h.callback),"function"==typeof this.commonCallback&&d.push(this.commonCallback),r.unshift(i.join(":")),(0,a.arrayEach)(d,(function(e){return e.apply(t.hot,r)}))}}}]),e}();t.default=u},function(e,t,n){"use strict";var r=n(0);n(15),n(60),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(4),s=n(3),l=n(85);function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=[],o=e;return o&&o.items?o=o.items:Array.isArray(o)||(o=t),(0,a.isObject)(o)?(0,a.objectEach)(o,(function(e,t){var o=n["string"==typeof e?e:t];o||(o=e),(0,a.isObject)(e)?(0,a.extend)(o,e):"string"==typeof o&&(o={name:o}),void 0===o.key&&(o.key=t),r.push(o)})):(0,s.arrayEach)(o,(function(e,t){var o=n[e];!o&&l.ITEMS.indexOf(e)>=0||(o||(o={name:e,key:"".concat(t)}),(0,a.isObject)(e)&&(0,a.extend)(o,e),void 0===o.key&&(o.key=t),r.push(o))})),r}var c=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,o.default)(this,e),this.hot=t,this.predefinedItems=(0,l.predefinedItems)(),this.defaultOrderPattern=n}return(0,i.default)(e,[{key:"setPredefinedItems",value:function(e){var t=this,n={};this.defaultOrderPattern.length=0,(0,a.objectEach)(e,(function(e,r){var o="";e.name===l.SEPARATOR?(n[l.SEPARATOR]=e,o=l.SEPARATOR):isNaN(parseInt(r,10))?(e.key=void 0===e.key?r:e.key,n[r]=e,o=e.key):(n[e.key]=e,o=e.key),t.defaultOrderPattern.push(o)})),this.predefinedItems=n}},{key:"getItems",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return u(e,this.defaultOrderPattern,this.predefinedItems)}}]),e}();t.default=c},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(19),s=0,l=function(){function e(t){(0,o.default)(this,e),this.hot=t,this._element=null,this.state=s}return(0,i.default)(e,[{key:"appendTo",value:function(e){e.appendChild(this._element),this.state=2}},{key:"build",value:function(){this.state===s&&(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=s}},{key:"isAppended",value:function(){return 2===this.state}},{key:"isBuilt",value:function(){return this.state>=1}},{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}}}]),e}();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=0,s=function(){function e(t){(0,o.default)(this,e),this.hot=t,this._element=null,this.state=a}return(0,i.default)(e,[{key:"appendTo",value:function(e){e.appendChild(this._element),this.state=2}},{key:"build",value:function(){this.state===a&&(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=a}},{key:"isAppended",value:function(){return 2===this.state}},{key:"isBuilt",value:function(){return this.state>=1}},{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}}}]),e}();t.default=s},function(e,t,n){"use strict";n(9),n(39),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(10);t.__esModule=!0,t.condition=a,t.CONDITION_NAME=void 0;var o=r(n(14)),i=n(29);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(10),o=n(0);t.__esModule=!0,t.condition=u,t.CONDITION_NAME=void 0;var i=o(n(18)),a=r(n(14)),s=n(24),l=n(29);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(10),o=n(0);t.__esModule=!0,t.condition=c,t.CONDITION_NAME=void 0;var i=o(n(18)),a=r(n(14)),s=n(29),l=n(397),u=n(398);function c(e,t){var n=(0,i.default)(t,2),r=n[0],o=n[1];if("numeric"===e.meta.type){var a=parseFloat(r,10),c=parseFloat(o,10);r=Math.min(a,c),o=Math.max(a,c)}else if("date"===e.meta.type){var h=(0,s.getCondition)(u.CONDITION_NAME,[o]),d=(0,s.getCondition)(l.CONDITION_NAME,[r]);return h(e)&&d(e)}return e.value>=r&&e.value<=o}t.CONDITION_NAME="between",(0,s.registerCondition)("between",c,{name:a.FILTERS_CONDITIONS_BETWEEN,inputsCount:2,showOperators:!0})},function(e,t,n){"use strict";var r=n(10),o=n(0);t.__esModule=!0,t.condition=u,t.CONDITION_NAME=void 0;var i=o(n(18)),a=o(n(64)),s=r(n(14)),l=n(29);function u(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="date_after",(0,l.registerCondition)("date_after",u,{name:s.FILTERS_CONDITIONS_AFTER,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";var r=n(10),o=n(0);t.__esModule=!0,t.condition=u,t.CONDITION_NAME=void 0;var i=o(n(18)),a=o(n(64)),s=r(n(14)),l=n(29);function u(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="date_before",(0,l.registerCondition)("date_before",u,{name:s.FILTERS_CONDITIONS_BEFORE,inputsCount:1,showOperators:!0})},function(e,t,n){"use strict";var r=n(10),o=n(0);n(15),t.__esModule=!0,t.condition=u,t.CONDITION_NAME=void 0;var i=o(n(18)),a=r(n(14)),s=n(24),l=n(29);function u(e,t){var n=(0,i.default)(t,1)[0];return(0,s.stringify)(e.value).toLowerCase().indexOf((0,s.stringify)(n))>=0}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(10);t.__esModule=!0,t.operationResult=s,t.SHORT_NAME_FOR_COMPONENT=t.OPERATION_ID=void 0;var o=r(n(14)),i=n(120);t.OPERATION_ID="disjunction";var a=o.FILTERS_LABELS_DISJUNCTION;function s(e,t){return e.some((function(e){return e.func(t)}))}t.SHORT_NAME_FOR_COMPONENT=a,(0,i.registerOperation)("disjunction",a,s)},function(e,t,n){"use strict";var r=n(10);n(31),t.__esModule=!0,t.operationResult=s,t.SHORT_NAME_FOR_COMPONENT=t.OPERATION_ID=void 0;var o=r(n(14)),i=n(120);t.OPERATION_ID="disjunctionWithExtraCondition";var a=o.FILTERS_LABELS_DISJUNCTION;function s(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=a,(0,i.registerOperation)("disjunctionWithExtraCondition",a,s)},function(e,t,n){"use strict";var r=n(0);n(15),n(34),n(60),t.__esModule=!0,t.default=void 0;var o=r(n(70)),i=r(n(1)),a=r(n(2)),s=n(3),l=n(4),u=n(71),c=r(n(49)),h=n(29),d=n(187),f=n(120);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(e,t){var n=this,r=!0;if(void 0===t)(0,l.objectEach)(this.columnTypes,(function(t,o){return r=n.isMatchInConditions(n.conditions[t][o],e,t)}));else{var o=this.columnTypes[t];r=this.isMatchInConditions(this.getConditions(t),e,o)}return r}},{key:"isMatchInConditions",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d.OPERATION_ID;return!e.length||(0,f.getOperationFunc)(n)(e,t)}},{key:"addCondition",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d.OPERATION_ID,r=(0,s.arrayMap)(t.args,(function(e){return"string"==typeof e?e.toLowerCase():e})),o=t.name||t.command.key;this.runLocalHooks("beforeAdd",e),-1===this.orderStack.indexOf(e)&&this.orderStack.push(e);var i=this.columnTypes[e];if(i){if(i!==n)throw Error((0,u.toSingleLine)(v(),e,i))}else{if(!this.conditions[n])throw new Error("Unexpected operation named `".concat(n,"`. Possible ones are `disjunction` and `conjunction`."));this.columnTypes[e]=n}this.getConditions(e).push({name:o,args:r,func:(0,h.getCondition)(o,r)}),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 e=this,t=[];return(0,s.arrayEach)(this.orderStack,(function(n){var r=(0,s.arrayMap)(e.getConditions(n),(function(e){return{name:e.name,args:e.args}})),o=e.columnTypes[n];t.push({column:n,operation:o,conditions:r})})),t}},{key:"importAllConditions",value:function(e){var t=this;this.clean(),(0,s.arrayEach)(e,(function(e){t.orderStack.push(e.column),(0,s.arrayEach)(e.conditions,(function(n){return t.addCondition(e.column,n)}))}))}},{key:"removeConditions",value:function(e){this.runLocalHooks("beforeRemove",e),this.orderStack.indexOf(e)>=0&&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,s.arrayFilter)(n,(function(e){return e.name===t})).length>0:n.length>0}},{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 e=Object.create(null);return(0,l.objectEach)(f.operations,(function(t,n){e[n]=Object.create(null)})),e}}]),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 e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return[]};(0,o.default)(this,e),this.conditionCollection=t,this.columnDataFactory=n}return(0,i.default)(e,[{key:"filter",value:function(){var e=this,t=[];return this.conditionCollection.isEmpty()||(0,a.arrayEach)(this.conditionCollection.orderStack,(function(n,r){var o=e.columnDataFactory(n);r&&(o=e._getIntersectData(o,t)),t=e.filterByColumn(n,o)})),t}},{key:"filterByColumn",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[];return(0,a.arrayEach)(n,(function(n){void 0!==n&&t.conditionCollection.isMatch(n,e)&&r.push(n)})),r}},{key:"_getIntersectData",value:function(e,t){var n=[];return(0,a.arrayEach)(t,(function(t){var r=t.meta.visualRow;void 0!==e[r]&&(n[r]=e[r])})),n}}]),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)),a=n(122),s=n(4),l=function(){function e(t,n){(0,o.default)(this,e);var r=(0,s.isObject)(t),i=(0,s.isObject)(n);this._row=r?t.index:t,this.rowAbsolute=!r||t.isAbsolute,this._column=i?n.index:n,this.columnAbsolute=!i||n.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,i.default)(e,[{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,a.toLabel)({index:this.row,isAbsolute:this.rowAbsolute},{index:this.column,isAbsolute:this.columnAbsolute})}}]),e}();t.default=l},function(e,t,n){"use strict";var r=n(0);n(17),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(6)),a=r(n(5)),s=r(n(2)),l=r(n(7)),u=n(3),c=n(19),h=n(8),d=function(e){function t(e,n){var r;return(0,o.default)(this,t),(r=(0,i.default)(this,(0,a.default)(t).call(this,e,n))).dataManager=r.plugin.dataManager,r.collapsingUI=r.plugin.collapsingUI,r.rowHeaderWidthCache=null,r}return(0,l.default)(t,e),(0,s.default)(t,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)(t,[{key:"appendLevelIndicators",value:function(e,n){var r=this.hot.toPhysicalRow(e),o=this.dataManager.getRowLevel(r),i=this.dataManager.getDataObject(r),a=n.getElementsByTagName("DIV")[0],s=a.querySelector("span.rowHeader"),l=a.querySelectorAll('[class^="ht_nesting"]');if((0,u.arrayEach)(l,(function(e){e&&a.removeChild(e)})),(0,h.addClass)(n,t.CSS_CLASSES.indicatorContainer),o){var d=this.hot.rootDocument,f=s.cloneNode(!0);a.innerHTML="",(0,c.rangeEach)(0,o-1,(function(){var e=d.createElement("SPAN");(0,h.addClass)(e,t.CSS_CLASSES.emptyIndicator),a.appendChild(e)})),a.appendChild(f)}if(this.dataManager.hasChildren(i)){var v=this.hot.rootDocument.createElement("DIV");(0,h.addClass)(n,t.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(r)?(0,h.addClass)(v,"".concat(t.CSS_CLASSES.button," ").concat(t.CSS_CLASSES.expandButton)):(0,h.addClass)(v,"".concat(t.CSS_CLASSES.button," ").concat(t.CSS_CLASSES.collapseButton)),a.appendChild(v)}}},{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()}}]),t}(r(n(190)).default);t.default=d},function(e,t,n){"use strict";var r=n(10),o=n(0);n(407),t.__esModule=!0,t.default=void 0,n(409),n(410),n(411),n(412);var i=n(61),a=n(43),s=n(82),l=n(174),u=o(n(365)),c=o(n(517)),h=r(n(25)),d=n(373),f=o(n(45)),v=o(n(181)),g=r(n(177)),p=r(n(3)),m=r(n(76)),y=r(n(140)),w=r(n(364)),C=r(n(81)),E=r(n(63)),S=r(n(24)),b=r(n(19)),R=r(n(4)),T=r(n(175)),M=r(n(77)),O=r(n(59)),k=r(n(8)),N=r(n(32)),_=r(n(518)),A=n(20),I=o(n(377)),D=n(374),L=n(378),x=r(n(14)),H=n(141);function P(e,t){var n=new u.default(e,t||{},D.rootInstanceSymbol);return n.init(),n}(0,c.default)(P),P.Core=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new u.default(e,t,D.rootInstanceSymbol)},P.DefaultSettings=I.default,P.EventManager=h.default,P._getListenersCounter=h.getListenersCounter,P._getRegisteredMapsCounter=d.getRegisteredMapsCounter,P.packageName="handsontable",P.buildDate="08/01/2020 17:58:03",P.version="7.2.2",P.hooks=f.default.getSingleton(),P.__GhostTable=v.default;var F=[p,m,y,w,C,E,S,b,R,T,M,O,g],B=[k,N];P.helper={},P.dom={},p.arrayEach(F,(function(e){p.arrayEach(Object.getOwnPropertyNames(e),(function(t){"_"!==t.charAt(0)&&(P.helper[t]=e[t])}))})),p.arrayEach(B,(function(e){p.arrayEach(Object.getOwnPropertyNames(e),(function(t){"_"!==t.charAt(0)&&(P.dom[t]=e[t])}))})),P.cellTypes={},p.arrayEach((0,l.getRegisteredCellTypeNames)(),(function(e){P.cellTypes[e]=(0,l.getCellType)(e)})),P.cellTypes.registerCellType=l.registerCellType,P.cellTypes.getCellType=l.getCellType,P.editors={},p.arrayEach((0,i.getRegisteredEditorNames)(),(function(e){P.editors["".concat(M.toUpperCaseFirst(e),"Editor")]=(0,i.getEditor)(e)})),P.editors.registerEditor=i.registerEditor,P.editors.getEditor=i.getEditor,P.renderers={},p.arrayEach((0,a.getRegisteredRendererNames)(),(function(e){var t=(0,a.getRenderer)(e);"base"===e&&(P.renderers.cellDecorator=t),P.renderers["".concat(M.toUpperCaseFirst(e),"Renderer")]=t})),P.renderers.registerRenderer=a.registerRenderer,P.renderers.getRenderer=a.getRenderer,P.validators={},p.arrayEach((0,s.getRegisteredValidatorNames)(),(function(e){P.validators["".concat(M.toUpperCaseFirst(e),"Validator")]=(0,s.getValidator)(e)})),P.validators.registerValidator=s.registerValidator,P.validators.getValidator=s.getValidator,P.plugins={},p.arrayEach(Object.getOwnPropertyNames(_),(function(e){var t=_[e];"Base"===e?P.plugins["".concat(e,"Plugin")]=t:P.plugins[e]=t})),P.plugins.registerPlugin=A.registerPlugin,P.languages={},P.languages.dictionaryKeys=x,P.languages.getLanguageDictionary=H.getLanguageDictionary,P.languages.getLanguagesDictionaries=H.getLanguagesDictionaries,P.languages.registerLanguageDictionary=H.registerLanguageDictionary,P.languages.getTranslatedPhrase=function(){return L.getTranslatedPhrase.apply(void 0,arguments)};var V=P;t.default=V},function(e,t,n){var r=n(21),o=n(28),i=n(198).f;r({target:"Object",stat:!0,forced:o((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:i})},function(e,t,n){var r=n(38),o=n(147),i=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=i},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var r=n(50),o=n(56),i=n(47),a=n(131);e.exports=r?Object.defineProperties:function(e,t){i(e);for(var n,r=a(t),s=r.length,l=0;s>l;)o.f(e,n=r[l++],t[n]);return e}},function(e,t,n){"use strict";var r=n(201).IteratorPrototype,o=n(103),i=n(97),a=n(132),s=n(104),l=function(){return this};e.exports=function(e,t,n){var u=t+" Iterator";return e.prototype=o(r,{next:i(1,n)}),a(e,u,!1,!0),s[u]=l,e}},function(e,t,n){var r=n(44);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var r=n(204),o={};o[n(37)("toStringTag")]="z",e.exports="[object z]"!==String(o)?function(){return"[object "+r(this)+"]"}:o.toString},function(e,t,n){var r=n(28);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},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 r=n(105),o=n(62),i=n(207),a=n(205),s=n(51),l=n(108),u=n(206);e.exports=function(e){var t,n,c,h,d,f=o(e),v="function"==typeof this?this:Array,g=arguments.length,p=g>1?arguments[1]:void 0,m=void 0!==p,y=0,w=u(f);if(m&&(p=r(p,g>2?arguments[2]:void 0,2)),null==w||v==Array&&a(w))for(n=new v(t=s(f.length));t>y;y++)l(n,y,m?p(f[y],y):f[y]);else for(d=(h=w.call(f)).next,n=new v;!(c=d.call(h)).done;y++)l(n,y,m?i(h,p,[c.value,y],!0):c.value);return n.length=y,n}},function(e,t,n){var r=n(47),o=n(156),i=n(37)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[i])?t:o(n)}},function(e,t,n){var r=n(28),o=n(215);e.exports=function(e){return r((function(){return!!o[e]()||" "!=" "[e]()||o[e].name!==e}))}},function(e,t,n){"use strict";var r=n(89).forEach,o=n(107);e.exports=o("forEach")?function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}:[].forEach},function(e,t){e.exports=function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){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);n(11),n(9),n(12),n(23),n(13),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(6)),s=r(n(5)),l=r(n(7)),u=n(138),c=function(e){function t(){var e;return(0,o.default)(this,t),(e=(0,a.default)(this,(0,s.default)(t).call(this,"TH"))).orderViews=new WeakMap,e.sourceRowIndex=0,e}return(0,l.default)(t,e),(0,i.default)(t,[{key:"obtainOrderView",value:function(e){var t,n=this;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new u.SharedOrderView(e,(function(e){return n.nodesPool.obtain(n.sourceRowIndex,e)}),this.nodeType),this.orderViews.set(e,t)),t}},{key:"render",value:function(){for(var e=this.table,t=e.rowsToRender,n=e.rowHeaderFunctions,r=e.rowHeadersCount,o=e.rows,i=e.cells,a=0;a<t;a++){var s=this.table.renderedRowToSource(a),l=o.getRenderedNode(a);this.sourceRowIndex=s;var u=this.obtainOrderView(l),c=i.obtainOrderView(l);u.appendView(c).setSize(r).setOffset(this.table.renderedColumnToSource(0)).start();for(var h=0;h<r;h++){u.render();var d=u.getCurrentNode();d.className="",d.removeAttribute("style"),n[h](s,d,h)}u.end()}}}]),t}(r(n(114)).default);t.default=c},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(427)),s=n(227),l=function(){function e(){(0,o.default)(this,e),this.size=new a.default,this.workingSpace=s.WORKING_SPACE_ALL,this.sharedSize=null}return(0,i.default)(e,[{key:"setSize",value:function(e){this.size.setSize(e)}},{key:"setOffset",value:function(e){this.size.setOffset(e)}},{key:"getViewSize",value:function(){return this.size}},{key:"isShared",value:function(){return this.sharedSize instanceof a.default}},{key:"isPlaceOn",value:function(e){return this.workingSpace===e}},{key:"append",value:function(e){this.workingSpace=s.WORKING_SPACE_TOP,e.workingSpace=s.WORKING_SPACE_BOTTOM,this.sharedSize=e.getViewSize()}},{key:"prepend",value:function(e){this.workingSpace=s.WORKING_SPACE_BOTTOM,e.workingSpace=s.WORKING_SPACE_TOP,this.sharedSize=e.getViewSize()}}]),e}();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=function(){function e(){(0,o.default)(this,e),this.currentSize=0,this.nextSize=0,this.currentOffset=0,this.nextOffset=0}return(0,i.default)(e,[{key:"setSize",value:function(e){this.currentSize=this.nextSize,this.nextSize=e}},{key:"setOffset",value:function(e){this.currentOffset=this.nextOffset,this.nextOffset=e}}]),e}();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=r(n(6)),s=r(n(5)),l=r(n(7)),u=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:"prependView",value:function(e){return this.sizeSet.prepend(e.sizeSet),e.sizeSet.append(this.sizeSet),this}},{key:"appendView",value:function(e){return this.sizeSet.append(e.sizeSet),e.sizeSet.prepend(this.sizeSet),this}}]),t}(r(n(226)).default);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=function(){function e(t){(0,o.default)(this,e),this.nodeType=t.toUpperCase()}return(0,i.default)(e,[{key:"setRootDocument",value:function(e){this.rootDocument=e}},{key:"obtain",value:function(){return this.rootDocument.createElement(this.nodeType)}}]),e}();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=r(n(6)),s=r(n(5)),l=r(n(7)),u=n(8),c=function(e){function t(e){return(0,o.default)(this,t),(0,a.default)(this,(0,s.default)(t).call(this,null,e))}return(0,l.default)(t,e),(0,i.default)(t,[{key:"adjust",value:function(){var e=this.table,t=e.columnHeadersCount,n=e.rowHeadersCount,r=this.rootNode.firstChild;if(t){for(var o=this.table.columnsToRender+n,i=0,a=t;i<a;i++){for((r=this.rootNode.childNodes[i])||(r=this.table.rootDocument.createElement("tr"),this.rootNode.appendChild(r)),this.renderedNodes=r.childNodes.length;this.renderedNodes<o;)r.appendChild(this.table.rootDocument.createElement("th")),this.renderedNodes+=1;for(;this.renderedNodes>o;)r.removeChild(r.lastChild),this.renderedNodes-=1}var s=this.rootNode.childNodes.length;if(s>t)for(var l=t;l<s;l++)this.rootNode.removeChild(this.rootNode.lastChild)}else r&&(0,u.empty)(r)}},{key:"render",value:function(){for(var e=this.table.columnHeadersCount,t=0;t<e;t++)for(var n=this.table,r=n.columnHeaderFunctions,o=n.columnsToRender,i=n.rowHeadersCount,a=this.rootNode.childNodes[t],s=-1*i;s<o;s++){var l=this.table.renderedColumnToSource(s),u=a.childNodes[s+i];u.className="",u.removeAttribute("style"),r[t](l,u,t)}}}]),t}(r(n(114)).default);t.default=c},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(6)),s=r(n(5)),l=r(n(7)),u=r(n(114)),c=n(8),h=function(e){function t(e){return(0,o.default)(this,t),(0,a.default)(this,(0,s.default)(t).call(this,null,e))}return(0,l.default)(t,e),(0,i.default)(t,[{key:"adjust",value:function(){for(var e=this.table,t=e.columnsToRender+e.rowHeadersCount;this.renderedNodes<t;)this.rootNode.appendChild(this.table.rootDocument.createElement("col")),this.renderedNodes+=1;for(;this.renderedNodes>t;)this.rootNode.removeChild(this.rootNode.lastChild),this.renderedNodes-=1}},{key:"render",value:function(){this.adjust();for(var e=this.table,t=e.columnsToRender,n=e.rowHeadersCount,r=0;r<n;r++){var o=this.table.renderedColumnToSource(r),i=this.table.columnUtils.getHeaderWidth(o);this.rootNode.childNodes[r].style.width="".concat(i,"px")}for(var a=0;a<t;a++){var s=this.table.renderedColumnToSource(a),l=this.table.columnUtils.getStretchedColumnWidth(s);this.rootNode.childNodes[a+n].style.width="".concat(l,"px")}var u=this.rootNode.firstChild;u&&(0,c.addClass)(u,"rowHeader")}}]),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(70)),i=r(n(1)),a=r(n(2)),s=r(n(6)),l=r(n(5)),u=r(n(7)),c=n(58),h=n(71),d=n(138),f=r(n(114));function v(){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.'],['Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting the number\\x20\n of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.']);return v=function(){return e},e}var g=!1,p=function(e){function t(e){var n;return(0,i.default)(this,t),(n=(0,s.default)(this,(0,l.default)(t).call(this,"TR",e))).orderView=new d.OrderView(e,(function(e){return n.nodesPool.obtain(e)}),n.nodeType),n}return(0,u.default)(t,e),(0,a.default)(t,[{key:"getRenderedNode",value:function(e){return this.orderView.getNode(e)}},{key:"render",value:function(){var e=this.table.rowsToRender;!g&&e>1e3&&(g=!0,(0,c.warn)((0,h.toSingleLine)(v()))),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(var t=0;t<e;t++)this.orderView.render();this.orderView.end()}}]),t}(f.default);t.default=p},function(e,t,n){"use strict";var r=n(21),o=n(153).codeAt;r({target:"String",proto:!0},{codePointAt:function(e){return o(this,e)}})},function(e,t,n){var r=n(51),o=n(229),i=n(54),a=Math.ceil,s=function(e){return function(t,n,s){var l,u,c=String(i(t)),h=c.length,d=void 0===s?" ":String(s),f=r(n);return f<=h||""==d?c:(l=f-h,(u=o.call(d,a(l/d.length))).length>l&&(u=u.slice(0,l)),e?c+u:u+c)}};e.exports={start:s(!1),end:s(!0)}},function(e,t,n){var r=n(168);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":230,"./af.js":230,"./ar":231,"./ar-dz":232,"./ar-dz.js":232,"./ar-kw":233,"./ar-kw.js":233,"./ar-ly":234,"./ar-ly.js":234,"./ar-ma":235,"./ar-ma.js":235,"./ar-sa":236,"./ar-sa.js":236,"./ar-tn":237,"./ar-tn.js":237,"./ar.js":231,"./az":238,"./az.js":238,"./be":239,"./be.js":239,"./bg":240,"./bg.js":240,"./bm":241,"./bm.js":241,"./bn":242,"./bn.js":242,"./bo":243,"./bo.js":243,"./br":244,"./br.js":244,"./bs":245,"./bs.js":245,"./ca":246,"./ca.js":246,"./cs":247,"./cs.js":247,"./cv":248,"./cv.js":248,"./cy":249,"./cy.js":249,"./da":250,"./da.js":250,"./de":251,"./de-at":252,"./de-at.js":252,"./de-ch":253,"./de-ch.js":253,"./de.js":251,"./dv":254,"./dv.js":254,"./el":255,"./el.js":255,"./en-au":256,"./en-au.js":256,"./en-ca":257,"./en-ca.js":257,"./en-gb":258,"./en-gb.js":258,"./en-ie":259,"./en-ie.js":259,"./en-nz":260,"./en-nz.js":260,"./eo":261,"./eo.js":261,"./es":262,"./es-do":263,"./es-do.js":263,"./es-us":264,"./es-us.js":264,"./es.js":262,"./et":265,"./et.js":265,"./eu":266,"./eu.js":266,"./fa":267,"./fa.js":267,"./fi":268,"./fi.js":268,"./fo":269,"./fo.js":269,"./fr":270,"./fr-ca":271,"./fr-ca.js":271,"./fr-ch":272,"./fr-ch.js":272,"./fr.js":270,"./fy":273,"./fy.js":273,"./gd":274,"./gd.js":274,"./gl":275,"./gl.js":275,"./gom-latn":276,"./gom-latn.js":276,"./gu":277,"./gu.js":277,"./he":278,"./he.js":278,"./hi":279,"./hi.js":279,"./hr":280,"./hr.js":280,"./hu":281,"./hu.js":281,"./hy-am":282,"./hy-am.js":282,"./id":283,"./id.js":283,"./is":284,"./is.js":284,"./it":285,"./it.js":285,"./ja":286,"./ja.js":286,"./jv":287,"./jv.js":287,"./ka":288,"./ka.js":288,"./kk":289,"./kk.js":289,"./km":290,"./km.js":290,"./kn":291,"./kn.js":291,"./ko":292,"./ko.js":292,"./ky":293,"./ky.js":293,"./lb":294,"./lb.js":294,"./lo":295,"./lo.js":295,"./lt":296,"./lt.js":296,"./lv":297,"./lv.js":297,"./me":298,"./me.js":298,"./mi":299,"./mi.js":299,"./mk":300,"./mk.js":300,"./ml":301,"./ml.js":301,"./mr":302,"./mr.js":302,"./ms":303,"./ms-my":304,"./ms-my.js":304,"./ms.js":303,"./mt":305,"./mt.js":305,"./my":306,"./my.js":306,"./nb":307,"./nb.js":307,"./ne":308,"./ne.js":308,"./nl":309,"./nl-be":310,"./nl-be.js":310,"./nl.js":309,"./nn":311,"./nn.js":311,"./pa-in":312,"./pa-in.js":312,"./pl":313,"./pl.js":313,"./pt":314,"./pt-br":315,"./pt-br.js":315,"./pt.js":314,"./ro":316,"./ro.js":316,"./ru":317,"./ru.js":317,"./sd":318,"./sd.js":318,"./se":319,"./se.js":319,"./si":320,"./si.js":320,"./sk":321,"./sk.js":321,"./sl":322,"./sl.js":322,"./sq":323,"./sq.js":323,"./sr":324,"./sr-cyrl":325,"./sr-cyrl.js":325,"./sr.js":324,"./ss":326,"./ss.js":326,"./sv":327,"./sv.js":327,"./sw":328,"./sw.js":328,"./ta":329,"./ta.js":329,"./te":330,"./te.js":330,"./tet":331,"./tet.js":331,"./th":332,"./th.js":332,"./tl-ph":333,"./tl-ph.js":333,"./tlh":334,"./tlh.js":334,"./tr":335,"./tr.js":335,"./tzl":336,"./tzl.js":336,"./tzm":337,"./tzm-latn":338,"./tzm-latn.js":338,"./tzm.js":337,"./uk":339,"./uk.js":339,"./ur":340,"./ur.js":340,"./uz":341,"./uz-latn":342,"./uz-latn.js":342,"./uz.js":341,"./vi":343,"./vi.js":343,"./x-pseudo":344,"./x-pseudo.js":344,"./yo":345,"./yo.js":345,"./zh-cn":346,"./zh-cn.js":346,"./zh-hk":347,"./zh-hk.js":347,"./zh-tw":348,"./zh-tw.js":348};function o(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id=437},function(e,t,n){"use strict";var r=n(0);n(11),n(9),n(12),n(23),n(13),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(6)),s=r(n(5)),l=r(n(7)),u=n(8),c=n(138),h=function(e){function t(){var e;return(0,o.default)(this,t),(e=(0,a.default)(this,(0,s.default)(t).call(this,"TD"))).orderViews=new WeakMap,e.sourceRowIndex=0,e}return(0,l.default)(t,e),(0,i.default)(t,[{key:"obtainOrderView",value:function(e){var t,n=this;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new c.SharedOrderView(e,(function(e){return n.nodesPool.obtain(n.sourceRowIndex,e)}),this.nodeType),this.orderViews.set(e,t)),t}},{key:"render",value:function(){for(var e=this.table,t=e.rowsToRender,n=e.columnsToRender,r=e.rows,o=e.rowHeaders,i=0;i<t;i++){var a=this.table.renderedRowToSource(i),s=r.getRenderedNode(i);this.sourceRowIndex=a;var l=this.obtainOrderView(s),c=o.obtainOrderView(s);l.prependView(c).setSize(n).setOffset(this.table.renderedColumnToSource(0)).start();for(var h=0;h<n;h++){l.render();var d=l.getCurrentNode(),f=this.table.renderedColumnToSource(h);(0,u.hasClass)(d,"hide")||(d.className=""),d.removeAttribute("style"),this.table.cellRenderer(a,f,d)}l.end()}}}]),t}(r(n(114)).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)),a=function(){function e(t){var n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).cellRenderer;(0,o.default)(this,e),this.rootNode=t,this.rootDocument=this.rootNode.ownerDocument,this.rowHeaders=null,this.columnHeaders=null,this.colGroup=null,this.rows=null,this.cells=null,this.rowFilter=null,this.columnFilter=null,this.rowUtils=null,this.columnUtils=null,this.rowsToRender=0,this.columnsToRender=0,this.rowHeaderFunctions=[],this.rowHeadersCount=0,this.columnHeaderFunctions=[],this.columnHeadersCount=0,this.cellRenderer=n}return(0,i.default)(e,[{key:"setAxisUtils",value:function(e,t){this.rowUtils=e,this.columnUtils=t}},{key:"setViewportSize",value:function(e,t){this.rowsToRender=e,this.columnsToRender=t}},{key:"setFilters",value:function(e,t){this.rowFilter=e,this.columnFilter=t}},{key:"setHeaderContentRenderers",value:function(e,t){this.rowHeaderFunctions=e,this.rowHeadersCount=e.length,this.columnHeaderFunctions=t,this.columnHeadersCount=t.length}},{key:"setRenderers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.rowHeaders,n=e.columnHeaders,r=e.colGroup,o=e.rows,i=e.cells;t.setTable(this),n.setTable(this),r.setTable(this),o.setTable(this),i.setTable(this),this.rowHeaders=t,this.columnHeaders=n,this.colGroup=r,this.rows=o,this.cells=i}},{key:"renderedRowToSource",value:function(e){return this.rowFilter.renderedToSource(e)}},{key:"renderedColumnToSource",value:function(e){return this.columnFilter.renderedToSource(e)}},{key:"render",value:function(){this.colGroup.adjust(),this.columnHeaders.adjust(),this.rows.adjust(),this.rowHeaders.adjust(),this.columnHeaders.render(),this.rows.render(),this.rowHeaders.render(),this.cells.render(),this.columnUtils.calculateWidths(),this.colGroup.render();for(var e=this.rowsToRender,t=this.rows,n=0;n<e;n++){var r=t.getRenderedNode(n);if(r.firstChild){var o=this.renderedRowToSource(n),i=this.rowUtils.getHeight(o);r.firstChild.style.height=i?"".concat(i-1,"px"):""}}}}]),e}();t.default=a},function(e,t,n){"use strict";var r=n(0);n(65),n(57),t.__esModule=!0;var o={ViewportColumnsCalculator:!0,ViewportRowsCalculator:!0},i=r(n(217));t.ViewportColumnsCalculator=i.default;var a=r(n(218));t.ViewportRowsCalculator=a.default;var s=n(164);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||(t[e]=s[e]))}))},function(e,t,n){"use strict";var r=n(0);n(11),n(40),n(9),n(12),n(13),t.__esModule=!0,t.default=void 0;var o=r(n(46)),i=r(n(1)),a=r(n(2)),s=n(8),l=function(){function e(t){(0,i.default)(this,e),this.wot=t,this.headerWidths=new Map}return(0,a.default)(e,[{key:"getWidth",value:function(e){var t=this.wot.wtSettings.settings.columnWidth;return"function"==typeof t?t=t(e):"object"===(0,o.default)(t)&&(t=t[e]),t||this.wot.wtSettings.settings.defaultColumnWidth}},{key:"getStretchedColumnWidth",value:function(e){var t=this.getWidth(e),n=this.wot.wtViewport.columnsRenderCalculator,r=null==t?this.wot.wtSettings.settings.defaultColumnWidth:t;if(n){var o=n.getStretchedColumnWidth(e,r);o&&(r=o)}return r}},{key:"getHeaderHeight",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:"getHeaderWidth",value:function(e){return this.headerWidths.get(this.wot.wtTable.columnFilter.sourceToRendered(e))}},{key:"calculateWidths",value:function(){var e=this.wot,t=e.wtTable,n=e.wtViewport,r=e.cloneSource,o=r?r.wtTable.holder:t.holder,i=o.offsetHeight<o.scrollHeight?(0,s.getScrollbarWidth)():0,a=e.getSetting("rowHeaderWidth");if(n.columnsRenderCalculator.refreshStretching(n.getViewportWidth()-i),null!=(a=e.getSetting("onModifyRowHeaderWidth",a)))for(var l=e.getSetting("rowHeaders").length,u=e.getSetting("defaultColumnWidth"),c=0;c<l;c++){var h=Array.isArray(a)?a[c]:a;h=null==h?u:h,this.headerWidths.set(c,h)}}}]),e}();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=function(){function e(t){(0,o.default)(this,e),this.wot=t}return(0,i.default)(e,[{key:"getHeight",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}}]),e}();t.default=a},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0;var o=r(n(444));t.BorderRenderer=o.default;var i=r(n(355));t.svgOptimizePath=i.default;var a=r(n(170));t.getSvgPathsRenderer=a.default;var s=r(n(171));t.getSvgResizer=s.default},function(e,t,n){"use strict";var r=n(10),o=n(0);n(17),n(11),n(72),n(40),n(9),n(12),n(57),n(13),t.__esModule=!0,t.default=void 0;var i=o(n(33)),a=o(n(1)),s=o(n(2)),l=r(n(170)),u=o(n(171)),c=o(n(355)),h=function(){function e(t){(0,a.default)(this,e),this.svg=this.createSvgContainer(t),this.svgResizer=(0,u.default)(this.svg),this.pathGroups=[],this.maxWidth=0,this.maxHeight=0,this.rootWindow=t.ownerDocument.defaultView}return(0,s.default)(e,[{key:"createSvgContainer",value:function(e){var t=e.ownerDocument.createElementNS("http://www.w3.org/2000/svg","svg");return t.style.top="0",t.style.left="0",t.style.width="0",t.style.height="0",t.style.position="absolute",t.style.zIndex="5",t.setAttribute("pointer-events","none"),e.appendChild(t),t}},{key:"ensurePathGroup",value:function(e){var t=this.pathGroups[e];if(!t){this.pathGroups.length<e&&this.ensurePathGroup(e-1);var n={svgPathsRenderer:this.getSvgPathsRendererForGroup(this.svg),stylesAndLines:new Map,styles:[],commands:[]};return this.pathGroups[e]=n,n}return t}},{key:"render",value:function(e,t){var n=this;this.containerBoundingRect=e.getBoundingClientRect(),this.maxWidth=0,this.maxHeight=0,this.pathGroups.forEach((function(e){return e.stylesAndLines.clear()})),t.forEach((function(e){return n.convertArgsToLines.apply(n,(0,i.default)(e))})),this.pathGroups.forEach((function(e){return n.convertLinesToCommands(e)})),this.svgResizer(Math.min(this.maxWidth,this.containerBoundingRect.width),Math.min(this.maxHeight,this.containerBoundingRect.height)),this.pathGroups.forEach((function(e){return e.svgPathsRenderer(e.styles,e.commands)}))}},{key:"sumArrayElementAtIndex",value:function(e,t){return e.reduce((function(e,n){return Math.max(e,n[t])}),0)}},{key:"getFrom2dMap",value:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0}},{key:"setIn2dMap",value:function(e,t,n,r){var o=e.get(t);o?o.set(n,r):e.set(t,new Map([[n,r]]))}},{key:"adjustTipsOfLines",value:function(e,t,n,r){if(0!==e.length)for(var o=0;o<e.length;o++){var i=e[o],a=i[0]===i[2],s=a?n:r,l=a?r:n,u=a?1:0,c=i.length,h=c-2,d=c-1,f=a?d:h,v=this.getFrom2dMap(s,i[0],i[1]),g=this.getFrom2dMap(s,i[h],i[d]);if(t>1)for(var p=0;p<c;p+=2)this.setIn2dMap(l,i[p],i[p+1],t);if(v&&(i[u]-=Math.floor(v/2)),i[f]+=1,g){var m=g%2==0?-1:0;i[f]+=Math.floor(g/2)+m}}}},{key:"convertLinesToCommands",value:function(e){var t=this,n=e.stylesAndLines,r=e.commands,o=(0,i.default)(n.keys()),a=new Map,s=new Map;r.length=0,e.styles=o.sort(l.compareStrokePriority),e.styles.forEach((function(e){var o=n.get(e),i=parseInt(e,10);t.adjustTipsOfLines(o,i,a,s);var u=(0,l.adjustLinesToViewBox)(i,o),h=(0,c.default)(u),d=(0,l.convertLinesToCommand)(h),f=Math.ceil(i/2),v=t.sumArrayElementAtIndex(o,2)+f,g=t.sumArrayElementAtIndex(o,3)+f;v>t.maxWidth&&(t.maxWidth=v),g>t.maxHeight&&(t.maxHeight=g),r.push(d)}))}},{key:"getSvgPathsRendererForGroup",value:function(e){var t=e.ownerDocument.createElementNS("http://www.w3.org/2000/svg","g");return e.appendChild(t),(0,l.default)(t)}},{key:"getLayerNumber",value:function(e){switch(e.className){case"current":return 3;case"area":return 2;case"fill":return 1;default:return 0}}},{key:"convertArgsToLines",value:function(e,t,n,r,o,i,a){var s=this.getLayerNumber(e),l=this.ensurePathGroup(s).stylesAndLines,u=t.getBoundingClientRect(),c=t===n?u:n.getBoundingClientRect(),h=u.left,d=u.top,f=c.left+c.width,v=c.top+c.height;h+=-1-this.containerBoundingRect.left,d+=-1-this.containerBoundingRect.top,f+=-1-this.containerBoundingRect.left,v+=-1-this.containerBoundingRect.top;var g=t.previousElementSibling,p=null===g||"TD"!==g.nodeName,m=null===t.parentNode.previousElementSibling,y=!!e.className;p&&((h+=1)>0&&!y&&(h+=1,a=!1));m&&((d+=1)>0&&!y&&(d+=1,r=!1));if("current"===e.className&&(h+=1,d+=1),!(h<0&&f<0||d<0&&v<0)){if(r&&this.hasLineAtEdge(e,"top"))this.getLines(l,e,"top").push([h,d,f,d]);if(o&&this.hasLineAtEdge(e,"right"))this.getLines(l,e,"right").push([f,d,f,v]);if(i&&this.hasLineAtEdge(e,"bottom"))this.getLines(l,e,"bottom").push([h,v,f,v]);if(a&&this.hasLineAtEdge(e,"left"))this.getLines(l,e,"left").push([h,d,h,v])}}},{key:"hasLineAtEdge",value:function(e,t){return!(e[t]&&e[t].hide)}},{key:"getLines",value:function(e,t,n){var r=1;t[n]&&void 0!==t[n].width?r=t[n].width:t.border&&void 0!==t.border.width&&(r=t.border.width);var o=t[n]&&t[n].color||t.border&&t.border.color||"black",i="".concat(r,"px solid ").concat(o),a=e.get(i);if(a)return a;var s=[];return e.set(i,s),s}}]),e}();t.default=h},function(e,t,n){"use strict";var r=n(0);n(41),n(11),n(40),n(9),n(12),n(57),n(13),t.__esModule=!0,t.default=function(e){for(var t=[],n=new Map,r=0;r<e.length;r++){var a=e[r],l=a[1]===a[3]?"h-".concat(a[1]):"v-".concat(a[0]),u=n.get(l);u?u.push(a):n.set(l,[a])}return n.forEach((function(e){e.length>1?t.push.apply(t,(0,o.default)(function(e){var t=0;do{var n=e[t],r=n[1]===n[3],o=void 0;do{o=!1;for(var a=t+1;a<e.length;a++){var l=e[a];if(!l.deleted&&(c=n,o=i((h=l)[0],h[1],c)||i(h[2],h[3],c))){var u=s(n,l);r?(n[0]=u.low[0],n[2]=u.high[0]):(n[1]=u.low[1],n[3]=u.high[1]),l.deleted=!0;break}}}while(o);t+=1}while(t<e.length);var c,h;return e.filter((function(e){return!e.deleted}))}(e))):t.push(e[0])})),t};var o=r(n(33));function i(e,t,n){return!!a(e,n[0],n[2])&&a(t,n[1],n[3])}function a(e,t,n){return n>t?e>=t&&e<=n:e>=n&&e<=t}function s(e,t){var n,r,o=l(e),i=l(t);return r=i,c((n=o).low,r.low,Math.min),c(n.high,r.high,Math.max),n}function l(e){return{low:u(e,Math.min),high:u(e,Math.max)}}function u(e,t){return[t(e[0],e[2]),t(e[1],e[3])]}function c(e,t,n){e[0]=n(e[0],t[0]),e[1]=n(e[1],t[1])}},function(e,t,n){"use strict";var r=n(0);n(11),n(95),n(113),n(31),n(34),n(9),n(13),t.__esModule=!0,t.default=function(e){for(var t=new i,n=[],r=0;r<e.length;r++){var c=e[r],d=t.insertValue({pathContext:c,reversed:!1});t.insertValueIdAtPoint(d,a(c));var f=t.insertValue({pathContext:c,reversed:!0});t.insertValueIdAtPoint(f,s(c))}var v=[];t.forEachPoint((function(e,r){if(r.length>0){var o=[];if(l(t,e[0],o,e[0]),o.endless)n.push(o);else{o.reverse();var i=o[0];o.forEach((function(e){e.reversed=!e.reversed}));var a=o.pop();l(t,a,o,i),o.length>1?(o.endless=(s=h(o[0],!0),u=h(o[o.length-1]),s[0]===u[0]&&s[1]===u[1]),n.push(o)):v.push(o[0].pathContext)}}var s,u}));var g=[];return n.forEach((function(e){g.push(function(e){var t=[];t.push.apply(t,(0,o.default)(u(e[0].pathContext,!e[0].reversed)));for(var n=0;n<e.length;n++)t.push.apply(t,(0,o.default)(u(e[n].pathContext,e[n].reversed)));return t}(e))})),v.forEach((function(e){g.push(e)})),g};var o=r(n(33));function i(){this.reset()}function a(e){return e.slice(0,2)}function s(e){return e.slice(2,4)}function l(e,t,n,r){for(;t;){n.push(t);var o=u(t.pathContext,t.reversed),i=e.getElementAtPoint(o);if(!i||0===i.length)break;var a=c(i.map((function(t){return e.values[t]})),t.pathContext);if(i.splice(0,2),!a)break;if(a.pathContext===r.pathContext){n.length>1&&(n.endless=!0);break}t=a}}function u(e,t){return t?a(e):s(e)}function c(e,t){return e[0].pathContext===t?e[1]:e[0]}function h(e,t){return t===e.reversed?s(e.pathContext):a(e.pathContext)}i.prototype.reset=function(){this.insertedCount=0,this.graph={},this.index={},this.values=[]},i.prototype.insertValue=function(e){return this.values.push(e),this.values.length-1},i.prototype.insertValueIdAtPoint=function(e,t){var n=t[0],r=t[1];this.graph[n]||(this.graph[n]={});var o,i,a=this.graph[n];r in a?(i=a[r],(o=this.index[i]).push(e)):(i=this.insertedCount,a[r]=i,this.insertedCount+=1,o=[e],this.index[i]=o)},i.prototype.forEachPoint=function(e){for(var t=this,n=0;n<this.insertedCount;n++){var r=this.index[n];r&&r.length>0&&e(r.map((function(e){return t.values[e]})),r)}},i.prototype.getIdOfPoint=function(e){var t=this.graph[e[0]];if(t){var n=t[e[1]];if(n>=0)return n}},i.prototype.getElementAtPoint=function(e){var t=this.getIdOfPoint(e);if(t>=0)return this.index[t]}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(115)),i=r(n(1)),a=r(n(2)),s=r(n(6)),l=r(n(5)),u=r(n(7)),c=n(8),h=r(n(448)),d=r(n(91)),f=function(e){function t(e){var n;return(0,i.default)(this,t),(n=(0,s.default)(this,(0,l.default)(t).call(this,e))).clone=n.makeClone(d.default.CLONE_LEFT),n}return(0,u.default)(t,e),(0,a.default)(t,[{key:"createTable",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,o.default)(h.default,t)}},{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,c.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&&l-t.offsetWidth>0?-s:0,o+="px",(0,c.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,c.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(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize(),e||(this.areElementSizesAdjusted=!0))}},{key:"adjustRootElementSize",value:function(){var e=this.wot,t=e.wtTable,n=e.rootDocument,r=e.rootWindow,o=(0,c.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,c.outerWidth)(this.clone.wtTable.TABLE);i.width="".concat(l,"px")}},{key:"adjustRootChildrenSize",value:function(){var e=this.clone.wtTable.holder;this.clone.wtTable.hider.style.height=this.hider.style.height,e.style.height=e.parentNode.style.height,e.style.width=e.parentNode.style.width}},{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,c.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,c.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,c.removeClass)(t,"emptyRows"):(0,c.addClass)(t,"emptyRows"),r&&!n.length)(0,c.addClass)(t,"innerBorderLeft");else if(!r&&n.length){var o=(0,c.hasClass)(t,"innerBorderLeft");e?(0,c.addClass)(t,"innerBorderLeft"):(0,c.removeClass)(t,"innerBorderLeft"),(!o&&e||o&&!e)&&this.wot.wtOverlays.adjustElementsSize()}}}]),t}(d.default);d.default.registerOverlay(d.default.CLONE_LEFT,f);var v=f;t.default=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(6)),s=r(n(5)),l=r(n(7)),u=r(n(94)),c=r(n(356)),h=r(n(173)),d=n(4),f=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:"getTableNeighborEast",value:function(){return this.wot.cloneSource.wtTable}}]),t}(u.default);(0,d.mixin)(f,c.default),(0,d.mixin)(f,h.default);var v=f;t.default=v},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(115)),i=r(n(1)),a=r(n(2)),s=r(n(6)),l=r(n(5)),u=r(n(7)),c=n(8),h=n(3),d=r(n(450)),f=r(n(91)),v=function(e){function t(e){var n;return(0,i.default)(this,t),(n=(0,s.default)(this,(0,l.default)(t).call(this,e))).clone=n.makeClone(f.default.CLONE_TOP),n}return(0,u.default)(t,e),(0,a.default)(t,[{key:"createTable",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,o.default)(d.default,t)}},{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,c.resetCssTransform)(e);else{var r,o,i=this.wot.wtTable,a=i.hider.getBoundingClientRect(),s=Math.ceil(a.top),l=Math.ceil(a.bottom);r=""===(r=i.hider.style.left)?0:r,t=o=s<0&&l-e.offsetHeight>0?-s:0,o+="px",(0,c.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,c.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(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize(),e||(this.areElementSizesAdjusted=!0))}},{key:"adjustRootElementSize",value:function(){var e=this.wot,t=e.wtTable,n=e.rootDocument,r=e.rootWindow,o=(0,c.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,c.outerHeight)(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(l=0),i.height="".concat(l,"px")}},{key:"adjustRootChildrenSize",value:function(){var e=this.clone.wtTable.holder;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=e.parentNode.style.height}},{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,c.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,c.getScrollTop)(this.mainTableScrollableElement,this.wot.rootWindow)}},{key:"redrawSelectionBorders",value:function(e){if(e&&e.cellRange&&e.hasSelectionHandle()){var t=e.getSelectionHandle(this.wot),n=e.getCorners();t.disappear(),t.appear(n)}}},{key:"redrawAllSelectionsBorders",value:function(){var e=this,t=this.wot.selections;this.redrawSelectionBorders(t.getCell()),(0,h.arrayEach)(t.getAreas(),(function(t){e.redrawSelectionBorders(t)})),this.redrawSelectionBorders(t.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,c.removeClass)(t,"emptyColumns"):(0,c.addClass)(t,"emptyColumns"),0===this.wot.getSetting("fixedRowsTop")&&this.wot.getSetting("columnHeaders").length>0){var n=(0,c.hasClass)(t,"innerBorderTop");e||0===this.wot.getSetting("totalRows")?(0,c.addClass)(t,"innerBorderTop"):(0,c.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}}}]),t}(f.default);f.default.registerOverlay(f.default.CLONE_TOP,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 o=r(n(1)),i=r(n(2)),a=r(n(6)),s=r(n(5)),l=r(n(7)),u=r(n(94)),c=r(n(357)),h=r(n(172)),d=n(4),f=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:"getTableNeighborSouth",value:function(){return this.wot.cloneSource.wtTable}}]),t}(u.default);(0,d.mixin)(f,c.default),(0,d.mixin)(f,h.default);var v=f;t.default=v},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(115)),i=r(n(1)),a=r(n(2)),s=r(n(6)),l=r(n(5)),u=r(n(7)),c=n(8),h=r(n(452)),d=r(n(91)),f=function(e){function t(e){var n;return(0,i.default)(this,t),(n=(0,s.default)(this,(0,l.default)(t).call(this,e))).clone=n.makeClone(d.default.CLONE_TOP_LEFT_CORNER),n}return(0,u.default)(t,e),(0,a.default)(t,[{key:"createTable",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,o.default)(h.default,t)}},{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=this.wot.getSetting("preventOverflow");if(this.trimmingContainer===this.wot.rootWindow){var n=this.wot.wtTable.hider.getBoundingClientRect(),r=Math.ceil(n.top),o=Math.ceil(n.left),i=Math.ceil(n.bottom),a=Math.ceil(n.right),s="0",l="0";t&&"vertical"!==t||o<0&&a-e.offsetWidth>0&&(s="".concat(-o,"px")),t&&"horizontal"!==t||r<0&&i-e.offsetHeight>0&&(l="".concat(-r,"px")),(0,c.setOverlayPosition)(e,s,l)}else(0,c.resetCssTransform)(e);var u=(0,c.outerHeight)(this.clone.wtTable.TABLE),h=(0,c.outerWidth)(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(u=0),e.style.height="".concat(u,"px"),e.style.width="".concat(h,"px")}}}]),t}(d.default);d.default.registerOverlay(d.default.CLONE_TOP_LEFT_CORNER,f);var v=f;t.default=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(6)),s=r(n(5)),l=r(n(7)),u=r(n(94)),c=r(n(357)),h=r(n(173)),d=n(4),f=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:"getTableNeighborEast",value:function(){return this.wot.cloneSource.wtOverlays.topOverlay.clone.wtTable}},{key:"getTableNeighborSouth",value:function(){return this.wot.cloneSource.wtOverlays.leftOverlay.clone.wtTable}},{key:"getTableNeighborDiagonal",value:function(){return this.wot.cloneSource.wtTable}}]),t}(u.default);(0,d.mixin)(f,c.default),(0,d.mixin)(f,h.default);var v=f;t.default=v},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(115)),i=r(n(1)),a=r(n(2)),s=r(n(6)),l=r(n(5)),u=r(n(7)),c=n(8),h=r(n(454)),d=r(n(91)),f=function(e){function t(e){var n;return(0,i.default)(this,t),(n=(0,s.default)(this,(0,l.default)(t).call(this,e))).clone=n.makeClone(d.default.CLONE_BOTTOM),n}return(0,u.default)(t,e),(0,a.default)(t,[{key:"createTable",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,o.default)(h.default,t)}},{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;e.style.top="";var n=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==this.wot.rootWindow||n&&"vertical"===n)t=this.getScrollPosition(),(0,c.resetCssTransform)(e),this.repositionOverlay();else{var r,o,i=this.wot,a=i.rootDocument,s=i.wtTable,l=s.hider.getBoundingClientRect(),u=Math.ceil(l.bottom),h=a.body.offsetHeight;r=""===(r=s.hider.style.left)?0:r,t=o=u>h?u-h:0,o+="px",e.style.top="",e.style.left=r,e.style.bottom=o}this.adjustHeaderBordersPosition(t),this.adjustElementsSize()}}},{key:"setScrollPosition",value:function(e){var t=this.wot.rootWindow,n=!1;return this.mainTableScrollableElement===t?(t.scrollTo((0,c.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,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(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize(),e||(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);this.wot.wtTable.hasDefinedSize()||(l=0),i.height="".concat(l,"px")}},{key:"adjustRootChildrenSize",value:function(){var e=this.clone.wtTable.holder;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=e.parentNode.style.height}},{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")&&this.wot.getSetting("columnHeaders").length>0){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)}}}]),t}(d.default);d.default.registerOverlay(d.default.CLONE_BOTTOM,f);var v=f;t.default=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(6)),s=r(n(5)),l=r(n(7)),u=r(n(94)),c=r(n(358)),h=r(n(172)),d=n(4),f=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:"getTableNeighborNorth",value:function(){return this.wot.cloneSource.wtTable}}]),t}(u.default);(0,d.mixin)(f,c.default),(0,d.mixin)(f,h.default);var v=f;t.default=v},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=void 0;var o=r(n(115)),i=r(n(1)),a=r(n(2)),s=r(n(6)),l=r(n(5)),u=r(n(7)),c=n(8),h=r(n(456)),d=r(n(91)),f=function(e){function t(e){var n;return(0,i.default)(this,t),(n=(0,s.default)(this,(0,l.default)(t).call(this,e))).clone=n.makeClone(d.default.CLONE_BOTTOM_LEFT_CORNER),n}return(0,u.default)(t,e),(0,a.default)(t,[{key:"createTable",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,o.default)(h.default,t)}},{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;if(t.style.top="",this.trimmingContainer===e.rootWindow){var n,r,o=e.wtTable.hider.getBoundingClientRect(),i=Math.ceil(o.bottom),a=Math.ceil(o.left),s=e.rootDocument.body.offsetHeight;n=a<0?-a:0,r=i>s?i-s:0,r+="px",n+="px",t.style.top="",t.style.left=n,t.style.bottom=r}else(0,c.resetCssTransform)(t),this.repositionOverlay();var l=(0,c.outerHeight)(this.clone.wtTable.TABLE),u=(0,c.outerWidth)(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(l=0),t.style.height="".concat(l,"px"),t.style.width="".concat(u,"px")}}}]),t}(d.default);d.default.registerOverlay(d.default.CLONE_BOTTOM_LEFT_CORNER,f);var v=f;t.default=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(6)),s=r(n(5)),l=r(n(7)),u=r(n(94)),c=r(n(358)),h=r(n(173)),d=n(4),f=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:"getTableNeighborEast",value:function(){return this.wot.cloneSource.wtOverlays.bottomOverlay.clone.wtTable}},{key:"getTableNeighborNorth",value:function(){return this.wot.cloneSource.wtOverlays.leftOverlay.clone.wtTable}},{key:"getTableNeighborDiagonal",value:function(){return this.wot.cloneSource.wtTable}}]),t}(u.default);(0,d.mixin)(f,c.default),(0,d.mixin)(f,h.default);var v=f;t.default=v},function(e,t,n){"use strict";var r=n(0);n(17),n(27),n(11),n(40),n(9),n(35),n(12),n(57),n(13),t.__esModule=!0,t.default=void 0;var o=r(n(18)),i=r(n(46)),a=r(n(1)),s=r(n(2)),l=n(8),u=r(n(359)),c=r(n(111)),h=r(n(219)),d=function(){function e(t,n){(0,a.default)(this,e),this.settings=t,this.cellRange=n||null,this.instanceSelectionHandles=new Map,this.classNames=[this.settings.className],this.classNameGenerator=this.linearClassNameGenerator(this.settings.className,this.settings.layerLevel)}return(0,s.default)(e,[{key:"hasSelectionHandle",value:function(){return this.settings.border&&"function"==typeof this.settings.border.cornerVisible}},{key:"getSelectionHandle",value:function(e){var t=this.getSelectionHandleIfExists(e);if(t)return t;var n=new u.default(e,this.settings);return this.instanceSelectionHandles.set(e,n),n}},{key:"getSelectionHandleIfExists",value:function(e){return this.instanceSelectionHandles.get(e)}},{key:"isEmpty",value:function(){return null===this.cellRange}},{key:"add",value:function(e){return this.isEmpty()?this.cellRange=new h.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(){return this.cellRange.getCorners()}},{key:"addClassAtCoords",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=e.getCell(new c.default(t,n));if("object"===(0,i.default)(a)){var s=r;o&&(s=this.classNameGenerator(a),this.classNames.includes(s)||this.classNames.push(s)),(0,l.addClass)(a,s)}return this}},{key:"linearClassNameGenerator",value:function(e,t){return function n(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0===t||0===o)return e;var i=o>=0?o:t,a=e,s=0===(i-=1)?e:"".concat(e,"-").concat(i);if((0,l.hasClass)(r,s)){var u=i+1;a="".concat(e,"-").concat(u)}else a=n(r,i);return a}}},{key:"addClassIfElemExists",value:function(e,t){e&&(0,l.addClass)(e,t)}},{key:"getRelevantCell",value:function(e,t,n,r,o,i){var a,s=e.getCell({row:t,col:n});"number"==typeof s&&(t>o&&n>i||n>i&&t<r?a=e.getTableNeighborDiagonal():t>o?a=e.getTableNeighborSouth():n>i?a=e.getTableNeighborEast():t<r&&(a=e.getTableNeighborNorth()),s=a.getCell({row:t,col:n}));return"number"==typeof s&&(s=void 0),s}},{key:"draw",value:function(e,t,n,r,i,a,s,l,u,c){if(!this.isEmpty()){var h,d=e.wtTable,f=this.settings,v=f.highlightHeaderClassName,g=f.highlightRowClassName,p=f.highlightColumnClassName,m=this.getCorners(),y=(0,o.default)(m,4),w=y[0],C=y[1],E=y[2],S=y[3],b=Math.max(w,r+c),R=Math.max(C,i),T=Math.min(E,a+u),M=Math.min(S,s+l),O=b===T&&R===M,k=b===w,N=M===S,_=T===E,A=R===C;if(n&&(v||p))for(var I=R;I<=M;I+=1)if(this.addClassIfElemExists(d.getColumnHeader(I),[v,p]),p)for(var D=0;D<t;D+=1)if(D<b||D>T){var L=d.rowFilter.renderedToSource(D);this.addClassAtCoords(d,L,I,p)}if(t&&(v||g))for(var x=b;x<=T;x+=1)if(this.addClassIfElemExists(d.getRowHeader(x),[v,g]),g)for(var H=0;H<n;H+=1)if(H<R||H>M){var P=d.columnFilter.renderedToSource(H);this.addClassAtCoords(d,x,P,g)}if(t&&n){if(this.settings.border&&b<=T&&R<=M){var F=this.getRelevantCell(d,b,R,r,a,s),B=O?F:this.getRelevantCell(d,T,M,r,a,s);F&&B&&(h=[this.settings,F,B,k,N,_,A])}for(var V=b;V<=T;V+=1)for(var W=R;W<=M;W+=1)if(V>=b&&V<=T&&W>=R&&W<=M&&this.settings.className&&this.addClassAtCoords(d,V,W,this.settings.className,this.settings.markIntersections),this.settings.className){var U=e.getSetting("onAfterDrawSelection",V,W,m,this.settings.layerLevel);"string"==typeof U&&this.addClassAtCoords(d,V,W,U)}}return e.getSetting("onBeforeDrawBorders",m,this.settings.className),this.hasSelectionHandle()&&this.getSelectionHandle(e).appear(m),h}if(this.hasSelectionHandle()){var Y=this.getSelectionHandleIfExists(e);Y&&Y.disappear()}}},{key:"destroy",value:function(){this.instanceSelectionHandles.forEach((function(e){return e.destroy()}))}}]),e}();t.default=d},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(e){var t=this;(0,r.arrayEach)(this._hooksStorage[e]||[],(function(n){t.hot.removeHook(e,n)}))},clearHooks:function(){var e=this;(0,o.objectEach)(this._hooksStorage,(function(t,n){return e.removeHooksByKey(n)})),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(5);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(17),t.__esModule=!0,t.default=void 0;var r=n(8);var o=function(e,t,n,o,i,a,s){var l=[],u=[];s.className&&(t.className?t.className="".concat(t.className," ").concat(s.className):t.className=s.className),s.readOnly&&l.push(s.readOnlyCellClassName),!1===s.valid&&s.invalidCellClassName?l.push(s.invalidCellClassName):u.push(s.invalidCellClassName),!1===s.wordWrap&&s.noWordWrapClassName&&l.push(s.noWordWrapClassName),!a&&s.placeholder&&l.push(s.placeholderCellClassName),(0,r.removeClass)(t,u),(0,r.addClass)(t,l)};t.default=o},function(e,t,n){"use strict";var r=n(0);n(17),t.__esModule=!0,t.default=void 0;var o=n(8),i=r(n(25)),a=n(26),s=n(43);var l=function(e,t,n,r,l,u,c){var h=e.rootDocument,d=c.allowHtml?"html":"text",f=h.createElement("DIV");f.className="htAutocompleteArrow",f.appendChild(h.createTextNode(String.fromCharCode(9660)));for(var v=arguments.length,g=new Array(v>7?v-7:0),p=7;p<v;p++)g[p-7]=arguments[p];if((0,s.getRenderer)(d).apply(this,[e,t,n,r,l,u,c].concat(g)),t.firstChild||t.appendChild(h.createTextNode(String.fromCharCode(160))),t.insertBefore(f,t.firstChild),(0,o.addClass)(t,"htAutocomplete"),!e.acArrowListener){var m=new i.default(e);e.acArrowListener=function(i){(0,o.hasClass)(i.target,"htAutocompleteArrow")&&e.view.wt.getSetting("onCellDblClick",null,new a.CellCoords(n,r),t)},m.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",(function(){m.destroy()}))}};t.default=l},function(e,t,n){"use strict";var r=n(0);n(17),n(27),n(11),n(9),n(39),n(35),n(12),n(23),n(13),n(36),t.__esModule=!0,t.default=void 0;var o=n(8),i=n(77),a=r(n(25)),s=n(59),l=n(63),u=n(32),c=n(43),h=new WeakMap,d=new WeakMap,f="htBadValue";function v(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}var g=function(e,t,n,r,g,p,m){for(var y=e.rootDocument,w=arguments.length,C=new Array(w>7?w-7:0),E=7;E<w;E++)C[E-7]=arguments[E];(0,c.getRenderer)("base").apply(this,[e,t,n,r,g,p,m].concat(C)),function(e){var t=d.get(e);if(!t){var n=e.rootElement;(t=new a.default(e)).addEventListener(n,"click",(function(t){return function(e,t){if(!v(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()}(t,e)})),t.addEventListener(n,"mouseup",(function(t){return function(e,t){if(!v(e.target))return;setTimeout(t.listen,10)}(t,e)})),t.addEventListener(n,"change",(function(t){return function(e,t){if(!v(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)}}(t,e)})),d.set(e,t)}}(e);var S=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)}(y),b=m.label,R=!1;if(void 0===m.checkedTemplate&&(m.checkedTemplate=!0),void 0===m.uncheckedTemplate&&(m.uncheckedTemplate=!1),(0,o.empty)(t),p===m.checkedTemplate||(0,i.equalsIgnoreCase)(p,m.checkedTemplate)?S.checked=!0:p===m.uncheckedTemplate||(0,i.equalsIgnoreCase)(p,m.uncheckedTemplate)?S.checked=!1:null===p?(0,o.addClass)(S,"noValue"):(S.style.display="none",(0,o.addClass)(S,f),R=!0),S.setAttribute("data-row",n),S.setAttribute("data-col",r),!R&&b){var T="";if(b.value)T="function"==typeof b.value?b.value.call(this,n,r,g,p):b.value;else if(b.property){var M=e.getDataAtRowProp(n,b.property);T=null!==M?M:""}var O=function(e,t){var n=e.createElement("label");return n.className="htCheckboxRendererLabel",n.appendChild(e.createTextNode(t)),n.cloneNode(!0)}(y,T);"before"===b.position?O.appendChild(S):O.insertBefore(S,O.firstChild),S=O}function k(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=e.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=e.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=e.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])}}u.length>0&&e.setDataAtCell(u)}}t.appendChild(S),R&&t.appendChild(y.createTextNode("#bad-value#")),h.has(e)||(h.set(e,!0),e.addHook("beforeKeyDown",(function(t){var n=(0,l.partial)(s.isKey,t.keyCode);if(!e.getSettings().enterBeginsEditing&&n("ENTER"))return;n("".concat("SPACE|ENTER","|").concat("DELETE|BACKSPACE"))&&!(0,u.isImmediatePropagationStopped)(t)&&function(t){var n=e.getSelectedRangeLast();if(!n)return;for(var r=n.getTopLeftCorner(),o=n.getBottomRightCorner(),i=r.row;i<=o.row;i++)for(var a=r.col;a<=o.col;a++){var s=e.getCellMeta(i,a);if("checkbox"!==s.type)return;var l=e.getCell(i,a);if(null==l)t(i,a,s);else{var u=l.querySelectorAll("input[type=checkbox]");u.length>0&&!s.readOnly&&t(u)}}}((function(){(0,u.stopImmediatePropagation)(t),t.preventDefault()}));n("SPACE|ENTER")&&k();n("DELETE|BACKSPACE")&&k(!0)})))};t.default=g},function(e,t,n){"use strict";n(17),t.__esModule=!0,t.default=void 0;var r=n(8),o=n(43);var i=function(e,t,n,i,a,s){for(var l=arguments.length,u=new Array(l>6?l-6:0),c=6;c<l;c++)u[c-6]=arguments[c];(0,o.getRenderer)("base").apply(this,[e,t,n,i,a,s].concat(u)),(0,r.fastInnerHTML)(t,null==s?"":s)};t.default=i},function(e,t,n){"use strict";var r=n(0);n(15),n(48),n(42),n(53),t.__esModule=!0,t.default=void 0;var o=r(n(361)),i=n(43),a=n(19);var s=function(e,t,n,r,s,l,u){var c=l;if((0,a.isNumeric)(c)){var h=u.numericFormat,d=h&&h.culture||"-",f=h&&h.pattern,v=u.className||"",g=v.length?v.split(" "):[];if(void 0!==d&&!o.default.languages()[d]){var p=d.replace("-",""),m=o.default.allLanguages?o.default.allLanguages[d]:o.default[p];m&&o.default.registerLanguage(m)}o.default.setLanguage(d),c=(0,o.default)(c).format(f||"0"),g.indexOf("htLeft")<0&&g.indexOf("htCenter")<0&&g.indexOf("htRight")<0&&g.indexOf("htJustify")<0&&g.push("htRight"),g.indexOf("htNumeric")<0&&g.push("htNumeric"),u.className=g.join(" ")}(0,i.getRenderer)("text")(e,t,n,r,s,c,u)};t.default=s},function(e,t,n){"use strict";n(17),t.__esModule=!0,t.default=void 0;var r=n(8),o=n(43),i=n(19);var a=function(e,t,n,a,s,l,u){for(var c=arguments.length,h=new Array(c>7?c-7:0),d=7;d<c;d++)h[d-7]=arguments[d];(0,o.getRenderer)("text").apply(this,[e,t,n,a,s,l,u].concat(h));var f=u.hashLength||t.innerHTML.length,v=u.hashSymbol||"*",g="";(0,i.rangeEach)(f-1,(function(){g+=v})),(0,r.fastInnerHTML)(t,g)};t.default=a},function(e,t,n){"use strict";n(17),n(42),t.__esModule=!0,t.default=void 0;var r=n(8),o=n(24),i=n(43);var a=function(e,t,n,a,s,l,u){for(var c=arguments.length,h=new Array(c>7?c-7:0),d=7;d<c;d++)h[d-7]=arguments[d];(0,i.getRenderer)("base").apply(this,[e,t,n,a,s,l,u].concat(h));var f=l;if(!f&&u.placeholder&&(f=u.placeholder),f=(0,o.stringify)(f),e.getSettings().trimWhitespace||e.getSettings().wordWrap||(f=f.replace(/ /g,String.fromCharCode(160))),u.rendererTemplate){(0,r.empty)(t);var v=e.rootDocument.createElement("TEMPLATE");v.setAttribute("bind","{{}}"),v.innerHTML=u.rendererTemplate,HTMLTemplateElement.decorate(v),v.model=e.getSourceDataAtRow(n),t.appendChild(v)}else(0,r.fastInnerText)(t,f)};t.default=a},function(e,t,n){"use strict";n(36),e.exports=function(){var e,t={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},n=document.body,r=document.createTextNode(""),o=document.createElement("SPAN"),i=function(e,t,n){e.addEventListener(t,n,!1)},a=function(e,t,n){e.removeEventListener(t,n,!1)},s=function(i){var a,s;i?/^[a-zA-Z \.,\\\/\|0-9]$/.test(i)||(i="."):i="",void 0!==r.textContent?r.textContent=e.value+i:r.data=e.value+i,o.style.fontSize=c(e).fontSize,o.style.fontFamily=c(e).fontFamily,o.style.whiteSpace="pre",n.appendChild(o),a=o.clientWidth+2,n.removeChild(o),e.style.height=t.minHeight+"px",t.minWidth>a?e.style.width=t.minWidth+"px":a>t.maxWidth?e.style.width=t.maxWidth+"px":e.style.width=a+"px",s=e.scrollHeight?e.scrollHeight-1:0,t.minHeight>s?e.style.height=t.minHeight+"px":t.maxHeight<s?(e.style.height=t.maxHeight+"px",e.style.overflowY="visible"):e.style.height=s+"px"},l=function(){window.setTimeout(s,0)},u=function(n,a,u){e=n,function(n){if(n&&n.minHeight)if("inherit"==n.minHeight)t.minHeight=e.clientHeight;else{var i=parseInt(n.minHeight);isNaN(i)||(t.minHeight=i)}if(n&&n.maxHeight)if("inherit"==n.maxHeight)t.maxHeight=e.clientHeight;else{var a=parseInt(n.maxHeight);isNaN(a)||(t.maxHeight=a)}if(n&&n.minWidth)if("inherit"==n.minWidth)t.minWidth=e.clientWidth;else{var s=parseInt(n.minWidth);isNaN(s)||(t.minWidth=s)}if(n&&n.maxWidth)if("inherit"==n.maxWidth)t.maxWidth=e.clientWidth;else{var l=parseInt(n.maxWidth);isNaN(l)||(t.maxWidth=l)}o.firstChild||(o.className="autoResize",o.style.display="inline-block",o.appendChild(r))}(a),"TEXTAREA"==e.nodeName&&(e.style.resize="none",e.style.overflowY="",e.style.height=t.minHeight+"px",e.style.minWidth=t.minWidth+"px",e.style.maxWidth=t.maxWidth+"px",e.style.overflowY="hidden"),u&&(i(e,"change",s),i(e,"cut",l),i(e,"paste",l),i(e,"drop",l),i(e,"keydown",l),i(e,"focus",s),i(e,"compositionstart",l),i(e,"compositionupdate",l),i(e,"compositionend",l)),s()};function c(e){return e.currentStyle||document.defaultView.getComputedStyle(e)}return{init:function(e,t,n){u(e,t,n)},unObserve:function(){a(e,"change",s),a(e,"cut",l),a(e,"paste",l),a(e,"drop",l),a(e,"keydown",l),a(e,"focus",s),a(e,"compositionstart",l),a(e,"compositionupdate",l),a(e,"compositionend",l)},resize: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=r(n(6)),s=r(n(5)),l=r(n(7)),u=r(n(110)),c=n(8),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)),a=r(n(6)),s=r(n(5)),l=r(n(16)),u=r(n(7)),c=r(n(64)),h=r(n(470));n(471);var d=n(8),f=n(4),v=r(n(25)),g=n(59),p=n(32),m=function(e){function t(e){var n;return(0,o.default)(this,t),(n=(0,a.default)(this,(0,s.default)(t).call(this,e))).defaultDateFormat="DD/MM/YYYY",n.isCellEdited=!1,n.parentDestroyed=!1,n}return(0,u.default)(t,e),(0,i.default)(t,[{key:"init",value:function(){var e=this;if("function"!=typeof c.default)throw new Error("You need to include moment.js to your project.");if("function"!=typeof h.default)throw new Error("You need to include Pikaday to your project.");(0,l.default)((0,s.default)(t.prototype),"init",this).call(this),this.instance.addHook("afterDestroy",(function(){e.parentDestroyed=!0,e.destroyElements()}))}},{key:"createElements",value:function(){(0,l.default)((0,s.default)(t.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,d.addClass)(this.datePicker,"htDatepickerHolder"),this.hot.rootDocument.body.appendChild(this.datePicker),this.$datePicker=new h.default(this.getDatePickerConfig()),new v.default(this).addEventListener(this.datePicker,"mousedown",(function(e){return(0,p.stopPropagation)(e)})),this.hideDatepicker()}},{key:"destroyElements",value:function(){var e=this.datePicker.parentNode;this.$datePicker.destroy(),e&&e.removeChild(this.datePicker)}},{key:"prepare",value:function(e,n,r,o,i,a){(0,l.default)((0,s.default)(t.prototype),"prepare",this).call(this,e,n,r,o,i,a)}},{key:"open",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,l.default)((0,s.default)(t.prototype),"open",this).call(this),this.showDatepicker(e)}},{key:"close",value:function(){var e=this;this._opened=!1,this.instance._registerTimeout((function(){e.instance._refreshBorders()})),(0,l.default)((0,s.default)(t.prototype),"close",this).call(this)}},{key:"finishEditing",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){var r=this.originalValue;void 0!==r&&this.setValue(r)}this.hideDatepicker(),(0,l.default)((0,s.default)(t.prototype),"finishEditing",this).call(this,e,n)}},{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,g.isMetaKey)(e.keyCode);this.datePickerStyle.top="".concat(this.hot.rootWindow.pageYOffset+n.top+(0,d.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,c.default)(t,r,!0).isValid()&&this.$datePicker.setMoment((0,c.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,c.default)(t,r,!0).isValid()&&this.$datePicker.setMoment((0,c.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 e=this,t=this.TEXTAREA,n={};this.cellProperties&&this.cellProperties.datePickerConfig&&(0,f.deepExtend)(n,this.cellProperties.datePickerConfig);var r=n.onSelect,o=n.onClose;return n.field=t,n.trigger=t,n.container=this.datePicker,n.bound=!1,n.format=n.format||this.defaultDateFormat,n.reposition=n.reposition||!1,n.onSelect=function(t){var n=t;isNaN(n.getTime())||(n=(0,c.default)(n).format(e.cellProperties.dateFormat||e.defaultDateFormat)),e.setValue(n),e.hideDatepicker(),r&&r()},n.onClose=function(){e.parentDestroyed||e.finishEditing(!1),o&&o()},n}}]),t}(r(n(116)).default);t.default=m},function(e,t,n){ | |
| /*! | |
| * Pikaday | |
| * | |
| * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday | |
| */ | |
| !function(t,r){"use strict";var o;try{o=n(64)}catch(e){}e.exports=function(e){var t="function"==typeof e,n=!!window.addEventListener,r=window.document,o=window.setTimeout,i=function(e,t,r,o){n?e.addEventListener(t,r,!!o):e.attachEvent("on"+t,r)},a=function(e,t,r,o){n?e.removeEventListener(t,r,!!o):e.detachEvent("on"+t,r)},s=function(e,t,n){var o;r.createEvent?((o=r.createEvent("HTMLEvents")).initEvent(t,!0,!1),o=p(o,n),e.dispatchEvent(o)):r.createEventObject&&(o=r.createEventObject(),o=p(o,n),e.fireEvent("on"+t,o))},l=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},u=function(e){return/Array/.test(Object.prototype.toString.call(e))},c=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},h=function(e){var t=e.getDay();return 0===t||6===t},d=function(e){return e%4==0&&e%100!=0||e%400==0},f=function(e,t){return[31,d(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},v=function(e){c(e)&&e.setHours(0,0,0,0)},g=function(e,t){return e.getTime()===t.getTime()},p=function(e,t,n){var r,o;for(r in t)(o=void 0!==e[r])&&"object"==typeof t[r]&&null!==t[r]&&void 0===t[r].nodeName?c(t[r])?n&&(e[r]=new Date(t[r].getTime())):u(t[r])?n&&(e[r]=t[r].slice(0)):e[r]=p({},t[r],n):!n&&o||(e[r]=t[r]);return e},m=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},y={field:null,bound:void 0,position:"bottom left",reposition:!0,format:"YYYY-MM-DD",defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,onSelect:null,onOpen:null,onClose:null,onDraw:null},w=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},C=function(e){var t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';t.push("is-outside-current-month")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'<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>"},E=function(e,t){return"<tr>"+(t?e.reverse():e).join("")+"</tr>"},S=function(e,t,n,r,o,i){var a,s,l,c,h,d=e._o,f=n===d.minYear,v=n===d.maxYear,g='<div id="'+i+'" class="pika-title" role="heading" aria-live="assertive">',p=!0,m=!0;for(l=[],a=0;a<12;a++)l.push('<option value="'+(n===o?a-t:12+a-t)+'"'+(a===r?' selected="selected"':"")+(f&&a<d.minMonth||v&&a>d.maxMonth?'disabled="disabled"':"")+">"+d.i18n.months[a]+"</option>");for(c='<div class="pika-label">'+d.i18n.months[r]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>",u(d.yearRange)?(a=d.yearRange[0],s=d.yearRange[1]+1):(a=n-d.yearRange,s=1+n+d.yearRange),l=[];a<s&&a<=d.maxYear;a++)a>=d.minYear&&l.push('<option value="'+a+'"'+(a===n?' selected="selected"':"")+">"+a+"</option>");return h='<div class="pika-label">'+n+d.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+l.join("")+"</select></div>",d.showMonthAfterYear?g+=h+c:g+=c+h,f&&(0===r||d.minMonth>=r)&&(p=!1),v&&(11===r||d.maxMonth<=r)&&(m=!1),0===t&&(g+='<button class="pika-prev'+(p?"":" is-disabled")+'" type="button">'+d.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(g+='<button class="pika-next'+(m?"":" is-disabled")+'" type="button">'+d.i18n.nextMonth+"</button>"),g+"</div>"},b=function(a){var s=this,u=s.config(a);s._onMouseDown=function(e){if(s._v){var t=(e=e||window.event).target||e.srcElement;if(t)if(l(t,"is-disabled")||(!l(t,"pika-button")||l(t,"is-empty")||l(t.parentNode,"is-disabled")?l(t,"pika-prev")?s.prevMonth():l(t,"pika-next")&&s.nextMonth():(s.setDate(new Date(t.getAttribute("data-pika-year"),t.getAttribute("data-pika-month"),t.getAttribute("data-pika-day"))),u.bound&&o((function(){s.hide(),u.field&&u.field.blur()}),100))),l(t,"pika-select"))s._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},s._onChange=function(e){var t=(e=e||window.event).target||e.srcElement;t&&(l(t,"pika-select-month")?s.gotoMonth(t.value):l(t,"pika-select-year")&&s.gotoYear(t.value))},s._onKeyChange=function(e){if(e=e||window.event,s.isVisible())switch(e.keyCode){case 13:case 27:u.field.blur();break;case 37:e.preventDefault(),s.adjustDate("subtract",1);break;case 38:s.adjustDate("subtract",7);break;case 39:s.adjustDate("add",1);break;case 40:s.adjustDate("add",7)}},s._onInputChange=function(n){var r;n.firedBy!==s&&(r=t?(r=e(u.field.value,u.format,u.formatStrict))&&r.isValid()?r.toDate():null:new Date(Date.parse(u.field.value)),c(r)&&s.setDate(r),s._v||s.show())},s._onInputFocus=function(){s.show()},s._onInputClick=function(){s.show()},s._onInputBlur=function(){var e=r.activeElement;do{if(l(e,"pika-single"))return}while(e=e.parentNode);s._c||(s._b=o((function(){s.hide()}),50)),s._c=!1},s._onClick=function(e){var t=(e=e||window.event).target||e.srcElement,r=t;if(t){!n&&l(t,"pika-select")&&(t.onchange||(t.setAttribute("onchange","return;"),i(t,"change",s._onChange)));do{if(l(r,"pika-single")||r===u.trigger)return}while(r=r.parentNode);s._v&&t!==u.trigger&&r!==u.trigger&&s.hide()}},s.el=r.createElement("div"),s.el.className="pika-single"+(u.isRTL?" is-rtl":"")+(u.theme?" "+u.theme:""),i(s.el,"mousedown",s._onMouseDown,!0),i(s.el,"touchend",s._onMouseDown,!0),i(s.el,"change",s._onChange),i(r,"keydown",s._onKeyChange),u.field&&(u.container?u.container.appendChild(s.el):u.bound?r.body.appendChild(s.el):u.field.parentNode.insertBefore(s.el,u.field.nextSibling),i(u.field,"change",s._onInputChange),u.defaultDate||(t&&u.field.value?u.defaultDate=e(u.field.value,u.format).toDate():u.defaultDate=new Date(Date.parse(u.field.value)),u.setDefaultDate=!0));var h=u.defaultDate;c(h)?u.setDefaultDate?s.setDate(h,!0):s.gotoDate(h):s.gotoDate(new Date),u.bound?(this.hide(),s.el.className+=" is-bound",i(u.trigger,"click",s._onInputClick),i(u.trigger,"focus",s._onInputFocus),i(u.trigger,"blur",s._onInputBlur)):this.show()};return b.prototype={config:function(e){this._o||(this._o=p({},y,!0));var t=p(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=n>4?4:n,c(t.minDate)||(t.minDate=!1),c(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),u(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))||y.yearRange,t.yearRange>100&&(t.yearRange=100);return t},toString:function(n){return c(this._d)?t?e(this._d).format(n||this._o.format):this._d.toDateString():""},getMoment:function(){return t?e(this._d):null},setMoment:function(n,r){t&&e.isMoment(n)&&this.setDate(n.toDate(),r)},getDate:function(){return c(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="",s(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),c(e)){var n=this._o.minDate,r=this._o.maxDate;c(n)&&e<n?e=n:c(r)&&e>r&&(e=r),this._d=new Date(e.getTime()),v(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),s(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(c(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(n,r){var o,i=this.getDate(),a=24*parseInt(r)*60*60*1e3;"add"===n?o=new Date(i.valueOf()+a):"subtract"===n&&(o=new Date(i.valueOf()-a)),t&&("add"===n?o=e(i).add(r,"days").toDate():"subtract"===n&&(o=e(i).subtract(r,"days").toDate())),this.setDate(o)},adjustCalendars:function(){this.calendars[0]=m(this.calendars[0]);for(var e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=m({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?(v(e),this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=y.minDate,this._o.minYear=y.minYear,this._o.minMonth=y.minMonth,this._o.startRange=y.startRange),this.draw()},setMaxDate:function(e){e instanceof Date?(v(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=y.maxDate,this._o.maxYear=y.maxYear,this._o.maxMonth=y.maxMonth,this._o.endRange=y.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,i=n.maxYear,a=n.minMonth,s=n.maxMonth,l="";this._y<=r&&(this._y=r,!isNaN(a)&&this._m<a&&(this._m=a)),this._y>=i&&(this._y=i,!isNaN(s)&&this._m>s&&(this._m=s)),t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2);for(var u=0;u<n.numberOfMonths;u++)l+='<div class="pika-lendar">'+S(this,u,this.calendars[u].year,this.calendars[u].month,this.calendars[0].year,t)+this.render(this.calendars[u].year,this.calendars[u].month,t)+"</div>";this.el.innerHTML=l,n.bound&&"hidden"!==n.field.type&&o((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,o,i,a,s,l,u,c;if(!this._o.container){if(this.el.style.position="absolute",t=e=this._o.trigger,n=this.el.offsetWidth,o=this.el.offsetHeight,i=window.innerWidth||r.documentElement.clientWidth,a=window.innerHeight||r.documentElement.clientHeight,s=window.pageYOffset||r.body.scrollTop||r.documentElement.scrollTop,"function"==typeof e.getBoundingClientRect)l=(c=e.getBoundingClientRect()).left+window.pageXOffset,u=c.bottom+window.pageYOffset;else for(l=t.offsetLeft,u=t.offsetTop+t.offsetHeight;t=t.offsetParent;)l+=t.offsetLeft,u+=t.offsetTop;(this._o.reposition&&l+n>i||this._o.position.indexOf("right")>-1&&l-n+e.offsetWidth>0)&&(l=l-n+e.offsetWidth),(this._o.reposition&&u+o>a+s||this._o.position.indexOf("top")>-1&&u-o-e.offsetHeight>0)&&(u=u-o-e.offsetHeight),this.el.style.left=l+"px",this.el.style.top=u+"px"}},render:function(e,t,n){var r=this._o,o=new Date,i=f(e,t),a=new Date(e,t,1).getDay(),s=[],l=[];v(o),r.firstDay>0&&(a-=r.firstDay)<0&&(a+=7);for(var u,d,p,m,y=0===t?11:t-1,S=11===t?0:t+1,b=0===t?e-1:e,R=11===t?e+1:e,T=f(b,y),M=i+a,O=M;O>7;)O-=7;M+=7-O;for(var k=0,N=0;k<M;k++){var _=new Date(e,t,k-a+1),A=!!c(this._d)&&g(_,this._d),I=g(_,o),D=k<a||k>=i+a,L=k-a+1,x=t,H=e,P=r.startRange&&g(r.startRange,_),F=r.endRange&&g(r.endRange,_),B=r.startRange&&r.endRange&&r.startRange<_&&_<r.endRange;D&&(k<a?(L=T+L,x=y,H=b):(L-=i,x=S,H=R));var V={day:L,month:x,year:H,isSelected:A,isToday:I,isDisabled:r.minDate&&_<r.minDate||r.maxDate&&_>r.maxDate||r.disableWeekends&&h(_)||r.disableDayFn&&r.disableDayFn(_),isEmpty:D,isStartRange:P,isEndRange:F,isInRange:B,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths};l.push(C(V)),7==++N&&(r.showWeekNumber&&l.unshift((u=k-a,d=t,p=e,m=void 0,void 0,m=new Date(p,0,1),'<td class="pika-week">'+Math.ceil(((new Date(p,d,u)-m)/864e5+m.getDay()+1)/7)+"</td>")),s.push(E(l,r.isRTL)),l=[],N=0)}return function(e,t,n){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+n+'">'+function(e){var t,n=[];e.showWeekNumber&&n.push("<th></th>");for(t=0;t<7;t++)n.push('<th scope="col"><abbr title="'+w(e,t)+'">'+w(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?n.reverse():n).join("")+"</tr></thead>"}(e)+(r=t,"<tbody>"+r.join("")+"</tbody>")+"</table>";var r}(r,s,n)},isVisible:function(){return this._v},show:function(){var e,t,n;this.isVisible()||(e=this.el,t="is-hidden",e.className=(n=(" "+e.className+" ").replace(" "+t+" "," ")).trim?n.trim():n.replace(/^\s+|\s+$/g,""),this._v=!0,this.draw(),this._o.bound&&(i(r,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var e,t,n=this._v;!1!==n&&(this._o.bound&&a(r,"click",this._onClick),this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto",e=this.el,l(e,t="is-hidden")||(e.className=""===e.className?t:e.className+" "+t),this._v=!1,void 0!==n&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){this.hide(),a(this.el,"mousedown",this._onMouseDown,!0),a(this.el,"touchend",this._onMouseDown,!0),a(this.el,"change",this._onChange),this._o.field&&(a(this._o.field,"change",this._onInputChange),this._o.bound&&(a(this._o.trigger,"click",this._onInputClick),a(this._o.trigger,"focus",this._onInputFocus),a(this._o.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},b}(o)}()},function(e,t,n){},function(e,t,n){"use strict";var r=n(0);n(41),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(6)),s=r(n(5)),l=r(n(16)),u=r(n(7)),c=r(n(360)),h=r(n(45)),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:"prepare",value:function(e,n,r,o,i,a){(0,l.default)((0,s.default)(t.prototype),"prepare",this).call(this,e,n,r,o,i,a),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}]),t}(c.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(6)),a=r(n(5)),s=r(n(7)),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(116)).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(6)),s=r(n(5)),l=r(n(16)),u=r(n(7)),c=n(8),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,(0,c.empty)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}]),t}(r(n(116)).default);t.default=h},function(e,t,n){"use strict";var r=n(10),o=n(0);t.__esModule=!0,t.default=void 0;var i=o(n(46)),a=o(n(1)),s=o(n(2)),l=o(n(6)),u=o(n(5)),c=o(n(16)),h=o(n(7)),d=n(8),f=n(32),v=n(59),g=r(n(110)),p=n(4),m=function(e){function t(){return(0,a.default)(this,t),(0,l.default)(this,(0,u.default)(t).apply(this,arguments))}return(0,h.default)(t,e),(0,s.default)(t,[{key:"init",value:function(){this.select=this.hot.rootDocument.createElement("SELECT"),(0,d.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",(0,d.hasClass)(this.select,"ht_editor_visible")&&(0,d.removeClass)(this.select,"ht_editor_visible"),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,n,r,o,i,a){var s=this;(0,c.default)((0,u.default)(t.prototype),"prepare",this).call(this,e,n,r,o,i,a);var l,h=this.cellProperties.selectOptions;l="function"==typeof h?this.prepareOptions(h(this.row,this.col,this.prop)):this.prepareOptions(h),(0,d.empty)(this.select),(0,p.objectEach)(l,(function(e,t){var n=s.hot.rootDocument.createElement("OPTION");n.value=t,(0,d.fastInnerHTML)(n,e),s.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===g.EditorState.EDITING)if(this.TD=this.getEditedCell(),this.TD){var e,t=this.hot.view.wt.wtOverlays,n=(0,d.offset)(this.TD),r=(0,d.offset)(this.hot.rootElement),o=t.scrollableElement,i=this.checkEditorSection(),a=(0,d.outerWidth)(this.TD)+1,s=(0,d.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,d.getCssTransform)(t.topOverlay.clone.wtTable.holder.parentNode);break;case"left":e=(0,d.getCssTransform)(t.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":e=(0,d.getCssTransform)(t.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":e=(0,d.getCssTransform)(t.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":e=(0,d.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,d.resetCssTransform)(this.select);var h=(0,d.getComputedStyle)(this.TD,this.hot.rootWindow);parseInt(h.borderTopWidth,10)>0&&(s-=1),parseInt(h.borderLeftWidth,10)>0&&(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",(0,d.addClass)(this.select,"ht_editor_visible")}else this.close()}},{key:"onBeforeKeyDown",value:function(){var e=this.select.selectedIndex-1,t=this.select.selectedIndex+1;switch(event.keyCode){case v.KEY_CODES.ARROW_UP:e>=0&&(this.select[e].selected=!0),(0,f.stopImmediatePropagation)(event),event.preventDefault();break;case v.KEY_CODES.ARROW_DOWN:t<=this.select.length-1&&(this.select[t].selected=!0),(0,f.stopImmediatePropagation)(event),event.preventDefault()}}}]),t}(g.default);t.default=m},function(e,t,n){"use strict";function r(e,t){var n=e;return function(e){for(var r=!1,o=0,i=e.length;o<i;o++)if(n===e[o]){r=!0;break}t(r)}}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(363),t.__esModule=!0,t.default=function(e,t){var n=(0,a.getEditorInstance)("date",this.instance),r=e,i=!0;null==r&&(r="");var l=(0,o.default)(r,this.dateFormat||n.defaultDateFormat,!0).isValid(),u=(0,o.default)(new Date(r)).isValid()||l;this.allowEmpty&&""===r&&(u=!0,l=!0);u||(i=!1);!u&&l&&(i=!0);if(u&&!l)if(!0===this.correctFormat){var c=s(r,this.dateFormat),h=this.instance.toVisualRow(this.row),d=this.instance.toVisualColumn(this.col);this.instance.setDataAtCell(h,d,c,"dateValidator"),i=!0}else i=!1;t(i)},t.correctFormat=s;var o=r(n(64)),i=n(364),a=n(61);function s(e,t){var n=(0,o.default)((0,i.getNormalizedDate)(e)),r=(0,o.default)(e,t),a=e.search(/[A-z]/g)>-1;return(n.isValid()&&n.format("x")===r.format("x")||!r.isValid()||a?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(19)},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,a=e;null===a&&(a="");a=/^\d{3,}$/.test(a)?parseInt(a,10):a;var s=/^\d{1,2}$/.test(a);s&&(a+=":00");var l=(0,o.default)(a,i,!0).isValid()?(0,o.default)(a):(0,o.default)(a,n),u=l.isValid(),c=(0,o.default)(a,n,!0).isValid()&&!s;this.allowEmpty&&""===a&&(u=!0,c=!0);u||(r=!1);!u&&c&&(r=!0);if(u&&!c)if(!0===this.correctFormat){var h=l.format(n),d=this.instance.toVisualRow(this.row),f=this.instance.toVisualColumn(this.col);this.instance.setDataAtCell(d,f,h,"timeValidator"),r=!0}else r=!1;t(r)};var o=r(n(64)),i=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"]},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(61),o=n(43),i=n(82),a={editor:(0,r.getEditor)("autocomplete"),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(61),o=n(43),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(61),o=n(43),i=n(82),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(61),o=n(43),i=n(82),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(61),o=n(43),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(61),o=n(43),i=n(82),a={editor:(0,r.getEditor)("numeric"),renderer:(0,o.getRenderer)("numeric"),validator:(0,i.getValidator)("numeric"),dataType:"number"};t.default=a},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(61),o=n(43),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(61),o=n(43),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(61),o=n(43),i=n(82),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(44),o=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&o(e)===e}},function(e,t,n){var r=n(38),o=n(492),i=!r.setImmediate||!r.clearImmediate;n(21)({global:!0,bind:!0,enumerable:!0,forced:i},{setImmediate:o.set,clearImmediate:o.clear})},function(e,t,n){var r,o,i,a=n(38),s=n(28),l=n(78),u=n(105),c=n(200),h=n(146),d=n(168),f=a.location,v=a.setImmediate,g=a.clearImmediate,p=a.process,m=a.MessageChannel,y=a.Dispatch,w=0,C={},E=function(e){if(C.hasOwnProperty(e)){var t=C[e];delete C[e],t()}},S=function(e){return function(){E(e)}},b=function(e){E(e.data)},R=function(e){a.postMessage(e+"",f.protocol+"//"+f.host)};v&&g||(v=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return C[++w]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},r(w),w},g=function(e){delete C[e]},"process"==l(p)?r=function(e){p.nextTick(S(e))}:y&&y.now?r=function(e){y.now(S(e))}:m&&!/(iphone|ipod|ipad).*applewebkit/i.test(d)?(i=(o=new m).port2,o.port1.onmessage=b,r=u(i.postMessage,i,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||s(R)?r="onreadystatechange"in h("script")?function(e){c.appendChild(h("script")).onreadystatechange=function(){c.removeChild(this),E(e)}}:function(e){setTimeout(S(e),0)}:(r=R,a.addEventListener("message",b,!1))),e.exports={set:v,clear:g}},function(e,t,n){"use strict";var r=n(0);n(41),n(15),n(11),n(31),n(72),n(34),n(40),n(9),n(12),n(53),n(13),t.__esModule=!0,t.default=void 0;var o=r(n(46)),i=r(n(1)),a=r(n(2)),s=r(n(366)),l=n(140),u=n(175),c=n(4),h=n(3),d=n(19),f=n(24),v=(0,l.cellMethodLookupFactory)("copyable",!1),g=function(){function e(t,n,r,o){(0,i.default)(this,e),this.instance=t,this.priv=r,this.GridSettings=o,this.dataSource=n,this.latestSourceRowsCount=0,this.duckSchema=this.dataSource&&this.dataSource[0]?(0,c.duckSchema)(this.dataSource[0]):{},this.colToPropCache=void 0,this.propToColCache=void 0,this.createMap()}return(0,a.default)(e,null,[{key:"DESTINATION_RENDERER",get:function(){return 1}},{key:"DESTINATION_CLIPBOARD_GENERATOR",get:function(){return 2}}]),(0,a.default)(e,[{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,c.deepObjectSize)(t);for("function"==typeof n&&(o=s>0?s:this.instance.countSourceCols(),a=!0),e=0;e<o;e++){var l=a?n(e):n[e];if((0,c.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,i=this,a=t,s=n;return void 0===a&&(a=0,s=""),"object"!==(0,o.default)(e)||Array.isArray(e)||(0,c.objectEach)(e,(function(e,t){null===e?(r=s+t,i.colToPropCache.push(r),i.propToColCache.set(r,a),a+=1):a=i.recursiveDuckColumns(e,a,"".concat(t,"."))})),a}},{key:"colToProp",value:function(e){var t=this.instance.toPhysicalColumn(e);return null===t?e:this.colToPropCache&&(0,f.isDefined)(this.colToPropCache[t])?this.colToPropCache[t]:t}},{key:"propToCol",value:function(e){var t=this.propToColCache.get(e);if((0,f.isDefined)(t))return this.instance.toVisualColumn(t);var n=this.instance.toVisualColumn(e);return null===n?e:n}},{key:"getSchema",value:function(){var e=this.instance.getSettings().dataSchema;return e?"function"==typeof e?e():e:this.duckSchema}},{key:"createRow",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0,o=0,i=e;("number"!=typeof i||i>=this.instance.countSourceRows())&&(i=this.instance.countSourceRows());var a=this.instance.runHooks("beforeCreateRow",i,n,r);if(!1===a)return 0;var s=this.instance.countSourceRows();i<this.instance.countRows()&&(s=this.instance.toPhysicalRow(i));for(var l=this.instance.getSettings().maxRows,u=this.instance.countCols(),h=function(){var e=null;"array"===t.instance.dataType?t.instance.getSettings().dataSchema?e=(0,c.deepClone)(t.getSchema()):(e=[],(0,d.rangeEach)(u-1,(function(){return e.push(null)}))):"function"===t.instance.dataType?e=t.instance.getSettings().dataSchema(i):(e={},(0,c.deepExtend)(e,t.getSchema())),i===t.instance.countSourceRows()?t.dataSource.push(e):t.spliceData(s,0,e),o+=1};o<n&&this.instance.countSourceRows()<l;)h();return this.instance.rowIndexMapper.insertIndexes(i,o),this.instance.runHooks("afterCreateRow",i,o,r),this.instance.forceFullRender=!0,o}},{key:"createCol",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]: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 r=this.dataSource,o=this.instance.getSettings().maxCols,i=e;("number"!=typeof i||i>=this.instance.countSourceCols())&&(i=this.instance.countSourceCols());var a=this.instance.runHooks("beforeCreateCol",i,t,n);if(!1===a)return 0;var s=this.instance.countSourceCols();i<this.instance.countCols()&&(s=this.instance.toPhysicalColumn(i));for(var l=this.instance.countSourceRows(),c=this.instance.countCols(),h=0,d=s;h<t&&c<o;){var f=(0,u.columnFactory)(this.GridSettings,this.priv.columnsSettingConflicts);if("number"!=typeof i||i>=c){if(l>0)for(var v=0;v<l;v+=1)void 0===r[v]&&(r[v]=[]),r[v].push(null);else r.push([null]);this.priv.columnSettings.push(f)}else{for(var g=0;g<l;g++)r[g].splice(d,0,null);this.priv.columnSettings.splice(d,0,f)}h+=1,d+=1,c+=1}return this.instance.columnIndexMapper.insertIndexes(i,h),this.instance.runHooks("afterCreateCol",i,h,n),this.instance.forceFullRender=!0,h}},{key:"removeRow",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0,r="number"!=typeof e?-t:e,o=this.instance.runHooks("modifyRemovedAmount",t,r),i=this.instance.countSourceRows();r=(i+r)%i;var a=this.visualRowsToPhysical(r,o),s=this.instance.runHooks("beforeRemoveRow",r,o,a,n);if(!1!==s){var l=this.dataSource,u=this.filterData(r,o);if(u&&(l.length=0,Array.prototype.push.apply(l,u)),r<this.instance.countRows()){this.instance.rowIndexMapper.removeIndexes(a);var c=(0,f.isDefined)(this.instance.getSettings().columns)||(0,f.isDefined)(this.instance.getSettings().dataSchema);0===this.instance.rowIndexMapper.getNotSkippedIndexesLength()&&!1===c&&this.instance.columnIndexMapper.setIndexesSequence([])}this.instance.runHooks("afterRemoveRow",r,o,a,n),this.instance.forceFullRender=!0}}},{key:"removeCol",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]: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 r="number"!=typeof e?-t:e;r=(this.instance.countCols()+r)%this.instance.countCols();var o=this.visualColumnsToPhysical(r,t),i=o.slice(0).sort((function(e,t){return t-e})),a=this.instance.runHooks("beforeRemoveCol",r,t,o,n);if(!1!==a){for(var s=!0,l=i.length,u=this.dataSource,c=0;c<l;c++)s&&o[0]!==o[c]-c&&(s=!1);if(s)for(var h=0,d=this.instance.countSourceRows();h<d;h++)u[h].splice(o[0],t);else{for(var f=0,v=this.instance.countSourceRows();f<v;f++)for(var g=0;g<l;g++)u[f].splice(i[g],1);for(var p=0;p<l;p++)this.priv.columnSettings.splice(o[p],1)}r<this.instance.countCols()&&(this.instance.columnIndexMapper.removeIndexes(o),0===this.instance.columnIndexMapper.getNotSkippedIndexesLength()&&this.instance.rowIndexMapper.setIndexesSequence([])),this.instance.runHooks("afterRemoveCol",r,t,o,n),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(a>3?a-3:0),l=3;l<a;l++)s[l-3]=arguments[l];(0,h.extendArray)(s,i);for(var u=0;u<n;)s.push(null),u+=1;return(0,h.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(a>3?a-3:0),l=3;l<a;l++)s[l-3]=arguments[l];(0,h.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,c.hasOwnProperty)(r,t))i=r[t];else if("string"==typeof t&&t.indexOf(".")>-1){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 h=(0,c.createObjectPropListener)(i);this.instance.runHooks("modifyData",n,this.propToCol(t),h,"get"),h.isTouched()&&(i=h.value)}return i}},{key:"getCopyable",value:function(e,t){return v.call(this.instance,e,this.propToCol(t))?this.get(e,t):""}},{key:"set",value:function(e,t,n){var r=this.instance.toPhysicalRow(e),o=n,i=this.dataSource[r],a=this.instance.runHooks("modifyRowData",r);if(i=isNaN(a)?a:i,this.instance.hasHook("modifyData")){var s=(0,c.createObjectPropListener)(o);this.instance.runHooks("modifyData",r,this.propToCol(t),s,"set"),s.isTouched()&&(o=s.value)}if(i&&i.hasOwnProperty&&(0,c.hasOwnProperty)(i,t))i[t]=o;else if("string"==typeof t&&t.indexOf(".")>-1){var l,u=t.split("."),h=i,d=0;for(d=0,l=u.length-1;d<l;d++)void 0===h[u[d]]&&(h[u[d]]={}),h=h[u[d]];h[u[d]]=o}else"function"==typeof t?t(this.dataSource.slice(r,r+1)[0],o):i[t]=o}},{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:"getLength",value:function(){var e,t=this.instance.getSettings().maxRows;e=t<0||0===t?0:t||1/0;var n=this.instance.rowIndexMapper.getNotSkippedIndexesLength();return Math.min(n,e)}},{key:"getAll",value:function(){var t={row:0,col:0},n={row:Math.max(this.instance.countRows()-1,0),col:Math.max(this.instance.countCols()-1,0)};return t.row-n.row!=0||this.instance.countSourceRows()?this.getRange(t,n,e.DESTINATION_RENDERER):[]}},{key:"getRange",value:function(t,n,r){var o,i,a,s=[],l=this.instance.getSettings().maxRows,u=this.instance.getSettings().maxCols;if(0===l||0===u)return[];var c=r===e.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,h=Math.min(Math.max(l-1,0),Math.max(t.row,n.row)),d=Math.min(Math.max(u-1,0),Math.max(t.col,n.col));for(o=Math.min(t.row,n.row);o<=h;o++){a=[];var f=this.instance.toPhysicalRow(o);for(i=Math.min(t.col,n.col);i<=d&&null!==f;i++)a.push(c.call(this,o,this.colToProp(i)));null!==f&&s.push(a)}return s}},{key:"getText",value:function(t,n){return s.default.stringify(this.getRange(t,n,e.DESTINATION_RENDERER))}},{key:"getCopyableText",value:function(t,n){return s.default.stringify(this.getRange(t,n,e.DESTINATION_CLIPBOARD_GENERATOR))}},{key:"destroy",value:function(){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}}]),e}();t.default=g},function(e,t,n){"use strict";var r=n(62),o=n(129),i=n(51);e.exports=function(e){for(var t=r(this),n=i(t.length),a=arguments.length,s=o(a>1?arguments[1]:void 0,n),l=a>2?arguments[2]:void 0,u=void 0===l?n:o(l,n);u>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(0);n(11),n(9),n(12),n(23),n(13),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(26),s=n(59),l=n(32),u=n(61),c=r(n(25)),h=n(110),d=n(8),f=function(){function e(t,n,r){var i=this;(0,o.default)(this,e),this.instance=t,this.priv=n,this.selection=r,this.eventManager=new c.default(t),this.destroyed=!1,this.lock=!1,this.activeEditor=void 0,this.cellProperties=void 0,this.instance.addHook("afterDocumentKeyDown",(function(e){return i.onAfterDocumentKeyDown(e)}));for(var a=this.instance.rootWindow;a;)this.eventManager.addEventListener(a.document.documentElement,"keydown",(function(e){i.destroyed||i.instance.runHooks("afterDocumentKeyDown",e)})),a=(0,d.getParentWindow)(a);this.eventManager.addEventListener(this.instance.rootDocument.documentElement,"compositionstart",(function(e){!i.destroyed&&i.activeEditor&&!i.activeEditor.isOpened()&&i.instance.isListening()&&i.openEditor("",e)})),this.instance.view.wt.update("onCellDblClick",(function(e,t,n){return i.onCellDblClick(e,t,n)}))}return(0,i.default)(e,[{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 e=this;if(!this.lock)if(this.activeEditor&&this.activeEditor.isWaiting())this.closeEditor(!1,!1,(function(t){t&&e.prepareEditor()}));else{var t=this.instance.selection.selectedRange.current().highlight,n=t.row,r=t.col;if(this.cellProperties=this.instance.getCellMeta(n,r),this.cellProperties.readOnly)this.clearActiveEditor();else{var o=this.instance.getCellEditor(this.cellProperties),i=this.instance.getCell(n,r,!0);if(o&&i){var a=this.instance.colToProp(r),s=this.instance.getSourceDataAtCell(this.instance.toPhysicalRow(n),r);this.activeEditor=(0,u.getEditorInstance)(o,this.instance),this.activeEditor.prepare(n,r,a,i,s,this.cellProperties)}else this.clearActiveEditor()}}}},{key:"isEditorOpened",value:function(){return this.activeEditor&&this.activeEditor.isOpened()}},{key:"openEditor",value:function(e,t){this.activeEditor&&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:"clearActiveEditor",value:function(){this.activeEditor=void 0}},{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,l.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,s.isMetaKey)(e.keyCode)||(0,s.isCtrlMetaKey)(e.keyCode)||t||this.isEditorOpened()){var n,r=e.shiftKey,o=r?this.selection.setRangeEnd:this.selection.setRangeStart;switch(e.keyCode){case s.KEY_CODES.A:!this.isEditorOpened()&&t&&(this.instance.selectAll(),e.preventDefault(),(0,l.stopPropagation)(e));break;case s.KEY_CODES.ARROW_UP:this.isEditorOpened()&&!this.activeEditor.isWaiting()&&this.closeEditorAndSaveChanges(t),this.moveSelectionUp(r),e.preventDefault(),(0,l.stopPropagation)(e);break;case s.KEY_CODES.ARROW_DOWN:this.isEditorOpened()&&!this.activeEditor.isWaiting()&&this.closeEditorAndSaveChanges(t),this.moveSelectionDown(r),e.preventDefault(),(0,l.stopPropagation)(e);break;case s.KEY_CODES.ARROW_RIGHT:this.isEditorOpened()&&!this.activeEditor.isWaiting()&&this.closeEditorAndSaveChanges(t),this.moveSelectionRight(r),e.preventDefault(),(0,l.stopPropagation)(e);break;case s.KEY_CODES.ARROW_LEFT:this.isEditorOpened()&&!this.activeEditor.isWaiting()&&this.closeEditorAndSaveChanges(t),this.moveSelectionLeft(r),e.preventDefault(),(0,l.stopPropagation)(e);break;case s.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,l.stopPropagation)(e);break;case s.KEY_CODES.BACKSPACE:case s.KEY_CODES.DELETE:this.instance.emptySelectedCells(),this.prepareEditor(),e.preventDefault();break;case s.KEY_CODES.F2:this.activeEditor&&this.activeEditor.enableFullEditMode(),this.openEditor(null,e),e.preventDefault();break;case s.KEY_CODES.ENTER:this.isEditorOpened()?(this.activeEditor&&this.activeEditor.state!==h.EditorState.WAITING&&this.closeEditorAndSaveChanges(t),this.moveSelectionAfterEnter(r)):this.instance.getSettings().enterBeginsEditing?this.cellProperties.readOnly?this.moveSelectionAfterEnter():this.activeEditor&&(this.activeEditor.enableFullEditMode(),this.openEditor(null,e)):this.moveSelectionAfterEnter(r),e.preventDefault(),(0,l.stopImmediatePropagation)(e);break;case s.KEY_CODES.ESCAPE:this.isEditorOpened()&&(this.closeEditorAndRestoreOriginalValue(t),this.activeEditor.focus()),e.preventDefault();break;case s.KEY_CODES.HOME:e.ctrlKey||e.metaKey?o.call(this.selection,new a.CellCoords(0,this.selection.selectedRange.current().from.col)):o.call(this.selection,new a.CellCoords(this.selection.selectedRange.current().from.row,0)),e.preventDefault(),(0,l.stopPropagation)(e);break;case s.KEY_CODES.END:e.ctrlKey||e.metaKey?o.call(this.selection,new a.CellCoords(this.instance.countRows()-1,this.selection.selectedRange.current().from.col)):o.call(this.selection,new a.CellCoords(this.selection.selectedRange.current().from.row,this.instance.countCols()-1)),e.preventDefault(),(0,l.stopPropagation)(e);break;case s.KEY_CODES.PAGE_UP:this.selection.transformStart(-this.instance.countVisibleRows(),0),e.preventDefault(),(0,l.stopPropagation)(e);break;case s.KEY_CODES.PAGE_DOWN:this.selection.transformStart(this.instance.countVisibleRows(),0),e.preventDefault(),(0,l.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()}}]),e}(),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 g=f;t.default=g},function(e,t,n){"use strict";var r=n(21),o=n(89).findIndex,i=n(102),a=!0;"findIndex"in[]&&Array(1).findIndex((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i("findIndex")},function(e,t,n){var r=n(21),o=n(498);r({target:"Array",proto:!0,forced:o!==[].lastIndexOf},{lastIndexOf:o})},function(e,t,n){"use strict";var r=n(67),o=n(79),i=n(51),a=n(107),s=Math.min,l=[].lastIndexOf,u=!!l&&1/[1].lastIndexOf(1,-0)<0,c=a("lastIndexOf");e.exports=u||c?function(e){if(u)return l.apply(this,arguments)||0;var t=r(this),n=i(t.length),a=n-1;for(arguments.length>1&&(a=s(a,o(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:l},function(e,t,n){"use strict";var r=n(0);n(11),n(9),n(12),n(23),n(13),t.__esModule=!0,t.default=void 0;var o=r(n(18)),i=r(n(1)),a=r(n(2)),s=n(8),l=r(n(25)),u=n(32),c=r(n(26)),h=n(367),d=new WeakMap,f=function(){function e(t){(0,i.default)(this,e),this.instance=t,this.eventManager=new l.default(t),this.settings=t.getSettings(),this.THEAD=void 0,this.TBODY=void 0,this.wt=void 0,this.activeWt=void 0,d.set(this,{selectionMouseDown:!1,mouseDown:void 0,table:void 0,lastWidth:0,lastHeight:0}),this.createElements(),this.registerEvents(),this.initializeWalkontable()}return(0,a.default)(e,[{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:"createElements",value:function(){var e=d.get(this),t=this.instance,n=t.rootElement,r=t.rootDocument,o=n.getAttribute("style");o&&n.setAttribute("data-originalstyle",o),(0,s.addClass)(n,"handsontable"),e.table=r.createElement("TABLE"),(0,s.addClass)(e.table,"htCore"),this.instance.getSettings().tableClassName&&(0,s.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 e=this,t=d.get(this),n=this.instance,r=n.rootElement,o=n.rootDocument,i=o.documentElement;this.eventManager.addEventListener(r,"mousedown",(function(n){if(t.selectionMouseDown=!0,!e.isTextSelectionAllowed(n.target)){var r=e.instance.rootWindow;(0,s.clearTextSelection)(r),n.preventDefault(),r.focus()}})),this.eventManager.addEventListener(r,"mouseup",(function(){t.selectionMouseDown=!1})),this.eventManager.addEventListener(r,"mousemove",(function(n){t.selectionMouseDown&&!e.isTextSelectionAllowed(n.target)&&(e.settings.fragmentSelection&&(0,s.clearTextSelection)(e.instance.rootWindow),n.preventDefault())})),this.eventManager.addEventListener(i,"keyup",(function(t){e.instance.selection.isInProgress()&&!t.shiftKey&&e.instance.selection.finish()})),this.eventManager.addEventListener(i,"mouseup",(function(n){e.instance.selection.isInProgress()&&(0,u.isLeftClick)(n)&&e.instance.selection.finish(),t.mouseDown=!1,((0,s.isOutsideInput)(o.activeElement)||!e.instance.selection.isSelected()&&!(0,u.isRightClick)(n))&&e.instance.unlisten()})),this.eventManager.addEventListener(i,"contextmenu",(function(n){e.instance.selection.isInProgress()&&(0,u.isRightClick)(n)&&(e.instance.selection.finish(),t.mouseDown=!1)})),this.eventManager.addEventListener(i,"touchend",(function(){e.instance.selection.isInProgress()&&e.instance.selection.finish(),t.mouseDown=!1})),this.eventManager.addEventListener(i,"mousedown",(function(n){var a=n.target,l=n.x||n.clientX,u=n.y||n.clientY,c=n.target;if(!t.mouseDown&&r&&e.instance.view){var h=e.instance.view.wt.wtTable.holder;if(c===h){var d=(0,s.getScrollbarWidth)(o);if(o.elementFromPoint(l+d,u)!==h||o.elementFromPoint(l,u+d)!==h)return}else for(;c!==i;){if(null===c){if(n.isTargetWebComponent)break;return}if(c===r)return;c=c.parentNode}("function"==typeof e.settings.outsideClickDeselects?e.settings.outsideClickDeselects(a):e.settings.outsideClickDeselects)?e.instance.deselectCell():e.instance.destroyEditor(!1,!1)}})),this.eventManager.addEventListener(t.table,"selectstart",(function(t){e.settings.fragmentSelection||(0,s.isInput)(t.target)||t.preventDefault()}))}},{key:"initializeWalkontable",value:function(){var e=this,t=d.get(this),n={debug:function(){return e.settings.debug},externalRowCalculator:this.instance.getPlugin("autoRowSize")&&this.instance.getPlugin("autoRowSize").isEnabled(),table:t.table,preventOverflow:function(){return e.settings.preventOverflow},preventWheel:function(){return e.settings.preventWheel},stretchH:function(){return e.settings.stretchH},data:this.instance.getDataAtCell,totalRows:function(){return e.instance.countRows()},totalColumns:function(){return e.instance.countCols()},fixedColumnsLeft:function(){return e.settings.fixedColumnsLeft},fixedRowsTop:function(){return e.settings.fixedRowsTop},fixedRowsBottom:function(){return e.settings.fixedRowsBottom},minSpareRows:function(){return e.settings.minSpareRows},renderAllRows:this.settings.renderAllRows,rowHeaders:function(){var t=[];return e.instance.hasRowHeaders()&&t.push((function(t,n){return e.appendRowHeader(t,n)})),e.instance.runHooks("afterGetRowHeaderRenderers",t),t},columnHeaders:function(){var t=[];return e.instance.hasColHeaders()&&t.push((function(t,n){e.appendColHeader(t,n)})),e.instance.runHooks("afterGetColumnHeaderRenderers",t),t},columnWidth:this.instance.getColWidth,rowHeight:this.instance.getRowHeight,cellRenderer:function(t,n,r){var o=e.instance.getCellMeta(t,n),i=e.instance.colToProp(n),a=e.instance.getDataAtRowProp(t,i);e.instance.hasHook("beforeValueRender")&&(a=e.instance.runHooks("beforeValueRender",a,o)),e.instance.runHooks("beforeRenderer",r,t,n,i,a,o),e.instance.getCellRenderer(o)(e.instance,r,t,n,i,a,o),e.instance.runHooks("afterRenderer",r,t,n,i,a,o)},selections:this.instance.selection.highlight,hideBorderOnMouseDownOver:function(){return e.settings.fragmentSelection},onWindowResize:function(){e.instance&&!e.instance.isDestroyed&&e.instance.refreshDimensions()},onCellMouseDown:function(n,r,o,i){var a={row:!1,column:!1,cell:!1};e.instance.listen(),e.activeWt=i,t.mouseDown=!0,e.instance.runHooks("beforeOnCellMouseDown",n,r,o,a),(0,u.isImmediatePropagationStopped)(n)||((0,h.handleMouseEvent)(n,{coords:r,selection:e.instance.selection,controller:a}),e.instance.runHooks("afterOnCellMouseDown",n,r,o),e.activeWt=e.wt)},onCellContextMenu:function(n,r,o,i){e.activeWt=i,t.mouseDown=!1,e.instance.selection.isInProgress()&&e.instance.selection.finish(),e.instance.runHooks("beforeOnCellContextMenu",n,r,o),(0,u.isImmediatePropagationStopped)(n)||(e.instance.runHooks("afterOnCellContextMenu",n,r,o),e.activeWt=e.wt)},onCellMouseOut:function(t,n,r,o){e.activeWt=o,e.instance.runHooks("beforeOnCellMouseOut",t,n,r),(0,u.isImmediatePropagationStopped)(t)||(e.instance.runHooks("afterOnCellMouseOut",t,n,r),e.activeWt=e.wt)},onCellMouseOver:function(n,r,o,i){var a={row:!1,column:!1,cell:!1};e.activeWt=i,e.instance.runHooks("beforeOnCellMouseOver",n,r,o,a),(0,u.isImmediatePropagationStopped)(n)||(t.mouseDown&&(0,h.handleMouseEvent)(n,{coords:r,selection:e.instance.selection,controller:a}),e.instance.runHooks("afterOnCellMouseOver",n,r,o),e.activeWt=e.wt)},onCellMouseUp:function(t,n,r,o){e.activeWt=o,e.instance.runHooks("beforeOnCellMouseUp",t,n,r),(0,u.isImmediatePropagationStopped)(t)||(e.instance.runHooks("afterOnCellMouseUp",t,n,r),e.activeWt=e.wt)},onCellCornerMouseDown:function(t){t.preventDefault(),e.instance.runHooks("afterOnCellCornerMouseDown",t)},onCellCornerDblClick:function(t){t.preventDefault(),e.instance.runHooks("afterOnCellCornerDblClick",t)},beforeDraw:function(t,n){return e.beforeRender(t,n)},onDraw:function(t){return e.onDraw(t)},onScrollVertically:function(){return e.instance.runHooks("afterScrollVertically")},onScrollHorizontally:function(){return e.instance.runHooks("afterScrollHorizontally")},onBeforeRemoveCellClassNames:function(){return e.instance.runHooks("beforeRemoveCellClassNames")},onAfterDrawSelection:function(t,n,r,o){return e.instance.runHooks("afterDrawSelection",t,n,r,o)},onBeforeDrawBorders:function(t,n){return e.instance.runHooks("beforeDrawBorders",t,n)},onBeforeTouchScroll:function(){return e.instance.runHooks("beforeTouchScroll")},onAfterMomentumScroll:function(){return e.instance.runHooks("afterMomentumScroll")},onBeforeStretchingColumnWidth:function(t,n){return e.instance.runHooks("beforeStretchingColumnWidth",t,n)},onModifyRowHeaderWidth:function(t){return e.instance.runHooks("modifyRowHeaderWidth",t)},onModifyGetCellCoords:function(t,n,r){return e.instance.runHooks("modifyGetCellCoords",t,n,r)},viewportRowCalculatorOverride:function(t){var n=e.settings.viewportRowRenderingOffset;if("auto"===n&&e.settings.fixedRowsTop&&(n=10),n>0||"auto"===n){var r=e.instance.countRows();if("number"==typeof n)t.startRow=Math.max(t.startRow-n,0),t.endRow=Math.min(t.endRow+n,r-1);else if("auto"===n){var o=t.startRow+t.endRow-t.startRow,i=Math.ceil(o/r*12);t.startRow=Math.max(t.startRow-i,0),t.endRow=Math.min(t.endRow+i,r-1)}}e.instance.runHooks("afterViewportRowCalculatorOverride",t)},viewportColumnCalculatorOverride:function(t){var n=e.settings.viewportColumnRenderingOffset;if("auto"===n&&e.settings.fixedColumnsLeft&&(n=10),n>0||"auto"===n){var r=e.instance.countCols();if("number"==typeof n&&(t.startColumn=Math.max(t.startColumn-n,0),t.endColumn=Math.min(t.endColumn+n,r-1)),"auto"===n){var o=t.startColumn+t.endColumn-t.startColumn,i=Math.ceil(o/r*12);t.startRow=Math.max(t.startColumn-i,0),t.endColumn=Math.min(t.endColumn+i,r-1)}}e.instance.runHooks("afterViewportColumnCalculatorOverride",t)},rowHeaderWidth:function(){return e.settings.rowHeaderWidth},columnHeaderHeight:function(){var t=e.instance.runHooks("modifyColumnHeaderHeight");return e.settings.columnHeaderHeight||t}};this.instance.runHooks("beforeInitWalkontable",n),this.wt=new c.default(n),this.activeWt=this.wt;var r=this.wt.wtTable.spreader,o=this.instance.rootElement.getBoundingClientRect(),i=o.width,a=o.height;this.setLastSize(i,a),this.eventManager.addEventListener(r,"mousedown",(function(e){e.target===r&&3===e.which&&(0,u.stopPropagation)(e)})),this.eventManager.addEventListener(r,"contextmenu",(function(e){e.target===r&&3===e.which&&(0,u.stopPropagation)(e)})),this.eventManager.addEventListener(this.instance.rootDocument.documentElement,"click",(function(){e.settings.observeDOMVisibility&&e.wt.drawInterrupted&&(e.instance.forceFullRender=!0,e.render())}))}},{key:"isTextSelectionAllowed",value:function(e){if((0,s.isInput)(e))return!0;var t=(0,s.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 d.get(this).mouseDown}},{key:"isSelectedOnlyCell",value:function(){var e=this.instance.getSelectedLast()||[],t=(0,o.default)(e,4),n=t[0],r=t[1],i=t[2],a=t[3];return void 0!==n&&n===i&&r===a}},{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,s.hasClass)(n,"relative"))return(0,s.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"),l=o.createElement("span");a.className="relative",l.className="rowHeader",this.updateCellHeader(l,e,i),a.appendChild(l),t.appendChild(a)}this.instance.runHooks("afterGetRowHeader",e,t)}},{key:"appendColHeader",value:function(e,t){if(t.firstChild){var n=t.firstChild;(0,s.hasClass)(n,"relative")?this.updateCellHeader(n.querySelector(".colHeader"),e,this.instance.getColHeader):((0,s.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:"updateCellHeader",value:function(e,t,n){var r=t,o=this.wt.wtOverlays.getParentOverlay(e)||this.wt;e.parentNode&&((0,s.hasClass)(e,"colHeader")?r=o.wtTable.columnFilter.sourceToRendered(t):(0,s.hasClass)(e,"rowHeader")&&(r=o.wtTable.rowFilter.sourceToRendered(t))),r>-1?(0,s.fastInnerHTML)(e,n(t)):((0,s.fastInnerText)(e,String.fromCharCode(160)),(0,s.addClass)(e,"cornerHeader"))}},{key:"maximumVisibleElementWidth",value:function(e){var t=this.wt.wtViewport.getWorkspaceWidth()-e;return t>0?t:0}},{key:"maximumVisibleElementHeight",value:function(e){var t=this.wt.wtViewport.getWorkspaceHeight()-e;return t>0?t:0}},{key:"setLastSize",value:function(e,t){var n=d.get(this),r=[e,t];n.lastWidth=r[0],n.lastHeight=r[1]}},{key:"getLastSize",value:function(){var e=d.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()}}]),e}();t.default=f},function(e,t,n){"use strict";var r=n(0);n(31),n(65),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(4),s=n(3),l=n(19),u=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];(0,o.default)(this,e),this.hot=t,this.data=n,this.dataType="array",this.colToProp=function(){},this.propToCol=function(){}}return(0,i.default)(e,[{key:"getData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.data;return e&&(t=this.getByRange({row:0,col:0},{row:Math.max(this.countRows()-1,0),col:Math.max(this.countColumns()-1,0)},!0)),t}},{key:"setData",value:function(e){this.data=e}},{key:"getAtColumn",value:function(e){var t=this,n=[];return(0,s.arrayEach)(this.data,(function(r){var o,i=t.colToProp(e);o="string"==typeof i?(0,a.getProperty)(r,i):"function"==typeof i?i(r):r[i],n.push(o)})),n}},{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){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=Math.min(e.row,t.row),i=Math.min(e.col,t.col),a=Math.max(e.row,t.row),s=Math.max(e.col,t.col),u=[];return(0,l.rangeEach)(o,a,(function(e){var t,o=n.getAtRow(e);"array"===n.dataType?t=o.slice(i,s+1):"object"===n.dataType&&(t=r?[]:{},(0,l.rangeEach)(i,s,(function(e){var i=n.colToProp(e);r?t.push(o[i]):t[i]=o[i]}))),u.push(t)})),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}}]),e}();t.default=u},function(e,t,n){"use strict";var r=n(0);n(176),n(41),n(27),n(15),n(11),n(9),n(35),n(13),t.__esModule=!0,t.default=void 0;var o=r(n(33)),i=r(n(1)),a=r(n(2)),s=n(3),l=n(178),u=n(19),c=r(n(368)),h=r(n(370)),d=r(n(373)),f=r(n(49)),v=n(4),g=n(24),p=function(){function e(){var t=this;(0,i.default)(this,e),this.indexesSequence=new c.default,this.skipMapsCollection=new d.default,this.variousMapsCollection=new d.default,this.flattenSkipList=[],this.notSkippedIndexesCache=[],this.isBatched=!1,this.cachedIndexesChange=!1,this.indexesSequence.addLocalHook("change",(function(){t.cachedIndexesChange=!0,t.updateCache(),t.runLocalHooks("change",t.indexesSequence,null)})),this.skipMapsCollection.addLocalHook("change",(function(e){t.cachedIndexesChange=!0,t.updateCache(),t.runLocalHooks("change",e,t.skipMapsCollection)})),this.variousMapsCollection.addLocalHook("change",(function(e){t.runLocalHooks("change",e,t.variousMapsCollection)}))}return(0,a.default)(e,[{key:"executeBatchOperations",value:function(e){var t=this.isBatched;this.isBatched=!0,e(),this.isBatched=t,this.updateCache()}},{key:"registerMap",value:function(e,t){if(this.skipMapsCollection.get(e)||this.variousMapsCollection.get(e))throw Error('Map with name "'.concat(e,'" has been already registered.'));t instanceof h.default?this.skipMapsCollection.register(e,t):this.variousMapsCollection.register(e,t);var n=this.getNumberOfIndexes();return n>0&&t.init(n),t}},{key:"unregisterMap",value:function(e){this.skipMapsCollection.unregister(e),this.variousMapsCollection.unregister(e)}},{key:"getPhysicalIndex",value:function(e){var t=this.getNotSkippedIndexes(),n=null;return e<t.length&&(n=t[e]),n}},{key:"getVisualIndex",value:function(e){var t=this.getNotSkippedIndexes().indexOf(e);return-1!==t?t:null}},{key:"initToLength",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getNumberOfIndexes();this.flattenSkipList=[],this.notSkippedIndexesCache=(0,o.default)(new Array(t).keys()),this.executeBatchOperations((function(){e.indexesSequence.init(t),e.skipMapsCollection.initEvery(t),e.variousMapsCollection.initEvery(t)})),this.runLocalHooks("init")}},{key:"getIndexesSequence",value:function(){return this.indexesSequence.getValues()}},{key:"setIndexesSequence",value:function(e){this.indexesSequence.setValues(e)}},{key:"getNotSkippedIndexes",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!0===t?this.notSkippedIndexesCache:(0,s.arrayFilter)(this.getIndexesSequence(),(function(t){return!1===e.isSkipped(t)}))}},{key:"getNotSkippedIndexesLength",value:function(){return this.getNotSkippedIndexes().length}},{key:"getNumberOfIndexes",value:function(){return this.getIndexesSequence().length}},{key:"moveIndexes",value:function(e,t){var n=this;"number"==typeof e&&(e=[e]);var r=(0,s.arrayMap)(e,(function(e){return n.getPhysicalIndex(e)})),o=this.getNotSkippedIndexesLength(),i=e.length,a=(0,l.getListWithRemovedItems)(this.getIndexesSequence(),r),u=o-i;if(t+i<o){var c=a.filter((function(e){return!1===n.isSkipped(e)}))[t];u=a.indexOf(c)}this.setIndexesSequence((0,l.getListWithInsertedItems)(a,u,r))}},{key:"isSkipped",value:function(e){return this.getFlattenSkipList()[e]||!1}},{key:"insertIndexes",value:function(e,t){var n=this,r=this.getNotSkippedIndexes()[e],o=(0,g.isDefined)(r)?r:this.getNumberOfIndexes(),i=this.getIndexesSequence().includes(r)?this.getIndexesSequence().indexOf(r):this.getNumberOfIndexes(),a=(0,s.arrayMap)(new Array(t).fill(o),(function(e,t){return e+t}));this.executeBatchOperations((function(){n.indexesSequence.insert(i,a),n.skipMapsCollection.insertToEvery(i,a),n.variousMapsCollection.insertToEvery(i,a)}))}},{key:"removeIndexes",value:function(e){var t=this;this.executeBatchOperations((function(){t.indexesSequence.remove(e),t.skipMapsCollection.removeFromEvery(e),t.variousMapsCollection.removeFromEvery(e)}))}},{key:"getFlattenSkipList",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!0===e)return this.flattenSkipList;if(0===this.skipMapsCollection.getLength())return[];var t=[],n=(0,s.arrayMap)(this.skipMapsCollection.get(),(function(e){return e.getValues()}));return(0,u.rangeEach)(this.indexesSequence.getLength(),(function(e){t[e]=n.some((function(t){return t[e]}))})),t}},{key:"updateCache",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];(!0===e||!1===this.isBatched&&!0===this.cachedIndexesChange)&&(this.flattenSkipList=this.getFlattenSkipList(!1),this.notSkippedIndexesCache=this.getNotSkippedIndexes(!1),this.cachedIndexesChange=!1,this.runLocalHooks("cacheUpdated"))}}]),e}();(0,v.mixin)(p,f.default);var m=p;t.default=m},function(e,t,n){"use strict";n(11),n(40),n(9),n(12),n(13),t.__esModule=!0,t.alterUtilsFactory=void 0;var r=n(369);t.getDecreasedIndexes=r.getDecreasedIndexes,t.getIncreasedIndexes=r.getIncreasedIndexes;var o=n(178),i=n(372),a=new Map([["visually",{getListWithInsertedItems:o.getListWithInsertedItems,getListWithRemovedItems:o.getListWithRemovedItems}],["physically",{getListWithInsertedItems:i.getListWithInsertedItems,getListWithRemovedItems:i.getListWithRemovedItems}]]);t.alterUtilsFactory=function(e){if(!1===a.has(e))throw new Error("Alter strategy for '".concat(e,"' indexed map does not exist."));return a.get(e)}},function(e,t,n){"use strict";var r=n(0),o=n(10);t.__esModule=!0,t.default=void 0;var i,a=r(n(75)),s=o(n(14)),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(80)),i=r(n(505)),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(83),n(84),t.__esModule=!0,t.default=function(e,t){if(Array.isArray(e)&&Number.isInteger(t))return e[t];return e}},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(80)),i=r(n(507)),a=r(n(508)),s=r(n(509)),l=r(n(510)),u=r(n(511)),c=r(n(512)),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(26);var o=function(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(26);var o=function(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(26);var o=function(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(26);var o=function(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(26);var o=function(){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 r=n(26);var o=function(e){var t=e.headerClassName,n=e.rowClassName,o=e.columnClassName;return new r.Selection({className:"highlight",highlightHeaderClassName:t,highlightRowClassName:n,highlightColumnClassName:o})};t.default=o},function(e,t,n){"use strict";var r=n(10),o=n(0);n(17),n(52),n(27),n(11),n(83),n(84),n(9),n(69),n(35),n(12),n(13),t.__esModule=!0,t.default=void 0;var i=o(n(18)),a=o(n(70)),s=o(n(1)),l=o(n(2)),u=r(n(381)),c=o(n(514)),h=n(26),d=n(142),f=n(4),v=n(24),g=n(3),p=o(n(49)),m=o(n(516)),y=n(143),w=n(71);function C(){var e=(0,a.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 e(t,n){var r=this;(0,s.default)(this,e),this.settings=t,this.tableProps=n,this.inProgress=!1,this.selectedByCorner=!1,this.selectedByRowHeader=new Set,this.selectedByColumnHeader=new Set,this.selectedRange=new c.default,this.highlight=new u.default({headerClassName:t.currentHeaderClassName,activeHeaderClassName:t.activeHeaderClassName,rowClassName:t.currentRowClassName,columnClassName:t.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 t.fixedRowsBottom},minSpareRows:function(){return t.minSpareRows},minSpareCols:function(){return t.minSpareCols},autoWrapRow:function(){return t.autoWrapRow},autoWrapCol:function(){return t.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,l.default)(e,[{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){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r="multiple"===this.settings.selectionMode,o=(0,v.isUndefined)(t)?(0,d.isPressedCtrlKey)():t,i=e.row<0,a=e.col<0,s=i&&a;i&&(e.row=0),a&&(e.col=0),this.selectedByCorner=s,this.runLocalHooks("beforeSetRangeStart".concat(n?"Only":""),e),(!r||r&&!o&&(0,v.isUndefined)(t))&&this.selectedRange.clear(),this.selectedRange.add(e),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),!s&&a&&this.selectedByRowHeader.add(this.getLayerLevel()),!s&&i&&this.selectedByColumnHeader.add(this.getLayerLevel()),n||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 h.CellCoords(e.row,e.col)),this.highlight.getCell().clear(),this.highlight.isEnabledFor(u.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(u.AREA_TYPE)&&(this.isMultiple()||n>=1)&&(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(u.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 h.CellCoords(t.from.row,-1)).add(new h.CellCoords(t.to.row,-1));if(this.isSelectedByColumnHeader())this.tableProps.countRows()===t.getHeight()&&i.add(new h.CellCoords(-1,t.from.col)).add(new h.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(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return-1===e?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(e)}},{key:"isSelectedByColumnHeader",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return-1===e?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(e)}},{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 h.CellCoords(-1,-1)),this.selectedByRowHeader.add(this.getLayerLevel()),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(new h.CellCoords(this.tableProps.countRows()-1,this.tableProps.countCols()-1))}},{key:"selectCells",value:function(e){var t=this,n=(0,y.detectSelectionType)(e);if(n===y.SELECTION_TYPE_EMPTY)return!1;if(n===y.SELECTION_TYPE_UNRECOGNIZED)throw new Error((0,w.toSingleLine)(C()));var r=(0,y.normalizeSelectionFactory)(n,{propToCol:function(e){return t.tableProps.propToCol(e)},keepDirection:!0}),o=this.tableProps.countRows(),a=this.tableProps.countCols(),s=!e.some((function(e){var t=r(e),n=(0,i.default)(t,4),s=n[0],l=n[1],u=n[2],c=n[3];return!((0,y.isValidCoord)(s,o)&&(0,y.isValidCoord)(l,a)&&(0,y.isValidCoord)(u,o)&&(0,y.isValidCoord)(c,a))}));return s&&(this.clear(),(0,g.arrayEach)(e,(function(e){var n=r(e),o=(0,i.default)(n,4),a=o[0],s=o[1],l=o[2],u=o[3];t.setRangeStartOnly(new h.CellCoords(a,s),!1),t.setRangeEnd(new h.CellCoords(l,u)),t.finish()}))),s}},{key:"selectColumns",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n="string"==typeof e?this.tableProps.propToCol(e):e,r="string"==typeof t?this.tableProps.propToCol(t):t,o=this.tableProps.countCols(),i=(0,y.isValidCoord)(n,o)&&(0,y.isValidCoord)(r,o);return i&&(this.setRangeStartOnly(new h.CellCoords(-1,n)),this.setRangeEnd(new h.CellCoords(this.tableProps.countRows()-1,r)),this.finish()),i}},{key:"selectRows",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.tableProps.countRows(),r=(0,y.isValidCoord)(e,n)&&(0,y.isValidCoord)(t,n);return r&&(this.setRangeStartOnly(new h.CellCoords(e,-1)),this.setRangeEnd(new h.CellCoords(t,this.tableProps.countCols()-1)),this.finish()),r}}]),e}();(0,f.mixin)(E,p.default);var S=E;t.default=S},function(e,t,n){"use strict";var r=n(0);n(118),n(180),n(515),n(27),n(11),n(9),n(35),n(12),n(13),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(26),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(e){return this.ranges.some((function(t){return t.includes(e)}))}},{key:"clear",value:function(){return this.ranges.length=0,this}},{key:"size",value:function(){return this.ranges.length}},{key:"peekByIndex",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=this.size()+t-1;return n>=0&&(e=this.ranges[n]),e}},{key:Symbol.iterator,value:function(){return this.ranges[Symbol.iterator]()}}]),e}();t.default=s},function(e,t,n){n(376)("iterator")},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(26),s=n(4),l=r(n(49)),u=function(){function e(t,n){(0,o.default)(this,e),this.range=t,this.options=n}return(0,i.default)(e,[{key:"transformStart",value:function(e,t,n){var r=new a.CellCoords(e,t);this.runLocalHooks("beforeTransformStart",r);var o=this.options.countRows(),i=this.options.countCols(),s=this.options.fixedRowsBottom(),l=this.options.minSpareRows(),u=this.options.minSpareCols(),c=this.options.autoWrapRow(),h=this.options.autoWrapCol(),d=this.range.current().highlight;d.row+e>o-1?n&&l>0&&!(s&&d.row>=o-s-1)?(this.runLocalHooks("insertRowRequire",o),o=this.options.countRows()):h&&(r.row=1-o,r.col=d.col+r.col===i-1?1-i:1):h&&d.row+r.row<0&&d.col+r.col>=0&&(r.row=o-1,r.col=d.col+r.col===0?i-1:-1),d.col+r.col>i-1?n&&u>0?(this.runLocalHooks("insertColRequire",i),i=this.options.countCols()):c&&(r.row=d.row+r.row===o-1?1-o:1,r.col=1-i):c&&d.col+r.col<0&&d.row+r.row>=0&&(r.row=d.row+r.row===0?o-1:-1,r.col=i-1);var f=new a.CellCoords(d.row+r.row,d.col+r.col),v=0,g=0;return f.row<0?(v=-1,f.row=0):f.row>0&&f.row>=o&&(v=1,f.row=o-1),f.col<0?(g=-1,f.col=0):f.col>0&&f.col>=i&&(g=1,f.col=i-1),this.runLocalHooks("afterTransformStart",f,v,g),f}},{key:"transformEnd",value:function(e,t){var n=new a.CellCoords(e,t);this.runLocalHooks("beforeTransformEnd",n);var r=this.options.countRows(),o=this.options.countCols(),i=this.range.current(),s=new a.CellCoords(i.to.row+n.row,i.to.col+n.col),l=0,u=0;return s.row<0?(l=-1,s.row=0):s.row>0&&s.row>=r&&(l=1,s.row=r-1),s.col<0?(u=-1,s.col=0):s.col>0&&s.col>=o&&(u=1,s.col=o-1),this.runLocalHooks("afterTransformEnd",s,l,u),s}}]),e}();(0,s.mixin)(u,l.default);var c=u;t.default=c},function(e,t,n){"use strict";n(17),t.__esModule=!0,t.default=function(e){var t="undefined"!=typeof window&&window.jQuery;if(!t)return;t.fn.handsontable=function(t){var n,r=this.first(),o=r.data("handsontable");if("string"!=typeof t){var i=t||{};return o?o.updateSettings(i):(o=new e.Core(r[0],i),r.data("handsontable",o),o.init()),r}if(o){if(void 0===o[t])throw new Error("Handsontable do not provide action: ".concat(t));for(var a,s=arguments.length,l=new Array(s>1?s-1:0),u=1;u<s;u++)l[u-1]=arguments[u];n=(a=o[t]).call.apply(a,[o].concat(l)),"destroy"===t&&r.removeData()}return n}}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0;var o=r(n(519));t.PersistentState=o.default;var i=r(n(521));t.AutoColumnSize=i.default;var a=r(n(522));t.AutoFill=a.default;var s=r(n(524));t.ManualRowResize=s.default;var l=r(n(525));t.AutoRowSize=l.default;var u=r(n(385));t.ColumnSorting=u.default;var c=r(n(538));t.Comments=c.default;var h=r(n(542));t.ContextMenu=h.default;var d=r(n(557));t.CopyPaste=d.default;var f=r(n(565));t.CustomBorders=f.default;var v=r(n(572));t.DragToScroll=v.default;var g=r(n(573));t.ManualColumnFreeze=g.default;var p=r(n(577));t.ManualColumnMove=p.default;var m=r(n(581));t.ManualColumnResize=m.default;var y=r(n(582));t.ManualRowMove=y.default;var w=r(n(586));t.MergeCells=w.default;var C=r(n(592));t.MultipleSelectionHandles=C.default;var E=r(n(593));t.MultiColumnSorting=E.default;var S=r(n(598));t.ObserveChanges=S.default;var b=r(n(602));t.Search=b.default;var R=r(n(603));t.TouchScroll=R.default;var T=r(n(604));t.UndoRedo=T.default;var M=r(n(22));t.Base=M.default;var O=r(n(605));t.BindRowsWithHeaders=O.default;var k=r(n(608));t.CollapsibleColumns=k.default;var N=r(n(609));t.ColumnSummary=N.default;var _=r(n(613));t.DropdownMenu=_.default;var A=r(n(615));t.ExportFile=A.default;var I=r(n(620));t.Filters=I.default;var D=r(n(653));t.Formulas=D.default;var L=r(n(666));t.GanttChart=L.default;var x=r(n(670));t.HeaderTooltips=x.default;var H=r(n(671));t.NestedHeaders=H.default;var P=r(n(674));t.NestedRows=P.default;var F=r(n(679));t.HiddenColumns=F.default;var B=r(n(683));t.HiddenRows=B.default;var V=r(n(687));t.TrimRows=V.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(6)),s=r(n(5)),l=r(n(16)),u=r(n(7)),c=r(n(22)),h=n(20),d=r(n(520)),f=r(n(45));f.default.getSingleton().register("persistentStateSave"),f.default.getSingleton().register("persistentStateLoad"),f.default.getSingleton().register("persistentStateReset");var v=function(e){function t(e){var n;return(0,o.default)(this,t),(n=(0,a.default)(this,(0,s.default)(t).call(this,e))).storage=void 0,n}return(0,u.default)(t,e),(0,i.default)(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().persistentState}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.storage||(this.storage=new d.default(this.hot.rootElement.id,this.hot.rootWindow)),this.addHook("persistentStateSave",(function(t,n){return e.saveValue(t,n)})),this.addHook("persistentStateLoad",(function(t,n){return e.loadValue(t,n)})),this.addHook("persistentStateReset",(function(){return e.resetValue()})),(0,l.default)((0,s.default)(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.storage=void 0,(0,l.default)((0,s.default)(t.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),(0,l.default)((0,s.default)(t.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)(t.prototype),"destroy",this).call(this)}}]),t}(c.default);(0,h.registerPlugin)("persistentState",v);var g=v;t.default=g},function(e,t,n){"use strict";var r=n(0);n(17),n(15),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(3),s=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;(0,o.default)(this,e),this.rootWindow=n,this.prefix=t,this.savedKeys=[],this.loadSavedKeys()}return(0,i.default)(e,[{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 e=this;(0,a.arrayEach)(this.savedKeys,(function(t,n){e.rootWindow.localStorage.removeItem("".concat(e.prefix,"_").concat(e.savedKeys[n]))})),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()}}]),e}();t.default=s},function(e,t,n){"use strict";var r=n(0);n(52),n(11),n(31),n(9),n(69),n(12),n(23),n(13),n(36),t.__esModule=!0,t.default=void 0;var o=r(n(18)),i=r(n(1)),a=r(n(6)),s=r(n(30)),l=r(n(5)),u=r(n(16)),c=r(n(2)),h=r(n(7)),d=r(n(22)),f=n(3),v=n(81),g=r(n(181)),p=n(4),m=n(19),y=n(20),w=r(n(384)),C=n(77),E=n(26),S=n(73),b=new WeakMap,R="autoColumnSize",T=function(e){function t(e){var n;return(0,i.default)(this,t),n=(0,a.default)(this,(0,l.default)(t).call(this,e)),b.set((0,s.default)(n),{cachedColumnHeaders:[]}),n.ghostTable=new g.default(n.hot),n.samplesGenerator=new w.default((function(e,t){var r=n.hot.getCellMeta(e,t),o="";r.spanned||(o=n.hot.getDataAtCell(e,t));var i=0;if(r.label){var a=r.label,s=a.value,l=a.property,u="";if(s)u="function"==typeof s?s(e,t,n.hot.colToProp(t),o):s;else if(l){var c=n.hot.getDataAtRowProp(e,l);u=null!==c?c:""}i=u.length}return{value:o,bundleCountSeed:i}})),n.firstCalculation=!0,n.inProgress=!1,n.measuredColumns=0,n.columnWidthsMap=new S.PhysicalIndexToValueMap,n.addHook("beforeColumnResize",(function(e,t,r){return n.onBeforeColumnResize(e,t,r)})),n.hot.columnIndexMapper.registerMap(R,n.columnWidthsMap),n}return(0,h.default)(t,e),(0,c.default)(t,null,[{key:"CALCULATION_STEP",get:function(){return 50}},{key:"SYNC_CALCULATION_LIMIT",get:function(){return 50}}]),(0,c.default)(t,[{key:"isEnabled",value:function(){return!1!==this.hot.getSettings().autoColumnSize&&!this.hot.getSettings().colWidths}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){var n=this.hot.getSettings().autoColumnSize;n&&null!==n.useHeaders&&void 0!==n.useHeaders&&this.ghostTable.setSetting("useHeaders",n.useHeaders),this.setSamplingOptions(),this.addHook("afterLoadData",(function(){return e.onAfterLoadData()})),this.addHook("beforeChange",(function(t){return e.onBeforeChange(t)})),this.addHook("beforeRender",(function(t){return e.onBeforeRender(t)})),this.addHook("modifyColWidth",(function(t,n){return e.getColumnWidth(n,t)})),this.addHook("afterInit",(function(){return e.onAfterInit()})),(0,u.default)((0,l.default)(t.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){var e=this.findColumnsWhereHeaderWasChanged();e.length&&this.clearCache(e),(0,u.default)((0,l.default)(t.prototype),"updatePlugin",this).call(this)}},{key:"calculateColumnsWidth",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countRows()-1},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i="number"==typeof t?{from:t,to:t}:t,a="number"==typeof n?{from:n,to:n}:n;(0,m.rangeEach)(i.from,i.to,(function(t){var n=e.hot.toPhysicalColumn(t);if(null===n&&(n=t),r||null===e.columnWidthsMap.getValueAtIndex(n)&&!e.hot._getColWidthFromSettings(n)){var i=e.samplesGenerator.generateColumnSamples(t,a);(0,f.arrayEach)(i,(function(t){var n=(0,o.default)(t,2),r=n[0],i=n[1];return e.ghostTable.addColumn(r,i)}))}})),this.ghostTable.columns.length&&(this.hot.executeBatchOperations((function(){e.ghostTable.getWidths((function(t,n){var r=e.hot.toPhysicalColumn(t);e.columnWidthsMap.setValueAtIndex(r,n)}))})),this.measuredColumns=i.to+1,this.ghostTable.clean())}},{key:"calculateAllColumnsWidth",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},r=0,o=this.hot.countCols()-1,i=null;this.inProgress=!0;var a=function a(){if(!e.hot)return(0,v.cancelAnimationFrame)(i),void(e.inProgress=!1);e.calculateColumnsWidth({from:r,to:Math.min(r+t.CALCULATION_STEP,o)},n),(r=r+t.CALCULATION_STEP+1)<o?i=(0,v.requestAnimationFrame)(a):((0,v.cancelAnimationFrame)(i),e.inProgress=!1,e.hot.view.wt.wtOverlays.adjustElementsSize())},s=this.getSyncCalculationLimit();this.firstCalculation&&s>=0&&(this.calculateColumnsWidth({from:0,to:s},n),this.firstCalculation=!1,r=s+1),r<o?a():this.inProgress=!1}},{key:"setSamplingOptions",value:function(){var e=this.hot.getSettings().autoColumnSize,t=e&&(0,p.hasOwnProperty)(e,"samplingRatio")?this.hot.getSettings().autoColumnSize.samplingRatio:void 0,n=e&&(0,p.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&&this.hot.view.wt.wtTable.isVisible()&&(this.clearCache(),this.calculateAllColumnsWidth())}},{key:"getSyncCalculationLimit",value:function(){var e=t.SYNC_CALCULATION_LIMIT,n=this.hot.countCols()-1;return(0,p.isObject)(this.hot.getSettings().autoColumnSize)&&(e=this.hot.getSettings().autoColumnSize.syncLimit,(0,C.isPercentValue)(e)?e=(0,m.valueAccordingPercent)(n,e):e>>=0),Math.min(e,n)}},{key:"getColumnWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t;return void 0===r&&(r=this.columnWidthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e)),n&&"number"==typeof r&&(r=Math.max(r,E.ViewportColumnsCalculator.DEFAULT_WIDTH))),r}},{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(),t=b.get(this).cachedColumnHeaders;return(0,f.arrayReduce)(e,(function(e,n,r){var o=t.length;return(o-1<r||t[r]!==n)&&e.push(r),o-1<r?t.push(n):t[r]=n,e}),[])}},{key:"clearCache",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.length?this.hot.executeBatchOperations((function(){(0,f.arrayEach)(t,(function(t){e.columnWidthsMap.setValueAtIndex(t,null)}))})):this.columnWidthsMap.clear()}},{key:"isNeedRecalculate",value:function(){return!!(0,f.arrayFilter)(this.columnWidthsMap.getValues().slice(0,this.measuredColumns),(function(e){return null===e})).length}},{key:"onBeforeRender",value:function(){var e=this.hot.renderCall,t=this.hot.countRows(),n=this.getFirstVisibleColumn(),r=this.getLastVisibleColumn();-1!==n&&-1!==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 t=this,n=(0,f.arrayMap)(e,(function(e){var n=(0,o.default)(e,2)[1];return t.hot.toPhysicalColumn(t.hot.propToCol(n))}));this.clearCache(Array.from(new Set(n)))}},{key:"onBeforeColumnResize",value:function(e,t,n){var r=e;return n&&(this.calculateColumnsWidth(t,void 0,!0),r=this.getColumnWidth(t,void 0,!1)),r}},{key:"onAfterInit",value:function(){b.get(this).cachedColumnHeaders=this.hot.getColHeader()}},{key:"disablePlugin",value:function(){(0,u.default)((0,l.default)(t.prototype),"disablePlugin",this).call(this)}},{key:"destroy",value:function(){this.hot.columnIndexMapper.unregisterMap(R),this.ghostTable.clean(),(0,u.default)((0,l.default)(t.prototype),"destroy",this).call(this)}}]),t}(d.default);(0,y.registerPlugin)("autoColumnSize",T);var M=T;t.default=M},function(e,t,n){"use strict";var r=n(0);n(17),n(27),n(15),n(35),n(36),t.__esModule=!0,t.default=void 0;var o=r(n(33)),i=r(n(1)),a=r(n(2)),s=r(n(6)),l=r(n(30)),u=r(n(5)),c=r(n(16)),h=r(n(7)),d=r(n(22)),f=r(n(45)),v=n(8),g=n(3),p=n(19),m=r(n(25)),y=n(20),w=n(26),C=n(523);f.default.getSingleton().register("modifyAutofillRange"),f.default.getSingleton().register("beforeAutofill");var E=function(e){function t(e){var n;return(0,i.default)(this,t),(n=(0,s.default)(this,(0,u.default)(t).call(this,e))).eventManager=new m.default((0,l.default)(n)),n.addingStarted=!1,n.mouseDownOnCellCorner=!1,n.mouseDragOutside=!1,n.handleDraggedCells=0,n.directions=[],n.autoInsertRow=!1,n}return(0,h.default)(t,e),(0,a.default)(t,[{key:"isEnabled",value:function(){return this.hot.getSettings().fillHandle}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",(function(t){return e.onAfterCellCornerMouseDown(t)})),this.addHook("afterOnCellCornerDblClick",(function(t){return e.onCellCornerDblClick(t)})),this.addHook("beforeOnCellMouseOver",(function(t,n){return e.onBeforeCellMouseOver(n)})),(0,c.default)((0,u.default)(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),(0,c.default)((0,u.default)(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.clearMappedSettings(),(0,c.default)((0,u.default)(t.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 e=this,t=this.getCopyableRanges(),n=[],r=[],o=[];return(0,g.arrayEach)(t,(function(e){(0,p.rangeEach)(e.startRow,e.endRow,(function(e){-1===n.indexOf(e)&&n.push(e)})),(0,p.rangeEach)(e.startCol,e.endCol,(function(e){-1===r.indexOf(e)&&r.push(e)}))})),(0,g.arrayEach)(n,(function(t){var n=[];(0,g.arrayEach)(r,(function(r){n.push(e.hot.getCopyableData(t,r))})),o.push(n)})),o}},{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&&o.row>-1&&o.col>-1){var a=this.getSelectionData();this.hot.runHooks("beforeAutofill",o,i,a);var s=(0,C.getDeltas)(o,i,a,r),l=a;if(["up","left"].indexOf(r)>-1){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 e=this,t=this.hot.rootDocument.documentElement;this.eventManager.addEventListener(t,"mouseup",(function(){return e.onMouseUp()})),this.eventManager.addEventListener(t,"mousemove",(function(t){return e.onMouseMove(t)}))}},{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&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}},{key:"onMouseMove",value:function(e){var t=this.getIfMouseWasDraggedOutside(e);!1===this.addingStarted&&this.handleDraggedCells>0&&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)(t.prototype),"destroy",this).call(this)}}]),t}(d.default);(0,y.registerPlugin)("autofill",E);var S=E;t.default=S},function(e,t,n){"use strict";n(15),n(65),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(24),i=n(26),a={horizontal:"horizontal",vertical:"vertical"};t.DIRECTIONS=a},function(e,t,n){"use strict";var r=n(0);n(11),n(9),n(12),n(23),n(57),n(13),n(36),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(6)),s=r(n(30)),l=r(n(5)),u=r(n(16)),c=r(n(7)),h=r(n(22)),d=n(8),f=r(n(25)),v=n(32),g=n(3),p=n(19),m=n(20),y=n(73),w=new WeakMap,C=function(e){function t(e){var n;(0,o.default)(this,t);var r=(n=(0,a.default)(this,(0,l.default)(t).call(this,e))).hot.rootDocument;return n.currentTH=null,n.currentRow=null,n.selectedRows=[],n.currentHeight=null,n.newSize=null,n.startY=null,n.startHeight=null,n.startOffset=null,n.handle=r.createElement("DIV"),n.guide=r.createElement("DIV"),n.eventManager=new f.default((0,s.default)(n)),n.pressed=null,n.dblclick=0,n.autoresizeTimeout=null,n.rowHeightsMap=void 0,w.set((0,s.default)(n),{config:void 0}),(0,d.addClass)(n.handle,"manualRowResizer"),(0,d.addClass)(n.guide,"manualRowResizerGuide"),n}return(0,c.default)(t,e),(0,i.default)(t,[{key:"isEnabled",value:function(){return this.hot.getSettings().manualRowResize}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.rowHeightsMap=new y.PhysicalIndexToValueMap,this.rowHeightsMap.addLocalHook("init",(function(){return e.onMapInit()})),this.hot.rowIndexMapper.registerMap("manualRowResize",this.rowHeightsMap),this.addHook("modifyRowHeight",(function(t,n){return e.onModifyRowHeight(t,n)})),this.bindEvents(),(0,u.default)((0,l.default)(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),(0,u.default)((0,l.default)(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){w.get(this).config=this.rowHeightsMap.getValues(),this.hot.rowIndexMapper.unregisterMap("manualRowResize"),(0,u.default)((0,l.default)(t.prototype),"disablePlugin",this).call(this)}},{key:"saveManualRowHeights",value:function(){this.hot.runHooks("persistentStateSave","manualRowHeights",this.rowHeightsMap.getValues())}},{key:"loadManualRowHeights",value:function(){var e={};return this.hot.runHooks("persistentStateLoad","manualRowHeights",e),e.value}},{key:"setManualSize",value:function(e,t){var n=this.hot.toPhysicalRow(e);return t<0&&(t=null),this.rowHeightsMap.setValueAtIndex(n,t),t}},{key:"setupHandlePosition",value:function(e){var t=this;this.currentTH=e;var n=this.hot.getCoords(this.currentTH),r=n.row,o=(0,d.outerWidth)(this.currentTH);if(r>=0){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(),f=h.from,v=h.to,g=f.row,m=v.row;g>=m&&(g=v.row,m=f.row),this.currentRow>=g&&this.currentRow<=m?(0,p.rangeEach)(g,m,(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,d.outerWidth)(this.handle),10),t=parseInt(this.handle.style.left,10)+e,n=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);(0,d.addClass)(this.handle,"active"),(0,d.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,d.removeClass)(this.handle,"active"),(0,d.removeClass)(this.guide,"active")}},{key:"checkIfRowHeader",value:function(e){if(e!==this.hot.rootElement){var t=e.parentNode;return"TBODY"===t.tagName||this.checkIfRowHeader(t)}return!1}},{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(){var e=this,t=function(){e.hot.forceFullRender=!0,e.hot.view.render(),e.hot.view.wt.wtOverlays.adjustElementsSize(!0)},n=function(n,r){var o=e.hot.runHooks("beforeRowResize",e.newSize,n,!0);void 0!==o&&(e.newSize=o),e.setManualSize(n,e.newSize),e.hot.runHooks("afterRowResize",e.newSize,n,!0),r&&t()};this.dblclick>=2&&(this.selectedRows.length>1?((0,g.arrayEach)(this.selectedRows,(function(e){n(e)})),t()):(0,g.arrayEach)(this.selectedRows,(function(e){n(e,!0)})));this.dblclick=0,this.autoresizeTimeout=null}},{key:"onMouseDown",value:function(e){var t=this;(0,d.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,v.pageY)(e),this.newSize=this.startHeight)}},{key:"onMouseMove",value:function(e){var t=this;this.pressed&&(this.currentHeight=this.startHeight+((0,v.pageY)(e)-this.startY),(0,g.arrayEach)(this.selectedRows,(function(e){t.newSize=t.setManualSize(e,t.currentHeight)})),this.refreshHandlePosition(),this.refreshGuidePosition())}},{key:"onMouseUp",value:function(){var e=this,t=function(){e.hot.forceFullRender=!0,e.hot.view.render(),e.hot.view.wt.wtOverlays.adjustElementsSize(!0)},n=function(n,r){e.hot.runHooks("beforeRowResize",e.newSize,n,!1),r&&t(),e.saveManualRowHeights(),e.hot.runHooks("afterRowResize",e.newSize,n,!1)};if(this.pressed){if(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startHeight)this.selectedRows.length>1?((0,g.arrayEach)(this.selectedRows,(function(e){n(e)})),t()):(0,g.arrayEach)(this.selectedRows,(function(e){n(e,!0)}));this.setupHandlePosition(this.currentTH)}}},{key:"bindEvents",value:function(){var e=this,t=this.hot,n=t.rootElement,r=t.rootWindow;this.eventManager.addEventListener(n,"mouseover",(function(t){return e.onMouseOver(t)})),this.eventManager.addEventListener(n,"mousedown",(function(t){return e.onMouseDown(t)})),this.eventManager.addEventListener(r,"mousemove",(function(t){return e.onMouseMove(t)})),this.eventManager.addEventListener(r,"mouseup",(function(){return e.onMouseUp()}))}},{key:"onModifyRowHeight",value:function(e,t){var n=e;if(this.enabled){var r=this.hot.toPhysicalRow(t),o=this.rowHeightsMap.getValueAtIndex(r);this.hot.getSettings().manualRowResize&&o&&(n=o)}return n}},{key:"onMapInit",value:function(){var e=this,t=w.get(this),n=this.hot.getSettings().manualRowResize,r=this.loadManualRowHeights();this.hot.executeBatchOperations((function(){void 0!==r?r.forEach((function(t,n){e.rowHeightsMap.setValueAtIndex(n,t)})):Array.isArray(n)?(n.forEach((function(t,n){e.rowHeightsMap.setValueAtIndex(n,t)})),t.config=n):!0===n&&Array.isArray(t.config)&&t.config.forEach((function(t,n){e.rowHeightsMap.setValueAtIndex(n,t)}))}))}},{key:"destroy",value:function(){this.hot.rowIndexMapper.unregisterMap("manualRowResize"),(0,u.default)((0,l.default)(t.prototype),"destroy",this).call(this)}}]),t}(h.default);(0,m.registerPlugin)("manualRowResize",C);var E=C;t.default=E},function(e,t,n){"use strict";var r=n(0);n(31),n(36),t.__esModule=!0,t.default=void 0;var o=r(n(18)),i=r(n(1)),a=r(n(6)),s=r(n(5)),l=r(n(16)),u=r(n(2)),c=r(n(7)),h=r(n(22)),d=n(3),f=n(81),v=n(8),g=r(n(181)),p=n(4),m=n(19),y=n(20),w=r(n(384)),C=n(77),E=n(73),S="autoRowSize",b=function(e){function t(e){var n;return(0,i.default)(this,t),(n=(0,a.default)(this,(0,s.default)(t).call(this,e))).rowHeightsMap=void 0,n.headerHeight=null,n.ghostTable=new g.default(n.hot),n.samplesGenerator=new w.default((function(e,t){var r;return e>=0?r=n.hot.getDataAtCell(e,t):-1===e&&(r=n.hot.getColHeader(t)),{value:r}})),n.firstCalculation=!0,n.inProgress=!1,n.measuredRows=0,n.addHook("beforeRowResize",(function(e,t,r){return n.onBeforeRowResize(e,t,r)})),n.rowHeightsMap=new E.PhysicalIndexToValueMap,n.hot.rowIndexMapper.registerMap(S,n.rowHeightsMap),n}return(0,c.default)(t,e),(0,u.default)(t,null,[{key:"CALCULATION_STEP",get:function(){return 50}},{key:"SYNC_CALCULATION_LIMIT",get:function(){return 500}}]),(0,u.default)(t,[{key:"isEnabled",value:function(){return!0===this.hot.getSettings().autoRowSize||(0,p.isObject)(this.hot.getSettings().autoRowSize)}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.setSamplingOptions(),this.addHook("afterLoadData",(function(){return e.onAfterLoadData()})),this.addHook("beforeChange",(function(t){return e.onBeforeChange(t)})),this.addHook("beforeColumnResize",(function(){return e.recalculateAllRowsHeight()})),this.addHook("beforeRender",(function(t){return e.onBeforeRender(t)})),this.addHook("modifyRowHeight",(function(t,n){return e.getRowHeight(n,t)})),this.addHook("modifyColumnHeaderHeight",(function(){return e.getColumnHeaderHeight()})),(0,l.default)((0,s.default)(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.headerHeight=null,(0,l.default)((0,s.default)(t.prototype),"disablePlugin",this).call(this)}},{key:"calculateRowsHeight",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countCols()-1},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i="number"==typeof t?{from:t,to:t}:t,a="number"==typeof n?{from:n,to:n}:n;if(null!==this.hot.getColHeader(0)){var s=this.samplesGenerator.generateRowSamples(-1,a);this.ghostTable.addColumnHeadersRow(s.get(-1))}(0,m.rangeEach)(i.from,i.to,(function(t){if(r||null===e.rowHeightsMap.getValueAtIndex(t)){var n=e.samplesGenerator.generateRowSamples(t,a);(0,d.arrayEach)(n,(function(t){var n=(0,o.default)(t,2),r=n[0],i=n[1];return e.ghostTable.addRow(r,i)}))}})),this.ghostTable.rows.length&&(this.hot.executeBatchOperations((function(){e.ghostTable.getHeights((function(t,n){t<0?e.headerHeight=n:e.rowHeightsMap.setValueAtIndex(e.hot.toPhysicalRow(t),n)}))})),this.measuredRows=i.to+1,this.ghostTable.clean())}},{key:"calculateAllRowsHeight",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},r=0,o=this.hot.countRows()-1,i=null;this.inProgress=!0;var a=function a(){if(!e.hot)return(0,f.cancelAnimationFrame)(i),void(e.inProgress=!1);e.calculateRowsHeight({from:r,to:Math.min(r+t.CALCULATION_STEP,o)},n),(r=r+t.CALCULATION_STEP+1)<o?i=(0,f.requestAnimationFrame)(a):((0,f.cancelAnimationFrame)(i),e.inProgress=!1,e.hot.view.wt.wtOverlays.adjustElementsSize(!0),e.hot.view.wt.wtOverlays.leftOverlay.needFullRender&&e.hot.view.wt.wtOverlays.leftOverlay.clone.draw())},s=this.getSyncCalculationLimit();this.firstCalculation&&s>=0&&(this.calculateRowsHeight({from:0,to:s},n),this.firstCalculation=!1,r=s+1),r<o?a():(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=t.SYNC_CALCULATION_LIMIT,n=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)(n,e):e>>=0),Math.min(e,n)}},{key:"getRowHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=e<0?this.headerHeight:this.rowHeightsMap.getValueAtIndex(this.hot.toPhysicalRow(e)),r=t;return null!==n&&n>(t||0)&&(r=n),r}},{key:"getColumnHeaderHeight",value:function(){return this.headerHeight}},{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.headerHeight=null,this.rowHeightsMap.init()}},{key:"clearCacheByRange",value:function(e){var t=this,n="number"==typeof e?{from:e,to:e}:e,r=n.from,o=n.to;this.hot.executeBatchOperations((function(){(0,m.rangeEach)(Math.min(r,o),Math.max(r,o),(function(e){t.rowHeightsMap.setValueAtIndex(e,null)}))}))}},{key:"isNeedRecalculate",value:function(){return!!(0,d.arrayFilter)(this.rowHeightsMap.getValues().slice(0,this.measuredRows),(function(e){return null===e})).length}},{key:"onBeforeRender",value:function(){var e=this.hot.renderCall,t=this.hot.getSettings().fixedRowsBottom,n=this.getFirstVisibleRow(),r=this.getLastVisibleRow();if(-1!==n&&-1!==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=e;return n&&(this.calculateRowsHeight(t,void 0,!0),r=this.getRowHeight(t)),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]:e.length>1&&(t={from:e[0][0],to:e[e.length-1][0]}),null!==t&&this.clearCacheByRange(t)}},{key:"destroy",value:function(){this.hot.rowIndexMapper.unregisterMap(S),this.ghostTable.clean(),(0,l.default)((0,s.default)(t.prototype),"destroy",this).call(this)}}]),t}(h.default);(0,y.registerPlugin)("autoRowSize",b);var R=b;t.default=R},function(e,t,n){"use strict";var r=n(50),o=n(28),i=n(131),a=n(150),s=n(145),l=n(62),u=n(124),c=Object.assign;e.exports=!c||o((function(){var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||"abcdefghijklmnopqrst"!=i(c({},t)).join("")}))?function(e,t){for(var n=l(e),o=arguments.length,c=1,h=a.f,d=s.f;o>c;)for(var f,v=u(arguments[c++]),g=h?i(v).concat(h(v)):i(v),p=g.length,m=0;p>m;)f=g[m++],r&&!d.call(v,f)||(n[f]=v[f]);return n}:c},function(e,t,n){var r=n(528);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},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],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){"use strict";var r=n(0);n(139),n(27),n(15),n(35),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=!1,c=!0,h=!0,d=function(){function e(){(0,o.default)(this,e),this.sortedColumnsStates=[],this.sortEmptyCells=u,this.indicator=c,this.headerAction=h,this.compareFunctionFactory=void 0}return(0,i.default)(e,[{key:"updateAllColumnsProperties",value:function(e){var t=this;(0,a.isObject)(e)&&(0,a.objectEach)(e,(function(e,n){l.includes(n)&&(t[n]=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 this.getNumberOfSortedColumns()>0&&(e=this.sortedColumnsStates[0].column),e}},{key:"getSortOrderOfColumn",value:function(e){var t,n=this.sortedColumnsStates.find((function(t){var n=t.column;return e===n}));return(0,a.isObject)(n)&&(t=n.sortOrder),t}},{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=d},function(e,t,n){"use strict";n(17),n(52),n(11),n(40),n(9),n(12),n(13),t.__esModule=!0,t.getClassesToAdd=function(e,t,n,r){var l=[i];r&&l.push(a);if(!1===n)l.push(o);else if(e.isColumnSorted(t)){var u=e.getSortOrderOfColumn(t);l.push(s.get(u))}return l},t.getClassedToRemove=function(){return Array.from(s.values()).concat(a,o,i)};var r=n(182),o="indicatorDisabled",i="columnSorting",a="sortAction",s=new Map([[r.ASC_SORT_STATE,"ascending"],[r.DESC_SORT_STATE,"descending"]])},function(e,t,n){"use strict";var r=n(0);n(31),t.__esModule=!0,t.rootComparator=function(e,t){return function(n,r){var a,s,l,u,c,h,d=(0,o.default)(n).slice(1),f=(0,o.default)(r).slice(1);return s=e[a=0],l=t[a],u=d[a],c=f[a],((h=l.columnSorting).compareFunctionFactory?h.compareFunctionFactory:(0,i.getCompareFunctionFactory)(l.type))(s,l,h)(u,c)}};var o=r(n(387)),i=n(92)},function(e,t,n){"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,n){return function(t,i){var a=n.sortEmptyCells;return"string"==typeof t&&(t=t.toLowerCase()),"string"==typeof i&&(i=i.toLowerCase()),t===i?o.DO_NOT_SWAP:(0,r.isEmpty)(t)?(0,r.isEmpty)(i)?o.DO_NOT_SWAP:a&&"asc"===e?o.FIRST_BEFORE_SECOND:o.FIRST_AFTER_SECOND:(0,r.isEmpty)(i)?a&&"asc"===e?o.FIRST_AFTER_SECOND:o.FIRST_BEFORE_SECOND:isNaN(t)&&!isNaN(i)?"asc"===e?o.FIRST_AFTER_SECOND:o.FIRST_BEFORE_SECOND:!isNaN(t)&&isNaN(i)?"asc"===e?o.FIRST_BEFORE_SECOND:o.FIRST_AFTER_SECOND:(isNaN(t)||isNaN(i)||(t=parseFloat(t),i=parseFloat(i)),t<i?"asc"===e?o.FIRST_BEFORE_SECOND:o.FIRST_AFTER_SECOND:t>i?"asc"===e?o.FIRST_AFTER_SECOND:o.FIRST_BEFORE_SECOND:o.DO_NOT_SWAP)}},t.COLUMN_DATA_TYPE=void 0;var r=n(24),o=n(92);t.COLUMN_DATA_TYPE="default"},function(e,t,n){"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,n){return function(t,i){var a=parseFloat(t),s=parseFloat(i),l=n.sortEmptyCells;if(a===s||isNaN(a)&&isNaN(s))return o.DO_NOT_SWAP;if(l){if((0,r.isEmpty)(t))return"asc"===e?o.FIRST_BEFORE_SECOND:o.FIRST_AFTER_SECOND;if((0,r.isEmpty)(i))return"asc"===e?o.FIRST_AFTER_SECOND:o.FIRST_BEFORE_SECOND}return isNaN(a)?o.FIRST_AFTER_SECOND:isNaN(s)?o.FIRST_BEFORE_SECOND:a<s?"asc"===e?o.FIRST_BEFORE_SECOND:o.FIRST_AFTER_SECOND:a>s?"asc"===e?o.FIRST_AFTER_SECOND:o.FIRST_BEFORE_SECOND:o.DO_NOT_SWAP}},t.COLUMN_DATA_TYPE=void 0;var r=n(24),o=n(92);t.COLUMN_DATA_TYPE="numeric"},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.compareFunctionFactory=function(e,t,n){return function(r,s){var l=n.sortEmptyCells;if(r===s)return a.DO_NOT_SWAP;if((0,i.isEmpty)(r))return(0,i.isEmpty)(s)?a.DO_NOT_SWAP:l&&"asc"===e?a.FIRST_BEFORE_SECOND:a.FIRST_AFTER_SECOND;if((0,i.isEmpty)(s))return l&&"asc"===e?a.FIRST_AFTER_SECOND:a.FIRST_BEFORE_SECOND;var u=t.dateFormat,c=(0,o.default)(r,u),h=(0,o.default)(s,u);return c.isValid()?h.isValid()?h.isAfter(c)?"asc"===e?a.FIRST_BEFORE_SECOND:a.FIRST_AFTER_SECOND:h.isBefore(c)?"asc"===e?a.FIRST_AFTER_SECOND:a.FIRST_BEFORE_SECOND:a.DO_NOT_SWAP:a.FIRST_BEFORE_SECOND:a.FIRST_AFTER_SECOND}},t.COLUMN_DATA_TYPE=void 0;var o=r(n(64)),i=n(24),a=n(92);t.COLUMN_DATA_TYPE="date"},function(e,t,n){"use strict";var r=n(0);n(72),t.__esModule=!0,t.sort=function(e,t){for(var n=(0,i.getRootComparator)(t),r=arguments.length,a=new Array(r>2?r-2:0),s=2;s<r;s++)a[s-2]=arguments[s];(0,o.default)(e,n.apply(void 0,a))},t.FIRST_AFTER_SECOND=t.FIRST_BEFORE_SECOND=t.DO_NOT_SWAP=void 0;var o=r(n(536)),i=n(388);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(9),n(39),t.__esModule=!0,t.default=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length;if(Math.abs(a-r)<=1)return[];var s=Math.ceil((r+a)/2);return e(t,n,r,s),e(t,n,s,a),function(e,t,n,r,i){for(var a=new o.default,s=new o.default,l=r-n,u=i-r,c=Math.max(l,u),h=i-n,d=0;d<c;d+=1)d<l&&a.push(e[n+d]),d<u&&s.push(e[r+d]);var f=0;for(;f<h;)a.first&&s.first?t(a.first.data,s.first.data)>0?e[n+f]=s.shift().data:e[n+f]=a.shift().data:a.first?e[n+f]=a.shift().data:e[n+f]=s.shift().data,f+=1;return e}(t,n,r,s,a)};var o=r(n(537)),i=function(e,t){var n=e.toString(),r=t.toString();return n===r?0:n<r?-1:1}},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0,t.default=t.NodeStructure=void 0;var o=r(n(2)),i=r(n(1)),a=function e(t){(0,i.default)(this,e),this.data=t,this.next=null,this.prev=null};t.NodeStructure=a;var s=function(){function e(){(0,i.default)(this,e),this.first=null,this.last=null}return(0,o.default)(e,[{key:"push",value:function(e){var t=new a(e);if(null===this.first)this.first=t,this.last=t;else{var n=this.last;this.last=t,t.prev=n,n.next=t}}},{key:"unshift",value:function(e){var t=new a(e);if(null===this.first)this.first=t,this.last=t;else{var n=this.first;this.first=t,t.next=n,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,t.next=n,n.prev=t,n=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(10),o=n(0);n(11),n(9),n(12),n(23),n(13),n(36),t.__esModule=!0,t.default=void 0;var i=o(n(75)),a=o(n(1)),s=o(n(2)),l=o(n(6)),u=o(n(30)),c=o(n(5)),h=o(n(16)),d=o(n(7)),f=n(8),v=n(4),g=o(n(25)),p=n(26),m=n(20),y=o(n(22)),w=o(n(539)),C=n(66),E=o(n(540)),S=r(n(14));n(541);var b=new WeakMap,R=function(e){function t(e){var n;return(0,a.default)(this,t),(n=(0,l.default)(this,(0,c.default)(t).call(this,e))).editor=null,n.displaySwitch=null,n.eventManager=null,n.range={},n.mouseDown=!1,n.contextMenuEvent=!1,n.timer=null,b.set((0,u.default)(n),{tempEditorDimensions:{},cellBelowCursor:null}),n}return(0,d.default)(t,e),(0,s.default)(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().comments}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.editor||(this.editor=new w.default(this.hot.rootDocument)),this.eventManager||(this.eventManager=new g.default(this)),this.displaySwitch||(this.displaySwitch=new E.default(this.getDisplayDelaySetting())),this.addHook("afterContextMenuDefaultOptions",(function(t){return e.addToContextMenu(t)})),this.addHook("afterRenderer",(function(t,n,r,o,i,a){return e.onAfterRenderer(t,a)})),this.addHook("afterScrollHorizontally",(function(){return e.hide()})),this.addHook("afterScrollVertically",(function(){return e.hide()})),this.addHook("afterBeginEditing",(function(){return e.onAfterBeginEditing()})),this.displaySwitch.addLocalHook("hide",(function(){return e.hide()})),this.displaySwitch.addLocalHook("show",(function(t,n){return e.showAtCell(t,n)})),this.registerListeners(),(0,h.default)((0,c.default)(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),(0,h.default)((0,c.default)(t.prototype),"updatePlugin",this).call(this),this.displaySwitch.updateDelay(this.getDisplayDelaySetting())}},{key:"disablePlugin",value:function(){(0,h.default)((0,c.default)(t.prototype),"disablePlugin",this).call(this)}},{key:"registerListeners",value:function(){var e=this,t=this.hot.rootDocument;this.eventManager.addEventListener(t,"mouseover",(function(t){return e.onMouseOver(t)})),this.eventManager.addEventListener(t,"mousedown",(function(t){return e.onMouseDown(t)})),this.eventManager.addEventListener(t,"mouseup",(function(){return e.onMouseUp()})),this.eventManager.addEventListener(this.editor.getInputElement(),"blur",(function(){return e.onEditorBlur()})),this.eventManager.addEventListener(this.editor.getInputElement(),"mousedown",(function(t){return e.onEditorMouseDown(t)})),this.eventManager.addEventListener(this.editor.getInputElement(),"mouseup",(function(t){return e.onEditorMouseUp(t)}))}},{key:"setRange",value:function(e){this.range=e}},{key:"clearRange",value:function(){this.range={}}},{key:"targetIsCellWithComment",value:function(e){var t=(0,f.closest)(e.target,"TD","TBODY");return!!(t&&(0,f.hasClass)(t,"htCommentCell")&&(0,f.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,i.default)({},"value",n)),this.hot.render()}},{key:"setCommentAtCell",value:function(e,t,n){this.setRange({from:new p.CellCoords(e,t)}),this.setComment(n)}},{key:"removeComment",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];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,"comment",void 0),e&&this.hot.render(),this.hide()}},{key:"removeCommentAtCell",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.setRange({from:new p.CellCoords(e,t)}),this.removeComment(n)}},{key:"getComment",value:function(){var e=this.range.from.row,t=this.range.from.col;return this.getCommentMeta(e,t,"value")}},{key:"getCommentAtCell",value:function(e,t){return this.getCommentMeta(e,t,"value")}},{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.comment?e.comment.value:""),this.editor.hidden&&this.editor.show(),!0}},{key:"showAtCell",value:function(e,t){return this.setRange({from:new p.CellCoords(e,t)}),this.show()}},{key:"hide",value:function(){this.editor.hidden||this.editor.hide()}},{key:"refreshEditor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(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,f.offset)(s),h=r.getStretchedColumnWidth(u),d=c.top<0?0:c.top,v=c.left;i.hasVerticalScroll()&&a!==t&&(d-=o.topOverlay.getScrollPosition()),i.hasHorizontalScroll()&&a!==t&&(v-=o.leftOverlay.getScrollPosition());var g=v+h,p=d,m=this.getCommentMeta(l,u,"style"),y=this.getCommentMeta(l,u,"readOnly");m?this.editor.setSize(m.width,m.height):this.editor.resetSize(),this.editor.setReadOnlyState(y),this.editor.setPosition(g,p)}}},{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,"value")&&(t=!0),t}},{key:"updateCommentMeta",value:function(e,t,n){var r,o=this.hot.getCellMeta(e,t).comment;o?(r=(0,v.deepClone)(o),(0,v.deepExtend)(r,n)):r=n,this.hot.setCellMeta(e,t,"comment",r)}},{key:"getCommentMeta",value:function(e,t,n){var r=this.hot.getCellMeta(e,t);if(r.comment)return r.comment[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,f.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,f.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 p.CellCoords(r.row,r.col)};this.displaySwitch.show(o)}else(0,f.isChildOf)(e.target,n)&&!this.targetIsCommentTextArea(e)&&this.displaySwitch.hide()}},{key:"onMouseUp",value:function(){this.mouseDown=!1}},{key:"onAfterRenderer",value:function(e,t){t.comment&&t.comment.value&&(0,f.addClass)(e,t.commentedCellClassName)}},{key:"onEditorBlur",value:function(){this.setComment()}},{key:"onEditorMouseDown",value:function(e){b.get(this).tempEditorDimensions={width:(0,f.outerWidth)(e.target),height:(0,f.outerHeight)(e.target)}}},{key:"onEditorMouseUp",value:function(e){var t=b.get(this),n=(0,f.outerWidth)(e.target),r=(0,f.outerHeight)(e.target);n===t.tempEditorDimensions.width+1&&r===t.tempEditorDimensions.height+2||this.updateCommentMeta(this.range.from.row,this.range.from.col,(0,i.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 a=!!this.getCommentMeta(r,o,"readOnly");this.updateCommentMeta(r,o,(0,i.default)({},"readOnly",!a))}}},{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 e=this,t=this.getTranslatedPhrase(S.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);return(0,C.checkSelectionConsistency)(this.getSelectedRangeLast(),(function(t,n){var r=e.getCellMeta(t,n).comment;if(r&&(r=r.readOnly),r)return!0}))&&(t=(0,C.markLabelAsSelected)(t)),t},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,v.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)(t.prototype),"destroy",this).call(this)}}]),t}(y.default);(0,m.registerPlugin)("comments",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)),a=n(8),s=function(){function e(t){(0,o.default)(this,e),this.container=null,this.rootDocument=t,this.editor=this.createEditor(),this.editorStyle=this.editor.style,this.hidden=!0,this.hide()}return(0,i.default)(e,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)(e,[{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(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=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 t=this.rootDocument.createElement("div"),n=this.rootDocument.createElement("textarea");return this.container=this.rootDocument.querySelector(".".concat(e.CLASS_EDITOR_CONTAINER)),this.container||(this.container=this.rootDocument.createElement("div"),(0,a.addClass)(this.container,e.CLASS_EDITOR_CONTAINER),this.rootDocument.body.appendChild(this.container)),(0,a.addClass)(t,e.CLASS_EDITOR),(0,a.addClass)(n,e.CLASS_INPUT),t.appendChild(n),this.container.appendChild(t),t}},{key:"getInputElement",value:function(){return this.editor.querySelector(".".concat(e.CLASS_INPUT))}},{key:"destroy",value:function(){var e=this.container?this.container.parentNode:null;this.editor.parentNode.removeChild(this.editor),this.editor=null,this.editorStyle=null,e&&e.removeChild(this.container)}}]),e}();t.default=s},function(e,t,n){"use strict";var r=n(0);n(36),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=n(63),s=n(4),l=r(n(49)),u=function(){function e(t){(0,o.default)(this,e),this.wasLastActionShow=!0,this.showDebounced=null,this.hidingTimer=null,this.updateDelay(t)}return(0,i.default)(e,[{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(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250;this.showDebounced=(0,a.debounce)((function(t){e.wasLastActionShow&&e.runLocalHooks("show",t.from.row,t.from.col)}),t)}},{key:"destroy",value:function(){this.clearLocalHooks()}}]),e}();(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(17),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(6)),a=r(n(30)),s=r(n(5)),l=r(n(16)),u=r(n(2)),c=r(n(7)),h=r(n(22)),d=r(n(45)),f=n(3),v=r(n(389)),g=r(n(25)),p=r(n(390)),m=r(n(184)),y=n(20),w=n(32),C=n(8),E=n(85);n(556),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 t(e){var n;return(0,o.default)(this,t),(n=(0,i.default)(this,(0,s.default)(t).call(this,e))).eventManager=new g.default((0,a.default)(n)),n.commandExecutor=new v.default(n.hot),n.itemsFactory=null,n.menu=null,n}return(0,c.default)(t,e),(0,u.default)(t,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,u.default)(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().contextMenu}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){var n=this.hot.getSettings().contextMenu;"function"==typeof n.callback&&this.commandExecutor.setCommonCallback(n.callback),this.menu=new m.default(this.hot,{className:"htContextMenu",keepInViewport:!0,container:n.uiContainer||this.hot.rootDocument.body}),this.menu.addLocalHook("beforeOpen",(function(){return e.onMenuBeforeOpen()})),this.menu.addLocalHook("afterOpen",(function(){return e.onMenuAfterOpen()})),this.menu.addLocalHook("afterClose",(function(){return e.onMenuAfterClose()})),this.menu.addLocalHook("executeCommand",(function(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.executeCommand).call.apply(t,[e].concat(r))})),this.addHook("afterOnCellContextMenu",(function(t){return e.onAfterOnCellContextMenu(t)})),(0,l.default)((0,s.default)(t.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),(0,l.default)((0,s.default)(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),(0,l.default)((0,s.default)(t.prototype),"disablePlugin",this).call(this)}},{key:"open",value:function(e){if(this.menu&&(this.prepareMenuItems(),this.menu.open(),this.menu.isOpened())){var t=0,n=0;if(this.hot.rootDocument!==this.menu.container.ownerDocument){var r=this.hot.rootWindow.frameElement.getBoundingClientRect(),o=r.top,i=r.left;t=o-(0,C.getWindowScrollTop)(e.view),n=i-(0,C.getWindowScrollLeft)(e.view)}else t=-1*(0,C.getWindowScrollTop)(this.menu.hotMenu.rootWindow),n=-1*(0,C.getWindowScrollLeft)(this.menu.hotMenu.rootWindow);this.menu.setPosition({top:parseInt((0,w.pageY)(e),10)+t,left:parseInt((0,w.pageX)(e),10)+n}),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(n>1?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 e=this;this.itemsFactory=new p.default(this.hot,t.DEFAULT_ITEMS);var n=this.hot.getSettings().contextMenu,r={items:this.itemsFactory.getItems(n)};this.hot.runHooks("afterContextMenuDefaultOptions",r),this.itemsFactory.setPredefinedItems(r.items);var o=this.itemsFactory.getItems(n);this.hot.runHooks("beforeContextMenuSetItems",o),this.menu.setMenuItems(o),(0,f.arrayEach)(o,(function(t){return e.commandExecutor.registerCommand(t.key,t)}))}},{key:"onAfterOnCellContextMenu",value:function(e){var t=this.hot.getSettings(),n=t.rowHeaders,r=t.colHeaders;var o=e.realTarget;this.close(),(0,C.hasClass)(o,"handsontableInput")||(e.preventDefault(),(0,w.stopPropagation)(e),(n||r||function(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}(o)||(0,C.hasClass)(o,"current")&&(0,C.hasClass)(o,"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,l.default)((0,s.default)(t.prototype),"destroy",this).call(this)}}]),t}(h.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(10);n(15),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 e=this,t=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT);return(0,o.checkSelectionConsistency)(this.getSelectedRange(),(function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htLeft"))return!0}))&&(t=(0,o.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,o.getAlignmentClasses)(t,(function(t,n){return e.getCellMeta(t,n).className}));this.runHooks("beforeCellAlignment",n,t,"horizontal","htLeft"),(0,o.align)(t,"horizontal","htLeft",(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,r,o){return e.setCellMeta(t,n,r,o)})),this.render()},disabled:!1},{key:"".concat(s,":center"),name:function(){var e=this,t=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER);return(0,o.checkSelectionConsistency)(this.getSelectedRange(),(function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htCenter"))return!0}))&&(t=(0,o.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,o.getAlignmentClasses)(t,(function(t,n){return e.getCellMeta(t,n).className}));this.runHooks("beforeCellAlignment",n,t,"horizontal","htCenter"),(0,o.align)(t,"horizontal","htCenter",(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,r,o){return e.setCellMeta(t,n,r,o)})),this.render()},disabled:!1},{key:"".concat(s,":right"),name:function(){var e=this,t=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT);return(0,o.checkSelectionConsistency)(this.getSelectedRange(),(function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htRight"))return!0}))&&(t=(0,o.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,o.getAlignmentClasses)(t,(function(t,n){return e.getCellMeta(t,n).className}));this.runHooks("beforeCellAlignment",n,t,"horizontal","htRight"),(0,o.align)(t,"horizontal","htRight",(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,r,o){return e.setCellMeta(t,n,r,o)})),this.render()},disabled:!1},{key:"".concat(s,":justify"),name:function(){var e=this,t=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY);return(0,o.checkSelectionConsistency)(this.getSelectedRange(),(function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htJustify"))return!0}))&&(t=(0,o.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,o.getAlignmentClasses)(t,(function(t,n){return e.getCellMeta(t,n).className}));this.runHooks("beforeCellAlignment",n,t,"horizontal","htJustify"),(0,o.align)(t,"horizontal","htJustify",(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,r,o){return e.setCellMeta(t,n,r,o)})),this.render()},disabled:!1},{name:i.KEY},{key:"".concat(s,":top"),name:function(){var e=this,t=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_TOP);return(0,o.checkSelectionConsistency)(this.getSelectedRange(),(function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htTop"))return!0}))&&(t=(0,o.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,o.getAlignmentClasses)(t,(function(t,n){return e.getCellMeta(t,n).className}));this.runHooks("beforeCellAlignment",n,t,"vertical","htTop"),(0,o.align)(t,"vertical","htTop",(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,r,o){return e.setCellMeta(t,n,r,o)})),this.render()},disabled:!1},{key:"".concat(s,":middle"),name:function(){var e=this,t=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE);return(0,o.checkSelectionConsistency)(this.getSelectedRange(),(function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htMiddle"))return!0}))&&(t=(0,o.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,o.getAlignmentClasses)(t,(function(t,n){return e.getCellMeta(t,n).className}));this.runHooks("beforeCellAlignment",n,t,"vertical","htMiddle"),(0,o.align)(t,"vertical","htMiddle",(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,r,o){return e.setCellMeta(t,n,r,o)})),this.render()},disabled:!1},{key:"".concat(s,":bottom"),name:function(){var e=this,t=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM);return(0,o.checkSelectionConsistency)(this.getSelectedRange(),(function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htBottom"))return!0}))&&(t=(0,o.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,o.getAlignmentClasses)(t,(function(t,n){return e.getCellMeta(t,n).className}));this.runHooks("beforeCellAlignment",n,t,"vertical","htBottom"),(0,o.align)(t,"vertical","htBottom",(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,r,o){return e.setCellMeta(t,n,r,o)})),this.render()},disabled:!1}]}}},t.KEY=void 0;var o=n(66),i=n(183),a=r(n(14)),s="alignment";t.KEY=s},function(e,t,n){"use strict";var r=n(10),o=n(0);n(48),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(66),s=r(n(14)),l="clear_column";t.KEY=l},function(e,t,n){"use strict";var r=n(10),o=n(0);n(48),t.__esModule=!0,t.default=function(){return{key:l,name:function(){return this.getTranslatedPhrase(s.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,a.getValidSelection)(this);if(!e)return!0;if(!this.isColumnModificationAllowed())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(","),s=1===this.countCols();return r<0||this.countCols()>=this.getSettings().maxCols||!s&&o},hidden:function(){return!this.getSettings().allowInsertColumn}}},t.KEY=void 0;var i=o(n(18)),a=n(66),s=r(n(14)),l="col_left";t.KEY=l},function(e,t,n){"use strict";var r=n(10),o=n(0);n(48),t.__esModule=!0,t.default=function(){return{key:l,name:function(){return this.getTranslatedPhrase(s.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,a.getValidSelection)(this);if(!e)return!0;if(!this.isColumnModificationAllowed())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(","),s=1===this.countCols();return r<0||this.countCols()>=this.getSettings().maxCols||!s&&o},hidden:function(){return!this.getSettings().allowInsertColumn}}},t.KEY=void 0;var i=o(n(18)),a=n(66),s=r(n(14)),l="col_right";t.KEY=l},function(e,t,n){"use strict";var r=n(10);t.__esModule=!0,t.default=function(){return{key:s,name:function(){var e=this,t=this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_READ_ONLY);return(0,o.checkSelectionConsistency)(this.getSelectedRange(),(function(t,n){return e.getCellMeta(t,n).readOnly}))&&(t=(0,o.markLabelAsSelected)(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=(0,o.checkSelectionConsistency)(t,(function(t,n){return e.getCellMeta(t,n).readOnly}));(0,i.arrayEach)(t,(function(t){t.forAll((function(t,r){e.setCellMeta(t,r,"readOnly",!n)}))})),this.render()},disabled:function(){return!(this.getSelectedRange()&&!this.selection.isSelectedByCorner())}}},t.KEY=void 0;var o=n(66),i=n(3),a=r(n(14)),s="make_read_only";t.KEY=s},function(e,t,n){"use strict";var r=n(10);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(14)),i="redo";t.KEY=i},function(e,t,n){"use strict";var r=n(10),o=n(0);t.__esModule=!0,t.default=function(){return{key:u,name:function(){var e=this.getSelected(),t=0;if(e)if(e.length>1)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(66),s=n(143),l=r(n(14)),u="remove_col";t.KEY=u},function(e,t,n){"use strict";var r=n(10),o=n(0);t.__esModule=!0,t.default=function(){return{key:u,name:function(){var e=this.getSelected(),t=0;if(e)if(e.length>1)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(66),s=n(143),l=r(n(14)),u="remove_row";t.KEY=u},function(e,t,n){"use strict";var r=n(10);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(66),i=r(n(14)),a="row_above";t.KEY=a},function(e,t,n){"use strict";var r=n(10);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(66),i=r(n(14)),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(14),o="no_items";t.KEY=o},function(e,t,n){"use strict";var r=n(10);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(14)),i="undo";t.KEY=i},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(8),s=n(32),l=function(){function e(t,n){(0,o.default)(this,e);var r,i,l,u,c,h,d=(0,a.getWindowScrollTop)(n),f=(0,a.getWindowScrollLeft)(n);this.rootWindow=n,this.type=this.getSourceType(t),"literal"===this.type?(r=parseInt(t.top,10),l=parseInt(t.left,10),c=t.height||0,h=t.width||0,i=r,u=l,r+=d,l+=f):"event"===this.type&&(r=parseInt((0,s.pageY)(t),10),l=parseInt((0,s.pageX)(t),10),c=t.target.clientHeight,h=t.target.clientWidth,i=r-d,u=l-f),this.top=r,this.topRelative=i,this.left=l,this.leftRelative=u,this.scrollTop=d,this.scrollLeft=f,this.cellHeight=c,this.cellWidth=h}return(0,i.default)(e,[{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){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerHeight;return this.topRelative+e.offsetHeight<=t}},{key:"fitsOnRight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerWidth;return this.leftRelative+this.cellWidth+e.offsetWidth<=t}},{key:"fitsOnLeft",value:function(e){return this.leftRelative>=e.offsetWidth}}]),e}();t.default=l},function(e,t,n){},function(e,t,n){"use strict";var r=n(0);n(15),n(11),n(48),n(9),n(12),n(23),n(13),t.__esModule=!0,t.default=void 0;var o=r(n(18)),i=r(n(46)),a=r(n(1)),s=r(n(2)),l=r(n(6)),u=r(n(30)),c=r(n(5)),h=r(n(16)),d=r(n(7)),f=r(n(22)),v=r(n(45)),g=r(n(366)),p=n(3),m=n(19),y=n(8),w=n(20),C=r(n(558)),E=r(n(559)),S=r(n(560)),b=n(562),R=n(177);n(564),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=1e3,M=1e3,O=new WeakMap,k=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join(""),N=function(e){function t(e){var n;return(0,a.default)(this,t),(n=(0,l.default)(this,(0,c.default)(t).call(this,e))).columnsLimit=M,n.copyableRanges=[],n.focusableElement=void 0,n.pasteMode="overwrite",n.rowsLimit=T,n.uiContainer=n.hot.rootDocument.body,O.set((0,u.default)(n),{isTriggeredByCopy:!1,isTriggeredByCut:!1,isBeginEditing:!1,isFragmentSelectionEnabled:!1}),n}return(0,d.default)(t,e),(0,s.default)(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().copyPaste}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){var n=this.hot.getSettings(),r=n.copyPaste,o=n.fragmentSelection;O.get(this).isFragmentSelectionEnabled=!!o,"object"===(0,i.default)(r)&&(this.pasteMode=r.pasteMode||this.pasteMode,this.rowsLimit=isNaN(r.rowsLimit)?this.rowsLimit:r.rowsLimit,this.columnsLimit=isNaN(r.columnsLimit)?this.columnsLimit:r.columnsLimit,this.uiContainer=r.uiContainer||this.uiContainer),this.addHook("afterContextMenuDefaultOptions",(function(t){return e.onAfterContextMenuDefaultOptions(t)})),this.addHook("afterOnCellMouseUp",(function(){return e.onAfterOnCellMouseUp()})),this.addHook("afterSelectionEnd",(function(){return e.onAfterSelectionEnd()})),this.addHook("beforeKeyDown",(function(){return e.onBeforeKeyDown()})),this.focusableElement=(0,b.createElement)(this.uiContainer),this.focusableElement.addLocalHook("copy",(function(t){return e.onCopy(t)})).addLocalHook("cut",(function(t){return e.onCut(t)})).addLocalHook("paste",(function(t){return e.onPaste(t)})),(0,h.default)((0,c.default)(t.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.getOrCreateFocusableElement(),(0,h.default)((0,c.default)(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.focusableElement&&(0,b.destroyElement)(this.focusableElement),(0,h.default)((0,c.default)(t.prototype),"disablePlugin",this).call(this)}},{key:"copy",value:function(){O.get(this).isTriggeredByCopy=!0,this.getOrCreateFocusableElement(),this.focusableElement.focus(),this.hot.rootDocument.execCommand("copy")}},{key:"cut",value:function(){O.get(this).isTriggeredByCut=!0,this.getOrCreateFocusableElement(),this.focusableElement.focus(),this.hot.rootDocument.execCommand("cut")}},{key:"getRangedCopyableData",value:function(e){var t=this,n=[],r=[],o=[];return(0,p.arrayEach)(e,(function(e){(0,m.rangeEach)(e.startRow,e.endRow,(function(e){-1===r.indexOf(e)&&r.push(e)})),(0,m.rangeEach)(e.startCol,e.endCol,(function(e){-1===o.indexOf(e)&&o.push(e)}))})),(0,p.arrayEach)(r,(function(e){var r=[];(0,p.arrayEach)(o,(function(n){r.push(t.hot.getCopyableData(e,n))})),n.push(r)})),g.default.stringify(n)}},{key:"getRangedData",value:function(e){var t=this,n=[],r=[],o=[];return(0,p.arrayEach)(e,(function(e){(0,m.rangeEach)(e.startRow,e.endRow,(function(e){-1===r.indexOf(e)&&r.push(e)})),(0,m.rangeEach)(e.startCol,e.endCol,(function(e){-1===o.indexOf(e)&&o.push(e)}))})),(0,p.arrayEach)(r,(function(e){var r=[];(0,p.arrayEach)(o,(function(n){r.push(t.hot.getCopyableData(e,n))})),n.push(r)})),n}},{key:"paste",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(e||t){var n=new S.default;e&&n.clipboardData.setData("text/plain",e),t&&n.clipboardData.setData("text/html",t),this.getOrCreateFocusableElement(),this.onPaste(n)}}},{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){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.hot.getSelectedLast();if(e.length){for(var n=e.length-1,r=e[0].length-1,o=Math.min(t[0],t[2]),i=Math.max(t[0],t[2],n+o),a=Math.min(t[1],t[3]),s=Math.max(t[1],t[3],r+a),l=[],u=o,c=0;u<=i;u+=1){for(var h=[],d=a,f=0;d<=s;d+=1)h.push(e[c][f]),f=f===r?0:f+=1;l.push(h),c=c===n?0:c+=1}return this.hot.populateFromArray(o,a,l,void 0,void 0,"CopyPaste.paste",this.pasteMode),[o,a,i,s]}}},{key:"onCopy",value:function(e){var t=O.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",[k,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=O.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",[k,o].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",r);this.hot.emptySelectedCells("CopyPaste.cut"),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),i=(0,o.default)(r,4),a=i[0],s=i[1],l=i[2],u=i[3];this.hot.selectCell(a,s,Math.min(this.hot.countRows()-1,l),Math.min(this.hot.countCols()-1,u)),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=O.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)(t.prototype),"destroy",this).call(this)}}]),t}(f.default);(0,w.registerPlugin)("CopyPaste",N);var _=N;t.default=_},function(e,t,n){"use strict";var r=n(10);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||e.length>1},hidden:!1}};var o=r(n(14))},function(e,t,n){"use strict";var r=n(10);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||e.length>1},hidden:!1}};var o=r(n(14))},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(561));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(11),n(9),n(12),n(23),n(563),n(13),t.__esModule=!0,t.createElement=function(e){var t=new h(e),n=d.get(e);return n=isNaN(n)?0:n,d.set(e,n+1),t},t.deactivateElement=f,t.destroyElement=function(e){if(!(e instanceof h))return;var t=d.get(e.container);(t=isNaN(t)?0:t)>0&&(t-=1);if(f(e),t<=0){t=0;var n=p.get(e.container);n&&n.parentNode&&(n.parentNode.removeChild(n),p.delete(e.container)),e.mainElement=null}d.set(e.container,t)};var o=r(n(1)),i=r(n(2)),a=r(n(25)),s=r(n(49)),l=n(4),u=n(76),c=n(8),h=function(){function e(t){(0,o.default)(this,e),this.rootDocument=t.defaultView?t:t.ownerDocument,this.mainElement=null,this.eventManager=new a.default(this),this.listenersCount=new WeakSet,this.container=t}return(0,i.default)(e,[{key:"useSecondaryElement",value:function(){var e=function(e){var t=p.get(e);if(t)return t.parentElement||e.appendChild(t),t;var n=(e.defaultView?e:e.ownerDocument).createElement("textarea");return p.set(e,n),n.className="HandsontableCopyPaste",n.tabIndex=-1,n.autocomplete="off",n.wrap="hard",n.value=" ",e.appendChild(n),n}(this.container);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)}}]),e}();(0,l.mixin)(h,s.default);var d=new WeakMap;function f(e){e.eventManager.clear()}var v=function(e,t){return function(n){return t.runLocalHooks(e,n)}};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(134)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),n(209),!1,!0)},function(e,t,n){},function(e,t,n){"use strict";var r=n(10),o=n(0);n(15),n(11),n(34),n(40),n(386),n(65),n(9),n(12),n(13),t.__esModule=!0,t.default=void 0;var i=o(n(18)),a=o(n(1)),s=o(n(2)),l=o(n(6)),u=o(n(5)),c=o(n(16)),h=o(n(7)),d=o(n(22)),f=n(20),v=n(4),g=n(19),p=n(3),m=n(26),y=r(n(14)),w=n(566),C=n(96),E=n(380),S=function(e){function t(e){var n;return(0,a.default)(this,t),(n=(0,l.default)(this,(0,u.default)(t).call(this,e))).savedBorders=[],n.savedBordersById=new Map,n}return(0,h.default)(t,e),(0,s.default)(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().customBorders}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.addHook("afterContextMenuDefaultOptions",(function(t){return e.onAfterContextMenuDefaultOptions(t)})),this.addHook("init",(function(){return e.onAfterInit()})),(0,c.default)((0,u.default)(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){this.hideBorders(),this.render(),(0,c.default)((0,u.default)(t.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),(0,c.default)((0,u.default)(t.prototype),"updatePlugin",this).call(this)}},{key:"setBorders",value:function(e,t){var n=this,r=t?Object.keys(t):["top","right","bottom","left"],o=(0,E.detectSelectionType)(e),a=(0,E.normalizeSelectionFactory)(o);(0,p.arrayEach)(e,(function(e){for(var o=a(e),s=(0,i.default)(o,4),l=s[0],u=s[1],c=s[2],h=s[3],d=function(e){for(var o=function(o){(0,p.arrayEach)(r,(function(r){n.prepareBorderFromCustomAdded(e,o,t,r)}))},i=u;i<=h;i+=1)o(i)},f=l;f<=c;f+=1)d(f)})),this.render()}},{key:"render",value:function(){this.hot.view.render()}},{key:"getBorders",value:function(e){var t=this;if(!Array.isArray(e))return this.savedBorders;var n=(0,E.detectSelectionType)(e),r=(0,E.normalizeSelectionFactory)(n),o=[];return(0,p.arrayEach)(e,(function(e){for(var n=r(e),a=(0,i.default)(n,4),s=a[0],l=a[1],u=a[2],c=a[3],h=function(e){for(var n=function(n){(0,p.arrayEach)(t.savedBorders,(function(t){t.row===e&&t.col===n&&o.push(t)}))},r=l;r<=c;r+=1)n(r)},d=s;d<=u;d+=1)h(d)})),o}},{key:"clearBorders",value:function(e){var t=this;e?this.setBorders(e):((0,p.arrayEach)(this.savedBorders,(function(e){t.clearBordersFromSelectionSettings(e.id),t.hot.removeCellMeta(e.row,e.col,"borders")})),this.savedBorders.length=0,this.savedBordersById.clear()),this.render()}},{key:"insertBorderIntoSettings",value:function(e){var t=this.savedBordersById.get(e.id);if(t){var n=this.savedBorders.indexOf(t);this.savedBorders[n]=e}else this.savedBorders.push(e);this.savedBordersById.set(e.id,e);var r={row:e.row,col:e.col},o=new m.CellRange(r,r,r);this.checkCustomSelections(e,o)||this.hot.selection.highlight.addCustomSelection(e.id,{border:e,cellRange:o})}},{key:"prepareBorderFromCustomAdded",value:function(e,t,n,r){var o=(0,C.createEmptyBorders)(e,t);if(n){o=(0,C.extendDefaultBorder)(o,n);var i=this.hot.selection.highlight.customSelections.get(o.id);i&&(Object.assign(i.settings,n),o=i.settings)}this.hot.setCellMeta(e,t,"borders",o),this.insertBorderIntoSettings(o,r)}},{key:"prepareBorderFromCustomAddedRange",value:function(e){var t=this,n=e.range;(0,g.rangeEach)(n.from.row,n.to.row,(function(r){(0,g.rangeEach)(n.from.col,n.to.col,(function(o){var i=(0,C.createEmptyBorders)(r,o),a=0;r===n.from.row&&(0,v.hasOwnProperty)(e,"top")&&(a+=1,i.top=e.top),r===n.to.row&&(0,v.hasOwnProperty)(e,"bottom")&&(a+=1,i.bottom=e.bottom),o===n.from.col&&(0,v.hasOwnProperty)(e,"left")&&(a+=1,i.left=e.left),o===n.to.col&&(0,v.hasOwnProperty)(e,"right")&&(a+=1,i.right=e.right),a>0&&(t.hot.setCellMeta(r,o,"borders",i),t.insertBorderIntoSettings(i))}))}))}},{key:"removeAllBorders",value:function(e,t){var n=(0,C.createId)(e,t);this.spliceBorder(n),this.clearBordersFromSelectionSettings(n),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)(),this.areAllEdgesDisabled(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,n){var r=this;(0,p.arrayEach)(e,(function(e){var o=e.start,i=e.end;if(o.row===i.row&&o.col===i.col)"noBorders"===t?r.removeAllBorders(o.row,o.col):r.setBorder(o.row,o.col,t,n);else switch(t){case"noBorders":(0,g.rangeEach)(o.col,i.col,(function(e){(0,g.rangeEach)(o.row,i.row,(function(t){r.removeAllBorders(t,e)}))}));break;case"top":(0,g.rangeEach)(o.col,i.col,(function(e){r.setBorder(o.row,e,t,n)}));break;case"right":(0,g.rangeEach)(o.row,i.row,(function(e){r.setBorder(e,i.col,t,n)}));break;case"bottom":(0,g.rangeEach)(o.col,i.col,(function(e){r.setBorder(i.row,e,t,n)}));break;case"left":(0,g.rangeEach)(o.row,i.row,(function(e){r.setBorder(e,o.col,t,n)}))}}))}},{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:"areAllEdgesDisabled",value:function(e){return!this.isEdgeEnabled(e.left)&&(!this.isEdgeEnabled(e.right)&&(!this.isEdgeEnabled(e.top)&&!this.isEdgeEnabled(e.bottom)))}},{key:"isEdgeEnabled",value:function(e){return void 0===e||void 0===e.hide||!e.hide}},{key:"clearBordersFromSelectionSettings",value:function(e){var t=this.hot.selection.highlight.customSelections.get(e);t&&(t.clear(),this.hot.selection.highlight.customSelections.delete(t.settings.id))}},{key:"hideBorders",value:function(){var e=this;(0,p.arrayEach)(this.savedBorders,(function(t){e.clearBordersFromSelectionSettings(t.id)}))}},{key:"spliceBorder",value:function(e){var t=this.savedBordersById.get(e);if(t){var n=this.savedBorders.indexOf(t);this.savedBorders.splice(n,1),this.savedBordersById.delete(e)}}},{key:"checkCustomSelectionsFromContextMenu",value:function(e){return this.hot.selection.highlight.customSelections.has(e.id)}},{key:"checkCustomSelections",value:function(e,t){if(this.areAllEdgesDisabled(e))return this.removeAllBorders(e.row,e.col),!0;var n=this.hot.selection.highlight.customSelections.get(e.id);return!!n&&(n.cellRange=t,!0)}},{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,c.default)((0,u.default)(t.prototype),"destroy",this).call(this)}}]),t}(d.default);(0,f.registerPlugin)("customBorders",S);var b=S;t.default=b},function(e,t,n){"use strict";var r=n(0);t.__esModule=!0;var o=r(n(567));t.bottom=o.default;var i=r(n(568));t.left=i.default;var a=r(n(569));t.noBorders=a.default;var s=r(n(570));t.right=s.default;var l=r(n(571));t.top=l.default},function(e,t,n){"use strict";var r=n(10);t.__esModule=!0,t.default=function(e){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(t,n){var r=(0,i.checkSelectionBorders)(this,"bottom");e.prepareBorder(n,"bottom",r),e.render()}}};var o=r(n(14)),i=n(96)},function(e,t,n){"use strict";var r=n(10);t.__esModule=!0,t.default=function(e){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(t,n){var r=(0,i.checkSelectionBorders)(this,"left");e.prepareBorder(n,"left",r),e.render()}}};var o=r(n(14)),i=n(96)},function(e,t,n){"use strict";var r=n(10);t.__esModule=!0,t.default=function(e){return{key:"borders:no_borders",name:function(){return this.getTranslatedPhrase(o.CONTEXTMENU_ITEMS_REMOVE_BORDERS)},callback:function(t,n){e.prepareBorder(n,"noBorders"),e.render()},disabled:function(){return!(0,i.checkSelectionBorders)(this)}}};var o=r(n(14)),i=n(96)},function(e,t,n){"use strict";var r=n(10);t.__esModule=!0,t.default=function(e){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(t,n){var r=(0,i.checkSelectionBorders)(this,"right");e.prepareBorder(n,"right",r),e.render()}}};var o=r(n(14)),i=n(96)},function(e,t,n){"use strict";var r=n(10);t.__esModule=!0,t.default=function(e){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(t,n){var r=(0,i.checkSelectionBorders)(this,"top");e.prepareBorder(n,"top",r),e.render()}}};var o=r(n(14)),i=n(96)},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(6)),s=r(n(30)),l=r(n(5)),u=r(n(16)),c=r(n(7)),h=r(n(22)),d=r(n(25)),f=n(20),v=n(32),g=n(8),p=function(e){function t(e){var n;return(0,o.default)(this,t),(n=(0,a.default)(this,(0,l.default)(t).call(this,e))).eventManager=new d.default((0,s.default)(n)),n.boundaries=null,n.callback=null,n.listening=!1,n}return(0,c.default)(t,e),(0,i.default)(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().dragToScroll}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.addHook("afterOnCellMouseDown",(function(t){return e.setupListening(t)})),this.addHook("afterOnCellCornerMouseDown",(function(t){return e.setupListening(t)})),this.registerEvents(),(0,u.default)((0,l.default)(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),(0,u.default)((0,l.default)(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.unregisterEvents(),(0,u.default)((0,l.default)(t.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:"listen",value:function(){this.listening=!0}},{key:"unlisten",value:function(){this.listening=!1}},{key:"isListening",value:function(){return this.listening}},{key:"registerEvents",value:function(){for(var e=this,t=this.hot.rootWindow;t;)this.eventManager.addEventListener(t.document,"contextmenu",(function(){return e.unlisten()})),this.eventManager.addEventListener(t.document,"mouseup",(function(){return e.unlisten()})),this.eventManager.addEventListener(t.document,"mousemove",(function(t){return e.onMouseMove(t)})),t=(0,g.getParentWindow)(t)}},{key:"unregisterEvents",value:function(){this.eventManager.clear()}},{key:"setupListening",value:function(e){if(!(0,v.isRightClick)(e)){var t=this.hot.view.wt.wtTable.holder;t!==this.hot.rootWindow&&(this.setBoundaries(t.getBoundingClientRect()),this.setCallback((function(e,n){e<0?t.scrollLeft-=50:e>0&&(t.scrollLeft+=50),n<0?t.scrollTop-=20:n>0&&(t.scrollTop+=20)})),this.listen())}}},{key:"onMouseMove",value:function(e){this.isListening()&&this.check(e.clientX,e.clientY)}},{key:"destroy",value:function(){(0,u.default)((0,l.default)(t.prototype),"destroy",this).call(this)}}]),t}(h.default);(0,f.registerPlugin)("dragToScroll",p);var m=p;t.default=m},function(e,t,n){"use strict";var r=n(0);n(11),n(9),n(12),n(23),n(13),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(6)),s=r(n(30)),l=r(n(5)),u=r(n(16)),c=r(n(7)),h=r(n(22)),d=n(20),f=r(n(574)),v=r(n(575));n(576);var g=new WeakMap,p=function(e){function t(e){var n;return(0,o.default)(this,t),n=(0,a.default)(this,(0,l.default)(t).call(this,e)),g.set((0,s.default)(n),{afterFirstUse:!1}),n}return(0,c.default)(t,e),(0,i.default)(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().manualColumnFreeze}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.addHook("afterContextMenuDefaultOptions",(function(t){return e.addContextMenuEntry(t)})),this.addHook("beforeColumnMove",(function(t,n){return e.onBeforeColumnMove(t,n)})),(0,u.default)((0,l.default)(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){g.get(this).afterFirstUse=!1,(0,u.default)((0,l.default)(t.prototype),"disablePlugin",this).call(this)}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),(0,u.default)((0,l.default)(t.prototype),"updatePlugin",this).call(this)}},{key:"freezeColumn",value:function(e){var t=g.get(this),n=this.hot.getSettings();t.afterFirstUse||(t.afterFirstUse=!0),n.fixedColumnsLeft===this.hot.countCols()||e<=n.fixedColumnsLeft-1||(this.hot.columnIndexMapper.moveIndexes(e,n.fixedColumnsLeft),n.fixedColumnsLeft+=1)}},{key:"unfreezeColumn",value:function(e){var t=g.get(this),n=this.hot.getSettings();t.afterFirstUse||(t.afterFirstUse=!0),n.fixedColumnsLeft<=0||e>n.fixedColumnsLeft-1||(n.fixedColumnsLeft-=1,this.hot.columnIndexMapper.moveIndexes(e,n.fixedColumnsLeft))}},{key:"addContextMenuEntry",value:function(e){e.items.push({name:"---------"},(0,f.default)(this),(0,v.default)(this))}},{key:"onBeforeColumnMove",value:function(e,t){if(g.get(this).afterFirstUse){var n=this.hot.getSettings().fixedColumnsLeft;if(t<n)return!1;if(e.some((function(e){return e<n})))return!1}}}]),t}(h.default);(0,d.registerPlugin)("manualColumnFreeze",p);var m=p;t.default=m},function(e,t,n){"use strict";var r=n(10),o=n(0);t.__esModule=!0,t.default=function(e){return{key:"freeze_column",name:function(){return this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_FREEZE_COLUMN)},callback:function(t,n){var r=(0,i.default)(n,1)[0].start.col;e.freezeColumn(r),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},hidden:function(){var e=this.getSelectedRange(),t=!1;return void 0===e?t=!0:e.length>1?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(14))},function(e,t,n){"use strict";var r=n(10),o=n(0);t.__esModule=!0,t.default=function(e){return{key:"unfreeze_column",name:function(){return this.getTranslatedPhrase(a.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN)},callback:function(t,n){var r=(0,i.default)(n,1)[0].start.col;e.unfreezeColumn(r),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},hidden:function(){var e=this.getSelectedRange(),t=!1;return void 0===e?t=!0:e.length>1?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(14))},function(e,t,n){},function(e,t,n){"use strict";var r=n(0);n(15),n(11),n(9),n(12),n(23),n(13),n(36),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(6)),s=r(n(30)),l=r(n(5)),u=r(n(16)),c=r(n(7)),h=r(n(22)),d=r(n(45)),f=n(3),v=n(8),g=n(19),p=r(n(25)),m=n(20),y=r(n(578)),w=r(n(579));n(580),d.default.getSingleton().register("beforeColumnMove"),d.default.getSingleton().register("afterColumnMove");var C=new WeakMap,E=function(e){function t(e){var n;return(0,o.default)(this,t),n=(0,a.default)(this,(0,l.default)(t).call(this,e)),C.set((0,s.default)(n),{columnsToMove:[],countCols:0,fixedColumns:0,pressed:void 0,target:{eventPageX:void 0,coords:void 0,TD:void 0,col:void 0},cachedDropIndex:void 0}),n.eventManager=new p.default((0,s.default)(n)),n.backlight=new y.default(e),n.guideline=new w.default(e),n}return(0,c.default)(t,e),(0,i.default)(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().manualColumnMove}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(t,n,r,o){return e.onBeforeOnCellMouseDown(t,n,r,o)})),this.addHook("beforeOnCellMouseOver",(function(t,n,r,o){return e.onBeforeOnCellMouseOver(t,n,r,o)})),this.addHook("afterScrollVertically",(function(){return e.onAfterScrollVertically()})),this.addHook("afterLoadData",(function(){return e.onAfterLoadData()})),this.buildPluginUI(),this.registerEvents(),(0,v.addClass)(this.hot.rootElement,"ht__manualColumnMove"),(0,u.default)((0,l.default)(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),(0,u.default)((0,l.default)(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){(0,v.removeClass)(this.hot.rootElement,"ht__manualColumnMove"),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),(0,u.default)((0,l.default)(t.prototype),"disablePlugin",this).call(this)}},{key:"moveColumn",value:function(e,t){return this.moveColumns([e],t)}},{key:"moveColumns",value:function(e,t){var n=C.get(this),r=n.cachedDropIndex,o=this.isMovePossible(e,t),i=this.hot.runHooks("beforeColumnMove",e,t,r,o);if(n.cachedDropIndex=void 0,!1!==i){o&&this.hot.columnIndexMapper.moveIndexes(e,t);var a=o&&this.isColumnOrderChanged(e,t);return this.hot.runHooks("afterColumnMove",e,t,r,o,a),a}}},{key:"dragColumn",value:function(e,t){return this.dragColumns([e],t)}},{key:"dragColumns",value:function(e,t){var n=this.countFinalIndex(e,t);return C.get(this).cachedDropIndex=t,this.moveColumns(e,n)}},{key:"isMovePossible",value:function(e,t){var n=this.hot.columnIndexMapper.getNotSkippedIndexesLength(),r=e.length+t>n,o=t<0,i=e.some((function(e){return e<0})),a=e.some((function(e){return e>=n}));return!(r||o||i||a)}},{key:"isColumnOrderChanged",value:function(e,t){return e.some((function(e,n){return e-n!==t}))}},{key:"countFinalIndex",value:function(e,t){var n=(0,f.arrayReduce)(e,(function(e,n){return n<t&&(e+=1),e}),0);return t-n}},{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:"moveBySettingsOrLoad",value:function(){var e=this.hot.getSettings().manualColumnMove;if(Array.isArray(e))this.moveColumns(e,0);else if(void 0!==e){var t=this.persistentStateLoad();t.length&&this.moveColumns(t,0)}}},{key:"isFixedColumnsLeft",value:function(e){return e<this.hot.getSettings().fixedColumnsLeft}},{key:"persistentStateSave",value:function(){this.hot.runHooks("persistentStateSave","manualColumnMove",this.hot.columnIndexMapper.getIndexesSequence())}},{key:"persistentStateLoad",value:function(){var e={};return this.hot.runHooks("persistentStateLoad","manualColumnMove",e),e.value?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=C.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.coords),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.coords<e.countCols&&(e.coords+=1),e.hasRowHeaders&&(d=this.hot.view.wt.wtOverlays.leftOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsLeft(e.coords)&&(a+=i),a+=d,e.coords<0)e.fixedColumns>0?e.target.col=0:e.target.col=t>0?t-1:t;else if(e.target.TD.offsetWidth/2+a<=s){var f=e.coords>=e.countCols?e.countCols-1:e.coords;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.coords,e.target.col<=t&&e.target.col>=e.fixedColumns&&t>0&&this.hot.scrollViewportTo(void 0,t-1);e.target.col<=t&&e.target.col>=e.fixedColumns&&t>0&&this.hot.scrollViewportTo(void 0,t-1);var v=s,g=a;s+h+c>=l?v=l-h-c:s+c<u+d&&(v=u+d+Math.abs(c)),a>=l-1?g=l-1:0===g?g=1:void 0!==o.scrollX&&e.coords<e.fixedColumns&&(g-=e.rootElementOffset<=o.scrollX?e.rootElementOffset:0),this.backlight.setPosition(null,v),this.guideline.setPosition(null,g)}},{key:"registerEvents",value:function(){var e=this,t=this.hot.rootDocument.documentElement;this.eventManager.addEventListener(t,"mousemove",(function(t){return e.onMouseMove(t)})),this.eventManager.addEventListener(t,"mouseup",(function(){return e.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=C.get(this),l=(0,v.hasClass)(e.realTarget,"sortAction");if(!a||!i||s.pressed||0!==e.button||l)return s.pressed=!1,s.columnsToMove.length=0,void(0,v.removeClass)(this.hot.rootElement,["on-moving--columns","show-ui"]);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),g=Math.max(h.col,d.col);if(t.row<0&&t.col>=f&&t.col<=g){r.column=!0,s.pressed=!0,s.target.eventPageX=e.pageX,s.coords=t.col,s.target.TD=n,s.target.col=t.col,s.columnsToMove=this.prepareColumnsToMoving(f,g),s.hasRowHeaders=!!this.hot.getSettings().rowHeaders,s.countCols=this.hot.countCols(),s.fixedColumns=this.hot.getSettings().fixedColumnsLeft,s.rootElementOffset=(0,v.offset)(this.hot.rootElement).left;var p=s.hasRowHeaders?-1:0,m=o.holder.scrollTop+o.getColumnHeaderHeight(0)+1,y=t.col<s.fixedColumns,w=this.hot.view.wt.wtOverlays.scrollableElement,E=w.scrollX?w.scrollX-s.rootElementOffset:0,S=e.layerX-(y?E:0),b=Math.abs(this.getColumnsWidth(f,t.col)+S);this.backlight.setPosition(m,this.getColumnsWidth(p,f)+b),this.backlight.setSize(this.getColumnsWidth(f,g+1),o.hider.offsetHeight-m),this.backlight.setOffset(null,-1*b),(0,v.addClass)(this.hot.rootElement,"on-moving--columns")}else(0,v.removeClass)(this.hot.rootElement,"after-selection--columns"),s.pressed=!1,s.columnsToMove.length=0}},{key:"onMouseMove",value:function(e){var t=C.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=C.get(this);o&&i.pressed&&(i.columnsToMove.indexOf(t.col)>-1?(0,v.removeClass)(this.hot.rootElement,"show-ui"):(0,v.addClass)(this.hot.rootElement,"show-ui"),r.row=!0,r.column=!0,r.cell=!0,i.coords=t.col,i.target.TD=n)}},{key:"onMouseUp",value:function(){var e=C.get(this),t=e.target.col,n=e.columnsToMove.length;if(e.coords=void 0,e.pressed=!1,e.backlightWidth=0,(0,v.removeClass)(this.hot.rootElement,["on-moving--columns","show-ui","after-selection--columns"]),this.hot.selection.isSelectedByColumnHeader()&&(0,v.addClass)(this.hot.rootElement,"after-selection--columns"),!(n<1||void 0===t)){var r=e.columnsToMove[0],o=this.hot.toPhysicalColumn(r),i=this.dragColumns(e.columnsToMove,t);if(e.columnsToMove.length=0,!0===i){this.persistentStateSave(),this.hot.render(),this.hot.view.wt.wtOverlays.adjustElementsSize(!0);var a=this.hot.toVisualColumn(o),s=a+n-1;this.hot.selectColumns(a,s)}}}},{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:"buildPluginUI",value:function(){this.backlight.build(),this.guideline.build()}},{key:"onAfterLoadData",value:function(){this.moveBySettingsOrLoad()}},{key:"destroy",value:function(){this.backlight.destroy(),this.guideline.destroy(),(0,u.default)((0,l.default)(t.prototype),"destroy",this).call(this)}}]),t}(h.default);(0,m.registerPlugin)("ManualColumnMove",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(1)),i=r(n(2)),a=r(n(6)),s=r(n(5)),l=r(n(16)),u=r(n(7)),c=r(n(391)),h=n(8),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(6)),s=r(n(5)),l=r(n(16)),u=r(n(7)),c=r(n(391)),h=n(8),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(11),n(9),n(12),n(23),n(57),n(13),n(36),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(6)),s=r(n(30)),l=r(n(5)),u=r(n(16)),c=r(n(7)),h=r(n(22)),d=n(8),f=r(n(25)),v=n(32),g=n(3),p=n(19),m=n(20),y=n(73),w=new WeakMap,C=function(e){function t(e){var n;(0,o.default)(this,t);var r=(n=(0,a.default)(this,(0,l.default)(t).call(this,e))).hot.rootDocument;return n.currentTH=null,n.currentCol=null,n.selectedCols=[],n.currentWidth=null,n.newSize=null,n.startY=null,n.startWidth=null,n.startOffset=null,n.handle=r.createElement("DIV"),n.guide=r.createElement("DIV"),n.eventManager=new f.default((0,s.default)(n)),n.pressed=null,n.dblclick=0,n.autoresizeTimeout=null,n.columnWidthsMap=void 0,w.set((0,s.default)(n),{config:void 0}),(0,d.addClass)(n.handle,"manualColumnResizer"),(0,d.addClass)(n.guide,"manualColumnResizerGuide"),n}return(0,c.default)(t,e),(0,i.default)(t,[{key:"isEnabled",value:function(){return this.hot.getSettings().manualColumnResize}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.columnWidthsMap=new y.PhysicalIndexToValueMap,this.columnWidthsMap.addLocalHook("init",(function(){return e.onMapInit()})),this.hot.columnIndexMapper.registerMap("manualColumnResize",this.columnWidthsMap),this.addHook("modifyColWidth",(function(t,n){return e.onModifyColWidth(t,n)})),this.addHook("beforeStretchingColumnWidth",(function(t,n){return e.onBeforeStretchingColumnWidth(t,n)})),this.addHook("beforeColumnResize",(function(t,n,r){return e.onBeforeColumnResize(t,n,r)})),this.bindEvents(),(0,u.default)((0,l.default)(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),(0,u.default)((0,l.default)(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){w.get(this).config=this.columnWidthsMap.getValues(),this.hot.columnIndexMapper.unregisterMap("manualColumnResize"),(0,u.default)((0,l.default)(t.prototype),"disablePlugin",this).call(this)}},{key:"saveManualColumnWidths",value:function(){this.hot.runHooks("persistentStateSave","manualColumnWidths",this.columnWidthsMap.getValues())}},{key:"loadManualColumnWidths",value:function(){var e={};return this.hot.runHooks("persistentStateLoad","manualColumnWidths",e),e.value}},{key:"setManualSize",value:function(e,t){var n=Math.max(t,20),r=this.hot.toPhysicalColumn(e);return this.columnWidthsMap.setValueAtIndex(r,n),n}},{key:"clearManualSize",value:function(e){var t=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(t,null)}},{key:"onMapInit",value:function(){var e=this,t=w.get(this),n=this.hot.getSettings().manualColumnResize,r=this.loadManualColumnWidths();void 0!==r?this.hot.executeBatchOperations((function(){r.forEach((function(t,n){e.columnWidthsMap.setValueAtIndex(n,t)}))})):Array.isArray(n)?(this.hot.executeBatchOperations((function(){n.forEach((function(t,n){e.columnWidthsMap.setValueAtIndex(n,t)}))})),t.config=n):!0===n&&Array.isArray(t.config)&&this.hot.executeBatchOperations((function(){t.config.forEach((function(t,n){e.columnWidthsMap.setValueAtIndex(n,t)}))}))}},{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,d.outerHeight)(this.currentTH);if(r>=0){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,f=c.col,v=h.col;f>=v&&(f=h.col,v=c.col),this.currentCol>=f&&this.currentCol<=v?(0,p.rangeEach)(f,v,(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,d.outerHeight)(this.handle),10),t=parseInt(this.handle.style.top,10)+e,n=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);(0,d.addClass)(this.handle,"active"),(0,d.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,d.removeClass)(this.handle,"active"),(0,d.removeClass)(this.guide,"active")}},{key:"checkIfColumnHeader",value:function(e){if(e!==this.hot.rootElement){var t=e.parentNode;return"THEAD"===t.tagName||this.checkIfColumnHeader(t)}return!1}},{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(){var e=this,t=function(){e.hot.forceFullRender=!0,e.hot.view.render(),e.hot.view.wt.wtOverlays.adjustElementsSize(!0)},n=function(n,r){var o=e.hot.runHooks("beforeColumnResize",e.newSize,n,!0);void 0!==o&&(e.newSize=o),"all"===e.hot.getSettings().stretchH?e.clearManualSize(n):e.setManualSize(n,e.newSize),e.saveManualColumnWidths(),e.hot.runHooks("afterColumnResize",e.newSize,n,!0),r&&t()};this.dblclick>=2&&(this.selectedCols.length>1?((0,g.arrayEach)(this.selectedCols,(function(e){n(e)})),t()):(0,g.arrayEach)(this.selectedCols,(function(e){n(e,!0)})));this.dblclick=0,this.autoresizeTimeout=null}},{key:"onMouseDown",value:function(e){var t=this;(0,d.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,v.pageX)(e),this.newSize=this.startWidth)}},{key:"onMouseMove",value:function(e){var t=this;this.pressed&&(this.currentWidth=this.startWidth+((0,v.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(){var e=this,t=function(){e.hot.forceFullRender=!0,e.hot.view.render(),e.hot.view.wt.wtOverlays.adjustElementsSize(!0)},n=function(n,r){e.hot.runHooks("beforeColumnResize",e.newSize,n,!1),r&&t(),e.saveManualColumnWidths(),e.hot.runHooks("afterColumnResize",e.newSize,n,!1)};if(this.pressed){if(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startWidth)this.selectedCols.length>1?((0,g.arrayEach)(this.selectedCols,(function(e){n(e)})),t()):(0,g.arrayEach)(this.selectedCols,(function(e){n(e,!0)}));this.setupHandlePosition(this.currentTH)}}},{key:"bindEvents",value:function(){var e=this,t=this.hot,n=t.rootWindow,r=t.rootElement;this.eventManager.addEventListener(r,"mouseover",(function(t){return e.onMouseOver(t)})),this.eventManager.addEventListener(r,"mousedown",(function(t){return e.onMouseDown(t)})),this.eventManager.addEventListener(n,"mousemove",(function(t){return e.onMouseMove(t)})),this.eventManager.addEventListener(n,"mouseup",(function(){return e.onMouseUp()}))}},{key:"onModifyColWidth",value:function(e,t){var n=e;if(this.enabled){var r=this.hot.toPhysicalColumn(t),o=this.columnWidthsMap.getValueAtIndex(r);this.hot.getSettings().manualColumnResize&&o&&(n=o)}return n}},{key:"onBeforeStretchingColumnWidth",value:function(e,t){var n=this.columnWidthsMap.getValueAtIndex(t);return null===n&&(n=e),n}},{key:"onBeforeColumnResize",value:function(){this.hot.view.wt.wtViewport.hasOversizedColumnHeadersMarked={}}},{key:"destroy",value:function(){this.hot.columnIndexMapper.unregisterMap("manualColumnResize"),(0,u.default)((0,l.default)(t.prototype),"destroy",this).call(this)}}]),t}(h.default);(0,m.registerPlugin)("manualColumnResize",C);var E=C;t.default=E},function(e,t,n){"use strict";var r=n(0);n(15),n(11),n(9),n(12),n(23),n(13),n(36),t.__esModule=!0,t.default=void 0;var o=r(n(1)),i=r(n(2)),a=r(n(6)),s=r(n(30)),l=r(n(5)),u=r(n(16)),c=r(n(7)),h=r(n(22)),d=r(n(45)),f=n(3),v=n(8),g=n(19),p=r(n(25)),m=n(20),y=r(n(583)),w=r(n(584));n(585),d.default.getSingleton().register("beforeRowMove"),d.default.getSingleton().register("afterRowMove");var C=new WeakMap,E=function(e){function t(e){var n;return(0,o.default)(this,t),n=(0,a.default)(this,(0,l.default)(t).call(this,e)),C.set((0,s.default)(n),{rowsToMove:[],pressed:void 0,target:{eventPageY:void 0,coords:void 0,TD:void 0,row:void 0},cachedDropIndex:void 0}),n.eventManager=new p.default((0,s.default)(n)),n.backlight=new y.default(e),n.guideline=new w.default(e),n}return(0,c.default)(t,e),(0,i.default)(t,[{key:"isEnabled",value:function(){return!!this.hot.getSettings().manualRowMove}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(t,n,r,o){return e.onBeforeOnCellMouseDown(t,n,r,o)})),this.addHook("beforeOnCellMouseOver",(function(t,n,r,o){return e.onBeforeOnCellMouseOver(t,n,r,o)})),this.addHook("afterScrollHorizontally",(function(){return e.onAfterScrollHorizontally()})),this.addHook("afterLoadData",(function(){return e.onAfterLoadData()})),this.buildPluginUI(),this.registerEvents(),(0,v.addClass)(this.hot.rootElement,"ht__manualRowMove"),(0,u.default)((0,l.default)(t.prototype),"enablePlugin",this).call(this))}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),(0,u.default)((0,l.default)(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){(0,v.removeClass)(this.hot.rootElement,"ht__manualRowMove"),this.unregisterEvents(),this.backlight.destroy(),this.guideline.destroy(),(0,u.default)((0,l.default)(t.prototype),"disablePlugin",this).call(this)}},{key:"moveRow",value:function(e,t){return this.moveRows([e],t)}},{key:"moveRows",value:function(e,t){var n=C.get(this),r=n.cachedDropIndex,o=this.isMovePossible(e,t),i=this.hot.runHooks("beforeRowMove",e,t,r,o);if(n.cachedDropIndex=void 0,!1!==i){o&&this.hot.rowIndexMapper.moveIndexes(e,t);var a=o&&this.isRowOrderChanged(e,t);return this.hot.runHooks("afterRowMove",e,t,r,o,a),a}}},{key:"dragRow",value:function(e,t){return this.dragRows([e],t)}},{key:"dragRows",value:function(e,t){var n=this.countFinalIndex(e,t);return C.get(this).cachedDropIndex=t,this.moveRows(e,n)}},{key:"isMovePossible",value:function(e,t){var n=this.hot.rowIndexMapper.getNotSkippedIndexesLength(),r=e.length+t>n,o=t<0,i=e.some((function(e){return e<0})),a=e.some((function(e){return e>=n}));return!(r||o||i||a)}},{key:"isRowOrderChanged",value:function(e,t){return e.some((function(e,n){return e-n!==t}))}},{key:"countFinalIndex",value:function(e,t){var n=(0,f.arrayReduce)(e,(function(e,n){return n<t&&(e+=1),e}),0);return t-n}},{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:"moveBySettingsOrLoad",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.hot.rowIndexMapper.getIndexesSequence())}},{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=C.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&&n>0&&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,v.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,g=this.backlight.getSize().height;this.isFixedRowTop(t.row)&&(u+=a.holder.scrollTop),t.row<0?e.target.row=n>0?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 p=c,m=u;c+g+f>=h?p=h-g-f:c+f<d&&(p=d+Math.abs(f)),u>=h-1&&(m=h-1);var y=0;this.hot.view.wt.wtOverlays.topOverlay&&(y=this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.TABLE.offsetHeight),t.row>=o&&m-a.holder.scrollTop<y&&this.hot.scrollViewportTo(t.row),this.backlight.setPosition(p),this.guideline.setPosition(m)}},{key:"registerEvents",value:function(){var e=this,t=this.hot.rootDocument.documentElement;this.eventManager.addEventListener(t,"mousemove",(function(t){return e.onMouseMove(t)})),this.eventManager.addEventListener(t,"mouseup",(function(){return e.onMouseUp()}))}},{key:"unregisterEvents",value:function(){this.eventManager.clear()}},{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=C.get(this);if(!l||!s||u.pressed||0!==e.button)return u.pressed=!1,u.rowsToMove.length=0,void(0,v.removeClass)(this.hot.rootElement,["on-moving--rows","show-ui"]);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,g=Math.min(d.row,f.row),p=Math.max(d.row,f.row);if(t.col<0&&t.row>=g&&t.row<=p){r.row=!0,u.pressed=!0,u.target.eventPageY=e.pageY,u.target.coords=t,u.target.TD=n,u.rowsToMove=this.prepareRowsToMoving();var m=i.holder.scrollLeft+a.getRowHeaderWidth();this.backlight.setPosition(null,m),this.backlight.setSize(i.hider.offsetWidth-m,this.getRowsHeight(g,p+1)),this.backlight.setOffset(-1*(this.getRowsHeight(g,t.row)+e.layerY),null),(0,v.addClass)(this.hot.rootElement,"on-moving--rows"),this.refreshPositions()}else(0,v.removeClass)(this.hot.rootElement,"after-selection--rows"),u.pressed=!1,u.rowsToMove.length=0}},{key:"onMouseMove",value:function(e){var t=C.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=C.get(this);o&&i.pressed&&(i.rowsToMove.indexOf(t.row)>-1?(0,v.removeClass)(this.hot.rootElement,"show-ui"):(0,v.addClass)(this.hot.rootElement,"show-ui"),r.row=!0,r.column=!0,r.cell=!0,i.target.coords=t,i.target.TD=n)}},{key:"onMouseUp",value:function(){var e=C.get(this),t=e.target.row,n=e.rowsToMove.length;if(e.pressed=!1,e.backlightHeight=0,(0,v.removeClass)(this.hot.rootElement,["on-moving--rows","show-ui","after-selection--rows"]),this.hot.selection.isSelectedByRowHeader()&&(0,v.addClass)(this.hot.rootElement,"after-selection--rows"),!(n<1||void 0===t)){var r=e.rowsToMove[0],o=this.hot.toPhysicalRow(r),i=this.dragRows(e.rowsToMove,t);if(e.rowsToMove.length=0,!0===i){this.persistentStateSave(),this.hot.render(),this.hot.view.wt.wtOverlays.adjustElementsSize(!0);var a=this.hot.toVisualRow(o),s=a+n-1;this.hot.selectRows(a,s)}}}},{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:"buildPluginUI",value:function(){this.backlight.build(),this.guideline.build()}},{key:"onAfterLoadData",value:function(){this.moveBySettingsOrLoad()}},{key:"destroy",value:function(){this.backlight.destroy(),this.guideline.destroy(),(0,u.default)((0,l.default)(t.prototype),"destroy",this).call(this)}}]),t}(h.default);(0,m.registerPlugin)("ManualRowMove",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(1)),i=r(n(2)),a=r(n(6)),s=r(n(5)),l=r(n(16)),u=r(n(7)),c=r(n(392)),h=n(8),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(6)),s=r(n(5)),l=r(n(16)),u=r(n(7)),c=r(n(392)),h=n(8),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(17),n(41),n(27),n(11),n(34),n(9),n(35),n(12),n(23),n(13),t.__esModule=!0,t.default=void 0;var o=r(n(18)),i=r(n(33)),a=r(n(1)),s=r(n(2)),l=r(n(6)),u=r(n(30)),c=r(n(5)),h=r(n(16)),d=r(n(7)),f=r(n(22)),v=r(n(45)),g=n(20),p=n(32),m=n(26),y=r(n(587)),w=r(n(185)),C=r(n(588)),E=r(n(589)),S=r(n(590)),b=n(3),R=n(4),T=n(58),M=n(19),O=n(393);n(591),v.default.getSingleton().register("beforeMergeCells"),v.default.getSingleton().register("afterMergeCells"),v.default.getSingleton().register("beforeUnmergeCells"),v.default.getSingleton().register("afterUnmergeCells");var k=new WeakMap,N=function(e){function t(e){var n;return(0,a.default)(this,t),n=(0,l.default)(this,(0,c.default)(t).call(this,e)),k.set((0,u.default)(n),{lastDesiredCoords:null}),n.mergedCellsCollection=null,n.autofillCalculations=null,n.selectionCalculations=null,n}return(0,d.default)(t,e),(0,s.default)(t,[{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,argum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment